From dfd75a24e24a45fa9fef8de964ccc6c0ed531526 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Tue, 26 Nov 2019 18:28:38 +0100 Subject: [PATCH] Core/Spells: * fixed Shatter not granting its crit chance properly * fixed Last Word crit chance bonus --- src/server/game/Entities/Unit/Unit.cpp | 5 ++--- src/server/game/Spells/SpellMgr.cpp | 9 +++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 1137049df36..40e88e75791 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -7149,15 +7149,14 @@ float Unit::GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto switch ((*i)->GetMiscValue()) { - case 11170: // Shatter - case 12982: + case 911: // Shatter if (victim->HasAuraState(AURA_STATE_FROZEN, spellProto, this)) crit_chance *= 2; else if (spellProto->SpellFamilyFlags[0] & 0x00020000 || spellProto->SpellFamilyFlags[1] & 0x00100000) if (GetAuraEffect(SPELL_AURA_ABILITY_IGNORE_AURASTATE, SPELLFAMILY_MAGE, 0, 0, 0x0000000A, GetGUID())) crit_chance *= 2; break; - case 7917: // Glyph of Shadowburn + case 7: // Last Word if (victim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, spellProto, this)) crit_chance += (*i)->GetAmount(); break; diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 4d9ab646918..e4128a69607 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -5611,6 +5611,15 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->SpellFamilyName = SPELLFAMILY_SHAMAN; }); + // Last Word + ApplySpellFix({ + 20234, + 20235, + }, [](SpellInfo* spellInfo) + { + spellInfo->Effects[EFFECT_0].ApplyAuraName = SPELL_AURA_OVERRIDE_CLASS_SCRIPTS; + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i];