diff --git a/sql/updates/world/4.3.4/2020_08_28_01_world.sql b/sql/updates/world/4.3.4/2020_08_28_01_world.sql new file mode 100644 index 00000000000..00e3d7e3add --- /dev/null +++ b/sql/updates/world/4.3.4/2020_08_28_01_world.sql @@ -0,0 +1,2 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_dru_furor'; +DELETE FROM `spell_proc` WHERE `SpellId`= -17056; diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index e792db069c4..3a247e4458a 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1843,12 +1843,27 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo if (PowerType != POWER_MANA) { + int32 oldPower = target->GetPower(PowerType); // reset power to default values only at power change if (target->GetPowerType() != PowerType) target->SetPowerType(PowerType); - if (form == FORM_CAT) - target->SetPower(POWER_ENERGY, 0); + if (form == FORM_CAT || form == FORM_BEAR) + { + AuraEffect const* furorEffect = target->GetDummyAuraEffect(SPELLFAMILY_DRUID, 238, 0); + if (form == FORM_CAT) + { + target->SetPower(POWER_ENERGY, 0); + if (furorEffect) + { + // Allow to retain up to x% of the caster's energy when shape shifting into cat form + int32 basePoints = std::min(oldPower, furorEffect->GetAmount()); + target->CastCustomSpell(target, 17099, &basePoints, nullptr, nullptr, true, nullptr, this); + } + } + else if (furorEffect && roll_chance_i(furorEffect->GetAmount())) // x% chance to gain 10 rage when shape shifting into bear form + target->CastSpell(target, 17057, true); + } } // stop handling the effect if it was removed by linked event if (aurApp->GetRemoveMode().HasAnyFlag()) diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 3ac823118cc..427bc4f2a2d 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -65,8 +65,6 @@ enum DruidSpells SPELL_DRUID_FUNGAL_GROWTH_R2 = 78789, SPELL_DRUID_FUNGAL_GROWTH_SUMMON_R1 = 81291, SPELL_DRUID_FUNGAL_GROWTH_SUMMON_R2 = 81283, - SPELL_DRUID_FUROR_ENERGIZE_RAGE = 17057, - SPELL_DRUID_FUROR_ENERGIZE_ENERGY = 17099, SPELL_DRUID_FRENZIED_REGENERATION_HEAL = 22845, SPELL_DRUID_EMPOWERED_TOUCH_SCRIPT = 88433, SPELL_DRUID_FURY_OF_STORMRAGE = 81093, @@ -1535,43 +1533,6 @@ class spell_dru_moonfire : public AuraScript } }; -class spell_dru_furor : public AuraScript -{ - bool Validate(SpellInfo const* /*spellInfo*/) override - { - return ValidateSpellInfo( - { - SPELL_DRUID_FUROR_ENERGIZE_ENERGY, - SPELL_DRUID_FUROR_ENERGIZE_RAGE - }); - } - - bool CheckProc(ProcEventInfo& /*eventInfo*/) - { - return roll_chance_i(GetEffect(EFFECT_0)->GetAmount()); - } - - void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/) - { - PreventDefaultAction(); - Unit* target = GetTarget(); - - if (target->GetShapeshiftForm() == FORM_BEAR) - target->CastSpell(target, SPELL_DRUID_FUROR_ENERGIZE_RAGE, true, nullptr, aurEff); - else if (target->GetShapeshiftForm() == FORM_CAT) - { - int32 amount = CalculatePct(100, aurEff->GetAmount()); - target->CastCustomSpell(SPELL_DRUID_FUROR_ENERGIZE_ENERGY, SPELLVALUE_BASE_POINT0, amount, target, true, nullptr, aurEff); - } - } - - void Register() override - { - DoCheckProc.Register(&spell_dru_furor::CheckProc); - OnEffectProc.Register(&spell_dru_furor::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); - } -}; - // 22568 - Ferocious Bite class spell_dru_ferocious_bite : public SpellScript { @@ -1952,7 +1913,6 @@ void AddSC_druid_spell_scripts() RegisterSpellScript(spell_dru_enrage); RegisterSpellScript(spell_dru_ferocious_bite); RegisterSpellScript(spell_dru_frenzied_regeneration); - RegisterSpellScript(spell_dru_furor); RegisterSpellScript(spell_dru_glyph_of_starfire); RegisterSpellScript(spell_dru_glyph_of_starfire_proc); RegisterSpellScript(spell_dru_harmony);