mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
Add ability to opt out of displaypower event
This commit is contained in:
@ -21,6 +21,7 @@ IceClassPowerCounter.prototype.unit = "player"
|
||||
IceClassPowerCounter.prototype.round = ceil
|
||||
IceClassPowerCounter.prototype.growModes = { width = 1, height = 2 }
|
||||
IceClassPowerCounter.prototype.currentGrowMode = IceClassPowerCounter.prototype.growModes["height"]
|
||||
IceClassPowerCounter.prototype.shouldRegisterDisplayPower = true
|
||||
|
||||
-- Constructor --
|
||||
function IceClassPowerCounter.prototype:init(name)
|
||||
@ -470,7 +471,9 @@ function IceClassPowerCounter.prototype:DisplayCounter()
|
||||
self:UnregisterEvent("PLAYER_LEVEL_UP")
|
||||
|
||||
self:RegisterEvent(self:GetPowerEvent(), "UpdateRunePower")
|
||||
self:RegisterEvent("UNIT_DISPLAYPOWER", "UpdateRunePower")
|
||||
if self.shouldRegisterDisplayPower then
|
||||
self:RegisterEvent("UNIT_DISPLAYPOWER", "UpdateRunePower")
|
||||
end
|
||||
self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld")
|
||||
if IceHUD.EventExistsUnitMaxPower then
|
||||
self:RegisterEvent("UNIT_MAXPOWER", "UpdateRunePower")
|
||||
|
Reference in New Issue
Block a user