WoWInterface SVN NeedyGreedy

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 34 to Rev 35
    Reverse comparison

Rev 34 → Rev 35

NeedyGreedy.lua
133,6 → 133,14
get = "GetOnlyShowInParty",
set = "SetOnlyShowInParty",
},
hideInCombat = {
name = L["Hide in combat"],
desc = L["Only display the roll window when not in combat"],
type = "toggle",
order = 60,
get = "GetHideInCombat",
set = "SetHideInCombat",
},
},
},
}
183,6 → 191,9
-- For tracking original state of detailed loot information
local originalSpamFilterSetting = nil
 
-- For tracking combat status
local IS_IN_COMBAT = nil
 
-- Utility functions
local function sanitizePattern(pattern)
pattern = string.gsub(pattern, "%(", "%%(")
280,6 → 291,7
ACD:AddToBlizOptions("NeedyGreedy", "NeedyGreedy", nil, "general")
ACD:AddToBlizOptions("NeedyGreedy", L["Profile"], "NeedyGreedy", "profile")
self:RegisterChatCommand("needygreedy", function() InterfaceOptionsFrame_OpenToCategory("NeedyGreedy") end)
self:RegisterChatCommand("ng", function() InterfaceOptionsFrame_OpenToCategory("NeedyGreedy") end)
-- self:RegisterChatCommand("ngt", "TestItemList")
-- self.items = items
 
291,6 → 303,9
self:RegisterEvent("PARTY_MEMBERS_CHANGED")
self:RegisterEvent("START_LOOT_ROLL")
self:RegisterEvent("CHAT_MSG_LOOT")
self:RegisterEvent("PLAYER_REGEN_DISABLED")
self:RegisterEvent("PLAYER_REGEN_ENABLED")
 
self:ScheduleRepeatingTimer("ExpireItems", 1)
 
-- Delay frame display so that player does not show as offline
333,8 → 348,18
self:RefreshTooltip()
end
 
function NeedyGreedy:PLAYER_REGEN_DISABLED()
IS_IN_COMBAT = true
self:RefreshTooltip()
end
 
function NeedyGreedy:PLAYER_REGEN_ENABLED()
IS_IN_COMBAT = false
self:RefreshTooltip()
end
 
 
 
-- Chat scanning and loot recording
function NeedyGreedy:START_LOOT_ROLL(event, rollid)
local texture, name, count, quality = GetLootRollItemInfo(rollid)
835,8 → 860,17
self:RefreshTooltip()
end
 
function NeedyGreedy:GetHideInCombat(info)
return self.db.profile.hideInCombat
end
 
function NeedyGreedy:SetHideInCombat(info, hideInCombat)
self.db.profile.hideInCombat = hideInCombat
self:RefreshTooltip()
end
 
 
 
-- Detachable QTip Frames
local LibQTip = LibStub('LibQTip-1.0')
 
1155,7 → 1189,7
end
 
function NeedyGreedy:DisplayRollTableCheck()
if self:CheckOnlyShowInParty() then
if self:CheckOnlyShowInParty() and self:CheckShowInCombat() then
return true
end
 
1170,8 → 1204,16
return true
end
 
function NeedyGreedy:CheckShowInCombat()
if self.db.profile.hideInCombat and IS_IN_COMBAT then
return false
end
 
return true
end
 
 
 
-- Chat filter functions
local filter = function() return true end
local FILTER_CHAT_LOOT_MSGS = {
Localization/enUS.lua
34,5 → 34,7
L["Show only in party"] = true
L["Only display the roll window when in a party"] = true
L["You are not in a party"] = true
L["Hide in combat"] = true
L["Only display the roll window when not in combat"] = true
 
end