Skip to content

Commit

Permalink
alternativepower: Add class color for AI units
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim committed Aug 7, 2024
1 parent 4566600 commit 6f4a30c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions elements/alternativepower.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6f4a30c

Please sign in to comment.