WoWInterface SVN NeedyGreedy

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 2 to Rev 3
    Reverse comparison

Rev 2 → Rev 3

RollWatcher.toc
1,12 → 1,8
## Interface: 30100
## Interface: 30300
## Title: RollWatcher
## Notes: Displays who has rolled need/greed/pass on what loot items
## Version: 1.0.4
## Author: Marco
## X-Curse-Packaged-Version: v1.0.4
## X-Curse-Project-Name: RollWatcher
## X-Curse-Project-ID: rollwatcher
## X-Curse-Repository-ID: wow/rollwatcher/mainline
## Author: Marco, lokyst
 
## SavedVariables: RollWatcherDB
 
RollWatcher.lua
72,6 → 72,13
style = "dropdown",
get = "GetQuality",
set = "SetQuality"
},
displayIcons = {
name = "Display Icons",
desc = "Display icons for rolls types instead of text strings",
type = "toggle",
get = "GetDisplayIcons",
set = "SetDisplayIcons",
}
}
}
82,10 → 89,30
namelistwidth = 100,
scale = 1,
expiry = 5,
quality = ITEM_QUALITY_EPIC
quality = ITEM_QUALITY_EPIC,
displayIcons = false,
}
}
 
local ROLLWATCHER_CHOICE = {
["need"] = {
["string"] = "|c00FF0000" .. NEED .. "|r",
["icon"] = "|TInterface\\Buttons\\UI-GroupLoot-Dice-Up:32|t",
},
["greed"] = {
["string"] = "|c0000FF00" .. GREED .. "|r",
["icon"] = "|TInterface\\Buttons\\UI-GroupLoot-Coin-Up:32|t",
},
["pass"] = {
["string"] = "|c00CCCCCC" .. PASS .. "|r",
["icon"] = "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_7:16|t",
},
["disenchant"] = {
["string"] = "|c00FF00FF" .. ROLL_DISENCHANT .. "|r",
["icon"] = "|TInterface\\Buttons\\UI-GroupLoot-DE-Up:32|t",
}
}
 
function RollWatcher:OnInitialize()
self.db = LibStub("AceDB-3.0"):New("RollWatcherDB", defaults, true)
self.db.RegisterCallback(self, "OnProfileChanged", "ResizeFrames")
260,6 → 287,31
self:RecordReceived(link)
return
end
 
-- To handle new disenchant rules
link = self:unformat(LOOT_ROLL_DISENCHANT_SELF, msg)
if link then
self:RecordChoice(link, me, "disenchant")
return
end
 
player, link = self:unformat(LOOT_ROLL_DISENCHANT, msg)
if link then
self:RecordChoice(link, player, "disenchant")
return
end
 
player, link = self:unformat(LOOT_ROLL_DISENCHANT, msg)
if link then
self:RecordChoice(link, player, "disenchant")
return
end
 
number, link, player = self:unformat(LOOT_ROLL_ROLLED_DE, msg)
if number then
self:RecordRoll(link, player, number)
return
end
end
 
function RollWatcher:RecordChoice(link, player, choice)
566,15 → 618,15
end
 
function RollWatcher:ChoiceText(choice)
if choice == "need" then
return "|c00FF0000" .. NEED .. "|r"
elseif choice == "greed" then
return "|c0000FF00" .. GREED .. "|r"
elseif choice == "pass" then
return "|c00CCCCCC" .. PASS .. "|r"
else
return ""
local style = "string"
if self.db.profile.displayIcons == true then style = "icon" end
 
if choice then
if ROLLWATCHER_CHOICE[choice][style] then
return ROLLWATCHER_CHOICE[choice][style]
end
end
return ""
end
 
function RollWatcher:RollText(number)
749,3 → 801,11
function RollWatcher:SetQuality(info, quality)
self.db.profile.quality = quality
end
 
function RollWatcher:GetDisplayIcons(info)
return self.db.profile.displayIcons
end
 
function RollWatcher:SetDisplayIcons(info, displayIcons)
self.db.profile.displayIcons = displayIcons
end