diff options
author | thenecromancer <none@none> | 2010-01-13 18:15:24 +0100 |
---|---|---|
committer | thenecromancer <none@none> | 2010-01-13 18:15:24 +0100 |
commit | c53ecf6dad25a2ddb74a355106aa63e3c36692e2 (patch) | |
tree | 56e34b3ca9aef9278f5cbb3d6e227649fd49c8f5 | |
parent | c3e87c3ba2c58a6810d1cc4a98d1f886891962a7 (diff) |
Fix Stealth Detection formula (Stealth auras are based on player level)
--HG--
branch : trunk
-rw-r--r-- | src/game/Unit.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 422cace994e..3ff0991ccf2 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -11524,10 +11524,10 @@ bool Unit::canDetectStealthOf(Unit const* target, float distance) const if ((*iter)->GetCasterGUID() == GetGUID()) return true; - //Visible distance based on stealth value (stealth rank 4 300MOD, 10.5 - 3 = 7.5) - float visibleDistance = 10.5f - target->GetTotalAuraModifier(SPELL_AURA_MOD_STEALTH) / 100.0f; - //Visible distance is modified by -Level Diff (every level diff = 1.0f in visible distance) - visibleDistance += int32(getLevelForTarget(target)) - int32(target->getLevelForTarget(this)); + //Visible distance based on stealth value (stealth rank 4 300MOD, 10.5 - 3 = 7.5)
+ float visibleDistance = 7.5f;
+ //Visible distance is modified by -Level Diff (every level diff = 1.0f in visible distance)
+ visibleDistance += float(getLevelForTarget(target)) - target->GetTotalAuraModifier(SPELL_AURA_MOD_STEALTH)/5.0f; //-Stealth Mod(positive like Master of Deception) and Stealth Detection(negative like paranoia) //based on wowwiki every 5 mod we have 1 more level diff in calculation visibleDistance += (float)(GetTotalAuraModifier(SPELL_AURA_MOD_DETECT) - target->GetTotalAuraModifier(SPELL_AURA_MOD_STEALTH_LEVEL)) / 5.0f; |