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:
Andrew6810
2022-10-28 07:12:13 -07:00
parent 60ef8a38af
commit df7cc26a64
205 changed files with 18480 additions and 35 deletions
+4
View File
@@ -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
+6 -1
View File
@@ -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
+6 -1
View File
@@ -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
+2 -1
View File
@@ -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]