From 7a049340c22929f31eb3e47997b5290e36a9291e Mon Sep 17 00:00:00 2001 From: Parnic Date: Sat, 18 Apr 2009 06:37:01 +0000 Subject: [PATCH] - added support for binding a custom bar/counter to a larger variety of units (pets, focus targets, etc.) --- modules/CustomBar.lua | 5 ++++- modules/CustomCount.lua | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/CustomBar.lua b/modules/CustomBar.lua index 5e90255..47904d1 100644 --- a/modules/CustomBar.lua +++ b/modules/CustomBar.lua @@ -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) diff --git a/modules/CustomCount.lua b/modules/CustomCount.lua index caefabe..acb4ab9 100644 --- a/modules/CustomCount.lua +++ b/modules/CustomCount.lua @@ -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