remove GetClassColoredTextForUnit
This commit is contained in:
@@ -48,7 +48,6 @@ globals = {
|
||||
"IsInRaid",
|
||||
"GetNumSubgroupMembers",
|
||||
"GetNumGroupMembers",
|
||||
"GetClassColoredTextForUnit",
|
||||
|
||||
"nop",
|
||||
"ActorPoolMixin",
|
||||
|
||||
+9
-3
@@ -263,7 +263,13 @@ WeakAuras.format_types = {
|
||||
if color == "class" then
|
||||
colorFunc = function(unit, text)
|
||||
if unit and UnitPlayerControlled(unit) then
|
||||
return GetClassColoredTextForUnit(unit, text)
|
||||
local _, class = UnitClass(unit)
|
||||
local color = class and RAID_CLASS_COLORS[class]
|
||||
if color and color.colorStr then
|
||||
return string.format("|c%s%s|r", color.colorStr, text)
|
||||
else
|
||||
return text
|
||||
end
|
||||
end
|
||||
return text
|
||||
end
|
||||
@@ -384,8 +390,8 @@ WeakAuras.format_types = {
|
||||
if color == "class" then
|
||||
colorFunc = function(class, text)
|
||||
local color = class and RAID_CLASS_COLORS[class]
|
||||
if color then
|
||||
return string.format("|c%s%s|r", string.format("ff%.2x%.2x%.2x", color.r * 255, color.g * 255, color.b * 255), text)
|
||||
if color and color.colorStr then
|
||||
return string.format("|c%s%s|r", color.colorStr, text)
|
||||
else
|
||||
return text
|
||||
end
|
||||
|
||||
@@ -1,22 +1,10 @@
|
||||
local ipairs = ipairs
|
||||
local pairs = pairs
|
||||
local ceil, floor = math.ceil, math.floor
|
||||
local format = string.format
|
||||
|
||||
local GetInstanceInfo = GetInstanceInfo
|
||||
local GetNumPartyMembers = GetNumPartyMembers
|
||||
local GetNumRaidMembers = GetNumRaidMembers
|
||||
local UnitClass = UnitClass
|
||||
|
||||
function GetClassColoredTextForUnit(unit, text)
|
||||
local _, classFilename = UnitClass(unit)
|
||||
local color = RAID_CLASS_COLORS[classFilename]
|
||||
if color then
|
||||
return format("|c%s%s|r", format("ff%.2x%.2x%.2x", color.r * 255, color.g * 255, color.b * 255), text)
|
||||
else
|
||||
return text
|
||||
end
|
||||
end
|
||||
|
||||
function tInvert(tbl)
|
||||
local inverted = {};
|
||||
|
||||
Reference in New Issue
Block a user