Table of Contents

Class TeleportToWaypointAction

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

ECA action that moves a player character to a specific waypoint — a town-portal item, a quest hand-in that returns the player to camp, a dungeon exit. Server only.

[Serializable]
public class TeleportToWaypointAction : BaseAction, IAction, IAbortableAction
Inheritance
TeleportToWaypointAction
Implements
Inherited Members

Remarks

Goes through TryTravel(IPlayerCharacter, IWaypoint, in WaypointTravelOptions, out WaypointTravelRefusalReason), the same routine the map's fast-travel request uses, so the rules are the same; the options below let a designer relax the two that are policy rather than physics (discovery, combat). The waypoint's own travel conditions are a third: an item that bypasses a level gate is a legitimate thing to author.

Same-scene only for now. The waypoint is resolved in the character's own scene instance; a SceneName naming another scene is refused with a warning until the world-map transfer lands.

Fields

AllowInCombat

[Tooltip("Permit the move while the character is in combat. Off unless the item or event is meant as an escape.")]
public bool AllowInCombat

Field Value

bool

EvaluateTravelConditions

[Tooltip("Refuse unless the waypoint's own travel conditions pass.")]
public bool EvaluateTravelConditions

Field Value

bool

RequireUnlocked

[Tooltip("Refuse unless the character has discovered the waypoint.")]
public bool RequireUnlocked

Field Value

bool

SceneName

[Tooltip("The scene the waypoint stands in. Leave empty for the character's current scene.")]
public string SceneName

Field Value

string

WaypointIndex

[Tooltip("The waypoint's authored index within that scene.")]
public int WaypointIndex

Field Value

int

Methods

Execute(ICharacter, EventData)

Executes the action. Must be implemented by derived classes.

public override void Execute(ICharacter initiator, EventData eventData)

Parameters

initiator ICharacter

The character initiating the action.

eventData EventData

Event data for the action.

GetTooltipContribution()

Returns a short, designer-facing tooltip line describing this action's effect, or null when the action has nothing to contribute. Override on actions that produce a player-visible outcome (damage, heal, buff apply, knockback, etc.) so ability tooltips can list effects without designer authoring text twice.

public override string GetTooltipContribution()

Returns

string

Remarks

The base implementation returns null. Aggregators (BaseAbilityTemplate) skip null/whitespace contributions, so most actions need not override.

TryExecute(ICharacter, EventData)

Attempts to perform the action. Returns false to signal that the action could not be performed (e.g. preconditions failed) so callers can short-circuit chains.

public bool TryExecute(ICharacter initiator, EventData eventData)

Parameters

initiator ICharacter

The character initiating the action.

eventData EventData

Event data for the action.

Returns

bool

True on success; false when the action could not be performed.