TrinityCore
Loading...
Searching...
No Matches
LootPackets.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "LootPackets.h"
19
20namespace WorldPackets::Loot
21{
23{
24 data << uint8(lootItem.LootListID);
25 data << uint32(lootItem.ItemID);
26 data << uint32(lootItem.Quantity);
27 data << uint32(lootItem.ItemDisplayInfoID);
28 data << int32(lootItem.RandomPropertiesSeed);
29 data << int32(lootItem.RandomPropertiesID);
30 data << uint8(lootItem.UIType);
31
32 return data;
33}
34
36{
38}
39
41{
44 if (AcquireReason)
45 {
47 _worldPacket << uint8(Items.size());
48 for (LootItemData const& item : Items)
49 _worldPacket << item;
50 }
51 else
53
54 return &_worldPacket;
55}
56
61
63{
65
66 return &_worldPacket;
67}
68
70{
72}
73
81}
uint8_t uint8
Definition Define.h:135
int32_t int32
Definition Define.h:129
uint32_t uint32
Definition Define.h:133
WorldPacket const * Write() override
WorldPacket const * Write() override
std::vector< LootItemData > Items
Definition LootPackets.h:60
WorldPacket const * Write() override
WorldPacket _worldPacket
Definition Packet.h:42
static ByteBuffer & operator<<(ByteBuffer &data, LootItemData const &lootItem)