Table of Contents

Class UITKDungeonFinder

Namespace
FishMMO.Client
Assembly
FishMMO.Client.dll

UI Toolkit dungeon finder: describes a dungeon, offers its difficulties, lists the runs currently open at the chosen one, and lets the player join one or start their own.

public class UITKDungeonFinder : UITKCharacterControl
Inheritance
Object
Component
Behaviour
MonoBehaviour
UITKDungeonFinder
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 panel holds no authority. It draws what the server told it and every control it offers is a request the server re-validates from scratch — which difficulties exist, whether a run may be joined, whether the player is allowed to open another. Nothing here is a permission; a drawn button is at most a prediction that a request will be accepted.

It never polls. A list is asked for when the panel opens, when the difficulty tab changes, and when Refresh is pressed, and at no other time. A finder that refreshed on a timer would turn every open panel on the shard into standing database load for a list nobody is necessarily reading.

Properties

Layer

Draw order tier for this panel. See UITKPanelLayer.

protected override UITKPanelLayer Layer { get; }

Property Value

UITKPanelLayer

Methods

OnAfterShow()

Draws the pending dungeon into the tree the player will actually see.

protected override void OnAfterShow()

OnAfterStarting()

Draws the pending dungeon again after the visual tree has been rebuilt.

protected override void OnAfterStarting()

Remarks

Both hooks are needed: on a panel's first open hasStarted is still false and the tree-replacement check bails out before OnAfterShow would help, while OnAfterStarting alone misses every later reopen.

OnClick_Refresh()

Asks for a fresh list.

public void OnClick_Refresh()

OnClick_Start()

Asks to open a new instance at the selected difficulty, and closes the panel.

public void OnClick_Start()

Remarks

One request per opening. The request is answered by a disconnect-and- reroute that takes a database round trip to arrange — so there is a window, seconds long on a loaded server, in which the player sees nothing happen and clicks again. The server's ingress guard debounces those, but it debounces them into SceneTransferRefusalReason.OnCooldown, so the reward for an impatient second click would be "You are travelling too often" on top of a request that was already succeeding. Clearing the entrance and closing removes the second click rather than punishing it.

Closing loses nothing: the entrance re-sends DungeonFinderBroadcast on the next interaction, which reopens the panel with fresh data. Nothing is armed server-side by having the panel open, and nothing is left armed by closing it — the request only exists once this method has sent it, and from that point it is the server's, cancelled only by its own refusal.

OnClientSet()

Registers the server's messages when the client is set.

public override void OnClientSet()

OnClientUnset()

Unregisters the server's messages when the client is unset.

public override void OnClientUnset()

OnPostUnsetCharacter()

Drops the pending dungeon when the character goes away.

public override void OnPostUnsetCharacter()

Remarks

currentInteractableID is a scene-object handle belonging to the scene the previous character was standing in. Carrying it across a character switch or a scene transfer meant a reopened panel showed the old dungeon and its buttons sent an ID that means something different — or nothing — on the new server. The server validates the handle against the character's own scene and refuses, so this was never exploitable; it was a panel showing one dungeon and a button asking for another.

OnStarting()

Queries the elements and wires the controls that do not depend on a dungeon.

public override void OnStarting()

OnTick()

Re-enables Refresh once its cooldown expires, and gives up on a request that went unanswered.

protected override void OnTick()

Remarks

The timeout is what stops an unanswered request leaving the panel saying "Looking for open dungeons…" for as long as it stays open. Every server exit does reply, so reaching this means a dropped message or a disconnect — and in both cases the honest thing is to hand the player Refresh back rather than a spinner that will never stop.