Core/Loot: Added loot slot check to Loot::LootItemInSlot (client sent-value)

Port From (https://github.com/TrinityCore/TrinityCore/commit/2eea58f26e8fe88f3294dca3d4a38d6a20d68e07)
This commit is contained in:
hondacrx
2023-01-11 00:40:16 -05:00
parent 5c439a6bae
commit a52c1f21a6
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -956,10 +956,14 @@ namespace Game.Loots
{
return LootItemInSlot(lootSlot, player, out _);
}
public LootItem LootItemInSlot(uint lootListId, Player player, out NotNormalLootItem ffaItem)
{
ffaItem = null;
if (lootListId >= items.Count)
return null;
LootItem item = items[(int)lootListId];
bool is_looted = item.is_looted;