Core/Conditions: CONDITION_NEAR_CREATURE will exclude personal spawns that aren't the target's owner (#26102)

This commit is contained in:
Matan Shukry
2021-02-17 00:42:53 +01:00
committed by GitHub
parent 907fc00f19
commit d2641c4924
4 changed files with 14 additions and 4 deletions
+2 -3
View File
@@ -1448,9 +1448,8 @@ bool WorldObject::CanSeeOrDetect(WorldObject const* obj, bool ignoreStealth, boo
viewpoint = player->GetViewpoint();
if (Creature const* creature = obj->ToCreature())
if (TempSummon const* tempSummon = creature->ToTempSummon())
if (tempSummon->IsVisibleBySummonerOnly() && GetGUID() != tempSummon->GetSummonerGUID())
return false;
if (TempSummon::IsPersonalSummonOfAnotherPlayer(creature, GetGUID()))
return false;
}
if (GameObject const* go = obj->ToGameObject())