aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/3.3.5/2020_08_29_01_world.sql3
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp15
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp28
3 files changed, 30 insertions, 16 deletions
diff --git a/sql/updates/world/3.3.5/2020_08_29_01_world.sql b/sql/updates/world/3.3.5/2020_08_29_01_world.sql
new file mode 100644
index 00000000000..7a217df5fa1
--- /dev/null
+++ b/sql/updates/world/3.3.5/2020_08_29_01_world.sql
@@ -0,0 +1,3 @@
+-- [Druid] Nurturing Instinct
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (-33872, 33872, 33873);
+INSERT INTO `spell_script_names` VALUES (-33872, 'spell_dru_nurturing_instinct');
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index b65358a706f..0a665fdcad1 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -1216,21 +1216,6 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
// Savage Roar
if (target->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_DRUID, 0, 0x10000000, 0))
target->CastSpell(target, 62071, true);
- // Nurturing Instinct
- if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT, SPELLFAMILY_DRUID, 2254, 0))
- {
- uint32 spellId3 = 0;
- switch (aurEff->GetId())
- {
- case 33872:
- spellId3 = 47179;
- break;
- case 33873:
- spellId3 = 47180;
- break;
- }
- target->CastSpell(target, spellId3, this);
- }
// Master Shapeshifter - Cat
if (AuraEffect const* aurEff = target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2851, 0))
{
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index 3fc2b43217b..981db329ee0 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -91,7 +91,9 @@ enum DruidSpells
SPELL_DRUID_BARKSKIN_01 = 63058,
SPELL_DRUID_RESTORATION_T10_2P_BONUS = 70658,
SPELL_DRUID_FRENZIED_REGENERATION_HEAL = 22845,
- SPELL_DRUID_GLYPH_OF_NOURISH = 62971
+ SPELL_DRUID_GLYPH_OF_NOURISH = 62971,
+ SPELL_DRUID_NURTURING_INSTINCT_R1 = 47179,
+ SPELL_DRUID_NURTURING_INSTINCT_R2 = 47180
};
enum MiscSpells
@@ -1892,6 +1894,29 @@ class spell_dru_wild_growth_aura : public AuraScript
float _baseReduction = 2.f;
};
+class spell_dru_nurturing_instinct : public AuraScript
+{
+ PrepareAuraScript(spell_dru_nurturing_instinct);
+
+ void AfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (Player* player = GetTarget()->ToPlayer())
+ player->AddAura(GetSpellInfo()->GetRank() == 1 ? SPELL_DRUID_NURTURING_INSTINCT_R1 : SPELL_DRUID_NURTURING_INSTINCT_R2, player);
+ }
+
+ void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (Player* player = GetTarget()->ToPlayer())
+ player->RemoveAura(GetSpellInfo()->GetRank() == 1 ? SPELL_DRUID_NURTURING_INSTINCT_R1 : SPELL_DRUID_NURTURING_INSTINCT_R2);
+ }
+
+ void Register() override
+ {
+ AfterEffectApply += AuraEffectApplyFn(spell_dru_nurturing_instinct::AfterApply, EFFECT_0, SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT, AURA_EFFECT_HANDLE_REAL);
+ AfterEffectRemove += AuraEffectRemoveFn(spell_dru_nurturing_instinct::AfterRemove, EFFECT_0, SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT, AURA_EFFECT_HANDLE_REAL);
+ }
+};
+
void AddSC_druid_spell_scripts()
{
RegisterSpellScript(spell_dru_barkskin);
@@ -1943,4 +1968,5 @@ void AddSC_druid_spell_scripts()
RegisterSpellScript(spell_dru_t10_restoration_4p_bonus);
RegisterSpellScript(spell_dru_t10_restoration_4p_bonus_dummy);
RegisterSpellAndAuraScriptPair(spell_dru_wild_growth, spell_dru_wild_growth_aura);
+ RegisterSpellScript(spell_dru_nurturing_instinct);
}