aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeader <keader.android@gmail.com>2019-12-26 13:22:04 -0300
committerGitHub <noreply@github.com>2019-12-26 13:22:04 -0300
commit9f7b464a6aa5b64bf5ec5c0f586853fbc71029c6 (patch)
tree511c8aea409d0c2b52d2f472be8ac92710b58f0e
parent18a4cbee5eb10cf0502ffae9c89ad468a2c58012 (diff)
Scritps/ICC: Fixed resistance calculation for Mutated Transformation (Professor Putricide) (#23858)
More Info in: #23837
-rw-r--r--sql/updates/world/3.3.5/2019_12_26_00_world.sql7
-rw-r--r--src/server/game/Spells/SpellMgr.cpp7
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp24
3 files changed, 38 insertions, 0 deletions
diff --git a/sql/updates/world/3.3.5/2019_12_26_00_world.sql b/sql/updates/world/3.3.5/2019_12_26_00_world.sql
new file mode 100644
index 00000000000..04ab8b791b7
--- /dev/null
+++ b/sql/updates/world/3.3.5/2019_12_26_00_world.sql
@@ -0,0 +1,7 @@
+--
+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'),
+(72511,'spell_abomination_mutated_transformation'),
+(72512,'spell_abomination_mutated_transformation'),
+(72513,'spell_abomination_mutated_transformation');
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 671f01c654d..c7d24f6294d 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -4352,6 +4352,13 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->Effects[EFFECT_0].TargetB = SpellImplicitTargetInfo(TARGET_UNIT_TARGET_ENEMY);
});
+ // Mutated Transformation (Professor Putricide)
+ ApplySpellFix({ 70402, 72511, 72512, 72513 }, [](SpellInfo* spellInfo)
+ {
+ // Resistance is calculated inside of SpellScript
+ spellInfo->AttributesEx4 |= SPELL_ATTR4_IGNORE_RESISTANCES;
+ });
+
ApplySpellFix({
71518, // Unholy Infusion Quest Credit (Professor Putricide)
72934, // Blood Infusion Quest Credit (Blood-Queen Lana'thel)
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
index d27ed193147..92f5f992f2b 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
@@ -1658,6 +1658,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();
@@ -1681,4 +1704,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);
}