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;
|
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
|
// GMs see any players, not higher GMs and all units
|
||||||
if (isGameMaster())
|
if (isGameMaster())
|
||||||
{
|
{
|
||||||
if (u->GetTypeId() == TYPEID_PLAYER)
|
if (owner->GetTypeId() == TYPEID_PLAYER)
|
||||||
return u->ToPlayer()->GetSession()->GetSecurity() <= GetSession()->GetSecurity();
|
return owner->ToPlayer()->GetSession()->GetSecurity() <= GetSession()->GetSecurity();
|
||||||
else
|
else
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// GM's can see everyone with invisibilitymask with less or equal security level
|
// GM's can see everyone with invisibilitymask with less or equal security level
|
||||||
if (m_mover->m_invisibilityMask || u->m_invisibilityMask)
|
if (m_mover->m_invisibilityMask || u->m_invisibilityMask)
|
||||||
|
|||||||
Reference in New Issue
Block a user