mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
Added feature to turn burning embers green if the player has the codex of xerrath spell.
This commit is contained in:
@ -67,6 +67,13 @@ function ShardCounter.prototype:UpdateRunePower(event, arg1, arg2)
|
|||||||
ShardCounter.super.prototype.UpdateRunePower(self, event, arg1, arg2)
|
ShardCounter.super.prototype.UpdateRunePower(self, event, arg1, arg2)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function ShardCounter.prototype:CheckGreenFire()
|
||||||
|
if IsSpellKnown(WARLOCK_GREEN_FIRE) then
|
||||||
|
self:Redraw();
|
||||||
|
self:UnregisterEvent("SPELLS_CHANGED")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function ShardCounter.prototype:UpdatePowerType(event)
|
function ShardCounter.prototype:UpdatePowerType(event)
|
||||||
if IceHUD.WowVer >= 50000 then
|
if IceHUD.WowVer >= 50000 then
|
||||||
CurrentSpec = GetSpecialization()
|
CurrentSpec = GetSpecialization()
|
||||||
@ -121,6 +128,8 @@ function ShardCounter.prototype:UpdatePowerType(event)
|
|||||||
if not IsPlayerSpell(WARLOCK_BURNING_EMBERS) then
|
if not IsPlayerSpell(WARLOCK_BURNING_EMBERS) then
|
||||||
self.requiredSpec = -1
|
self.requiredSpec = -1
|
||||||
self:RegisterEvent("SPELLS_CHANGED", "UpdatePowerType")
|
self:RegisterEvent("SPELLS_CHANGED", "UpdatePowerType")
|
||||||
|
elseif not IsSpellKnown(WARLOCK_GREEN_FIRE) then
|
||||||
|
self:RegisterEvent("SPELLS_CHANGED", "CheckGreenFire")
|
||||||
else
|
else
|
||||||
self:UnregisterEvent("SPELLS_CHANGED", "UpdatePowerType")
|
self:UnregisterEvent("SPELLS_CHANGED", "UpdatePowerType")
|
||||||
end
|
end
|
||||||
@ -186,7 +195,11 @@ function ShardCounter.prototype:GetRuneTexture(rune)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if CurrentSpec == SPEC_WARLOCK_DESTRUCTION then
|
if CurrentSpec == SPEC_WARLOCK_DESTRUCTION then
|
||||||
|
if IsSpellKnown(WARLOCK_GREEN_FIRE) then
|
||||||
|
return "Interface\\PlayerFrame\\Warlock-DestructionUI-Green"
|
||||||
|
else
|
||||||
return "Interface\\PlayerFrame\\Warlock-DestructionUI"
|
return "Interface\\PlayerFrame\\Warlock-DestructionUI"
|
||||||
|
end
|
||||||
elseif CurrentSpec == SPEC_WARLOCK_DEMONOLOGY then
|
elseif CurrentSpec == SPEC_WARLOCK_DEMONOLOGY then
|
||||||
return "Interface\\PlayerFrame\\Warlock-DemonologyUI"
|
return "Interface\\PlayerFrame\\Warlock-DemonologyUI"
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user