Table of Contents

Class UITKParty

Namespace
FishMMO.Client
Assembly
FishMMO.Client.dll

UI Toolkit party panel. Renders party members as horizontal bands — identity, stacked health/mana/stamina bars, per-encounter damage and healing meters, and the member's buffs and debuffs — and handles create/leave/invite plus a per-member context menu (message / add friend / promote / kick). The shared dialog and context-menu overlays are resolved by name through the UIManager rather than referenced directly.

public class UITKParty : UITKCharacterControl
Inheritance
Object
Component
Behaviour
MonoBehaviour
UITKParty
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.destroyCancellationToken
MonoBehaviour.useGUILayout
MonoBehaviour.didStart
MonoBehaviour.didAwake
MonoBehaviour.runInEditMode
Behaviour.enabled
Behaviour.isActiveAndEnabled
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Component.GetComponentIndex()
Component.CompareTag(TagHandle)
Component.transform
Component.transformHandle
Component.gameObject
Component.tag
Object.GetEntityId()
Object.GetInstanceID()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Scene)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Object.FindObjectsByType<T>()
Object.FindObjectsByType<T>(FindObjectsInactive)
Object.ToString()
Object.name
Object.hideFlags

Remarks

The roster is split into a MODEL (FishMMO.Client.UITKParty.roster, plain data, owned by the character) and a VIEW (FishMMO.Client.UITKParty.rows, elements owned by one visual tree). UIDocument re-clones the UXML on every enable, so the view is destroyed on each hide/show. Keeping only the view — as this panel used to — meant the party vanished permanently after the first close, because the data that would have redrawn it was inside the discarded elements. See OnAfterStarting().

Two sources feed the model, and they are not equal. The roster broadcast (PartyAddBroadcast) is rebuilt from the party database rows, which are written on connect and on disconnect and at no other time — it is authoritative about WHO is in the party and what rank they hold, and its health figure is whatever the member logged in with. The vitals broadcast is pushed from the scene server's in-memory controllers once a second and is authoritative about everything that moves. Each field is taken from exactly one of them; see OnPartyAddMember(long, PartyRank, float) for why the roster's health is only ever a seed.

Absence from the vitals payload is a fact, not a gap. The server sends every party member who shares the recipient's scene, so a roster member missing from the latest payload is in another zone, another dungeon instance, on another scene server, or offline. Those rows are drawn as a greyscale facade holding their last known values rather than blanked or hidden — see FishMMO.Client.UITKParty.ApplyPresence(FishMMO.Client.UITKParty.MemberModel).

Methods

OnAfterShow()

Redraws the roster whenever the panel is shown.

protected override void OnAfterShow()

Remarks

Show() re-clones the tree, so anything written before it is discarded. On the very first open OnAfterStarting has not run yet and this is the only pass that happens; on later opens both run and writing the same state twice is harmless.

OnAfterStarting()

Re-applies the roster after the visual tree was rebuilt.

protected override void OnAfterStarting()

Remarks

The base implementation re-runs the character pre/post pair, which is what re-subscribes this panel to the party controller; the rebuild below then redraws whatever the model already holds.

OnButtonCreateParty()

Broadcasts a create-party request when not already in a party.

public void OnButtonCreateParty()

OnButtonInviteToParty()

Invites the current target, or prompts for a name, to the party.

public void OnButtonInviteToParty()

OnButtonLeaveParty()

Confirms then broadcasts a leave-party request.

public void OnButtonLeaveParty()

OnDestroying()

Clears all member rows when the control is destroyed.

public override void OnDestroying()

OnLeaveParty()

Clears all member rows when leaving the party.

public void OnLeaveParty()

OnPartyAddMember(long, PartyRank, float)

Adds or updates a member from the roster payload.

public void OnPartyAddMember(long characterID, PartyRank rank, float healthPCT)

Parameters

characterID long

The member's character ID.

rank PartyRank

