[8229] Improve stealth detection code for player case. Author: Ambal
--HG-- branch : trunk
This commit is contained in:
1 parent
7bd47f8827
commit
5d9d64e6f0
6 files changed
+43
-12
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user