aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2015-02-01 00:38:28 +0100
committerShauren <shauren.trinity@gmail.com>2015-02-01 00:38:28 +0100
commit9ccaf7d7a0c7e3e746eb9ec20d45520e5e6435d6 (patch)
treec745c3cb229aaf892167c691c8bc82b88e773b06
parent95b1204798d3ab2a141f81b294b064255c335b8a (diff)
Core/Spells: Updated base spell hit chance calculation (spells will never miss targets up to 3 levels higher than caster)
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 07d10c4a360..3b63facf708 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -2399,11 +2399,9 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit* victim, SpellInfo const* spellInfo
int32 leveldif = int32(victim->getLevelForTarget(this)) - thisLevel;
// Base hit chance from attacker and victim levels
- int32 modHitChance;
- if (leveldif < 3)
- modHitChance = 96 - leveldif;
- else
- modHitChance = 94 - (leveldif - 2) * lchance;
+ int32 modHitChance = 100;
+ if (leveldif > 3)
+ modHitChance -= (leveldif - 3) * lchance;
// Spellmod from SPELLMOD_RESIST_MISS_CHANCE
if (Player* modOwner = GetSpellModOwner())