Change visibility of pets or charmed units as well when GM is invisible
Fix by liberate --HG-- branch : trunk
This commit is contained in:
+11
-8
@@ -20130,17 +20130,20 @@ 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())
|
||||||
{
|
{
|
||||||
// GMs see any players, not higher GMs and all units
|
if (owner->GetVisibility() == VISIBILITY_OFF)
|
||||||
if (isGameMaster())
|
|
||||||
{
|
{
|
||||||
if (u->GetTypeId() == TYPEID_PLAYER)
|
// GMs see any players, not higher GMs and all units
|
||||||
return u->ToPlayer()->GetSession()->GetSecurity() <= GetSession()->GetSecurity();
|
if (isGameMaster())
|
||||||
else
|
{
|
||||||
return true;
|
if (owner->GetTypeId() == TYPEID_PLAYER)
|
||||||
|
return owner->ToPlayer()->GetSession()->GetSecurity() <= GetSession()->GetSecurity();
|
||||||
|
else
|
||||||
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user