- Added support for WoD variable 3/5 shadow orbs.

This commit is contained in:
Parnic
2014-09-18 23:06:01 -05:00
parent 88655f0689
commit 37f52f44f1

View File

@ -6,24 +6,54 @@ function ShadowOrbs.prototype:init()
self:SetDefaultColor("ShadowOrbsNumeric", 218, 231, 31) self:SetDefaultColor("ShadowOrbsNumeric", 218, 231, 31)
-- pulled from PriestBar.xml in Blizzard's UI source
self.runeCoords =
{
{0.45703125, 0.60546875, 0.44531250, 0.73437500},
{0.45703125, 0.60546875, 0.44531250, 0.73437500},
{0.45703125, 0.60546875, 0.44531250, 0.73437500},
}
self.numericColor = "ShadowOrbsNumeric" self.numericColor = "ShadowOrbsNumeric"
self.unitPower = SPELL_POWER_SHADOW_ORBS self.unitPower = SPELL_POWER_SHADOW_ORBS
self.minLevel = SHADOW_ORBS_SHOW_LEVEL self.minLevel = SHADOW_ORBS_SHOW_LEVEL
self.bTreatEmptyAsFull = true self.bTreatEmptyAsFull = true
self.unit = "player" self.unit = "player"
self.numConsideredFull = PRIEST_BAR_NUM_ORBS if IceHUD.WowVer >= 60000 then
self.numConsideredFull = PRIEST_BAR_NUM_LARGE_ORBS
-- pulled from PriestBar.xml in Blizzard's UI source
self.runeCoords = { }
for i=1, PRIEST_BAR_NUM_SMALL_ORBS do
self.runeCoords[i] = {0.45703125, 0.60546875, 0.44531250, 0.73437500}
end
if IsSpellKnown(SHADOW_ORB_MINOR_TALENT_ID) then
self.numRunes = PRIEST_BAR_NUM_SMALL_ORBS
else
self.numRunes = PRIEST_BAR_NUM_LARGE_ORBS
end
else
self.numConsideredFull = PRIEST_BAR_NUM_ORBS
-- pulled from PriestBar.xml in Blizzard's UI source
self.runeCoords = { }
for i=1, PRIEST_BAR_NUM_ORBS do
self.runeCoords[i] = {0.45703125, 0.60546875, 0.44531250, 0.73437500}
end
end
self.runeHeight = 36 self.runeHeight = 36
self.runeWidth = 36 self.runeWidth = 36
self.requiredSpec = SPEC_PRIEST_SHADOW self.requiredSpec = SPEC_PRIEST_SHADOW
end end
function ShadowOrbs.prototype:Enable(core)
ShadowOrbs.super.prototype.Enable(self, core)
if IceHUD.WowVer >= 60000 then
if not IsSpellKnown(SHADOW_ORB_MINOR_TALENT_ID) then
self:RegisterEvent("SPELLS_CHANGED", "CheckHasMoreOrbs")
end
end
end
function ShadowOrbs.prototype:CheckHasMoreOrbs(event)
if IsSpellKnown(SHADOW_ORB_MINOR_TALENT_ID) then
self:UnregisterEvent("SPELLS_CHANGED")
self:UpdateRunePower()
end
end
function ShadowOrbs.prototype:GetOptions() function ShadowOrbs.prototype:GetOptions()
local opts = ShadowOrbs.super.prototype.GetOptions(self) local opts = ShadowOrbs.super.prototype.GetOptions(self)