Access accountData and inventory
masterThe module provides two main data properties that are populated once the connection is established:
accountData: A large object containing account statistics and information about players currently in-game. This isundefineduntil theaccountDataevent is emitted.inventory: An array containing the items in your inventory. This isundefineduntil theconnectedToGCevent is emitted.
Note on Inventory and Storage Units:
If you are using the inventory array to track items, be aware that the GC may load items from storage units (caskets) into your inventory without a specific call. To avoid counting items that are actually inside a storage unit, you should filter your inventory check by the casket_id property.