mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scritps/ICC: Fixed resistance calculation for Mutated Transformation (Professor Putricide) (#23858)
More Info in: #23837
(cherry picked from commit 9f7b464a6a)
This commit is contained in:
@@ -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');
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user