Table of Contents

Namespace FishMMO.Server.Core.World.SceneServer

Classes

ChatPumpCursor

Where one scene server's cross-server chat pump has got to, and what it has already handled. Pure bookkeeping on the database clock: no network, no database, main thread only.

InFlightLookupTable<TKey, TWaiter>

Lookups in flight, keyed by what is being looked up, each with every requester waiting on it. Main thread only.

ItemExchangeLeg

One character's half of a two-character exchange, as handed to TryRunExchange(IPlayerCharacter, IPlayerCharacter, Func<ItemExchangeLeg[]>, Action<bool>, string).

NamingAnswerRule

Whether a waiter is answered when its lookup finishes, and with what. Pure.

NamingBatchRequest

Reads the IDs out of a batched name request. Pure.

NamingReplyBatches<TConnection>

Batched name answers grouped by the connection they go to, then split into replies of at most a given size. Reusable; main thread only.

Structs

CharacterSessionInfo

Stores the session ownership token and server ID for a claimed character. Used to properly release character sessions via ReleaseAsync.

ChatPumpKey

The relevance key of a pumped chat row: the world, party, guild or tell target it concerns.

NamingRequestBucket

One connection's naming request budget: a token bucket.

NamingWaiter<TConnection>

A connection waiting on a name lookup, and the form it asked in.

PendingChatPersist

Immutable struct for a chat message pending batch DB persistence. Captured on the main or async thread, consumed on the periodic flush background thread. Stores the receive timestamp as ticks to avoid DateTime allocation on the hot path; converted to DateTime only at the DB boundary.

PendingSceneInfo

Combines a pending scene load request with its enqueue time, eliminating the need for separate synchronized dictionaries. Previously PendingScenes (SceneData) and PendingSceneEnqueueUtcBySceneId (DateTime) were tracked in two separate maps, creating a dual-map sync risk.

Interfaces

IAIController

Composite interface for AI controllers managing NPC navigation, state transitions, and movement logic. Inherits from IAINavigation, IAIStateMachine, and IAIWaypoints for interface segregation. Consumers that only need navigation, state management, or waypoints should depend on the corresponding sub-interface instead.

IAINavigation

Interface for AI navigation — controlling agent movement, stopping, and resuming. Separated from IAIController to satisfy ISP: consumers that only need navigation can depend on this smaller contract.

IAIStateMachine

Interface for AI state management — querying and transitioning between AI states. Separated from IAIController to satisfy ISP: consumers that only need state transitions can depend on this smaller contract.

IAIWaypoints

Interface for AI waypoint management — patrolling and picking waypoints. Separated from IAIController to satisfy ISP: consumers that only need waypoint logic can depend on this smaller contract.

IAbilitySystem

Engine-agnostic public API for granting crafted abilities on scene servers.

IAbilitySystemMainThreadQueueData

Per-system main-thread queue interface for AbilitySystem. Ensures this system gets its own slot in the DataContainerRegistry without colliding with other systems that also use IMainThreadQueueData.

IAbilitySystemRuntimeData

Runtime state for ability request ingress guards.

IAchievementSystem

Engine-agnostic public API for achievement handling.

ICharacterInventorySystem

Engine-agnostic public API for character inventory operations. Implementations perform item container manipulations and coordinate any necessary database updates or client notifications.

ICharacterInventorySystemMainThreadQueueData

Per-system main-thread queue interface for CharacterInventorySystem. Ensures this system gets its own slot in the DataContainerRegistry without colliding with other systems that also use IMainThreadQueueData.

ICharacterInventorySystemRuntimeData

Runtime state for character inventory ingress guards.

ICharacterMappingData<TConnection>

Runtime data container for character-to-connection mappings and character lookups. Provides read-only access to all character mapping collections.

ICharacterSystemMainThreadQueueData

Per-system main-thread queue interface for CharacterSystem. Ensures this system gets its own slot in the DataContainerRegistry without colliding with other systems that also use IMainThreadQueueData.

ICharacterSystemRuntimeData

Runtime state for character-system periodic gates.

ICharacterSystem<TConnection, TScene>

Engine-agnostic public API for character management on a scene server. Exposes events and read-only mappings other systems use to query and react to character lifecycle and state changes.

IChatSystem

Engine-agnostic public API for chat handling on a scene server. Provides channel-specific handlers that validate, parse, rate-limit, and broadcast or route incoming chat messages. Implementations should keep message validation and spam protections here; the boolean return value for each handler indicates whether the message should be persisted/forwarded to upstream systems (for example written to the chat database) or suppressed.

IChatSystemMainThreadQueueData

