Table of Contents

Class UITKBank

Namespace
FishMMO.Client
Assembly
FishMMO.Client.dll

UI Toolkit implementation of the bank panel.

public class UITKBank : UITKItemGridPanel
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, its slots, drag-and-drop, tooltips and the capacity readout all live in UITKItemGridPanel, which the inventory panel shares. What is left here is what is actually particular to a bank: it is opened by a banker rather than by a keybind, its slots belong to the bank container, and a move into it is a bank swap.

Properties

DragType

The drag and operation-tracker identity of this panel's slots.

protected override ReferenceButtonType DragType { get; }

Property Value

ReferenceButtonType

OpensInventoryOnShow

True for a panel that should bring the inventory up alongside itself when it opens.

protected override bool OpensInventoryOnShow { get; }

Property Value

bool

Remarks

Interaction panels — shops, the bank — are where the player is about to move items, and opening one without the inventory meant a second key press before anything could be dragged. Each such panel exposes an inspector toggle and overrides this to return it; the default is off so HUD elements and dialogs stay out of it. (Issue #208.)

OwnInventoryType

This panel's container, as the server names it in a request.

protected override InventoryType OwnInventoryType { get; }

Property Value

InventoryType

Prefix

Element and USS name prefix for this panel, without a trailing dash.

protected override string Prefix { get; }

Property Value

string

Remarks

Every panel-specific name is this prefix plus a fixed suffix — "bank-used" and "inv-used", "bank-slot__lock--pending" and "inv-slot__lock--pending". Ten constants followed that pattern in each panel without exception, so one string replaces all twenty. A panel whose markup does not follow it should override the names below rather than bend the prefix.

QuickTransferTarget

The container a shift-click sends an item to, or null when this panel has nowhere to send one.

protected override ReferenceButtonType? QuickTransferTarget { get; }

Property Value

ReferenceButtonType?

Methods

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()

SendQuickTransferRequest(int, int)

Sends the request that moves an item out of this panel and into QuickTransferTarget.

protected override void SendQuickTransferRequest(int fromSlot, int toSlot)

Parameters

fromSlot int

Slot in this panel the item is leaving.

toSlot int

Slot in the target container it is going to.

Remarks

The broadcast belongs to the DESTINATION container, not this one — moving into the bank is a bank swap whoever asked for it — so the panel losing the item is the one that has to name the other panel's request.

SendSplitRequest(int, int, InventoryType, uint)

Asks the server to split part of a stack into one of this panel's slots. Issue #198.

protected override void SendSplitRequest(int fromSlot, int toSlot, InventoryType fromInventory, uint amount)

Parameters

fromSlot int

Slot holding the stack being split.

toSlot int

Slot in this panel the split half is going to.

fromInventory InventoryType

Container holding the stack being split.

amount uint

How much to take off it.

Remarks

As with SendSwapRequest(int, int, InventoryType), the request names its DESTINATION container, so the panel receiving the split half is the one that sends it.

SendSwapRequest(int, int, InventoryType)

Asks the server to move an item into one of this panel's slots.

protected override void SendSwapRequest(int fromSlot, int toSlot, InventoryType fromInventory)

Parameters

fromSlot int

Slot the item is leaving.

toSlot int

Slot in this panel it is going to.

fromInventory InventoryType

Container the item is leaving.

Remarks

The only part of a drop that differs between panels: the request carries the same three fields either way, but the broadcast type names its destination container.