diff --git a/sql/migrations/20221013041810_world.sql b/sql/migrations/20221013041810_world.sql new file mode 100644 index 000000000..35ca1d008 --- /dev/null +++ b/sql/migrations/20221013041810_world.sql @@ -0,0 +1,21 @@ +DROP PROCEDURE IF EXISTS add_migration; +delimiter ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20221013041810'); +IF v=0 THEN +INSERT INTO `migrations` VALUES ('20221013041810'); +-- Add your query below. + + +-- Revert changes made to Druid's Enrage. +UPDATE `spell_template` SET `effect2`=3, `effectImplicitTargetA2`=0, `effectApplyAuraName2`=0, `effectMiscValue2`=0, `effectBonusCoefficient2`=1 WHERE `entry`=5229 && `build` >= 5086; + + +-- End of migration. +END IF; +END?? +delimiter ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/src/game/Spells/SpellAuras.cpp b/src/game/Spells/SpellAuras.cpp index a4cecd08a..3812b2389 100644 --- a/src/game/Spells/SpellAuras.cpp +++ b/src/game/Spells/SpellAuras.cpp @@ -2191,12 +2191,6 @@ void Aura::HandleAuraDummy(bool apply, bool Real) ((Player*)target)->UpdateAttackPowerAndDamage(); return; } - // Enrage - if ((target->GetTypeId() == TYPEID_PLAYER) && (GetId() == 5229)) - { - ((Player*)target)->UpdateArmor(); // Spell managed in UpdateArmor() - return; - } break; } case SPELLFAMILY_ROGUE: diff --git a/src/game/Spells/SpellEffects.cpp b/src/game/Spells/SpellEffects.cpp index ef68add40..fd114aadd 100644 --- a/src/game/Spells/SpellEffects.cpp +++ b/src/game/Spells/SpellEffects.cpp @@ -1856,11 +1856,20 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx) case SPELLFAMILY_DRUID: switch (m_spellInfo->Id) { +#if SUPPORTED_CLIENT_BUILD > CLIENT_BUILD_1_8_4 case 5229: // Enrage { + if (!unitTarget) + return; + // Reduce base armor by 27% in Bear Form and 16% in Dire Bear Form + int32 reductionMod = -27; + if (unitTarget->HasAura(9634)) // If in Dire Bear form only 16% + reductionMod = -16; + unitTarget->CastCustomSpell(unitTarget, 25503, reductionMod, {}, {}, true); break; } +#endif case 29201: // Loatheb Corrupted Mind triggered sub spells { uint32 spellid = 0; diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp index d454f949a..e9c9872b9 100644 --- a/src/game/StatSystem.cpp +++ b/src/game/StatSystem.cpp @@ -138,30 +138,6 @@ void Player::UpdateArmor() } } -#if SUPPORTED_CLIENT_BUILD > CLIENT_BUILD_1_8_4 - // Add dummy effects from spells (check class and other conditions first for optimization) - if (GetClass() == CLASS_DRUID) - { - ShapeshiftForm form = GetShapeshiftForm(); - if ((form == FORM_DIREBEAR) || (form == FORM_BEAR)) - { - Unit::AuraList const& mDummy = GetAurasByType(SPELL_AURA_DUMMY); - for (const auto itr : mDummy) - { - // Enrage - if (itr->GetId() == 5229) - { - float enrageModifier = 0.0f; - enrageModifier = GetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE); - enrageModifier *= itr->GetModifier()->m_amount / 100.0f; - dynamic += enrageModifier; - break; - } - } - } - } -#endif - m_auraModifiersGroup[UNIT_MOD_ARMOR][TOTAL_VALUE] += dynamic; int32 value = GetTotalResistanceValue(SPELL_SCHOOL_NORMAL);