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

View File

@@ -208,25 +208,27 @@ class spell_murmur_thundering_storm : public SpellScript
}
};
// 33711/38794 - Murmur's Touch
class spell_murmur_touch : public AuraScript
// 33686 - Shockwave (Murmur's Touch final explosion)
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())
{
GetTarget()->CastSpell(GetTarget(), SPELL_SHOCKWAVE_SERVERSIDE, true);
}
target->CastSpell(target, SPELL_SHOCKWAVE_SERVERSIDE, true);
}
}
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);
RegisterSpellScript(spell_murmur_thundering_storm);
RegisterSpellScript(spell_murmur_touch);
RegisterSpellScript(spell_shockwave_knockback);
RegisterSpellScript(spell_murmur_sonic_boom_effect);
}