aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/3.3.5/2018_02_12_03_world.sql1
-rw-r--r--src/server/scripts/Northrend/zone_wintergrasp.cpp10
2 files changed, 7 insertions, 4 deletions
diff --git a/sql/updates/world/3.3.5/2018_02_12_03_world.sql b/sql/updates/world/3.3.5/2018_02_12_03_world.sql
new file mode 100644
index 00000000000..39636d3935e
--- /dev/null
+++ b/sql/updates/world/3.3.5/2018_02_12_03_world.sql
@@ -0,0 +1 @@
+UPDATE `spell_dbc` SET `EffectApplyAuraName1`=118 WHERE `Id`=47802;
diff --git a/src/server/scripts/Northrend/zone_wintergrasp.cpp b/src/server/scripts/Northrend/zone_wintergrasp.cpp
index fbbfd750aad..4649ca2e5c7 100644
--- a/src/server/scripts/Northrend/zone_wintergrasp.cpp
+++ b/src/server/scripts/Northrend/zone_wintergrasp.cpp
@@ -594,9 +594,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 = GetSpellInfo()->Effects[aurEff->GetEffIndex()].CalcValue())
{
int32 bp = 0;
if (AuraEffect const* healEffect = GetEffect(EFFECT_0))
@@ -614,13 +616,13 @@ class spell_wintergrasp_tenacity_refresh : public AuraScript
void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
- if (uint32 triggeredSpellId = aurEff->GetAmount())
+ if (uint32 triggeredSpellId = GetSpellInfo()->Effects[aurEff->GetEffIndex()].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);
}
};