Core/Misc: Fix various crashes, also related to multithreading

Port From (https://github.com/TrinityCore/TrinityCore/commit/ad008c43b75080ec59aa973f1e2e4424332c34a4)
This commit is contained in:
hondacrx
2019-08-16 22:03:02 -04:00
parent 653a9bb035
commit d3bce6a75c
19 changed files with 174 additions and 117 deletions
+4 -2
View File
@@ -2614,7 +2614,8 @@ namespace Game.AI
{
Player member = groupRef.GetSource();
if (member)
l.Add(member);
if (member.IsInMap(player))
l.Add(member);
}
}
// We still add the player to the list if there is no group. If we do
@@ -2838,7 +2839,8 @@ namespace Game.AI
{
Player recipient = refe.GetSource();
if (recipient)
l.Add(recipient);
if (recipient.IsInMap(me))
l.Add(recipient);
}
}
else