diff options
3 files changed, 35 insertions, 0 deletions
diff --git a/sql/updates/world/master/2021_12_19_20_world_2019_12_26_00_world.sql b/sql/updates/world/master/2021_12_19_20_world_2019_12_26_00_world.sql new file mode 100644 index 00000000000..90bcaf900e2 --- /dev/null +++ b/sql/updates/world/master/2021_12_19_20_world_2019_12_26_00_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_abomination_mutated_transformation'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(70402,'spell_abomination_mutated_transformation'); diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index fa2f12c437c..5ede1c15af9 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -4250,6 +4250,13 @@ void SpellMgr::LoadSpellInfoCorrections() }); }); + // Mutated Transformation (Professor Putricide) + ApplySpellFix({ 70402 }, [](SpellInfo* spellInfo) + { + // Resistance is calculated inside of SpellScript + spellInfo->AttributesEx4 |= SPELL_ATTR4_IGNORE_RESISTANCES; + }); + // Empowered Flare (Blood Prince Council) ApplySpellFix({ 71708 }, [](SpellInfo* spellInfo) { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp index 37c84759489..2a8416c7de4 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp @@ -1654,6 +1654,29 @@ class spell_stinky_precious_decimate : public SpellScriptLoader } }; +// 70402, 72511, 72512, 72513 - Mutated Transformation +class spell_abomination_mutated_transformation : public SpellScript +{ + PrepareSpellScript(spell_abomination_mutated_transformation); + + /* Resist system always pick the min resist value for spells with multiple schools. + But following some combat logs of retail, this spell is a exception and need get the sum of both schools. */ + void HandleResistance(SpellEffIndex /*effIndex*/) + { + Unit* caster = GetCaster(); + uint32 damage = GetHitDamage(); + Unit* target = GetHitUnit(); + damage -= Unit::CalcSpellResistedDamage(caster, target, GetHitDamage(), SPELL_SCHOOL_MASK_SHADOW, nullptr); + damage -= Unit::CalcSpellResistedDamage(caster, target, GetHitDamage(), SPELL_SCHOOL_MASK_NATURE, nullptr); + SetHitDamage(damage); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_abomination_mutated_transformation::HandleResistance, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE); + } +}; + void AddSC_boss_professor_putricide() { new boss_professor_putricide(); @@ -1677,4 +1700,5 @@ void AddSC_boss_professor_putricide() new spell_putricide_regurgitated_ooze(); new spell_putricide_clear_aura_effect_value(); new spell_stinky_precious_decimate(); + RegisterSpellScript(spell_abomination_mutated_transformation); } |