Inventory - Types/Gridinv¶
This page documents the hooks defined by the types/gridinv submodule in the inventory module.
BagInventoryReady(item, inventory)View Source
BagInventoryRemoved(item, inventory)View Source
InterceptClickItemIcon(panel, itemIcon, keyCode)View Source
Purpose
Allows clientside code to intercept clicks on a grid inventory item icon before default handling runs.
Realm
Client
Parameters
Panel panel The grid inventory panel receiving the click.
Panel itemIcon The clicked item icon panel.
number keyCode The mouse key or button code that was pressed.
Returns
boolean|nil Return true to indicate the click was fully handled and skip default processing.
InventoryItemIconCreated(icon, item, panel)View Source
InventoryPanelCreated(panel, inventory, parent)View Source
ItemCombine(client, item, target)View Source
Purpose
Allows code to handle combining one item with another before default transfer behavior continues.
Realm
Server
Parameters
Player client The player attempting the combine action.
table item The item being moved or used.
table target The item being combined with.
Returns
boolean|nil Return true when the combine action was handled successfully.
OnPlayerLostStackItem(itemTypeOrItem)View Source
Purpose
Called when the grid inventory stack restore flow fails to recover an item.
Realm
Server
Parameters
string|table itemTypeOrItem The item type or item reference that could not be restored.
OnRequestItemTransfer(panel, itemID, inventoryID, x, y)View Source
SetupBagInventoryAccessRules(inventory)View Source
Purpose
Allows code to configure access rules on a newly created bag inventory.
Realm
Server
Parameters
table inventory The bag inventory being initialized.