WoWInterface SVN NeedyGreedy

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 123 to Rev 122
    Reverse comparison

Rev 123 → Rev 122

Localization/enUS.lua
74,7 → 74,5
L["Winner Color"] = true
L["UI options"] = true
L["Chat options"] = true
L["Show Loot Method"] = true
L["Display the loot method as a databroker feed"] = true
 
end
NeedyGreedy.lua
8,8 → 8,7
 
-- Set up DataBroker object
local NeedyGreedyLDB = LibStub("LibDataBroker-1.1"):NewDataObject("NeedyGreedy", {
type = "data source",
text = "",
type = "launcher",
label = "Needy Greedy",
icon = "Interface\\Buttons\\UI-GroupLoot-Dice-Up",
OnClick = function(frame, button)
152,16 → 151,7
get = "GetShowGroupOnly",
set = "SetShowGroupOnly",
},
showLootMethod = {
name = L["Show Loot Method"],
desc = L["Display the loot method as a databroker feed"],
type = "toggle",
order = 50,
get = "GetShowLootMethod",
set = "SetShowLootMethod",
},
 
 
chatOptions = {
name = L["Chat options"],
type = "group",
378,7 → 368,6
highlightSelfChatColor = {1, 0.8, 0, 1},
highlightWinnerChat = false,
highlightWinnerChatColor = {0, 1, 0, 1},
showLootMethod = false,
}
}
 
653,7 → 642,6
self:RegisterEvent("PLAYER_REGEN_ENABLED")
self:RegisterEvent("PLAYER_ALIVE")
self:RegisterEvent("RAID_ROSTER_UPDATE")
self:RegisterEvent("PARTY_LOOT_METHOD_CHANGED")
 
self:ScheduleRepeatingTimer("ExpireItems", 10)
 
720,8 → 708,6
end
end
 
self:UpdatePartyLootMethodText()
 
self:SetShowLootSpam()
end
 
755,8 → 741,6
 
end
 
self:UpdatePartyLootMethodText()
 
wipe(nameList)
self:RefreshTooltip()
end
787,50 → 771,8
end
end
 
function NeedyGreedy:PARTY_LOOT_METHOD_CHANGED()
self:UpdatePartyLootMethodText()
end
 
local LOOT_METHOD_STRINGS = {
["freeforall"] = LOOT_FREE_FOR_ALL,
["roundrobin"] = LOOT_ROUND_ROBIN,
["group"] = LOOT_GROUP_LOOT,
["master"] = LOOT_MASTER_LOOTER,
["needbeforegreed"] = LOOT_NEED_BEFORE_GREED,
}
 
function NeedyGreedy:UpdatePartyLootMethodText()
if not self.db.profile.showLootMethod then
NeedyGreedyLDB.text = ""
return
end
 
local lootmethod, masterlooterPartyID, masterlooterRaidID = GetLootMethod()
local name = ""
 
if (GetNumPartyMembers() > 0 or GetNumRaidMembers() > 0) then
if lootmethod == "master" then
if masterlooterRaidID ~= nil then
name = GetRaidRosterInfo(masterlooterRaidID)
elseif masterlooterPartyID ~= nil then
name = UnitName("party" .. masterlooterPartyID)
end
 
if name == nil then
name = UnitName("player")
end
NeedyGreedyLDB.text = LOOT_METHOD_STRINGS[lootmethod] .. " (" .. name .. ")"
else
 
NeedyGreedyLDB.text = LOOT_METHOD_STRINGS[lootmethod]
end
 
else
NeedyGreedyLDB.text = ""
end
end
 
 
-- Chat scanning and loot recording
function NeedyGreedy:START_LOOT_ROLL(event, rollid, rollTime)
local texture, name, count, quality = GetLootRollItemInfo(rollid)
1461,15 → 1403,6
self:RefreshTooltip()
end
 
function NeedyGreedy:GetShowLootMethod(info)
return self.db.profile.showLootMethod
end
 
function NeedyGreedy:SetShowLootMethod(info, showLootMethod)
self.db.profile.showLootMethod = showLootMethod
self:UpdatePartyLootMethodText()
end
 
function NeedyGreedy:GetNoSpamMode(info)
return self.db.profile.noSpamMode
end