diff --git a/sql/updates/world/2021_08_02_00_world.sql b/sql/updates/world/2021_08_02_00_world.sql new file mode 100644 index 00000000000..dc3a743b54e --- /dev/null +++ b/sql/updates/world/2021_08_02_00_world.sql @@ -0,0 +1,2 @@ +DELETE FROM `spell_script_names` WHERE `spell_id`=106922 AND `ScriptName`='spell_dru_might_of_ursoc'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (106922, 'spell_dru_might_of_ursoc'); diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index d55bd73f7ad..3869f818e93 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -1245,10 +1245,30 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b case 5215: // Prowl { // check for catform - if (!caster->HasAura(768)) + if (caster->GetShapeshiftForm() != FORM_CAT) caster->CastSpell(caster, 768, true); break; } + case 106898: // Stampeding Roar + { + // activates bear form + caster->CastSpell(caster, 5487, true); + target->RemoveMovementImpairingAuras(); + break; + } + case 77761: // Stampeding roar Bearform + case 77764: // Stampeding roar Catform + { + target->RemoveMovementImpairingAuras(); + break; + } + case 102795: // Bear Hug + { + // check for bear form + if (caster->GetShapeshiftForm() != FORM_BEAR) + caster->CastSpell(caster, 5487, true); // activate bear form + break; + } break; } break; @@ -1458,6 +1478,16 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b if (caster && caster->HasAura(56845)) target->CastSpell(target, 61394, true); break; + case SPELLFAMILY_DRUID: + switch (m_spellInfo->Id) + { + case 768: // catform + // remove prowl when leaving catform + if (caster->HasAura(5215)) + caster->RemoveOwnedAura(5215); + break; + } + break; } } diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 6a726eb98fb..dec5e632222 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -56,7 +56,8 @@ enum DruidSpells SPELL_DRUID_STAMPEDE_BAER_RANK_1 = 81016, SPELL_DRUID_STAMPEDE_CAT_RANK_1 = 81021, SPELL_DRUID_STAMPEDE_CAT_STATE = 109881, - SPELL_DRUID_TIGER_S_FURY_ENERGIZE = 51178 + SPELL_DRUID_TIGER_S_FURY_ENERGIZE = 51178, + SPELL_DRUID_BEAR_FORM = 5487, }; // 1850 - Dash @@ -541,6 +542,49 @@ class spell_dru_living_seed_proc : public SpellScriptLoader } }; +// 106922 - Might of Ursoc +class spell_dru_might_of_ursoc: public SpellScriptLoader +{ +public: + spell_dru_might_of_ursoc() : SpellScriptLoader("spell_dru_might_of_ursoc") { } + + class spell_dru_might_of_ursoc_AuraScript : public AuraScript + { + PrepareAuraScript(spell_dru_might_of_ursoc_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_BEAR_FORM)) + return false; + return true; + } + + void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/) + { + if (Unit* caster = GetCaster()) + { + // cast bear form first + if (caster->GetShapeshiftForm() != FORM_BEAR) + caster->CastSpell(caster, SPELL_DRUID_BEAR_FORM, true); // activate bear form + // then calculate amount + amount = aurEff->GetBase()->GetUnitOwner()->CountPctFromMaxHealth(amount); + } + + } + + void Register() override + { + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dru_might_of_ursoc_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_MOD_INCREASE_HEALTH_2); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_dru_might_of_ursoc_AuraScript(); + } + +}; + // -16972 - Predatory Strikes class spell_dru_predatory_strikes : public SpellScriptLoader { @@ -945,6 +989,7 @@ void AddSC_druid_spell_scripts() new spell_dru_lifebloom(); new spell_dru_living_seed(); new spell_dru_living_seed_proc(); + new spell_dru_might_of_ursoc(); new spell_dru_predatory_strikes(); new spell_dru_savage_defense(); new spell_dru_savage_roar();