aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Player.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 307dc6c7407..aff35ea3da1 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -17411,17 +17411,18 @@ bool Player::canSeeOrDetect(Unit const* u, bool detect, bool inVisibleList) cons
return false;
}
- // GMs see any players, not higher GMs and all units
- if(isGameMaster())
- {
- if(u->GetTypeId() == TYPEID_PLAYER)
- return ((Player *)u)->GetSession()->GetSecurity() <= GetSession()->GetSecurity();
- else
- return true;
- }
-
if(u->GetVisibility() == VISIBILITY_OFF)
+ {
+ // GMs see any players, not higher GMs and all units
+ if(isGameMaster())
+ {
+ if(u->GetTypeId() == TYPEID_PLAYER)
+ return ((Player *)u)->GetSession()->GetSecurity() <= GetSession()->GetSecurity();
+ else
+ return true;
+ }
return false;
+ }
// player see other player with stealth/invisibility only if he in same group or raid or same team (raid/team case dependent from conf setting)
if((m_invisibilityMask || u->m_invisibilityMask) && !canDetectInvisibilityOf(u))