From 6f4a30c90ecf76e55a73800db6829564a17bede9 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Wed, 7 Aug 2024 15:33:09 +0200 Subject: [PATCH] alternativepower: Add class color for AI units --- elements/alternativepower.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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