InventoryCatalog
constInventoryCatalog:object
Defined in: server/api.d.ts:4139
The compiled Hogwarts Legacy inventory definition catalog, and the server’s stack limits over it.
Type Declaration
Section titled “Type Declaration”get(
itemId):InventoryCatalogDefinition|null
Returns a canonical catalog definition, or null when absent.
Parameters
Section titled “Parameters”itemId
Section titled “itemId”string
Exact lookup first, then case-insensitive fallback.
Returns
Section titled “Returns”InventoryCatalogDefinition | null
has(
itemId):boolean
Tests whether an item id exists in the compiled catalog.
Parameters
Section titled “Parameters”itemId
Section titled “itemId”string
Exact lookup first, then case-insensitive fallback.
Returns
Section titled “Returns”boolean
holderPair()
Section titled “holderPair()”holderPair(
holder):InventoryHolderPair|null
Returns the canonical mount-holder pair for either half, or null for an ordinary holder.
Parameters
Section titled “Parameters”holder
Section titled “holder”string
Storage or active mount holder, matched case-insensitively.
Returns
Section titled “Returns”InventoryHolderPair | null
info()
Section titled “info()”info():
InventoryCatalogInfo
Returns catalog version, game build, and definition count.
Returns
Section titled “Returns”list()
Section titled “list()”list(
filter?):InventoryCatalogDefinition[]
Returns fresh catalog objects in canonical itemId order.
Parameters
Section titled “Parameters”filter?
Section titled “filter?”All provided filters are combined with AND.
Returns
Section titled “Returns”setMaxStack()
Section titled “setMaxStack()”setMaxStack(
itemId,max):void
Sets the most one stack of an item may hold, for every player: give/patch/replace check it, and every client’s game takes the bigger stack too. Stacks already over a lowered limit are kept, but cannot grow.
Parameters
Section titled “Parameters”itemId
Section titled “itemId”string
A stacking catalog item (kind item); gear, tools, mounts and Knuts are refused.
number | null
1 to 1000000; null restores the game’s own.
Returns
Section titled “Returns”void