mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +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
|
//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;
|
visibleDistance += (int32(u->GetTotalAuraModifier(SPELL_AURA_MOD_DETECT)) - stealthMod)/5.0f;
|
||||||
|
|
||||||
if(!IsWithinDist(u,visibleDistance))
|
if(visibleDistance <= 0 || !IsWithinDist(u,visibleDistance))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8180"
|
#define REVISION_NR "8181"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue