WoW:API GetLootSlotInfo: Difference between revisions

m
Move page script moved page API GetLootSlotInfo to WoW:API GetLootSlotInfo without leaving a redirect
mNo edit summary
m (Move page script moved page API GetLootSlotInfo to WoW:API GetLootSlotInfo without leaving a redirect)
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<center>'''GetLootSlotInfo''' ''- Documentation by [[user:tsigo|tsigo]] -''</center>
{{wowapi}}


<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->


  lootIcon, lootName, lootQuantity, rarity = GetLootSlotInfo(''index'');
  lootIcon, lootName, lootQuantity, rarity, locked, isQuestItem, questId, isActive = GetLootSlotInfo(''index'');


<!-- Describe the purpose of the function, though exhausting detail can be saved for a later section -->
<!-- Describe the purpose of the function, though exhausting detail can be saved for a later section -->
Line 13: Line 13:


<!-- List each argument, together with its type -->
<!-- List each argument, together with its type -->
: slot
:; slot: Number - the index of the item (1 is the first item)
:; slot: Number - the index of the item (1 is the first item)


Line 20: Line 19:


<!-- List each return value, together with its type -->
<!-- List each return value, together with its type -->
: lootIcon
:; lootIcon: String - The path of the graphical icon for the item.
:; lootIcon: String - The path of the graphical icon for the item.
: lootName
:; lootName: String - The name of the item.
:; lootName: String - The name of the item.
: lootQuantity
:; lootQuantity: Number - The quantity of the item in a stack. ''Note: Quantity for coin is always 0.''
:; lootQuantity: Number - The quantity of the item in a stack. ''Note: Quantity for coin is always 0.''
: rarity
:; rarity: Number - 0 for grey, 1 for white items and quest items, 2 for green, 3 for blue and have not seen output with epics yet presumably it would be 4 as it has incremented so far.
:; rarity: Number - 0 for grey, 1 for white items and quest items, 2 for green, 3 for blue and have not seen output with epics yet presumably it would be 4 as it has incremented so far.
 
:; locked: Whether you are eligible to loot this item or not. Locked items are by default shown tinted red.
:; isQuestItem: Whether or not this item is used for a quest.
:; questId: Number - the quest ID that this item is related to if isQuestId is true.
:; isActive: Unknown.
----
----
;''Example''
;''Example''


<!-- If it helps, include an example here, though it's not required if the usage is self-explanatory -->
<!-- If it helps, include an example here, though it's not required if the usage is self-explanatory -->
  local lootIcon, lootName, lootQuantity, rarity= GetLootSlotInfo(1);
  local lootIcon, lootName, lootQuantity, rarity, locked = GetLootSlotInfo(1);


;''Result''
;''Result''
Line 41: Line 39:
: lootQuantity is 0
: lootQuantity is 0
: rarity is 0
: rarity is 0
: locked is 0


----
----
Line 47: Line 46:


  DEFAULT_CHAT_FRAME:AddMessage("coins: "..string.gsub(item,"\n"," "),1,1,1);
  DEFAULT_CHAT_FRAME:AddMessage("coins: "..string.gsub(item,"\n"," "),1,1,1);
----
{{Template:WoW API}}
[[Category:API Functions|GetLootSlotInfo]]
[[Category:API Inventory Functions|GetLootSlotInfo]]
[[Category:API Item Functions|GetLootSlotInfo]]
[[Category:API Loot Functions|GetLootSlotInfo]]
Anonymous user