IInventory interface
Read-only access to the player’s module-package inventory and currently equipped set. Sampled at 1Hz from the Game.Update tick; not subscription driven (inventory changes are infrequent enough that 1Hz polling beats the bookkeeping cost of subscriptions). Pair with GetAttributeProfile to resolve ModulePart.AttrId labels (Phase 6 reuse). Threading: GetModules and GetEquipped are thread-safe lock-free reads (Volatile under the hood). The InventoryChanged event raises on the framework Update thread; subscribers can call IMGUI from the handler. SelfGearChanged is different — it raises on the network/sync thread (see its remarks).
public interface IInventoryMembers
Section titled “Members”| name | description |
|---|---|
| IsAvailable { get; } | True after the first successful probe sample. False during character select / loading / before HybridCLR finishes. |
| event InventoryChanged | Fires once when the snapshot or equipped set diffs the previous tick. Polling cadence is 1Hz so the event fires at most once per second. |
| event SelfGearChanged | Fires when the LOCAL player’s self-gear is (re)synced — i.e. a full container sync landed and GetSelfGear now returns fresh data. This is the ONLY signal for a self-gear change: InventoryChanged deliberately excludes self-gear (it is push-fed, not part of the 1Hz probe hash). A class swap re-syncs the new class’s gear a moment after the profession flips, so consumers that snapshot per-class gear should re-read on this event rather than at the profession-change instant (the gear is stale then). |
| GetEquipped() | Currently equipped module UUIDs by slot (1..ModSlotMaxCount; 4 before patch 3.7, 5 since). Slots with no module are absent from the returned dictionary. |
| GetLiveEquipped() | The LOCAL player’s CURRENT LIVE equipped gear + modules, read from the game’s live equip/mod containers — so it reflects manual equips, refines, and class-swap re-equips (unlike GetSelfGear, which is a stale method-21 full-sync cache). Gear carries rolls + refine + enchant; modules carry rolled parts keyed by slot. Empty lists until the container resolves. Re-read on SelfGearChanged to capture a change as it happens. |
| GetModules() | Current module inventory snapshot, or null until the first sample lands. |
| GetSelfGear() | The LOCAL player’s currently equipped gear instances with their per-piece rolled attributes, ordered by slot. Empty (never null) until the first full container sync lands. Staleness contract: the list is refreshed on full container syncs (login / map change); mid-session refines or re-rolls may be stale until the next full sync (method-22 incremental deltas are not decoded for gear). Thread-safe lock-free read, like the other getters. |
See Also
Section titled “See Also”- namespace Stellar.Abstractions.Services