diff options
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 21 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_warlock.cpp | 2 |
2 files changed, 22 insertions, 1 deletions
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 24edf343028..e8a8756a109 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -4060,6 +4060,26 @@ class spell_corrupting_plague_aura : public AuraScript } }; +enum SiegeTankControl +{ + SPELL_SIEGE_TANK_CONTROL = 47963 +}; + +class spell_gen_vehicle_control_link : public AuraScript +{ + PrepareAuraScript(spell_gen_vehicle_control_link); + + void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetTarget()->RemoveAurasDueToSpell(SPELL_SIEGE_TANK_CONTROL); //aurEff->GetAmount() + } + + void Register() override + { + AfterEffectRemove += AuraEffectRemoveFn(spell_gen_vehicle_control_link::OnRemove, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + } +}; + // 34779 - Freezing Circle enum FreezingCircleMisc { @@ -4471,6 +4491,7 @@ void AddSC_generic_spell_scripts() RegisterSpellScript(spell_gen_clear_debuffs); RegisterAuraScript(spell_gen_pony_mount_check); RegisterAuraScript(spell_corrupting_plague_aura); + RegisterAuraScript(spell_gen_vehicle_control_link); RegisterSpellScript(spell_freezing_circle); RegisterSpellScript(spell_gen_decimatus_transformation_sickness); RegisterSpellScript(spell_gen_anetheron_summon_towering_infernal); diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index 035262d0b4c..acd01840b92 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -318,7 +318,7 @@ class spell_warl_haunt : public SpellScriptLoader { if (Aura* aura = GetHitAura()) if (AuraEffect* aurEff = aura->GetEffect(EFFECT_1)) - aurEff->SetAmount(CalculatePct(aurEff->GetAmount(), GetHitDamage())); + aurEff->SetAmount(CalculatePct(GetHitDamage(), aurEff->GetAmount())); } void Register() override |
