aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2013-06-16 17:56:40 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2013-06-16 17:56:40 +0200
commit8c42b4ce8a6c9753e0d988f2d06d931ba49ee4ad (patch)
treecdce495deb6734080d4175c49be8039a98533789 /src
parent31b0b1afb8da2d72f197a61bf23787a7d783962a (diff)
Core/Spells: Fix shaman lava surge proc
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp
index 045227a8f99..db24d860a3e 100644
--- a/src/server/scripts/Spells/spell_shaman.cpp
+++ b/src/server/scripts/Spells/spell_shaman.cpp
@@ -42,8 +42,10 @@ enum ShamanSpells
SPELL_SHAMAN_GLYPH_OF_HEALING_STREAM_TOTEM = 55456,
SPELL_SHAMAN_GLYPH_OF_MANA_TIDE = 55441,
SPELL_SHAMAN_GLYPH_OF_THUNDERSTORM = 62132,
+ SPELL_SHAMAN_LAVA_BURST = 51505,
SPELL_SHAMAN_LAVA_FLOWS_R1 = 51480,
SPELL_SHAMAN_LAVA_FLOWS_TRIGGERED_R1 = 65264,
+ SPELL_SHAMAN_LAVA_SURGE = 77762,
SPELL_SHAMAN_SATED = 57724,
SPELL_SHAMAN_STORM_EARTH_AND_FIRE = 51483,
SPELL_SHAMAN_TOTEM_EARTHBIND_EARTHGRAB = 64695,
@@ -585,6 +587,80 @@ class spell_sha_lava_lash : public SpellScriptLoader
}
};
+class spell_sha_lava_surge : public SpellScriptLoader
+{
+ public:
+ spell_sha_lava_surge() : SpellScriptLoader("spell_sha_lava_surge") { }
+
+ class spell_sha_lava_surge_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_sha_lava_surge_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_LAVA_SURGE))
+ return false;
+ return true;
+ }
+
+ void HandleEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
+ {
+ PreventDefaultAction(); // will prevent default effect execution
+
+ GetTarget()->CastSpell(GetTarget(), SPELL_SHAMAN_LAVA_SURGE, true);
+ }
+
+ void Register()
+ {
+ OnEffectProc += AuraEffectProcFn(spell_sha_lava_surge_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_sha_lava_surge_AuraScript();
+ }
+};
+
+class spell_sha_lava_surge_proc : public SpellScriptLoader
+{
+ public:
+ spell_sha_lava_surge_proc() : SpellScriptLoader("spell_sha_lava_surge_proc") { }
+
+ class spell_sha_lava_surge_proc_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_sha_lava_surge_proc_SpellScript)
+
+ bool Validate(SpellInfo const* /*spellInfo*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_LAVA_BURST))
+ return false;
+ return true;
+ }
+
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ GetCaster()->ToPlayer()->RemoveSpellCooldown(SPELL_SHAMAN_LAVA_BURST, true);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_sha_lava_surge_proc_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_sha_lava_surge_proc_SpellScript();
+ }
+};
+
// 16191 - Mana Tide
/// Updated 4.3.4
class spell_sha_mana_tide_totem : public SpellScriptLoader
@@ -658,6 +734,8 @@ void AddSC_shaman_spell_scripts()
new spell_sha_healing_stream_totem();
new spell_sha_heroism();
new spell_sha_lava_lash();
+ new spell_sha_lava_surge();
+ new spell_sha_lava_surge_proc();
new spell_sha_mana_tide_totem();
new spell_sha_thunderstorm();
}