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>
This commit is contained in:
1 parent
8a33ddc010
commit
3d8aaabaf3
4 files changed
+20
-44
No files matched your search
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user