WoWInterface SVN NeedyGreedy

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 88 to Rev 87
    Reverse comparison

Rev 88 → Rev 87

NeedyGreedy.lua
305,7 → 305,7
-- We track rolling on items like this to avoid the scenario where you're in
-- combat the window pops up, you leave combat briefly before another add
-- attacks and the window disappears as you're deciding
local WATCH_ITEM_BEING_ROLLED_ON = nil
local ITEM_IS_BEING_ROLLED_ON = nil
 
-- For tracking grouped status
local IS_IN_PARTY = nil
540,7 → 540,7
 
 
-- Chat scanning and loot recording
function NeedyGreedy:START_LOOT_ROLL(event, rollid, rollTime)
function NeedyGreedy:START_LOOT_ROLL(event, rollid)
local texture, name, count, quality = GetLootRollItemInfo(rollid)
local link = GetLootRollItemLink(rollid)
if quality >= self.db.profile.quality then
551,12 → 551,11
assigned = "",
received = 0,
choices = {},
rolls = {},
rollTimeOut = GetTime() + rollTime/1000,
rolls = {}
})
 
if self.db.profile.detachedTooltip and self.db.profile.autoPopUp then
WATCH_ITEM_BEING_ROLLED_ON = true
ITEM_IS_BEING_ROLLED_ON = true
self:ShowDetachedTooltip()
end
 
796,7 → 795,7
 
-- This could be done in one of the other loops, but since I live with
-- pedantic man, we will do this as a separate scan
if WATCH_ITEM_BEING_ROLLED_ON then
if ITEM_IS_BEING_ROLLED_ON then
local itemsStillBeingRolledOn = 0
for _, record in ipairs(items) do
if record.received == 0 then
805,7 → 804,7
end
 
if itemsStillBeingRolledOn == 0 then
WATCH_ITEM_BEING_ROLLED_ON = false
ITEM_IS_BEING_ROLLED_ON = false
self:RefreshTooltip()
end
end
931,28 → 930,17
function NeedyGreedy:ExpireItems()
local now = GetTime()
local update = false
local displayTimeOut = true
local padding = 60
 
if self.db.profile.expiry == 0 then
return
end
for rollid, record in ipairs(items) do
if record.rollTimeOut and record.rollTimeOut > 0 and now < record.rollTimeOut + padding and WATCH_ITEM_BEING_ROLLED_ON then
displayTimeOut = false
if record.received > 0 and now - record.received >= self.db.profile.expiry * 60 then
table.remove(items, rollid)
wipe(nameList)
update = true
end
 
if self.db.profile.expiry ~= 0 then
if record.received > 0 and now - record.received >= self.db.profile.expiry * 60 then
table.remove(items, rollid)
wipe(nameList)
update = true
end
end
end
 
if displayTimeOut and WATCH_ITEM_BEING_ROLLED_ON then
WATCH_ITEM_BEING_ROLLED_ON = false
self:RefreshTooltip()
end
 
if update then
self:UpdateReport()
end
1521,9 → 1509,6
 
-- Don't toggle display status if we can't see anything to toggle
if self.detachedTooltip and self.detachedTooltip:IsShown() then
if WATCH_ITEM_BEING_ROLLED_ON then
WATCH_ITEM_BEING_ROLLED_ON = false
end
self:HideDetachedTooltip()
self.db.profile.detachedTooltipDisplayStatus = false
elseif self:CheckDisplayOptions() then
1535,7 → 1520,7
 
-- Only use this when not forcing display e.g. RefreshTooltip
function NeedyGreedy:DisplayDetachedTTCheck()
if self.db.profile.autoPopUp and WATCH_ITEM_BEING_ROLLED_ON then
if self.db.profile.autoPopUp and ITEM_IS_BEING_ROLLED_ON then
return true
end
 
1644,9 → 1629,6
function NeedyGreedy:SlashHide()
self.db.profile.detachedTooltip = true
self.db.profile.detachedTooltipDisplayStatus = false
if WATCH_ITEM_BEING_ROLLED_ON then
WATCH_ITEM_BEING_ROLLED_ON = false
end
self:RefreshTooltip()
LibStub("AceConfigRegistry-3.0"):NotifyChange("NeedyGreedy")
end