diff --git a/src/server/scripts/EasternKingdoms/Vashjir/zone_vashjir.cpp b/src/server/scripts/EasternKingdoms/Vashjir/zone_vashjir.cpp index f0aed2d9aa..af8e48d835 100644 --- a/src/server/scripts/EasternKingdoms/Vashjir/zone_vashjir.cpp +++ b/src/server/scripts/EasternKingdoms/Vashjir/zone_vashjir.cpp @@ -35,22 +35,20 @@ class spell_vashjir_sea_legs_aura : public AuraScript return ValidateSpellInfo({ Spells::SeaLegsAura }); } - void CalcPeriodic(AuraEffect const* /*aurEff*/, bool& isPeriodic, int32& amplitude) const + static void CalcPeriodic(AuraScript const&, AuraEffect const* /*aurEff*/, bool& isPeriodic, int32& amplitude) { isPeriodic = true; amplitude = 500; } - void OnUpdate(AuraEffect* /*aurEff*/) + void OnUpdate(AuraEffect const* /*aurEff*/) const { Unit* target = GetTarget(); if (target->IsInWater()) target->CastSpell(target, Spells::SeaLegsAura, TRIGGERED_IGNORE_CAST_IN_PROGRESS); - else - target->RemoveAura(Spells::SeaLegsAura); } - void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const { GetTarget()->RemoveAura(Spells::SeaLegsAura); } @@ -58,7 +56,7 @@ class spell_vashjir_sea_legs_aura : public AuraScript void Register() override { DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_vashjir_sea_legs_aura::CalcPeriodic, EFFECT_0, SPELL_AURA_DUMMY); - OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_vashjir_sea_legs_aura::OnUpdate, EFFECT_0, SPELL_AURA_DUMMY); + OnEffectPeriodic += AuraEffectPeriodicFn(spell_vashjir_sea_legs_aura::OnUpdate, EFFECT_0, SPELL_AURA_DUMMY); AfterEffectRemove += AuraEffectRemoveFn(spell_vashjir_sea_legs_aura::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); } };