WoW API: ConfirmLootRoll

From AddOn Studio
Revision as of 02:28, 7 March 2010 by WoWWiki>Meredy (New article written)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < ConfirmLootRoll

Confirm your loot roll after one of the events "CONFIRM_LOOT_ROLL" or "CONFIRM_DISENCHANT_ROLL" has fired.

ConfirmLootRoll(RollID[ ,roll])


Arguments

RollID
Number - As passed by the event. (The number increases with every roll you have in a party)
roll
Number - Type of roll: (also passed by the event)
1 : Need roll
2 : Greed roll
3 : Disenchant roll


Example

local f = CreateFrame("Frame", "MyAddon")
f:RegisterEvent("CONFIRM_LOOT_ROLL")
f:SetScript("OnEvent",function(self,event,...)
  if event == "CONFIRM_LOOT_ROLL" then
    local RollID = select(1, ...)
    local roll = select(2, ...)
    ConfirmLootRoll( RollID, roll )
  end   
end)

Result

Every Need or Greed roll will automatically get confirmed.