diff options
| author | Subv <s.v.h21@hotmail.com> | 2012-04-14 20:03:47 -0500 |
|---|---|---|
| committer | Subv <s.v.h21@hotmail.com> | 2012-04-14 20:08:16 -0500 |
| commit | 3d8aaabaf3f4c627a583ff8c5a611a7b02400931 (patch) | |
| tree | f13064d5bd0dd0ab17fd08b1d8aa9b04e73774a7 /src/server/scripts | |
| parent | 8a33ddc010a4be4a181191d2b8b06dee611a1a9c (diff) | |
Core/Spells: Do not proc spells with PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_(NEG|POS) if there is no target, reimplemented Storm, Earth and Fire talent in another way
Closes #3367
Closes #2424
If you find more spells that are broken because of this, please notify us
Signed-off-by: Subv <s.v.h21@hotmail.com>
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Spells/spell_shaman.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 1a0f4576fea..84e3bd8d604 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -35,6 +35,9 @@ enum ShamanSpells SHAMAN_SPELL_FIRE_NOVA_TRIGGERED_R1 = 8349, SHAMAN_SPELL_SATED = 57724, SHAMAN_SPELL_EXHAUSTION = 57723, + + SHAMAN_SPELL_STORM_EARTH_AND_FIRE = 51483, + EARTHBIND_TOTEM_SPELL_EARTHGRAB = 64695, // For Earthen Power SHAMAN_TOTEM_SPELL_EARTHBIND_TOTEM = 6474, @@ -221,9 +224,25 @@ class spell_sha_earthbind_totem : public SpellScriptLoader caster->CastSpell(caster, SHAMAN_TOTEM_SPELL_EARTHEN_POWER, true, NULL, aurEff); } + void Apply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (!GetCaster()) + return; + Player* owner = GetCaster()->GetCharmerOrOwnerPlayerOrPlayerItself(); + if (!owner) + return; + // Storm, Earth and Fire + if (AuraEffect* aurEff = owner->GetAuraEffectOfRankedSpell(SHAMAN_SPELL_STORM_EARTH_AND_FIRE, EFFECT_1)) + { + if (roll_chance_i(aurEff->GetAmount())) + GetCaster()->CastSpell(GetCaster(), EARTHBIND_TOTEM_SPELL_EARTHGRAB, false); + } + } + void Register() { OnEffectPeriodic += AuraEffectPeriodicFn(spell_sha_earthbind_totem_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + OnEffectApply += AuraEffectApplyFn(spell_sha_earthbind_totem_AuraScript::Apply, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL); } }; |
