mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[8181] Prevent passing negative values into IsWithinDist() in stealth detection
* This should fix wrong stealth detection for high level differencies Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
58a292e99c
commit
fcb34b3928
2 changed files with 2 additions and 2 deletions
|
|
@ -9259,7 +9259,7 @@ bool Unit::isVisibleForOrDetect(Unit const* u, bool detect, bool inVisibleList,
|
|||
//based on wowwiki every 5 mod we have 1 more level diff in calculation
|
||||
visibleDistance += (int32(u->GetTotalAuraModifier(SPELL_AURA_MOD_DETECT)) - stealthMod)/5.0f;
|
||||
|
||||
if(!IsWithinDist(u,visibleDistance))
|
||||
if(visibleDistance <= 0 || !IsWithinDist(u,visibleDistance))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue