WoW:API GetMasterLootCandidate: Difference between revisions

function requires a slot index of the loot window together with a raid index (slot, index) so updated the arguments and the example
(function requires a slot index of the loot window together with a raid index (slot, index) so updated the arguments and the example)
Line 3: Line 3:
Returns the name of the player at the specified index, who would receive an item assigned by [[API GiveMasterLoot|GiveMasterLoot(slot, index)]] using the same index.
Returns the name of the player at the specified index, who would receive an item assigned by [[API GiveMasterLoot|GiveMasterLoot(slot, index)]] using the same index.


  candidate = GetMasterLootCandidate(index);
  candidate = GetMasterLootCandidate(slot, index);


== Parameters ==
== Parameters ==
=== Arguments ===
=== Arguments ===
;slot
: The loot slot number of the item you want to get information about


:;index : The number of the player whose name you wish to return. Typically between 1 and 40. Can exceed the value of [[API GetNumRaidMembers|GetNumRaidMembers()]]
:;index
:: The number of the player whose name you wish to return. Typically between 1 and 40. Can exceed the value of [[API GetNumRaidMembers|GetNumRaidMembers()]]


=== Returns ===
=== Returns ===


:;candidate : The name of the player at '''index'''.
:;candidate
:: The name of the player at '''index'''.


== Example ==
== Example ==
  for i = 1, 40 do
  for li = 1, GetNumLootItems() do
  if GetMasterLootCandidate(i)then
  for ci = 1, 40 do
     DEFAULT_CHAT_FRAME:AddMessage(i.." -> "..GetMasterLootCandidate(i))
      if GetMasterLootCandidate(li, ci) then  
   end
      DEFAULT_CHAT_FRAME:AddMessage(ci.." -> "..GetMasterLootCandidate(li, ci))
    end
  end
  end
  end


Lists master loot candidates by index. - These are the people capable of receiving loot from the Master Looter. This function is only usable by the master looter.
Lists master loot candidates by index. - These are the people capable of receiving loot from the Master Looter. This function is only usable by the master looter.


== See Also ==  
== See Also ==


:* [[API GetNumRaidMembers|GetNumRaidMembers()]]
:* [[API GetNumRaidMembers|GetNumRaidMembers()]]
Anonymous user