Core/Loot: Store references to Loot objects directly in players loot view map instead of guids of world objects holding that loot

Port From (https://github.com/TrinityCore/TrinityCore/commit/f19f32f2a49cf0eb235f1aa12106322bf9db2a15)
This commit is contained in:
hondacrx
2022-09-18 15:40:17 -04:00
parent 76dd5b94f0
commit bfdbcd7cbe
4 changed files with 49 additions and 181 deletions
+7
View File
@@ -815,6 +815,13 @@ namespace Game.Loots
PlayerNonQuestNonFFAConditionalItems.Clear();
foreach (ObjectGuid playerGuid in PlayersLooting)
{
Player player = Global.ObjAccessor.FindConnectedPlayer(playerGuid);
if (player != null)
player.GetSession().DoLootRelease(this);
}
PlayersLooting.Clear();
items.Clear();
quest_items.Clear();