minor fix healthbar

This commit is contained in:
Sumsebrum
2021-07-27 16:55:00 +02:00
parent 582ca88b59
commit 599fde6581
2 changed files with 4 additions and 1 deletions

View File

@ -257,7 +257,9 @@ function Healthbar:ENEMY_SPOTTED(unit)
healthBar.nameText:SetText(button.name)
end
healthBar.hp:SetStatusBarColor(RAID_CLASS_COLORS[button.class].r, RAID_CLASS_COLORS[button.class].g, RAID_CLASS_COLORS[button.class].b, 1)
if button.class then
healthBar.hp:SetStatusBarColor(RAID_CLASS_COLORS[button.class].r, RAID_CLASS_COLORS[button.class].g, RAID_CLASS_COLORS[button.class].b, 1)
end
end
function Healthbar:UNIT_HEALTH(unit, health, healthMax)