Mercurial > wow > breuesk
diff Looting.lua @ 82:db7e4ee34dce
Lots of support for mobs with multiple loots
author | John@Yosemite-PC |
---|---|
date | Fri, 13 Apr 2012 23:14:03 -0400 |
parents | 62805e6b46c5 |
children | ef4f6dc262ea |
line wrap: on
line diff
--- a/Looting.lua Fri Apr 13 22:09:17 2012 -0400 +++ b/Looting.lua Fri Apr 13 23:14:03 2012 -0400 @@ -41,9 +41,13 @@ _G.LootSlot(i) end local items = {} + local threshold = _G.GetLootThreshold() + print("threshold: ", threshold) for i = 1,n do + local _,_,_,rarity,_ = _G.GetLootSlotInfo(i) + print("item: rarity: ",rarity) local link = _G.GetLootSlotLink(i) - if link then + if link and rarity >= threshold then table.insert(items,{link=link,mlid=i}) print("Item: ", link, i) end @@ -156,7 +160,7 @@ event:RegisterEvent("LOOT_OPENED",LootOpened) -- todo: what are these - event:RegisterEvent("LOOT_SLOT_CLEARED",function() print("LSCleared") end) + event:RegisterEvent("LOOT_SLOT_CLEARED",function(_,index) InitiateLSClear(index) end) event:RegisterEvent("LOOT_SLOT_CHANGED",function() print("LSChanged") end) RegisterListenerStateChange(statelistener)