From 4566600c3a6200da2eee3b86d34f06d732194538 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Wed, 7 Aug 2024 15:33:04 +0200 Subject: [PATCH] power: Add class color for AI units --- elements/power.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elements/power.lua b/elements/power.lua index 72a3dd6a..bab26240 100644 --- a/elements/power.lua +++ b/elements/power.lua @@ -146,8 +146,8 @@ local function UpdateColor(self, event, unit) else color = self.colors.power[ALTERNATE_POWER_INDEX] end - elseif(element.colorClass and UnitIsPlayer(unit)) - or (element.colorClassNPC and not UnitIsPlayer(unit)) + elseif(element.colorClass and (UnitIsPlayer(unit) or UnitInPartyIsAI(unit))) + or (element.colorClassNPC and not (UnitIsPlayer(unit) or UnitInPartyIsAI(unit))) or (element.colorClassPet and UnitPlayerControlled(unit) and not UnitIsPlayer(unit)) then local _, class = UnitClass(unit) color = self.colors.class[class]