Skip to content

Commit

Permalink
Add priest tags for spirit shell and clarity of will
Browse files Browse the repository at this point in the history
  • Loading branch information
xmyno committed Dec 25, 2014
1 parent e455e79 commit 67290a0
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cfg.lua
Expand Up @@ -74,7 +74,7 @@ local cfg = CreateFrame("Frame")
--["MAGE"] = ,
["MONK"] = "[Monk:EnvelopingMist][Monk:RenewingMist]",
--["PALADIN"] = ,
["PRIEST"] = "[Priest:Renew][Priest:PowerWordShield]",
["PRIEST"] = "[Priest:Renew][Priest:SpiritShell][Priest:ClarityOfWill][Priest:PowerWordShield]",
--["ROGUE"] = tricks,
["SHAMAN"] = "[Shaman:Riptide][Shaman:EarthShield]",
--["WARLOCK"] = ,
Expand Down
32 changes: 32 additions & 0 deletions tags.lua
Expand Up @@ -343,6 +343,38 @@ tags.Methods["Priest:PowerWordShield"] = function(unit)
end
end

local CLARITY_OF_WILL = GetSpellInfo(152118)
tags.Events["Priest:ClarityOfWill"] = 'UNIT_AURA'
tags.Methods["Priest:ClarityOfWill"] = function(unit)

local _, _, _, _, _, _, expirationTime = UnitAura(unit, CLARITY_OF_WILL)
if expirationTime then
return format("|cff33cc00%.0f|r ", expirationTime - GetTime())
end
end

local SPIRIT_SHELL = GetSpellInfo(114908)
tags.Events["Priest:SpiritShell"] = 'UNIT_AURA'
tags.Methods["Priest:SpiritShell"] = function(unit)

local _, _, _, _, _, _, expirationTime, _, _, _, spellId = UnitAura(unit, SPIRIT_SHELL)

if expirationTime then
-- check if it's the spell buff itself and not the absorb buff. if yes search through buffs by index
if spellId == 109964 then
for i = 1, 40 do
_, _, _, _, _, _, expirationTime, _, _, _, spellId = UnitAura(unit, i)
-- we found the correct buff?
if spellId == 114908 then break end
end
end

if spellId == 114908 then
return format("|cffd814ff%.0f|r ", expirationTime - GetTime())
end
end
end

local RENEW = GetSpellInfo(139)
tags.Events["Priest:Renew"] = 'UNIT_AURA'
tags.Methods["Priest:Renew"] = function(unit)
Expand Down

0 comments on commit 67290a0

Please sign in to comment.