The member's party rank.

healthPCT float

The member's health percentage (0-1).

Remarks

healthPCT is a SEED, not an update. It comes from the party database row, which is written on connect and on disconnect and at no other time, so it is the value the member logged in with — useful for a member who has just appeared in the roster and about whom nothing else is known yet, and actively wrong for one whose live vitals are already arriving. Applying it unconditionally made every bar jump back to its login value once per party update and then be corrected again a fraction of a second later.

OnPartyCreated(string)

Adds the local player as a member row when a party is created.

public void OnPartyCreated(string location)

Parameters

location string

Location string (unused).

OnPartyRemoveMember(long)

Removes a member.

public void OnPartyRemoveMember(long characterID)

Parameters

characterID long

The member's character ID.

OnPartyUpdateVitals(PartyMemberVitalsEntry[])

Applies a live vitals payload from the scene server.

public void OnPartyUpdateVitals(PartyMemberVitalsEntry[] entries)

Parameters

entries PartyMemberVitalsEntry[]

Live state for every party member sharing the local scene.

Remarks

The payload is treated as an authoritative SET. Everyone in it is present and gets their live values; everyone in the roster who is not in it is somewhere the local scene server cannot see, and their row becomes a greyscale facade over whatever was last known about them. An entry for somebody not in the roster is ignored rather than creating a row — the roster payload owns membership, and inventing a member here would let the two disagree about who is in the party.

OnPostSetCharacter()

Subscribes to party controller events after the character is set.

public override void OnPostSetCharacter()

OnPostUnsetCharacter()

Drops the roster once the character is gone.

public override void OnPostUnsetCharacter()

Remarks

The model outlives the visual tree on purpose, so nothing else would clear it — and a partyless character generates no roster traffic to overwrite it, which is what left the previous character's party on screen after a character switch.

OnPreSetCharacter()

Unsubscribes from the outgoing character's party controller.

public override void OnPreSetCharacter()

Remarks

UITKCharacterControl.OnAfterStarting calls Pre then Post on every tree rebuild so the pair cancels out. Leaving this un-overridden made the Pre call a no-op, so every reopen stacked another subscription onto the same controller.

OnPreUnsetCharacter()

Unsubscribes from party controller events before the character is unset.

public override void OnPreUnsetCharacter()

OnStarting()

Queries the member list and wires up the action buttons.

public override void OnStarting()

Remarks

Runs against a fresh tree every time, so it drops the old view first — those elements belong to a tree that no longer exists. The buttons are new objects, so += cannot accumulate handlers across rebuilds.

OnTick()

Refreshes the local player's own bars and animates every buff countdown.

protected override void OnTick()

Remarks

The server pushes vitals once a second, which is the right rate for five other people and far too slow for your own health bar — a player who takes a hit would watch their own row disagree with the resource bar beside it for most of a second. The local character's attributes are right here and are the same values the server is reading, so the self row is refreshed every frame from those and the payload merely confirms it.

Buff durations count down locally between pushes for the same reason the target frame's do: the server sends a list only when the SET changes, and each entry carries the seconds remaining at send time. Rows for members in another zone are skipped — nothing about them is being updated, and a duration ticking down under a greyed-out facade would be the one part of it still claiming to be live.

PartyController_OnReceivePartyInvite(long)

Prompts the local player to accept or decline a received party invite.

public void PartyController_OnReceivePartyInvite(long inviterCharacterID)

Parameters

inviterCharacterID long

The inviter's character ID.

Remarks

The inviter's ID travels back on the answer so the server can confirm the player is answering the invitation they were actually shown. See PartyAcceptInviteBroadcast.

PartyController_OnValidatePartyMembers(HashSet<long>)

Removes member rows that are no longer part of the validated member set.

public void PartyController_OnValidatePartyMembers(HashSet<long> newMembers)

Parameters

newMembers HashSet<long>

The set of valid member IDs.