mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- added support for binding a custom bar/counter to a larger variety of units (pets, focus targets, etc.)
This commit is contained in:
@ -2,7 +2,7 @@ local AceOO = AceLibrary("AceOO-2.0")
|
||||
|
||||
IceCustomBar = AceOO.Class(IceUnitBar)
|
||||
|
||||
local validUnits = {"player", "target"}
|
||||
local validUnits = {"player", "target", "focus", "pet", "vehicle", "targettarget"}
|
||||
local buffOrDebuff = {"buff", "debuff"}
|
||||
|
||||
IceCustomBar.prototype.auraDuration = 0
|
||||
@ -21,6 +21,9 @@ function IceCustomBar.prototype:Enable(core)
|
||||
IceCustomBar.super.prototype.Enable(self, core)
|
||||
|
||||
self:RegisterEvent("UNIT_AURA", "UpdateCustomBar")
|
||||
self:RegisterEvent("UNIT_PET", "UpdateCustomBar")
|
||||
self:RegisterEvent("PLAYER_PET_CHANGED", "UpdateCustomBar")
|
||||
self:RegisterEvent("PLAYER_FOCUS_CHANGED", "UpdateCustomBar")
|
||||
|
||||
self:Show(true)
|
||||
|
||||
|
@ -5,7 +5,7 @@ local waterfall = AceLibrary("Waterfall-1.0")
|
||||
|
||||
IceCustomCount.prototype.countSize = 20
|
||||
|
||||
local validUnits = {"player", "target"}
|
||||
local validUnits = {"player", "target", "focus", "pet", "vehicle", "targettarget"}
|
||||
local buffOrDebuff = {"buff", "debuff"}
|
||||
|
||||
-- Constructor --
|
||||
@ -375,6 +375,9 @@ function IceCustomCount.prototype:Enable(core)
|
||||
IceCustomCount.super.prototype.Enable(self, core)
|
||||
|
||||
self:RegisterEvent("UNIT_AURA", "UpdateCustomCount")
|
||||
self:RegisterEvent("UNIT_PET", "UpdateCustomCount")
|
||||
self:RegisterEvent("PLAYER_PET_CHANGED", "UpdateCustomCount")
|
||||
self:RegisterEvent("PLAYER_FOCUS_CHANGED", "UpdateCustomCount")
|
||||
|
||||
self.unit = self.moduleSettings.auraTarget
|
||||
|
||||
|
Reference in New Issue
Block a user