mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
- added rune stuff for DK's in wotlk
- fixed args returned from UnitBuff in wotlk - added default DK spell for gcd module
This commit is contained in:
@ -5,6 +5,8 @@ local SML = AceLibrary("LibSharedMedia-3.0")
|
|||||||
|
|
||||||
IceHUD.CurrTagVersion = 3
|
IceHUD.CurrTagVersion = 3
|
||||||
|
|
||||||
|
IceHUD.WowVer = select(4, GetBuildInfo())
|
||||||
|
|
||||||
IceHUD.Location = "Interface\\AddOns\\IceHUD"
|
IceHUD.Location = "Interface\\AddOns\\IceHUD"
|
||||||
IceHUD.options =
|
IceHUD.options =
|
||||||
{
|
{
|
||||||
|
@ -39,17 +39,33 @@ function GlobalCoolDown.prototype:Disable(core)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function GlobalCoolDown.prototype:GetSpellName()
|
function GlobalCoolDown.prototype:GetSpellName()
|
||||||
local defaultSpells = {
|
local defaultSpells;
|
||||||
ROGUE=GetSpellInfo(1833), -- cheap shot
|
if (IceHUD.WowVer >= 30000)
|
||||||
PRIEST=GetSpellInfo(139), -- renew
|
defaultSpells = {
|
||||||
DRUID=GetSpellInfo(774), -- rejuvenation
|
ROGUE=GetSpellInfo(1833), -- cheap shot
|
||||||
WARRIOR=GetSpellInfo(6673), -- battle shout
|
PRIEST=GetSpellInfo(139), -- renew
|
||||||
MAGE=GetSpellInfo(168), -- frost armor
|
DRUID=GetSpellInfo(774), -- rejuvenation
|
||||||
WARLOCK=GetSpellInfo(1454), -- life tap
|
WARRIOR=GetSpellInfo(6673), -- battle shout
|
||||||
PALADIN=GetSpellInfo(1152), -- purify
|
MAGE=GetSpellInfo(168), -- frost armor
|
||||||
SHAMAN=GetSpellInfo(324), -- lightning shield
|
WARLOCK=GetSpellInfo(1454), -- life tap
|
||||||
HUNTER=GetSpellInfo(1978) -- serpent sting
|
PALADIN=GetSpellInfo(1152), -- purify
|
||||||
}
|
SHAMAN=GetSpellInfo(324), -- lightning shield
|
||||||
|
HUNTER=GetSpellInfo(1978), -- serpent sting
|
||||||
|
DEATHKNIGHT=GetSpellInfo(45462) -- plague strike
|
||||||
|
}
|
||||||
|
else
|
||||||
|
defaultSpells = {
|
||||||
|
ROGUE=GetSpellInfo(1833), -- cheap shot
|
||||||
|
PRIEST=GetSpellInfo(139), -- renew
|
||||||
|
DRUID=GetSpellInfo(774), -- rejuvenation
|
||||||
|
WARRIOR=GetSpellInfo(6673), -- battle shout
|
||||||
|
MAGE=GetSpellInfo(168), -- frost armor
|
||||||
|
WARLOCK=GetSpellInfo(1454), -- life tap
|
||||||
|
PALADIN=GetSpellInfo(1152), -- purify
|
||||||
|
SHAMAN=GetSpellInfo(324), -- lightning shield
|
||||||
|
HUNTER=GetSpellInfo(1978) -- serpent sting
|
||||||
|
}
|
||||||
|
end
|
||||||
local _, unitClass = UnitClass("player")
|
local _, unitClass = UnitClass("player")
|
||||||
return defaultSpells[unitClass]
|
return defaultSpells[unitClass]
|
||||||
end
|
end
|
||||||
@ -85,6 +101,10 @@ end
|
|||||||
-- 'Protected' methods --------------------------------------------------------
|
-- 'Protected' methods --------------------------------------------------------
|
||||||
|
|
||||||
function _FindSpellId(spellName)
|
function _FindSpellId(spellName)
|
||||||
|
if not spellName then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
for tab = 1, 4 do
|
for tab = 1, 4 do
|
||||||
local _, _, offset, numSpells = GetSpellTabInfo(tab)
|
local _, _, offset, numSpells = GetSpellTabInfo(tab)
|
||||||
|
|
||||||
|
@ -105,6 +105,13 @@ function PlayerMana.prototype:Enable(core)
|
|||||||
self:RegisterEvent("UNIT_MAXRAGE", "Update")
|
self:RegisterEvent("UNIT_MAXRAGE", "Update")
|
||||||
self:RegisterEvent("UNIT_ENERGY", "UpdateEnergy")
|
self:RegisterEvent("UNIT_ENERGY", "UpdateEnergy")
|
||||||
self:RegisterEvent("UNIT_MAXENERGY", "Update")
|
self:RegisterEvent("UNIT_MAXENERGY", "Update")
|
||||||
|
-- DK rune stuff
|
||||||
|
if IceHUD.WowVer >= 30000 then
|
||||||
|
self:RegisterEvent("UNIT_RUNIC_POWER", "Update")
|
||||||
|
self:RegisterEvent("RUNE_TYPE_UPDATE", "Update")
|
||||||
|
self:RegisterEvent("RUNE_POWER_UPDATE", "Update")
|
||||||
|
self:RegisterEvent("RUNE_REGEN_UPDATE", "Update")
|
||||||
|
end
|
||||||
|
|
||||||
self:RegisterEvent("UNIT_DISPLAYPOWER", "ManaType")
|
self:RegisterEvent("UNIT_DISPLAYPOWER", "ManaType")
|
||||||
|
|
||||||
@ -209,7 +216,7 @@ end
|
|||||||
|
|
||||||
-- OVERRIDE
|
-- OVERRIDE
|
||||||
function PlayerMana.prototype:UpdateBar(scale, color, alpha)
|
function PlayerMana.prototype:UpdateBar(scale, color, alpha)
|
||||||
self.noFlash = (self.manaType ~= 0)
|
self.noFlash = (self.manaType ~= 0 and self.manaType ~= 6)
|
||||||
|
|
||||||
PlayerMana.super.prototype.UpdateBar(self, scale, color, alpha)
|
PlayerMana.super.prototype.UpdateBar(self, scale, color, alpha)
|
||||||
end
|
end
|
||||||
|
@ -739,8 +739,14 @@ function TargetInfo.prototype:UpdateBuffs()
|
|||||||
|
|
||||||
|
|
||||||
for i = 1, IceCore.BuffLimit do
|
for i = 1, IceCore.BuffLimit do
|
||||||
local buffName, buffRank, buffTexture, buffApplications,
|
local buffName, buffRank, buffTexture, buffApplications, buffType, buffDuration, buffTimeLeft;
|
||||||
buffDuration, buffTimeLeft = UnitBuff("target", i, filter and not hostile)
|
if IceHUD.WowVer >= 30000 then
|
||||||
|
buffName, buffRank, buffTexture, buffApplications, buffType, buffDuration, buffTimeLeft
|
||||||
|
= UnitBuff("target", i, filter and not hostile)
|
||||||
|
else
|
||||||
|
buffName, buffRank, buffTexture, buffApplications, buffDuration, buffTimeLeft
|
||||||
|
= UnitBuff("target", i, filter and not hostile)
|
||||||
|
end
|
||||||
|
|
||||||
if (buffTexture) then
|
if (buffTexture) then
|
||||||
self.frame.buffFrame.buffs[i].icon.texture:SetTexture(buffTexture)
|
self.frame.buffFrame.buffs[i].icon.texture:SetTexture(buffTexture)
|
||||||
|
@ -39,6 +39,13 @@ function TargetMana.prototype:Enable(core)
|
|||||||
self:RegisterEvent("UNIT_MAXFOCUS", "Update")
|
self:RegisterEvent("UNIT_MAXFOCUS", "Update")
|
||||||
self:RegisterEvent("UNIT_AURA", "Update")
|
self:RegisterEvent("UNIT_AURA", "Update")
|
||||||
self:RegisterEvent("UNIT_FLAGS", "Update")
|
self:RegisterEvent("UNIT_FLAGS", "Update")
|
||||||
|
-- DK rune stuff
|
||||||
|
if IceHUD.WowVer >= 30000 then
|
||||||
|
self:RegisterEvent("UNIT_RUNIC_POWER", "Update")
|
||||||
|
self:RegisterEvent("RUNE_TYPE_UPDATE", "Update")
|
||||||
|
self:RegisterEvent("RUNE_POWER_UPDATE", "Update")
|
||||||
|
self:RegisterEvent("RUNE_REGEN_UPDATE", "Update")
|
||||||
|
end
|
||||||
|
|
||||||
self:Update("target")
|
self:Update("target")
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user