Core/Loot: Implemented currency loot

This commit is contained in:
Shauren
2024-08-26 15:02:22 +02:00
parent 6b4270850f
commit 3e28ee080a
17 changed files with 576 additions and 237 deletions

View File

@@ -441,12 +441,18 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPackets::Loot::MasterLootItem
if (req.LootListID >= loot->items.size())
{
_player->SendLootError(req.Object, loot->GetOwnerGUID(), LOOT_ERROR_MASTER_OTHER);
TC_LOG_DEBUG("loot", "MasterLootItem: Player {} might be using a hack! (slot {}, size {})",
GetPlayer()->GetName(), req.LootListID, loot->items.size());
return;
}
LootItem& item = loot->items[req.LootListID];
if (item.type != LootItemType::Item)
{
_player->SendLootError(req.Object, loot->GetOwnerGUID(), LOOT_ERROR_MASTER_OTHER);
return;
}
ItemPosCountVec dest;
InventoryResult msg = target->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, item.itemid, item.count);