From 5d544f6001bd60539285a802636e57c64d6e12fe Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Mon, 29 Nov 2021 17:46:49 +0100 Subject: [PATCH] fix(Core/Spells) T9 2p Hunter bonus vs Mortal Shots. (#9246) Fixed getting bonus damage from critical strikes for melee/ranged DoT spells. Fixes #8859 --- src/server/game/Entities/Unit/Unit.cpp | 9 +++------ src/server/game/Spells/SpellMgr.cpp | 17 ++++++++++++++++- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index a6bca4313..3ee8ac500 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -11659,12 +11659,9 @@ uint32 Unit::SpellCriticalDamageBonus(Unit const* caster, SpellInfo const* spell crit_bonus -= damage; - if (damage > uint32(crit_bonus)) - { - // adds additional damage to critBonus (from talents) - if (Player* modOwner = caster->GetSpellModOwner()) - modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_CRIT_DAMAGE_BONUS, crit_bonus); - } + // adds additional damage to critBonus (from talents) + if (Player* modOwner = caster->GetSpellModOwner()) + modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_CRIT_DAMAGE_BONUS, crit_bonus); crit_bonus += damage; } diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index a31ce0266..23cc9fe52 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -7476,12 +7476,27 @@ void SpellMgr::LoadDbcDataCorrections() spellInfo->AuraInterruptFlags |= (AURA_INTERRUPT_FLAG_MELEE_ATTACK | AURA_INTERRUPT_FLAG_CAST); }); - // Arcane Bolt + // Arcane Bolt ApplySpellFix({ 15979 }, [](SpellEntry* spellInfo) { spellInfo->RangeIndex = 3; // 20y }); + // Mortal Shots + ApplySpellFix({ 19485, 19487, 19488, 19489, 19490 }, [](SpellEntry* spellInfo) + { + spellInfo->EffectSpellClassMask[EFFECT_0][EFFECT_0] |= 0x00004000; + spellInfo->Effect[EFFECT_1] = 0; + }); + + // Item - Death Knight T9 Melee 4P Bonus + // Item - Hunter T9 2P Bonus + // Item - Paladin T9 Retribution 2P Bonus (Righteous Vengeance) + ApplySpellFix({ 67118, 67150, 67188 }, [](SpellEntry* spellInfo) + { + spellInfo->Effect[EFFECT_1] = 0; + }); + for (uint32 i = 0; i < sSpellStore.GetNumRows(); ++i) { SpellEntry* spellInfo = (SpellEntry*)sSpellStore.LookupEntry(i);