Change visibility of pets or charmed units as well when GM is invisible
Fix by liberate --HG-- branch : trunk
This commit is contained in:
+6
-3
@@ -20130,18 +20130,21 @@ bool Player::canSeeOrDetect(Unit const* u, bool detect, bool inVisibleList, bool
|
||||
return false;
|
||||
}
|
||||
|
||||
if (u->GetVisibility() == VISIBILITY_OFF)
|
||||
if (Unit* owner = u->GetCharmerOrOwnerOrSelf())
|
||||
{
|
||||
if (owner->GetVisibility() == VISIBILITY_OFF)
|
||||
{
|
||||
// GMs see any players, not higher GMs and all units
|
||||
if (isGameMaster())
|
||||
{
|
||||
if (u->GetTypeId() == TYPEID_PLAYER)
|
||||
return u->ToPlayer()->GetSession()->GetSecurity() <= GetSession()->GetSecurity();
|
||||
if (owner->GetTypeId() == TYPEID_PLAYER)
|
||||
return owner->ToPlayer()->GetSession()->GetSecurity() <= GetSession()->GetSecurity();
|
||||
else
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// GM's can see everyone with invisibilitymask with less or equal security level
|
||||
if (m_mover->m_invisibilityMask || u->m_invisibilityMask)
|
||||
|
||||
Reference in New Issue
Block a user