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 7a408a5 commit 31951a4
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)))

Check warning on line 91 in elements/alternativepower.lua

View workflow job for this annotation

GitHub Actions / lint

accessing undefined variable 'UnitInPartyIsAI'
or (element.colorClassNPC and not (UnitIsPlayer(unit) or UnitInPartyIsAI(unit))) then

Check warning on line 92 in elements/alternativepower.lua

View workflow job for this annotation

GitHub Actions / lint

accessing undefined variable 'UnitInPartyIsAI'
local _, class = UnitClass(unit)
color = self.colors.class[class]
elseif(element.colorSelection and unitSelectionType(unit, element.considerSelectionInCombatHostile)) then
Expand Down

0 comments on commit 31951a4

Please sign in to comment.