From 050f12ba456894520ae8f4a469ccb31d52caab63 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Wed, 7 Aug 2024 15:32:14 +0200 Subject: [PATCH] health: Add class color for AI units --- elements/health.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elements/health.lua b/elements/health.lua index 081b9275..5aca4418 100644 --- a/elements/health.lua +++ b/elements/health.lua @@ -127,8 +127,8 @@ local function UpdateColor(self, event, unit) color = self.colors.tapped elseif(element.colorThreat and not UnitPlayerControlled(unit) and UnitThreatSituation('player', unit)) then color = self.colors.threat[UnitThreatSituation('player', unit)] - 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]