diff options
author | megamage <none@none> | 2009-07-30 10:38:53 +0800 |
---|---|---|
committer | megamage <none@none> | 2009-07-30 10:38:53 +0800 |
commit | 5d9d64e6f048298a19f4c80795f05e31facb2318 (patch) | |
tree | d4ab8dcf7ef32783355eeb005ffbf9228eee40a9 /src/game/Unit.cpp | |
parent | 7bd47f88276551ffd51aef1659d4876cf18434ae (diff) |
[8229] Improve stealth detection code for player case. Author: Ambal
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 117dbe0e1da..111538040f8 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10905,6 +10905,7 @@ bool Unit::canDetectStealthOf(Unit const* target, float distance) const //-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; + visibleDistance = visibleDistance > MAX_PLAYER_STEALTH_DETECT_RANGE ? MAX_PLAYER_STEALTH_DETECT_RANGE : visibleDistance; return distance < visibleDistance; } |