From 27bbba32aa2c935518b86a1425ce37f7739e9eea Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Sat, 29 Aug 2020 21:33:16 +0200 Subject: [PATCH] Core/Spells: * fixed Protector of the Innocent talent * fixed Tower of Radiance talent * fixed Blessed Life talent * fixed Gift of the Earthmother Rejuvenation instant heal effect --- .../world/4.3.4/2020_08_29_00_world.sql | 32 +++++++++++++++++ src/server/game/Spells/SpellMgr.cpp | 10 ++++++ src/server/scripts/Spells/spell_druid.cpp | 22 ++++++++++-- src/server/scripts/Spells/spell_paladin.cpp | 35 +++++++++++++++++++ 4 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 sql/updates/world/4.3.4/2020_08_29_00_world.sql diff --git a/sql/updates/world/4.3.4/2020_08_29_00_world.sql b/sql/updates/world/4.3.4/2020_08_29_00_world.sql new file mode 100644 index 00000000000..4e87053963a --- /dev/null +++ b/sql/updates/world/4.3.4/2020_08_29_00_world.sql @@ -0,0 +1,32 @@ +-- Protector of the Innocent +DELETE FROM `spell_proc` WHERE `SpellId`= -20138; +INSERT INTO `spell_proc` (`SpellId`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask2`, `SpellPhaseMask`, `SpellTypeMask`) VALUES +(-20138, 10, 0x40000000 | 0x80000000 | 0x8000, 0x400 | 0x4000, 2, 2); + +-- Tower of Radiance +DELETE FROM `spell_proc` WHERE `SpellId`= -84800; +INSERT INTO `spell_proc` (`SpellId`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask2`, `ProcFlags`, `SpellPhaseMask`, `SpellTypeMask`, `Chance`) VALUES +(-84800, 10, 0x40000000, 0x400, 0x4000, 2, 2, 100); + +-- Blessed Life +DELETE FROM `spell_proc` WHERE `SpellId`= -31828; +INSERT INTO `spell_proc` (`SpellId`, `SpellTypeMask`, `Cooldown`, `AttributesMask`) VALUES +(-31828, 1, 8000, 0x20); + +-- Spell Scripts +DELETE FROM `spell_script_names` WHERE `ScriptName` IN +('spell_pal_protector_of_the_innocent', +'spell_pal_tower_of_radiance'); + +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(-20138, 'spell_pal_protector_of_the_innocent'), +(-84800, 'spell_pal_tower_of_radiance'); + +-- Serverside Spells +DELETE FROM `spell_dbc` WHERE `Id`= 32733; +INSERT INTO `spell_dbc` (`Id`, `CastingTimeIndex`, `DurationIndex`, `RangeIndex`, `AttributesEx`, `Comment`) VALUES +(32733, 1, 0, 0, 0x100, '((Serverside/Non-DB2) Holy Power Talent Marker (DND)'); + +DELETE FROM `spell_bonus_data` WHERE `entry`= 64801; +INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `comments`) VALUES +(64801, 0, 'Druid - Rejuvenation (Gift of the Earthmother)'); diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index edda8544b55..e0f25c0707c 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -5741,6 +5741,16 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(2); // 5 yards (combat range) }); + // Gift of the Earthmother (Rank 2) + ApplySpellFix({ 51180 }, [](SpellInfo* spellInfo) + { + spellInfo->Effects[EFFECT_0].Effect = SPELL_EFFECT_APPLY_AURA; + spellInfo->Effects[EFFECT_0].ApplyAuraName = SPELL_AURA_DUMMY; + + spellInfo->Effects[EFFECT_1].Effect = SPELL_EFFECT_APPLY_AURA; + spellInfo->Effects[EFFECT_1].ApplyAuraName = SPELL_AURA_DUMMY; + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i]; diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 427bc4f2a2d..1d8be817186 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -103,6 +103,7 @@ enum DruidSpells SPELL_DRUID_STRENGTH_OF_THE_PANTHER = 90166, SPELL_DRUID_SUNFIRE = 93402, SPELL_DRUID_SUNFIRE_TALENT = 93401, + SPELL_DRUID_REJUVENATION_DIRECT_HEAL = 64801, SPELL_DRUID_TIGER_S_FURY_ENERGIZE = 51178, SPELL_DRUID_TREE_OF_LIFE = 33891, SPELL_DRUID_TREE_OF_LIFE_PASSIVE_1 = 5420, @@ -123,7 +124,8 @@ enum DruidSpellIconIds SPELL_ICON_ID_EUPHORIA = 4431, SPELL_ICON_ID_SAVAGE_DEFENDER = 146, SPELL_ICON_ID_GLYPH_OF_FEROCIOUS_BITE = 1680, - SPELL_ICON_ID_GLYPH_OF_FRENZIED_REGENERATION = 50 + SPELL_ICON_ID_GLYPH_OF_FRENZIED_REGENERATION = 50, + SPELL_ICON_ID_GIFT_OF_THE_EARTHMOTHER = 3186 }; enum MiscSpells @@ -1252,7 +1254,11 @@ class spell_dru_rejuvenation : public AuraScript { bool Validate(SpellInfo const* /*spellInfo*/) override { - return ValidateSpellInfo({ SPELL_DRUID_NATURES_BOUNTY }); + return ValidateSpellInfo( + { + SPELL_DRUID_NATURES_BOUNTY, + SPELL_DRUID_REJUVENATION_DIRECT_HEAL + }); } void AfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) @@ -1272,6 +1278,17 @@ class spell_dru_rejuvenation : public AuraScript } } + void HandleGiftOfTheEarthmother(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) + { + if (Unit* caster = GetCaster()) + { + if (AuraEffect const* giftEffect = caster->GetDummyAuraEffect(SPELLFAMILY_DRUID, SPELL_ICON_ID_GIFT_OF_THE_EARTHMOTHER, EFFECT_1)) + { + int32 bp = CalculatePct(aurEff->GetAmount() * aurEff->GetTotalTicks(), giftEffect->GetAmount()); + caster->CastCustomSpell(SPELL_DRUID_REJUVENATION_DIRECT_HEAL, SPELLVALUE_BASE_POINT0, bp, GetTarget(), true); + } + } + } void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { @@ -1289,6 +1306,7 @@ class spell_dru_rejuvenation : public AuraScript void Register() override { AfterEffectApply.Register(&spell_dru_rejuvenation::AfterApply, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL); + AfterEffectApply.Register(&spell_dru_rejuvenation::HandleGiftOfTheEarthmother, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK); AfterEffectRemove.Register(&spell_dru_rejuvenation::AfterRemove, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL); } }; diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 6342b958a9f..17d660049c8 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -1955,6 +1955,39 @@ class spell_pal_divine_shield : public SpellScript } }; +// -20138 - Protector of the Innocent +class spell_pal_protector_of_the_innocent : public AuraScript +{ + bool CheckProc(ProcEventInfo& eventInfo) + { + return eventInfo.GetHealInfo() && eventInfo.GetProcTarget() != GetTarget(); + } + + void Register() override + { + DoCheckProc.Register(&spell_pal_protector_of_the_innocent::CheckProc); + } +}; + +// -84800 - Tower of Radiance +class spell_pal_tower_of_radiance : public AuraScript +{ + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_PALADIN_BEACON_OF_LIGHT }); + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + return eventInfo.GetProcTarget() && eventInfo.GetProcTarget()->HasAura(SPELL_PALADIN_BEACON_OF_LIGHT, GetTarget()->GetGUID()); + } + + void Register() override + { + DoCheckProc.Register(&spell_pal_tower_of_radiance::CheckProc); + } +}; + void AddSC_paladin_spell_scripts() { RegisterSpellScript(spell_pal_ardent_defender); @@ -1995,6 +2028,7 @@ void AddSC_paladin_spell_scripts() RegisterSpellScript(spell_pal_lights_beacon); RegisterSpellScript(spell_pal_light_of_dawn); RegisterSpellScript(spell_pal_long_arm_of_the_law); + RegisterSpellScript(spell_pal_protector_of_the_innocent); new spell_pal_righteous_defense(); RegisterSpellScript(spell_pal_sacred_shield); RegisterSpellScript(spell_pal_seal_of_righteousness); @@ -2002,5 +2036,6 @@ void AddSC_paladin_spell_scripts() new spell_pal_shield_of_the_righteous(); RegisterSpellScript(spell_pal_selfless_healer); RegisterSpellScript(spell_pal_templar_s_verdict); + RegisterSpellScript(spell_pal_tower_of_radiance); RegisterSpellAndAuraScriptPair(spell_pal_word_of_glory, spell_pal_word_of_glory_AuraScript); }