aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Spells
diff options
context:
space:
mode:
authorPolarCookie <sei009@post.uit.no>2019-03-08 08:34:16 +0100
committerGiacomo Pozzoni <giacomopoz@gmail.com>2019-03-08 08:34:16 +0100
commitec3cb05d7fbc5cef60d000af910dc39dd3af92bf (patch)
treef0b35878eb73b046aca3964ae5d0d790cec03171 /src/server/scripts/Spells
parent3eecadcebf11f7418b6cdcf5d3602cea5e4e60f7 (diff)
Core/Spell: SpellAura Redux (#22794)
* typo and correction * spell aura no longer shared between targets _spellAura isolated * SPELL_AURA_CONTROL_VEHICLE is not strictly single target spell Steam Tank Control and Wyrmrest Commander units can reseat themselves again * Rename 9999_99_99_99_world.sql to 2019_03_08_00_world.sql
Diffstat (limited to 'src/server/scripts/Spells')
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp21
-rw-r--r--src/server/scripts/Spells/spell_warlock.cpp2
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 e8c1b3438ff..48ab431147a 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -4126,6 +4126,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 FreezingCircleSpells
{
@@ -4289,5 +4309,6 @@ 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);
}
diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp
index 80c96a18bdc..4195b828046 100644
--- a/src/server/scripts/Spells/spell_warlock.cpp
+++ b/src/server/scripts/Spells/spell_warlock.cpp
@@ -773,7 +773,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