Core/Loot: Refactored Player::SendLoot to accept Loot object directly

Port From (https://github.com/TrinityCore/TrinityCore/commit/cbf2064c62137d9f0c0397956592f3ab9700480c)
This commit is contained in:
hondacrx
2022-09-18 22:22:44 -04:00
parent 6c7991c28f
commit 40f06a3fb0
6 changed files with 33 additions and 75 deletions
+4 -1
View File
@@ -212,7 +212,10 @@ namespace Game
if (loot.gold > 0 || loot.unlootedCount > 0)
Global.LootItemStorage.AddNewStoredLoot(item.GetGUID().GetCounter(), loot, player);
}
player.SendLoot(item.GetGUID(), LootType.Item);
if (item.loot != null)
player.SendLoot(item.loot);
else
player.SendLootError(ObjectGuid.Empty, item.GetGUID(), LootError.NoLoot);
}
}