Table of Contents

Class MapRelationshipTracker

Namespace
FishMMO.Client
Assembly
FishMMO.Client.dll

Keeps track of which character IDs are in the local player's party and guild, and answers what the local player's relationship to another character is.

public static class MapRelationshipTracker
Inheritance
MapRelationshipTracker
Inherited Members

Remarks

Why a tracker and not a lookup. Neither IPartyController nor IGuildController exposes its membership: both are event streams, and every panel that needs the roster builds its own copy from the broadcasts. The map needs the same answer several times a second for every marker in view, so it keeps two hash sets fed by those same events rather than asking a panel that may not be open.

Why it is not read off the other character. The obvious implementation — read the other character's own PartyController.ID and compare — does not work and would fail quietly. Those controllers are filled from broadcasts sent to their owner, so on this client every remote character's party ID is zero. Comparing zeros would put every stranger in the player's party.

Properties

GuildMembers

Character IDs currently in the local player's guild. Do not mutate.

public static IReadOnlyCollection<long> GuildMembers { get; }

Property Value

IReadOnlyCollection<long>

PartyMembers

Character IDs currently in the local player's party. Do not mutate.

public static IReadOnlyCollection<long> PartyMembers { get; }

Property Value

IReadOnlyCollection<long>

Methods

Resolve(IPlayerCharacter, ICharacter)

Works out how the local player stands towards another character.

public static MapRelationship Resolve(IPlayerCharacter local, ICharacter other)

Parameters

local IPlayerCharacter

The local player character.

other ICharacter

The character being classified. May be null.

Returns

MapRelationship

The relationship, most trusted match first.

Track(IPlayerCharacter)

Starts tracking a character's party and guild.

public static void Track(IPlayerCharacter character)

Parameters

character IPlayerCharacter

The local player character, or null to stop tracking.

Remarks

Idempotent, and safe to call with a different character: the previous subscriptions are dropped first. World entry hands every panel a character at once and a panel that has not built its visual tree yet is handed it again later, so this is called more than once per character as a matter of course.

Untrack()

Stops tracking and forgets both rosters.

public static void Untrack()