WoWInterface SVN EasyRoll

[/] [trunk/] [EasyRoll/] [EasyRoll.lua] - Rev 2

Compare with Previous | Blame | View Log

local f = CreateFrame("Frame", "EasyRoll")
f:RegisterEvent("START_LOOT_ROLL")
f:RegisterEvent("CONFIRM_LOOT_ROLL")
f:RegisterEvent("CONFIRM_DISENCHANT_ROLL")
f:SetScript("OnEvent",function(self,event,...)
if event == "CONFIRM_LOOT_ROLL" or event == "CONFIRM_DISENCHANT_ROLL" then
        local _, iname, _, quality, BoP, canNeed, _, canDiss = GetLootRollItemInfo(select(1,...))
        if BoP and not canNeed then
                if canDiss then
                        ConfirmLootRoll(select(1,...),3)
                else
                        ConfirmLootRoll(select(1,...),2)
                end
        end
elseif event == "START_LOOT_ROLL" then
        local _, iname, _, quality, BoP, canNeed, _, canDiss = GetLootRollItemInfo(select(1,...))
        if BoP and not canNeed then
                if canDiss then
                        RollOnLoot(select(1,...),3)
                else
                        RollOnLoot(select(1,...),2)
                end
        end
end
end)

Compare with Previous | Blame