Skip to content

Commit

Permalink
Shaman's PowerSurge proc in SoD
Browse files Browse the repository at this point in the history
  • Loading branch information
d87 committed Feb 12, 2024
1 parent 4f42bc8 commit 4ffc194
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions ClassicSpellActivations.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ AddSpellName("HealingTouchSoD", 25297, 9889, 9888, 9758, 8903, 6778, 5189, 5188,
AddSpellName("HowlingBlast", 51411, 51410, 51409, 49184)
AddSpellName("FrostStrike", 55268, 51419, 51418, 51417, 51416, 49143)

AddSpellName("ChainLightning", 408484, 408482, 408481, 408479, 10605, 2860, 930, 421)
AddSpellName("ChainHeal", 416246, 416245, 416244, 10623, 10622, 1064)
AddSpellName("LavaBurst", 408490)


local function OnAuraStateChange(conditionFunc, actions)
local state = -1
Expand Down Expand Up @@ -271,7 +275,8 @@ local runeSpells = {
["VictoryRush"] = 402927,
[402927] = 403470, -- spell ID = engraving ID
["BloodSurgeSoD"] = 413380,
[413380] = 416004
[413380] = 416004,
["PowerSurgeSoD"] = 415100
}


Expand Down Expand Up @@ -1014,7 +1019,7 @@ end
-----------------
-- SHAMAN
-----------------
if APILevel == 2 then
if APILevel <= 2 then

local CheckShamanisticFocus = OnAuraStateChange(function() return FindAura("player", 43339, "HELPFUL") end,
function(present, duration)
Expand All @@ -1030,16 +1035,34 @@ local CheckShamanisticFocus = OnAuraStateChange(function() return FindAura("play
end
)

local CheckPowerSurge = OnAuraStateChange(function() return FindAura("player", 415105, "HELPFUL") end,
function(present, duration)
if present then
f:Activate("ChainLightning", "PowerSurge", duration, true)
f:Activate("ChainHeal", "PowerSurge", duration, true)
f:Activate("LavaBurst", "PowerSurge", duration, true)
else
f:Deactivate("ChainLightning", "PowerSurge")
f:Deactivate("ChainHeal", "PowerSurge")
f:Deactivate("LavaBurst", "PowerSurge")
end
end
)

ns.configs.SHAMAN = function(self)
self:SetScript("OnUpdate", self.timerOnUpdate)
local hasShamanisticFocusTalent = IsPlayerSpell(43338)
local hasPowerSurgeSoD = ns.findHighestRank("PowerSurgeSoD")
if hasShamanisticFocusTalent then
self:RegisterUnitEvent("UNIT_AURA", "player")
self:SetScript("OnUpdate", self.timerOnUpdate)
self.UNIT_AURA = function(self, event, unit)
if hasShamanisticFocusTalent then
CheckShamanisticFocus()
end
if hasPowerSurgeSoD then
CheckPowerSurge()
end
end
else
self:SetScript("OnUpdate", nil)
Expand Down

0 comments on commit 4ffc194

Please sign in to comment.