- 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:
Parnic
2008-07-26 19:14:47 +00:00
parent 7e42238219
commit 76f4e1b020
5 changed files with 56 additions and 14 deletions

View File

@ -5,6 +5,8 @@ local SML = AceLibrary("LibSharedMedia-3.0")
IceHUD.CurrTagVersion = 3
IceHUD.WowVer = select(4, GetBuildInfo())
IceHUD.Location = "Interface\\AddOns\\IceHUD"
IceHUD.options =
{

View File

@ -39,17 +39,33 @@ function GlobalCoolDown.prototype:Disable(core)
end
function GlobalCoolDown.prototype:GetSpellName()
local 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
}
local defaultSpells;
if (IceHUD.WowVer >= 30000)
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
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")
return defaultSpells[unitClass]
end
@ -85,6 +101,10 @@ end
-- 'Protected' methods --------------------------------------------------------
function _FindSpellId(spellName)
if not spellName then
return nil
end
for tab = 1, 4 do
local _, _, offset, numSpells = GetSpellTabInfo(tab)

View File

@ -105,6 +105,13 @@ function PlayerMana.prototype:Enable(core)
self:RegisterEvent("UNIT_MAXRAGE", "Update")
self:RegisterEvent("UNIT_ENERGY", "UpdateEnergy")
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")
@ -209,7 +216,7 @@ end
-- OVERRIDE
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)
end

View File

@ -739,8 +739,14 @@ function TargetInfo.prototype:UpdateBuffs()
for i = 1, IceCore.BuffLimit do
local buffName, buffRank, buffTexture, buffApplications,
buffDuration, buffTimeLeft = UnitBuff("target", i, filter and not hostile)
local buffName, buffRank, buffTexture, buffApplications, buffType, buffDuration, buffTimeLeft;
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
self.frame.buffFrame.buffs[i].icon.texture:SetTexture(buffTexture)

View File

@ -39,6 +39,13 @@ function TargetMana.prototype:Enable(core)
self:RegisterEvent("UNIT_MAXFOCUS", "Update")
self:RegisterEvent("UNIT_AURA", "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")
end