/
get = "GetNoSpamMode", |
set = "SetNoSpamMode", |
}, |
highlightSelf = { |
name = L["Highlight Self"], |
desc = L["Color loot you have won differently"], |
type = "toggle", |
order = 37, |
get = "GetHighlightSelf", |
set = "SetHighlightSelf", |
}, |
highlightSelfColor = { |
name = "HighLightSelf Color", |
type = "color", |
order = 38, |
get = "GetHighlightSelfColor", |
set = "SetHighlightSelfColor", |
hasAlpha = false, |
}, |
showGroupOnly = { |
name = L["Hide Non-Members"], |
desc = L["Only display the names of members currently in your party"], |
suppressInRaid = false, |
autoHideDelay = 0, |
noSpamMode = false, |
highlightSelf = false, |
highlightSelfColor = {1, 0.8, 0, 1}, |
} |
} |
printString = LOOT_ROLL_WON_NO_SPAM_NEED:format(player, roll, link) |
end |
end |
if self.db.profile.highlightSelf and player == me then |
r, g, b = unpack(self.db.profile.highlightSelfColor) |
end |
DEFAULT_CHAT_FRAME:AddMessage(printString, r, g, b) |
end |
return "" |
end |
function NeedyGreedy:RollText(number, winner, winnerIsSelf) |
local hexColor = "" |
local r, g, b, a = unpack(self.db.profile.highlightSelfColor) |
function NeedyGreedy:RollText(number, winner) |
if number then |
number = " - " .. number |
if winner then |
if self.db.profile.highlightSelf and winnerIsSelf then |
hexColor = string.format("|cff%x%x%x", 255*r, 255*g, 255*b) |
else |
hexColor = gC |
end |
number = hexColor .. number .. "|r" |
number = gC .. number .. "|r" |
end |
return number |
else |
self.db.profile.suppressInRaid = suppressInRaid |
self:RefreshTooltip() |
end |
function NeedyGreedy:GetAutoHideDelay(info) |
return self.db.profile.autoHideDelay |
end |
end |
end |
function NeedyGreedy:GetHighlightSelf(info) |
return self.db.profile.highlightSelf |
end |
function NeedyGreedy:SetHighlightSelf(info, highlightSelf) |
self.db.profile.highlightSelf = highlightSelf |
self:RefreshTooltip() |
end |
function NeedyGreedy:GetHighlightSelfColor(info) |
return unpack(self.db.profile.highlightSelfColor) |
end |
function NeedyGreedy:SetHighlightSelfColor(info, r, g, b, a) |
self.db.profile.highlightSelfColor = {r, g, b, a} |
self:RefreshTooltip() |
end |
-- QTip Frames |
local LibQTip = LibStub('LibQTip-1.0') |
local COL_MIN_WIDTH = 60 |
tooltip:AddLine("") |
-- Create table with party names and their rolls |
local me = UnitName("player") |
for i, name in ipairs(players) do |
local partyLine = tooltip:AddLine("") |
tooltip:SetCell(partyLine, 1, self:ColorizeName(name) .. " " .. (self.db.profile.displayIcons and BLANK_ICON or ""), nil, "LEFT", nil, nil, nil, nil, nil, minWidth) |
local index = #items - (report.firstItem + i - 2) |
if index >= 1 then |
local item = items[index] |
tooltip:SetCell(partyLine, i + 1, self:ChoiceText(item.choices[name]) .. self:RollText(item.rolls[name], item.assigned == name, item.assigned == me), nil, "LEFT", nil, nil, nil, nil, nil, minWidth) |
tooltip:SetCell(partyLine, i + 1, self:ChoiceText(item.choices[name]) .. self:RollText(item.rolls[name], item.assigned == name), nil, "LEFT", nil, nil, nil, nil, nil, minWidth) |
end |
end |
end |
L["Time to remain visible after the last item has been received (Popup mode only)"] = true |
L["Loot Summary"] = true |
L["Print loot roll summary message to chat frame"] = true |
L["Highlight Self"] = true |
L["Color loot you have won differently"] = true |
end |