Per-system main-thread queue interface for ChatSystem. Ensures this system gets its own slot in the DataContainerRegistry without colliding with other systems that also use IMainThreadQueueData.

IChatSystemRuntimeData

Runtime data container for chat message synchronization state. Tracks database polling position for chat message pump.

IFactionSystem

Engine-agnostic public API for the faction subsystem on a scene server. Provides a minimal surface so other core systems can obtain or interact with faction-related services without depending on the implementation.

IGuildCharacterMappingData

Which guild members are logged into this scene server (guild chat reaches them). The Social module's guild system keeps it; see IGuildRosterMappingData for the roster cache it keeps beside it.

IHotkeySystem

Engine-agnostic public API for hotkey handling on scene servers. Implementations should process hotkey set requests coming from clients and update the player's hotkey state accordingly. Connection and channel types are intentionally typed as object to avoid tying this contract to a specific networking library.

IHotkeySystemRuntimeData

Runtime state for hotkey ingress guards and pending hotkey persistence.

IInteractableSystem

Engine-agnostic public API for interactable handling and validation. Implementations validate interactions and broadcast inventory/merchant updates. Interactable behaviour is now driven entirely by ECA triggers on each prefab.

IInteractableSystemMainThreadQueueData

Per-system main-thread queue interface for InteractableSystem. Ensures this system gets its own slot in the DataContainerRegistry without colliding with other systems that also use IMainThreadQueueData.

IInteractableSystemRuntimeData

Runtime state for interactable ingress guards and debounce tracker cleanup.

INamingSystemMainThreadQueueData

Per-system main-thread queue interface for NamingSystem. Ensures this system gets its own slot in the DataContainerRegistry without colliding with other systems that also use IMainThreadQueueData.

INamingSystemMappingData

Mapping/cache state for the naming system. Stores bounded TTL caches for direct and reverse lookups.

INamingSystemRuntimeData

Runtime state for the naming system. Tracks lookups in flight with their waiting requesters, per-connection request budgets, and sweep cadence.

INamingSystem<TConnection>

Engine-agnostic public API for the naming system used to resolve IDs to human-readable names and to resolve names back to IDs. Implementations should prefer local caches when available and fall back to database lookups. The connection parameter is typed as object so this contract remains independent of the networking transport.

IPartyCharacterMappingData

Runtime data container for party member and character tracking. Provides read-only access to party membership lookups.

IPartySystem<TConnection>

Engine-agnostic public API for party management on a scene server. Implementations manage party membership state for characters connected to this scene server, synchronize party updates with persistence, and notify local party members of changes.

IPetSystem

Engine-agnostic public API for pet management on the scene server.

IPetSystemMainThreadQueueData

Per-system main-thread queue interface for PetSystem. Ensures this system gets its own slot in the DataContainerRegistry without colliding with other systems that also use IMainThreadQueueData.

IPetSystemRuntimeData

Runtime state for pet ingress guards.

ISceneChannelSystem

Interface for the scene channel system that handles channel selection for open world scenes. Provides channel listing (aggregating instances across all scene servers on the same world server) and same-server or cross-server channel switching.

ISceneChannelSystemMainThreadQueueData

Marker interface for the SceneChannelSystem main-thread action queue. Isolates channel system queued actions from other subsystem queues.

ISceneChannelSystemRuntimeData

Runtime data contract for the SceneChannelSystem. Stores all mutable state: ingress guard, per-connection cooldowns, and cleanup timers.

ISceneInstanceDetails

Engine-agnostic, read-only view of a scene instance managed by a scene server. This interface mirrors the implementation-level SceneInstanceDetails while avoiding engine-specific types so core code can safely consume the data.

ISceneInstanceMappingData

Runtime data container for scene instance tracking and scene handle management. Provides read-only access to scene instance collections.

ISceneServerRuntimeData

Runtime data container for scene server identification and state. Provides access to scene server operational state.

ISceneServerSystemMainThreadQueueData

Per-system main-thread queue data interface for SceneServerSystem. Extends IMainThreadQueueData to provide a dedicated queue for marshalling async DB results back to the main Unity thread.

ISceneServerSystem<TConnection>

Engine-agnostic public API for a Scene Server system responsible for loading and unloading scenes, tracking scene instances, and sending periodic heartbeats (pulses) to connected world servers.

Enums

ChatPumpKeyKind

What a pumped chat row is addressed to, as its handler routes it.

InFlightLookupTable<TKey, TWaiter>.JoinResult

What Join(TKey, TWaiter, DateTime, TimeSpan) decided.

ItemWriteOutcome

What became of one item write — an incremental batch, a snapshot, or a departing character's flush.

PartyJoinOutcome

What adding a character to a party for an instance came to.