Table of Contents

Class UITKBank

Namespace
FishMMO.Client
Assembly
FishMMO.Client.dll

UI Toolkit implementation of the bank panel. Binds to UIBank.uxml / UIBank.uss and renders the character's bank as a grid of slot buttons. Item drag-and-drop and tooltips reuse the shared UITKDragObject and UITKTooltip overlays via UIManager.

public class UITKBank : UITKCharacterControl
Inheritance
Object
Component
Behaviour
MonoBehaviour
UITKBank
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 grid is a view of the replicated container and nothing else: no click here writes to a slot. A request goes out, the slot is marked as waiting, and the container being replicated back is what changes what the player sees.

Methods

Hide(bool)

Hides the panel and abandons anything it had in flight.

public override void Hide(bool overrideIsAlwaysOpen)

Parameters

overrideIsAlwaysOpen bool

When true, the call is a no-op.

Remarks

Closing the bank is not a neutral act: walking out of range of the banker is one of the ways the server refuses an operation, so a bank slot left marked as waiting after the panel closes has a very good chance of never being answered.

OnAfterShow()

Fills the grid on every show, including the very first one.

protected override void OnAfterShow()

Remarks

THE CONTRACT: enabling the document re-clones the UXML, so anything written before Show() is discarded. OnAfterStarting covers later opens, but on the first ever open hasStarted is still false and ReinitializeIfTreeReplaced bails out before calling it — and this panel is opened by a banker broadcast, so its first open is triggered by something the player did rather than at startup. Both hooks do the work, and both are idempotent.

OnAfterStarting()

Rebuilds the grid after the visual tree has been replaced.

protected override void OnAfterStarting()

OnBankSlotLockChanged(IItemContainer, int, bool)

Called when the lock state of a bank slot changes.

public void OnBankSlotLockChanged(IItemContainer container, int slot, bool isLocked)

Parameters

container IItemContainer
slot int
isLocked bool

OnBankSlotUpdated(IItemContainer, Item, int)

Called when a bank slot's item changes.

public void OnBankSlotUpdated(IItemContainer container, Item item, int bankIndex)

Parameters

container IItemContainer
item Item
bankIndex int

Remarks

The slot arriving from the server IS the acknowledgement of whatever this panel asked for, so the pending mark is released here rather than on a separate reply message.

OnClientSet()

Registers the banker broadcast handler and joins the shared operation tracker.

public override void OnClientSet()

OnClientUnset()

Unregisters the banker broadcast handler and leaves the shared operation tracker.

public override void OnClientUnset()

OnDestroying()

Destroys all runtime slot elements and drops every subscription when the control is destroyed.

public override void OnDestroying()

OnPostSetCharacter()

Builds the bank grid for the newly set character and subscribes to slot events.

public override void OnPostSetCharacter()

OnPreSetCharacter()

Unsubscribes from bank slot events before the character is replaced.

public override void OnPreSetCharacter()

OnPreUnsetCharacter()

Drops every subscription and in-flight operation before the character goes away.

public override void OnPreUnsetCharacter()

OnStarting()

Queries named elements and wires up the close button.

public override void OnStarting()

OnTick()

Times out item operations whose reply never arrived.

protected override void OnTick()