From dccd46008886b059d06fe6d1ebfac1c7de4eef14 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Fri, 28 Aug 2020 12:10:53 +0200 Subject: [PATCH] Core/Spells: corrected Shatter bonus logic and fixed another warning --- src/server/game/Entities/Unit/Unit.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index e2353ce6964..63f367251a8 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -7092,15 +7092,14 @@ float Unit::SpellCritChanceTaken(Unit const* caster, SpellInfo const* spellInfo, if (!aurEff->IsAffectingSpell(spellInfo)) continue; - float modChance = 0.f; switch (aurEff->GetMiscValue()) { case 911: // Shatter - if (HasAuraState(AURA_STATE_FROZEN, spellInfo, this)) - crit_chance *= 2; + if (HasAuraState(AURA_STATE_FROZEN, spellInfo, caster)) + crit_chance *= (1 * aurEff->GetSpellInfo()->GetRank()); else if (spellInfo->SpellFamilyFlags[0] & 0x00020000 || spellInfo->SpellFamilyFlags[1] & 0x00100000) - if (GetAuraEffect(SPELL_AURA_ABILITY_IGNORE_AURASTATE, SPELLFAMILY_MAGE, 0, 0, 0x0000000A, GetGUID())) - crit_chance *= 2; + if (GetAuraEffect(SPELL_AURA_ABILITY_IGNORE_AURASTATE, SPELLFAMILY_MAGE, 0, 0, 0x0000000A, caster->GetGUID())) + crit_chance *= (1 * aurEff->GetSpellInfo()->GetRank()); break; case 57470: // Renewed Hope case 57472: