From 9e3c9124f2b63e048e7a62a44c1ea36249e9a85a Mon Sep 17 00:00:00 2001 From: megamage Date: Tue, 25 Nov 2008 21:32:20 -0600 Subject: *Fix the bug that low level gm cannot see high level gm even when they are visible. --HG-- branch : trunk --- src/game/Player.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/game/Player.cpp') 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)) -- cgit v1.2.3