aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua Deus <95978183+aquadeus@users.noreply.github.com>2022-06-08 15:52:33 +0200
committerGitHub <noreply@github.com>2022-06-08 15:52:33 +0200
commitcac5b22f455e2c9f24bf71fd51d8c2a06019bf89 (patch)
treef42720d3339819e1b2a77639c3a31de40fb2130a /src
parenta4eafbd3f6a4d4ea4934dca564cd6c4beae54280 (diff)
Scripts/Spells: Update and fix Druid Survival Instincts script (#27969)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index 55331f0fbef..40ffe620427 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -1036,12 +1036,9 @@ class spell_dru_survival_instincts : public AuraScript
return ValidateSpellInfo({ SPELL_DRUID_SURVIVAL_INSTINCTS });
}
- void AfterApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
+ void AfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- Unit* target = GetTarget();
- CastSpellExtraArgs args(aurEff);
- args.AddSpellMod(SPELLVALUE_BASE_POINT0, target->CountPctFromMaxHealth(aurEff->GetAmount()));
- target->CastSpell(target, SPELL_DRUID_SURVIVAL_INSTINCTS, args);
+ GetTarget()->CastSpell(GetTarget(), SPELL_DRUID_SURVIVAL_INSTINCTS, true);
}
void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
@@ -1051,8 +1048,8 @@ class spell_dru_survival_instincts : public AuraScript
void Register() override
{
- AfterEffectApply += AuraEffectApplyFn(spell_dru_survival_instincts::AfterApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK);
- AfterEffectRemove += AuraEffectRemoveFn(spell_dru_survival_instincts::AfterRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK);
+ AfterEffectApply += AuraEffectApplyFn(spell_dru_survival_instincts::AfterApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ AfterEffectRemove += AuraEffectRemoveFn(spell_dru_survival_instincts::AfterRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};