diff --git a/Source/Game/Entities/Object/WorldObject.cs b/Source/Game/Entities/Object/WorldObject.cs index 8a13ca941..c82040008 100644 --- a/Source/Game/Entities/Object/WorldObject.cs +++ b/Source/Game/Entities/Object/WorldObject.cs @@ -1139,12 +1139,8 @@ namespace Game.Entities Creature creature = obj.ToCreature(); if (creature) - { - TempSummon tempSummon = creature.ToTempSummon(); - if (tempSummon) - if (tempSummon.IsVisibleBySummonerOnly() && GetGUID() != tempSummon.GetSummonerGUID()) - return false; - } + if (TempSummon.IsPersonalSummonOfAnotherPlayer(creature, GetGUID())) + return false; } GameObject go = obj.ToGameObject(); diff --git a/Source/Game/Entities/TemporarySummon.cs b/Source/Game/Entities/TemporarySummon.cs index 19d33a8be..965f70569 100644 --- a/Source/Game/Entities/TemporarySummon.cs +++ b/Source/Game/Entities/TemporarySummon.cs @@ -43,6 +43,16 @@ namespace Game.Entities return !m_summonerGUID.IsEmpty() ? ObjectAccessor.GetCreature(this, m_summonerGUID) : null; } + public static bool IsPersonalSummonOfAnotherPlayer(Creature summon, ObjectGuid playerToCheck) + { + TempSummon tempSummon = summon.ToTempSummon(); + if (tempSummon != null) + if (tempSummon.IsVisibleBySummonerOnly() && playerToCheck != tempSummon.GetSummonerGUID()) + return true; + + return false; + } + public override void Update(uint diff) { base.Update(diff); diff --git a/Source/Game/Maps/GridNotifiers.cs b/Source/Game/Maps/GridNotifiers.cs index 46e46e3f2..56fb1fd40 100644 --- a/Source/Game/Maps/GridNotifiers.cs +++ b/Source/Game/Maps/GridNotifiers.cs @@ -2300,7 +2300,7 @@ namespace Game.Maps public bool Invoke(Creature u) { - if (u.GetDeathState() != DeathState.Dead && u.GetEntry() == i_entry && u.IsAlive() == i_alive && i_obj.IsWithinDistInMap(u, i_range)) + if (u.GetDeathState() != DeathState.Dead && u.GetEntry() == i_entry && u.IsAlive() == i_alive && i_obj.IsWithinDistInMap(u, i_range) && !TempSummon.IsPersonalSummonOfAnotherPlayer(u, i_obj.GetGUID())) { i_range = i_obj.GetDistance(u); // use found unit range as new range limit for next check return true;