(BAG0SLOT) Tag: WoW API docs |
(GetContainerItemInfo) Tag: WoW API docs |
||
Line 1: | Line 1: | ||
{{wowapitype}} |
{{wowapitype}} |
||
− | Inventory Slot IDs refer to equipment or bag slots. See |
+ | Inventory Slot IDs refer to equipment or bag slots. See '''FrameXML\Constants.lua''' ([https://github.com/Gethe/wow-ui-source/blob/163ac1f68d1026f4faad2eb27a54838f080bc21a/FrameXML/Constants.lua#L311 Classic] / [https://github.com/Gethe/wow-ui-source/blob/f8064cb645d378926142b95e43e36c1298c426a6/FrameXML/Constants.lua#L336 Retail]) |
[[Image:InventorySlots.jpg|thumb|Graphical Explanation]] |
[[Image:InventorySlots.jpg|thumb|Graphical Explanation]] |
||
Line 118: | Line 118: | ||
==See also== |
==See also== |
||
* {{api|UseInventoryItem}}(), {{api|PickupInventoryItem}}() |
* {{api|UseInventoryItem}}(), {{api|PickupInventoryItem}}() |
||
− | * {{api| |
+ | * {{api|GetContainerItemInfo}}() |
==Patch changes== |
==Patch changes== |
Revision as of 21:56, 22 February 2020
Inventory Slot IDs refer to equipment or bag slots. See FrameXML\Constants.lua (Classic / Retail)
Values
Equipment
Inventory Slot IDs for equipment are returned from GetInventorySlotInfo(invSlotName)
Example: Returns the head slot ID
GetInventorySlotInfo("HEADSLOT") => 1
Bags
Inventory Slot IDs for character/bank bags are returned from ContainerIDToInventoryID()
Constants:
CONTAINER_BAG_OFFSET = 19; -- Used for PutItemInBag NUM_BAG_SLOTS = 4; NUM_BANKBAGSLOTS = 7; -- 6 in classic
Examples: (retail)
ContainerIDToInventoryID(1) => 20 -- 1st character bag, the rightmost one ContainerIDToInventoryID(NUM_BAG_SLOTS) => 23 -- 4th character bag, the leftmost one ContainerIDToInventoryID(NUM_BAG_SLOTS+1) => 80 -- 1st bank bag ContainerIDToInventoryID(NUM_BAG_SLOTS+NUM_BANKBAGSLOTS) => 86 -- 7th bank bag
ID | Classic | Retail | Description |
---|---|---|---|
1st character bag | |||
2nd character bag | |||
3rd character bag | |||
4th character bag | |||
bank slots (classic: 24, retail: 28) | |||
1st bank bag | |||
2nd bank bag | |||
3rd bank bag | |||
4th bank bag | |||
5th bank bag | |||
6th bank bag | |||
7th bank bag |
Bank slots
Inventory Slot IDs for bank bag slots are returned from BankButtonIDToInvSlotID()
Constants:
NUM_BANKGENERIC_SLOTS = 28; -- 24 in classic
Examples: (retail)
BankButtonIDToInvSlotID(1) => 52 -- first bank bag slot BankButtonIDToInvSlotID(NUM_BANKGENERIC_SLOTS) => 79 -- last bank bag slot
See also
Patch changes
- Patch 8.3.0 (2020-01-14): Bank bag slot IDs changed from starting at 76 to starting at 80.