WoW:API GiveMasterLoot: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
m (Move page script moved page API GiveMasterLoot to API GiveMasterLoot without leaving a redirect)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<center>'''GiveMasterLoot''' ''-Documentation by [[User:Haarm|Haarm]]-''</center>
{{wowapi}}
Assigns an item from the current loot window to a group member, when in Master Looter mode.
Assigns an item from the current loot window to a group member, when in Master Looter mode.


Line 31: Line 31:
:* [[API GetNumLootItems|GetNumLootItems()]]
:* [[API GetNumLootItems|GetNumLootItems()]]
:* [[API GetMasterLootCandidate|GetMasterLootCandidate(index)]]
:* [[API GetMasterLootCandidate|GetMasterLootCandidate(index)]]
{{Template:WoW API}}

Latest revision as of 04:46, 15 August 2023

WoW API < GiveMasterLoot

Assigns an item from the current loot window to a group member, when in Master Looter mode.

GiveMasterLoot(lootIndex, candidateIndex);


Arguments
lootIndex
The index of the item you wish to assign. Should be between 1 and GetNumLootItems()
candidateIndex
The index of the player you wish to receive the item. You can retreive candidate names with GetMasterLootCandidate(index)

Returns
nil

Example
for ci = 1, GetNumRaidMembers() do
 if (GetMasterLootCandidate(ci) == UnitName("player")) then
  for li = 1, GetNumLootItems() do
   GiveMasterLoot(li, ci);
  end
 end
end
Result

Gives all the loot to yourself. Naughty.


See Also