WoW:API EquipCursorItem: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
m (result)
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>
<br>
'''Notes'''<br>
The <number> parameter is exactly that of [[API PickupInventoryItem|PickupInventoryItem(index)]], The off by one error was corrected in interface version 10900. (The text below left for reference and repair of old mods)
<br><br>
'''Notes before 10900'''<br>
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 [[API PickupInventoryItem|PickupInventoryItem(index)]], but seems to be one off from it:
<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 01/05/06 by Lex Delani''


{{template:WoW API}}
==Example==
EquipCursorItem(GetInventorySlotInfo("HEADSLOT"));
===Result===
Attempts to equip the currently picked up item to the head slot.

Revision as of 22:12, 22 June 2006

WoW API < EquipCursorItem

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

EquipCursorItem(slot);

Parameters

Arguments

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

Example

EquipCursorItem(GetInventorySlotInfo("HEADSLOT"));

Result

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