Table of Contents

Class ExploreMapAction

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

ECA action that explores part of the world map without the character having walked it. Client-only: suppressed on the server and during prediction reconciliation.

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

Remarks

This is the hook for map consumables, exploration rewards and discovery triggers — anything that hands the player ground they have not covered on foot. Put it on an item's use event to make a map scroll, on a region's enter event to open up the valley the player has just looked out over, or on a quest completion to fill in the region it sent them through.

Exploration is client-side data. It lives in the player's own explored-map files, not in the database, so this action is the whole delivery mechanism: it raises an event on the owning client and the map subsystem there applies it. Nothing is sent to the server and there is nothing for the server to validate — which also means it is only as trustworthy as the client, and is therefore fine for revealing a map and wrong for anything a player could gain by lying about.

The area is taken from the character's own position, so the same asset works wherever it is used. Content that needs to name a fixed place instead should call ClientMapSystem.ExploreArea or ExploreChunk directly from a client script.

Fields

EntireScene

Explores the whole scene instead of a radius.

[Tooltip("Explore the entire scene, ignoring the radius. For a map that hands over a whole zone.")]
public bool EntireScene

Field Value

bool

Radius

How far around the character to explore, in world metres.

[Tooltip("How far around the character to explore, in world metres.")]
public float Radius

Field Value

float

Remarks

Rounded outwards to whole chunks when it lands, because a chunk is the smallest piece of ground the map can describe. A radius smaller than one chunk therefore still explores the chunk the character is standing in, which is what "reveals your surroundings" should do in the tightest scene as much as the widest.

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.

Events

OnExploreMap

Raised on the owning client when map exploration should be granted. The payload is the world-space centre and the radius in metres. Subscribe in a MonoBehaviour to apply.

public static event Action<Vector3, float> OnExploreMap

Event Type

Action<Vector3, float>