*Fix the bug that low level gm cannot see high level gm even when they are visible.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-11-25 21:32:20 -06:00
parent 9bbf3e9493
commit 9e3c9124f2
+10 -9
View File
@@ -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))