diff options
author | ariel- <ariel-@users.noreply.github.com> | 2018-02-12 18:56:57 -0300 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-06-20 01:15:00 +0200 |
commit | a342b864030941423b12c9d974705bc268be8f44 (patch) | |
tree | cdd0979cea0f02bd4bc6371127829846369ff532 | |
parent | 15810eb579c40ee2b3db35ef2a99b7c5cb70c985 (diff) |
Core/Scripts: fix Tenacity Aurascript (target is null on UpdatePeriodic)
- also aura amount increases with stack so we lose spellid info, calculate it from basepoints directly
- aura should be SPELL_AURA_MOD_HEALING_PCT instead of SPELL_AURA_MOD_HEALING_DONE_PERCENT (ie taken instead of done, confusing names)
(cherry picked from commit bc2a4c816d6dc893b9b0c8d5bf0a15fe085506c5)
-rw-r--r-- | src/server/scripts/Northrend/zone_wintergrasp.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/server/scripts/Northrend/zone_wintergrasp.cpp b/src/server/scripts/Northrend/zone_wintergrasp.cpp index 550b6fa3f28..a7db09490ad 100644 --- a/src/server/scripts/Northrend/zone_wintergrasp.cpp +++ b/src/server/scripts/Northrend/zone_wintergrasp.cpp @@ -597,9 +597,11 @@ class spell_wintergrasp_tenacity_refresh : public AuraScript return !triggeredSpellId || ValidateSpellInfo({ triggeredSpellId }); } - void Refresh(AuraEffect* aurEff) + void Refresh(AuraEffect const* aurEff) { - if (uint32 triggeredSpellId = aurEff->GetAmount()) + PreventDefaultAction(); + + if (uint32 triggeredSpellId = aurEff->GetSpellEffectInfo()->CalcValue()) { int32 bp = 0; if (AuraEffect const* healEffect = GetEffect(EFFECT_0)) @@ -617,13 +619,13 @@ class spell_wintergrasp_tenacity_refresh : public AuraScript void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) { - if (uint32 triggeredSpellId = aurEff->GetAmount()) + if (uint32 triggeredSpellId = aurEff->GetSpellEffectInfo()->CalcValue()) GetTarget()->RemoveAurasDueToSpell(triggeredSpellId); } void Register() override { - OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_wintergrasp_tenacity_refresh::Refresh, EFFECT_2, SPELL_AURA_PERIODIC_DUMMY); + OnEffectPeriodic += AuraEffectPeriodicFn(spell_wintergrasp_tenacity_refresh::Refresh, EFFECT_2, SPELL_AURA_PERIODIC_DUMMY); AfterEffectRemove += AuraEffectRemoveFn(spell_wintergrasp_tenacity_refresh::OnRemove, EFFECT_2, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL); } }; |