Change all use of heroclass to use RAID_CLASS_COLORS instead. This can be changed to CUSTOM_CLASS_COLORS later with a color picker for each class, but to support CoA classes need to go back to being colored properly.
Fix remaining lua errors covered by ascension patches Add Addon Skins Add Enhanced Friends List
This commit is contained in:
@@ -30,6 +30,10 @@ local colors = {
|
||||
threat = {},
|
||||
}
|
||||
|
||||
for classToken, color in next, RAID_CLASS_COLORS do
|
||||
colors.class[classToken] = {color.r, color.g, color.b}
|
||||
end
|
||||
|
||||
for debuffType, color in next, DebuffTypeColor do
|
||||
colors.debuff[debuffType] = {color.r, color.g, color.b}
|
||||
end
|
||||
|
||||
@@ -76,7 +76,12 @@ local function UpdateColor(self, event, unit, powertype)
|
||||
if(element.colorPower) then
|
||||
t = self.colors.power[ADDITIONAL_POWER_BAR_INDEX]
|
||||
elseif(element.colorClass and UnitIsPlayer(unit)) then
|
||||
t = oUF.herocolor
|
||||
if UnitIsUnit("player", unit) then
|
||||
t = oUF.herocolor
|
||||
else
|
||||
local _, class = UnitClass(unit)
|
||||
t = self.colors.class[class]
|
||||
end
|
||||
elseif(element.colorSmooth) then
|
||||
r, g, b = self:ColorGradient(element.cur or 1, element.max or 1, unpack(element.smoothGradient or self.colors.smooth))
|
||||
end
|
||||
|
||||
@@ -101,7 +101,12 @@ local function UpdateColor(self, event, unit)
|
||||
elseif(element.colorClass and UnitIsPlayer(unit)) or
|
||||
(element.colorClassNPC and not UnitIsPlayer(unit)) or
|
||||
(element.colorClassPet and UnitPlayerControlled(unit) and not UnitIsPlayer(unit)) then
|
||||
t = oUF.herocolor
|
||||
if UnitIsUnit("player", unit) then
|
||||
t = oUF.herocolor
|
||||
else
|
||||
local _, class = UnitClass(unit)
|
||||
t = self.colors.class[class]
|
||||
end
|
||||
elseif(element.colorReaction and UnitReaction(unit, 'player')) then
|
||||
t = self.colors.reaction[UnitReaction(unit, 'player')]
|
||||
elseif(element.colorSmooth) then
|
||||
|
||||
@@ -125,7 +125,12 @@ local function UpdateColor(self, event, unit)
|
||||
elseif(element.colorClass and UnitIsPlayer(unit)) or
|
||||
(element.colorClassNPC and not UnitIsPlayer(unit)) or
|
||||
(element.colorClassPet and UnitPlayerControlled(unit) and not UnitIsPlayer(unit)) then
|
||||
t = oUF.herocolor
|
||||
if UnitIsUnit("player", unit) then
|
||||
t = oUF.herocolor
|
||||
else
|
||||
local _, class = UnitClass(unit)
|
||||
t = self.colors.class[class]
|
||||
end
|
||||
elseif(element.colorReaction and UnitReaction(unit, 'player')) then
|
||||
t = self.colors.reaction[UnitReaction(unit, 'player')]
|
||||
elseif(element.colorSmooth) then
|
||||
|
||||
@@ -805,4 +805,5 @@ if(global) then
|
||||
end
|
||||
end
|
||||
|
||||
oUF.herocolor = {0.0, 1.0, 0.0}
|
||||
local _, myClass = UnitClass("player")
|
||||
oUF.herocolor = RAID_CLASS_COLORS[myClass]
|
||||
Reference in New Issue
Block a user