diff options
author | ariel- <ariel-@users.noreply.github.com> | 2017-01-20 01:16:51 -0300 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2017-01-20 01:17:18 -0300 |
commit | 23f76b563f3002e1557eb5dd75e0d26bd22357ab (patch) | |
tree | 22f7ddfb091972afc2b7a2125b1a2e3528a4b094 /src | |
parent | 93559450ce05b817b1ede54261158177a490bf3a (diff) |
Core/Spell: remove duplicated SPELL_AURA_MOD_DEBUFF_RESISTANCE handling.
Each spell had two rolls in which it could be resisted, effectively adding to the resist chance.
Closes #7406
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 9 |
2 files changed, 1 insertions, 10 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 9ec729f741e..eefed9e97e4 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -2603,7 +2603,7 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit* victim, SpellInfo const* spellInfo // Increase hit chance from attacker SPELL_AURA_MOD_SPELL_HIT_CHANCE and attacker ratings HitChance += int32(m_modSpellHitChance * 100.0f); - RoundToInterval(HitChance, 100, 10000); + RoundToInterval(HitChance, 0, 10000); int32 tmp = 10000 - HitChance; diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index eeb6dd68e80..d2612ba1bdf 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2537,15 +2537,6 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA { if (unit->IsImmunedToSpellEffect(m_spellInfo, effectNumber, m_caster)) effectMask &= ~(1 << effectNumber); - else if (m_spellInfo->Effects[effectNumber].IsAura() && !m_spellInfo->IsPositiveEffect(effectNumber)) - { - int32 debuff_resist_chance = unit->GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_DEBUFF_RESISTANCE, static_cast<int32>(m_spellInfo->Dispel)); - if (debuff_resist_chance > 0 && roll_chance_i(debuff_resist_chance)) - { - effectMask &= ~(1 << effectNumber); - returnVal = SPELL_MISS_RESIST; - } - } } } |