fix(Scripts/ShadowLabyrinth): Murmur's Touch (#16600)

This commit is contained in:
Angelo Venturini
2023-06-21 23:12:23 -03:00
committed by GitHub
parent 4d3756262d
commit a62143e540
2 changed files with 17 additions and 11 deletions
@@ -0,0 +1,4 @@
--
DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_murmur_touch', 'spell_shockwave_knockback');
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(33686, 'spell_shockwave_knockback');
@@ -208,25 +208,27 @@ class spell_murmur_thundering_storm : public SpellScript
} }
}; };
// 33711/38794 - Murmur's Touch // 33686 - Shockwave (Murmur's Touch final explosion)
class spell_murmur_touch : public AuraScript class spell_shockwave_knockback : public SpellScript
{ {
PrepareAuraScript(spell_murmur_touch); PrepareSpellScript(spell_shockwave_knockback);
void HandleAfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE) return ValidateSpellInfo({ SPELL_SHOCKWAVE_SERVERSIDE });
}
void HandleOnHit()
{
if (Unit* target = GetHitUnit())
{ {
if (GetTarget()) target->CastSpell(target, SPELL_SHOCKWAVE_SERVERSIDE, true);
{
GetTarget()->CastSpell(GetTarget(), SPELL_SHOCKWAVE_SERVERSIDE, true);
}
} }
} }
void Register() override void Register() override
{ {
AfterEffectRemove += AuraEffectRemoveFn(spell_murmur_touch::HandleAfterRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL); OnHit += SpellHitFn(spell_shockwave_knockback::HandleOnHit);
} }
}; };
@@ -252,6 +254,6 @@ void AddSC_boss_murmur()
{ {
RegisterShadowLabyrinthCreatureAI(boss_murmur); RegisterShadowLabyrinthCreatureAI(boss_murmur);
RegisterSpellScript(spell_murmur_thundering_storm); RegisterSpellScript(spell_murmur_thundering_storm);
RegisterSpellScript(spell_murmur_touch); RegisterSpellScript(spell_shockwave_knockback);
RegisterSpellScript(spell_murmur_sonic_boom_effect); RegisterSpellScript(spell_murmur_sonic_boom_effect);
} }