WoW:API EquipCursorItem: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(created 8/31/05)
 
m (Move page script moved page API EquipCursorItem to API EquipCursorItem without leaving a redirect)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
'''Function'''<br>
{{wowapi}}
EquipCursorItem( <number> );
Equips the currently picked up item to a specific inventory slot.
EquipCursorItem(slot);


'''Parameters'''<br>
== Parameters ==
<number> : Slot to be equipped in (see notes).<br>
=== Arguments ===
<br>
:;slot : Numric - The [[API_TYPE_InventorySlotID|slot ID]] to place the item into. Use [[API_GetInventorySlotInfo|GetInventorySlotInfo(slotname)]] to resolve an [[API_TYPE_InventorySlotName|inventory slot name]] to its ID.
'''Return'''<br>
 
''Unknown''<br>
==Example==
<br>
EquipCursorItem(GetInventorySlotInfo("HEADSLOT"));
'''Notes'''<br>
===Result===
This function will equip the item that has been 'picked up' and is held by the cursor. The <number> parameter seems to be similar to PickupInventoryItem([http://www.wowwiki.com/API_PickupInventoryItem]), but seems to be one off from it:
Attempts to equip the currently picked up item to the head slot.
<br>
0 = head, 1 = neck, 2 = shoulder, 3 = shirt, 4 = chest, 5 = belt, 6 = legs, 7 = feet, 8 = wrist, 9 = gloves, 10 = finger 1, 11 = finger 2, 12 = trinket 1, 13 = trinket 2, 14 = back, 15 = main hand, 16 = off hand, 17 = ranged<br>
<br>
'''Furthermore:'''<br>
18 - 22 = UNKNOWN<br>
23 = Backpack slot 1<br>
...<br>
38 = Backpack slot 16<br>
39 = Bank slot 1<br>
...<br>
<br>
''Last edited 8/31/05 by Popoi''

Latest revision as of 04:45, 15 August 2023

WoW API < EquipCursorItem

Equips the currently picked up item to a specific inventory slot.

EquipCursorItem(slot);

Parameters[edit]

Arguments[edit]

slot
Numric - The slot ID to place the item into. Use GetInventorySlotInfo(slotname) to resolve an inventory slot name to its ID.

Example[edit]

EquipCursorItem(GetInventorySlotInfo("HEADSLOT"));

Result[edit]

Attempts to equip the currently picked up item to the head slot.