diff --git a/elements/alternativepower.lua b/elements/alternativepower.lua index bb76358f..c0ca6bc1 100644 --- a/elements/alternativepower.lua +++ b/elements/alternativepower.lua @@ -88,8 +88,8 @@ local function UpdateColor(self, event, unit, powerType) color = self.colors.threat[UnitThreatSituation('player', unit)] elseif(element.colorPower) then color = self.colors.power[ALTERNATE_POWER_INDEX] - elseif(element.colorClass and UnitIsPlayer(unit)) - or (element.colorClassNPC and not UnitIsPlayer(unit)) then + elseif(element.colorClass and (UnitIsPlayer(unit) or UnitInPartyIsAI(unit))) + or (element.colorClassNPC and not (UnitIsPlayer(unit) or UnitInPartyIsAI(unit))) then local _, class = UnitClass(unit) color = self.colors.class[class] elseif(element.colorSelection and unitSelectionType(unit, element.considerSelectionInCombatHostile)) then