/Tukui/modules/loot/autodez.lua
http://github.com/Asphyxia/Tukui · Lua · 25 lines · 19 code · 1 blank · 5 comment · 10 complexity · dcb8b36a2e58b8404074eac67a8857ff MD5 · raw file
- local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales
- --------------------------------------------------------------------------
- -- auto-dez (priority) or auto-greed green item at max level
- -- yes... you are right... i'm totally lazy
- -- auto-greed Frozen Orbs
- --------------------------------------------------------------------------
- if C["loot"].autogreed == true then
- local autogreed = CreateFrame("frame")
- autogreed:RegisterEvent("START_LOOT_ROLL")
- autogreed:SetScript("OnEvent", function(self, event, id)
- local name = select(2, GetLootRollItemInfo(id))
- if (name == select(1, GetItemInfo(43102))) then
- RollOnLoot(id, 2)
- end
- if T.level ~= MAX_PLAYER_LEVEL then return end
- if(id and select(4, GetLootRollItemInfo(id))==2 and not (select(5, GetLootRollItemInfo(id)))) then
- if RollOnLoot(id, 3) then
- RollOnLoot(id, 3)
- else
- RollOnLoot(id, 2)
- end
- end
- end)
- end