mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-29 05:11:55 +01:00
Core/Loot: Implemented currency loot
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user