Table of Contents

Interface ITradeSystem

Namespace
FishMMO.Server.Core.World.SceneServer
Assembly
FishMMO.Server.dll

Engine-agnostic public API of the player-to-player trade system.

public interface ITradeSystem : IServerBehaviour, IServerComponent

Remarks

Other systems only ever need to ask one thing of it: whether a character is mid-trade, so a teleport, a scene hand-off or an instance return can close the session before it moves the character. Everything else — invitations, offers, acceptance, the atomic exchange — is driven by client broadcasts and the system's own range tick.

Properties

MaxTradeDistance

The range, in metres, beyond which an open trade is closed by the server.

float MaxTradeDistance { get; }

Property Value

float

Methods

CloseTradeFor(IPlayerCharacter, TradeCloseReason)

Closes whatever trade the character is in, telling both parties why.

bool CloseTradeFor(IPlayerCharacter character, TradeCloseReason reason)

Parameters

character IPlayerCharacter
reason TradeCloseReason

Returns

bool

True when a session was closed.

IsTrading(long)

True while the character has a trade window open with someone.

bool IsTrading(long characterID)

Parameters

characterID long

Returns

bool