WoWInterface SVN NeedyGreedy

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 38 to Rev 39
    Reverse comparison

Rev 38 → Rev 39

NeedyGreedy.lua
317,7 → 317,7
self:RegisterEvent("PLAYER_REGEN_DISABLED")
self:RegisterEvent("PLAYER_REGEN_ENABLED")
 
self:ScheduleRepeatingTimer("ExpireItems", 1)
self:ScheduleRepeatingTimer("ExpireItems", 10)
 
-- Delay frame display so that player does not show as offline
self:RegisterEvent("PLAYER_ENTERING_WORLD")
581,7 → 581,8
 
function NeedyGreedy:RecordReceived(link, player)
local _, _, quality = GetItemInfo(link)
if quality < self.db.profile.quality then return end
-- Because disenchanted items can be white >_<9
if quality < ITEM_QUALITY_COMMON then return end
 
local match = false
for rollid, record in pairs(items) do
590,10 → 591,6
match = true
break
end
-- Since players receive disenchanted items not link
if record.choices[player] == "disenchant" and record.assigned == player and record.received == 0 then
record.received = GetTime()
end
end
 
if not match then
607,6 → 604,19
end
end
 
if not match then
for rollid, record in pairs(items) do
-- Since players receive the results of the disenchant, we will never be
-- able to match the link that triggered the received message against
-- our list. However, we should cross disenchanted items that have been
-- assigned off the list as we find them on the assumption that they
-- would have automatically received the item anyway.
if record.choices[player] == "disenchant" and record.assigned == player and record.received == 0 then
record.received = GetTime()
end
end
end
 
self:UpdateReport()
end
 
1320,6 → 1330,7
-- Unit tests
function NeedyGreedy:SetItems(itemList)
items = itemList
self:UpdateReport()
end
 
function NeedyGreedy:TestItemList()