aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2021_06_20_00_world_2018_02_12_02_world.sql6
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp4
-rw-r--r--src/server/scripts/Northrend/zone_wintergrasp.cpp34
3 files changed, 38 insertions, 6 deletions
diff --git a/sql/updates/world/master/2021_06_20_00_world_2018_02_12_02_world.sql b/sql/updates/world/master/2021_06_20_00_world_2018_02_12_02_world.sql
new file mode 100644
index 00000000000..98913424a12
--- /dev/null
+++ b/sql/updates/world/master/2021_06_20_00_world_2018_02_12_02_world.sql
@@ -0,0 +1,6 @@
+UPDATE `serverside_spell` SET `BaseLevel`=0, `SpellLevel`=0, `SpellFamilyName`=0, `SpellFamilyFlags1`=0, `PreventionType`=0 WHERE `Id`=47802;
+
+DELETE FROM `serverside_spell_effect` WHERE `SpellID`=47802;
+INSERT INTO `serverside_spell_effect` (`SpellID`,`EffectIndex`,`Effect`,`ImplicitTarget1`,`EffectAura`) VALUES
+(47802,0,6,1,118),
+(47802,1,6,1,88);
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 2cfa5155dfb..051cf5c1b61 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -7429,10 +7429,6 @@ uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, u
if (maxval)
AddPct(TakenTotalMod, maxval);
- // Tenacity increase healing % taken
- if (AuraEffect const* Tenacity = GetAuraEffect(58549, 0))
- AddPct(TakenTotalMod, Tenacity->GetAmount());
-
// Nourish cast
if (spellProto->SpellFamilyName == SPELLFAMILY_DRUID && spellProto->SpellFamilyFlags[1] & 0x2000000)
{
diff --git a/src/server/scripts/Northrend/zone_wintergrasp.cpp b/src/server/scripts/Northrend/zone_wintergrasp.cpp
index 14834ce8b1c..550b6fa3f28 100644
--- a/src/server/scripts/Northrend/zone_wintergrasp.cpp
+++ b/src/server/scripts/Northrend/zone_wintergrasp.cpp
@@ -29,6 +29,7 @@
#include "ScriptedGossip.h"
#include "ScriptSystem.h"
#include "SpellAuras.h"
+#include "SpellAuraEffects.h"
#include "SpellScript.h"
#include "Vehicle.h"
#include "WorldSession.h"
@@ -587,14 +588,43 @@ class spell_wintergrasp_tenacity_refresh : public AuraScript
{
PrepareAuraScript(spell_wintergrasp_tenacity_refresh);
- void Refresh(AuraEffect* /*aurEff*/)
+ bool Validate(SpellInfo const* spellInfo) override
{
- GetAura()->RefreshDuration();
+ SpellEffectInfo const* effect2 = spellInfo->GetEffect(EFFECT_2);
+ if (!effect2)
+ return false;
+ uint32 triggeredSpellId = effect2->CalcValue();
+ return !triggeredSpellId || ValidateSpellInfo({ triggeredSpellId });
+ }
+
+ void Refresh(AuraEffect* aurEff)
+ {
+ if (uint32 triggeredSpellId = aurEff->GetAmount())
+ {
+ int32 bp = 0;
+ if (AuraEffect const* healEffect = GetEffect(EFFECT_0))
+ bp = healEffect->GetAmount();
+
+ CastSpellExtraArgs args(aurEff);
+ args
+ .AddSpellMod(SPELLVALUE_BASE_POINT0, bp)
+ .AddSpellMod(SPELLVALUE_BASE_POINT1, bp);
+ GetTarget()->CastSpell(nullptr, triggeredSpellId, args);
+ }
+
+ RefreshDuration();
+ }
+
+ void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
+ {
+ if (uint32 triggeredSpellId = aurEff->GetAmount())
+ GetTarget()->RemoveAurasDueToSpell(triggeredSpellId);
}
void Register() override
{
OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(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);
}
};