- Added support for ClassPowerCounters to only show up for specific talent specs.

- Added Priest Shadow Orbs module.
This commit is contained in:
Parnic
2012-08-25 20:07:32 +00:00
parent 66103c0a2b
commit 3e32e4a481
3 changed files with 103 additions and 1 deletions

View File

@ -14,6 +14,7 @@ IceClassPowerCounter.prototype.minLevel = 9
IceClassPowerCounter.prototype.DesiredAnimDuration = 0.6
IceClassPowerCounter.prototype.DesiredScaleMod = .4
IceClassPowerCounter.prototype.DesiredAnimPause = 0.5
IceClassPowerCounter.prototype.requiredSpec = nil
-- Constructor --
function IceClassPowerCounter.prototype:init(name)
@ -371,15 +372,36 @@ end
function IceClassPowerCounter.prototype:CheckValidLevel(event, level)
if not level then
return
if event == "PLAYER_TALENT_UPDATE" then
level = UnitLevel("player")
else
return
end
end
if level < self.minLevel then
self:RegisterEvent("PLAYER_LEVEL_UP", "CheckValidLevel")
self:Show(false)
else
self:CheckValidSpec()
end
end
function IceClassPowerCounter.prototype:CheckValidSpec()
if self.requiredSpec == nil then
self:DisplayCounter()
self:Show(true)
return
end
self:RegisterEvent("PLAYER_TALENT_UPDATE", "CheckValidLevel")
local spec = GetSpecialization()
if spec == self.requiredSpec then
self:DisplayCounter()
self:Show(true)
else
self:Show(false)
end
end