Skip to content

Commit

Permalink
Relations Stage 2 Rollout: Migrate from IsFriendlyTo in GO visibility
Browse files Browse the repository at this point in the history
Planned deprecation.
  • Loading branch information
Warlockbugs committed Nov 8, 2017
1 parent 56c4185 commit e4e63d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/game/Entities/GameObject.cpp
Expand Up @@ -853,19 +853,19 @@ bool GameObject::isVisibleForInState(Player const* u, WorldObject const* viewPoi
Player* ownerPlayer = (Player*)owner;
if ((GetMap()->IsBattleGroundOrArena() && ownerPlayer->GetBGTeam() != u->GetBGTeam()) ||
(ownerPlayer->IsInDuelWith(u)) ||
(ownerPlayer->GetTeam() != u->GetTeam()))
(!ownerPlayer->CanCooperate(u)))
trapNotVisible = true;
}
else
{
if (u->IsFriendlyTo(owner))
if (owner->CanCooperate(u))
return true;
}
}
// handle environment traps (spawned by DB)
else
{
if (this->IsFriendlyTo(u))
if (this->IsFriend(u))
return true;
else
trapNotVisible = true;
Expand Down

0 comments on commit e4e63d3

Please sign in to comment.