TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
AuctionHousePackets.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
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 #ifndef AuctionHousePackets_h__
19 #define AuctionHousePackets_h__
20 
21 #include "Packet.h"
22 #include "ObjectGuid.h"
23 #include "ItemPackets.h"
24 #include "MailPackets.h"
25 
26 struct AuctionEntry;
27 
28 namespace WorldPackets
29 {
30  namespace AuctionHouse
31  {
32  struct AuctionItem
33  {
35  {
36  AuctionItemEnchant(int32 id, uint32 expiration, int32 charges, uint8 slot) : ID(id), Expiration(expiration), Charges(charges), Slot(slot) { }
37  int32 ID = 0;
40  uint8 Slot = 0;
41  };
42 
44  int32 Count = 0;
46  std::vector<AuctionItemEnchant> Enchantments;
47  int32 Flags = 0;
55  bool CensorServerSideInfo = false;
56  bool CensorBidInfo = false;
62  };
63 
65  {
66  void Initialize(::AuctionEntry const* auction, ::Item const* item);
67 
71  };
72 
74  {
75  void Initialize(::AuctionEntry const* auction, ::Item const* item);
76 
80  };
81 
82  class AuctionHelloRequest final : public ClientPacket
83  {
84  public:
86 
87  void Read() override;
89  };
90 
91  class AuctionHelloResponse final : public ServerPacket
92  {
93  public:
95 
96  WorldPacket const* Write() override;
97 
99  bool OpenForBusiness = true;
100  };
101 
102  class AuctionCommandResult final : public ServerPacket
103  {
104  public:
106 
114  void InitializeAuction(::AuctionEntry* auction);
115 
116  WorldPacket const* Write() override;
117 
121  uint64 Money = 0;
125  };
126 
127  class AuctionSellItem final : public ClientPacket
128  {
129  public:
131  {
134  };
135 
137 
138  void Read() override;
139 
144  std::vector<AuctionItemForSale> Items;
145  };
146 
147  class AuctionPlaceBid final : public ClientPacket
148  {
149  public:
151 
152  void Read() override;
153 
157  };
158 
160  {
161  public:
163 
164  void Read() override;
165 
167  std::vector<uint32> AuctionItemIDs;
169  };
170 
171  class AuctionRemoveItem final : public ClientPacket
172  {
173  public:
175 
176  void Read() override;
177 
180  };
181 
182  class AuctionReplicateItems final : public ClientPacket
183  {
184  public:
186 
187  void Read() override;
188 
194  };
195 
197  {
198  public:
200 
201  void Read() override { }
202  };
203 
205  {
206  public:
208 
209  WorldPacket const* Write() override;
210 
212  std::vector<AuctionItem> Items;
213  bool OnlyUsable = true;
215  };
216 
218  {
219  public:
221 
222  WorldPacket const* Write() override;
223 
226  std::vector<AuctionItem> Items;
227  };
228 
230  {
231  public:
233 
234  WorldPacket const* Write() override;
235 
238  std::vector<AuctionItem> Items;
239  };
240 
241  class AuctionListOwnerItems final : public ClientPacket
242  {
243  public:
245 
246  void Read() override;
247 
250  };
251 
252  class AuctionListItems final : public ClientPacket
253  {
254  public:
255  struct Sort
256  {
259  };
260 
262 
263  void Read() override;
264 
274  bool ExactMatch = true;
275  std::string Name;
276  bool OnlyUsable = false;
277  std::vector<Sort> DataSort;
278  };
279 
281  {
282  public:
284 
285  WorldPacket const* Write() override;
286 
287  std::vector<Mail::MailListEntry> Mails;
289  };
290 
292  {
293  public:
295 
296  WorldPacket const* Write() override;
297 
299  float ProceedsMailDelay = 0.0f;
300  bool Sold = true;
301  };
302 
304  {
305  public:
307 
308  WorldPacket const* Write() override;
309 
313  };
314 
316  {
317  public:
319 
320  WorldPacket const* Write() override;
321 
323  };
324 
326  {
327  public:
329 
330  WorldPacket const* Write() override;
331 
335  };
336 
338  {
339  public:
341 
342  WorldPacket const* Write() override;
343 
349  std::vector<AuctionItem> Items;
350  };
351  }
352 }
353 
354 #endif // AuctionHousePackets_h__
Definition: Opcodes.h:68
AuctionOwnerBidNotification()
Definition: AuctionHousePackets.h:306
WorldPacket const * Write() override
Definition: AuctionHousePackets.cpp:288
int32 Charges
Definition: AuctionHousePackets.h:39
ObjectGuid Auctioneer
Definition: AuctionHousePackets.h:141
WorldPacket const * Write() override
Definition: AuctionHousePackets.cpp:278
Definition: Opcodes.h:762
uint32 TotalCount
Definition: AuctionHousePackets.h:225
bool OnlyUsable
Definition: AuctionHousePackets.h:213
WorldPacket const * Write() override
Definition: AuctionHousePackets.cpp:124
uint8 MaxLevel
Definition: AuctionHousePackets.h:267
uint8 SortCount
Definition: AuctionHousePackets.h:266
uint32 UseCount
Definition: AuctionHousePackets.h:133
Definition: AuctionHousePackets.h:241
ObjectGuid Auctioneer
Definition: AuctionHousePackets.h:178
uint32 TotalCount
Definition: AuctionHousePackets.h:214
int32 DurationLeft
Definition: AuctionHousePackets.h:53
std::vector< AuctionItemForSale > Items
Definition: AuctionHousePackets.h:144
std::string Name
Definition: AuctionHousePackets.h:275
uint32 Expiration
Definition: AuctionHousePackets.h:38
void Initialize(::AuctionEntry const *auction,::Item const *item)
Definition: AuctionHousePackets.cpp:82
uint32 TotalCount
Definition: AuctionHousePackets.h:237
ObjectGuid Bidder
Definition: AuctionHousePackets.h:311
AuctionSellItem(WorldPacket &&packet)
Definition: AuctionHousePackets.h:136
void Read() override
Definition: AuctionHousePackets.cpp:163
uint8 UnkByte1
Definition: AuctionHousePackets.h:257
AuctionWonNotification()
Definition: AuctionHousePackets.h:318
int32 ChangeNumberTombstone
Definition: AuctionHousePackets.h:193
uint8 MinLevel
Definition: AuctionHousePackets.h:270
Definition: AuctionHousePackets.h:337
Definition: Opcodes.h:69
WorldPacket const * Write() override
Definition: AuctionHousePackets.cpp:101
uint32 ChangeNumberTombstone
Definition: AuctionHousePackets.h:347
uint32 DesiredDelay
Definition: AuctionHousePackets.h:211
void Initialize(::AuctionEntry const *auction,::Item const *item)
Definition: AuctionHousePackets.cpp:89
uint32 Offset
Definition: AuctionHousePackets.h:268
ObjectGuid Auctioneer
Definition: AuctionHousePackets.h:154
Definition: Opcodes.h:770
Definition: AuctionHousePackets.h:255
void InitializeAuction(::AuctionEntry *auction)
Definition: AuctionHousePackets.cpp:113
AuctionListPendingSalesResult()
Definition: AuctionHousePackets.h:283
AuctionOwnerNotification Info
Definition: AuctionHousePackets.h:298
Definition: AuctionHousePackets.h:196
AuctionListItems(WorldPacket &&packet)
Definition: AuctionHousePackets.h:261
std::vector< Mail::MailListEntry > Mails
Definition: AuctionHousePackets.h:287
STL namespace.
uint8 UnkByte2
Definition: AuctionHousePackets.h:258
bool CensorBidInfo
Definition: AuctionHousePackets.h:56
Definition: AuctionHouseMgr.h:67
uint64 MinIncrement
Definition: AuctionHousePackets.h:51
uint8 DeleteReason
Definition: AuctionHousePackets.h:54
ObjectGuid Auctioneer
Definition: AuctionHousePackets.h:168
bool ExactMatch
Definition: AuctionHousePackets.h:274
WorldPacket const * Write() override
Definition: AuctionHousePackets.cpp:221
uint32 ChangeNumberCursor
Definition: AuctionHousePackets.h:344
Definition: Opcodes.h:765
Definition: AuctionHousePackets.h:32
uint32 Offset
Definition: AuctionHousePackets.h:166
std::vector< Sort > DataSort
Definition: AuctionHousePackets.h:277
AuctionItemEnchant(int32 id, uint32 expiration, int32 charges, uint8 slot)
Definition: AuctionHousePackets.h:36
AuctionBidderNotification Info
Definition: AuctionHousePackets.h:332
int32 TotalNumRecords
Definition: AuctionHousePackets.h:288
std::vector< uint32 > AuctionItemIDs
Definition: AuctionHousePackets.h:167
uint32 DesiredDelay
Definition: AuctionHousePackets.h:236
uint64 BidAmount
Definition: AuctionHousePackets.h:333
Definition: Opcodes.h:70
void Read() override
Definition: AuctionHousePackets.cpp:96
uint64 MinIncrement
the sum of outbid is (1% of current bid) * 5, if the bid is too small, then this value is 1 copper...
Definition: AuctionHousePackets.h:124
WorldPacket const * Write() override
Definition: AuctionHousePackets.cpp:304
Definition: Opcodes.h:769
Definition: AuctionHousePackets.h:204
uint8 Slot
Definition: AuctionHousePackets.h:40
Definition: AuctionHousePackets.h:64
ObjectGuid Auctioneer
Definition: AuctionHousePackets.h:248
ObjectGuid Guid
Definition: AuctionHousePackets.h:98
int32 Flags
Definition: AuctionHousePackets.h:47
AuctionListPendingSales(WorldPacket &&packet)
Definition: AuctionHousePackets.h:199
AuctionListBidderItemsResult()
Definition: AuctionHousePackets.h:232
std::vector< AuctionItem > Items
Definition: AuctionHousePackets.h:226
Definition: Opcodes.h:67
AuctionListOwnerItemsResult()
Definition: AuctionHousePackets.h:220
AuctionListItemsResult()
Definition: AuctionHousePackets.h:207
std::vector< AuctionItem > Items
Definition: AuctionHousePackets.h:212
bool CensorServerSideInfo
Definition: AuctionHousePackets.h:55
std::vector< AuctionItemEnchant > Enchantments
Definition: AuctionHousePackets.h:46
uint64 BidAmount
Definition: AuctionHousePackets.h:69
WorldPacket const * Write() override
Definition: AuctionHousePackets.cpp:193
uint32 Offset
Definition: AuctionHousePackets.h:249
void Read() override
Definition: AuctionHousePackets.cpp:261
Item::ItemInstance Item
Definition: AuctionHousePackets.h:79
uint32 AuctionItemID
the id of the auction that triggered this notification
Definition: AuctionHousePackets.h:118
ObjectGuid Bidder
Definition: AuctionHousePackets.h:60
Definition: AuctionHousePackets.h:217
ObjectGuid Auctioneer
Definition: AuctionHousePackets.h:265
int32 ItemSubclass
Definition: AuctionHousePackets.h:273
Definition: Opcodes.h:65
Definition: AuctionHousePackets.h:315
int32 ChangeNumberCursor
Definition: AuctionHousePackets.h:192
Definition: Packet.h:59
int32 ErrorCode
the error code that was generated when trying to perform the action. Possible values are AuctionError...
Definition: AuctionHousePackets.h:120
Definition: AuctionHousePackets.h:82
Definition: Opcodes.h:760
void Read() override
Definition: AuctionHousePackets.h:201
int32 InvType
Definition: AuctionHousePackets.h:271
void Read() override
Definition: AuctionHousePackets.cpp:184
std::vector< AuctionItem > Items
Definition: AuctionHousePackets.h:238
Definition: AuctionHousePackets.h:102
Definition: AuctionHousePackets.h:252
uint64 MinIncrement
Definition: AuctionHousePackets.h:334
Definition: AuctionHousePackets.h:325
uint64 MinBid
Definition: AuctionHousePackets.h:50
Definition: Packet.h:46
Definition: Opcodes.h:768
Item::ItemInstance Item
Definition: AuctionHousePackets.h:43
void Read() override
Definition: AuctionHousePackets.cpp:233
WorldPacket const * Write() override
Definition: AuctionHousePackets.cpp:297
Definition: Item.h:259
ObjectGuid ItemGuid
Definition: AuctionHousePackets.h:57
uint64 Money
the amount of money that the player bid in copper
Definition: AuctionHousePackets.h:121
int32 AuctionItemID
Definition: AuctionHousePackets.h:179
ObjectGuid Guid
Definition: AuctionHousePackets.h:132
int32_t int32
Definition: Define.h:146
uint64 BidAmount
Definition: AuctionHousePackets.h:155
int32 Count
Definition: AuctionHousePackets.h:44
uint32_t uint32
Definition: Define.h:150
uint32 DesiredDelay
Definition: AuctionHousePackets.h:224
uint64_t uint64
Definition: Define.h:149
WorldPacket const * Write() override
Definition: AuctionHousePackets.cpp:313
int32 AuctionItemID
Definition: AuctionHousePackets.h:68
Definition: AuctionHousePackets.h:303
ObjectGuid Guid
the GUID of the bidder for this auction.
Definition: AuctionHousePackets.h:123
Definition: Opcodes.h:64
AuctionOutBidNotification()
Definition: AuctionHousePackets.h:328
Definition: AuctionHousePackets.h:182
AuctionOwnerNotification Info
Definition: AuctionHousePackets.h:310
ItemClass
Definition: ItemTemplate.h:365
WorldPacket const * Write() override
Definition: AuctionHousePackets.cpp:209
ObjectGuid Guid
Definition: AuctionHousePackets.h:88
AuctionClosedNotification()
Definition: AuctionHousePackets.h:294
int32 AuctionItemID
Definition: AuctionHousePackets.h:77
AuctionListBidderItems(WorldPacket &&packet)
Definition: AuctionHousePackets.h:162
uint32 Command
the type of action that triggered this notification. Possible values are AuctionAction ...
Definition: AuctionHousePackets.h:119
Definition: BattlegroundMgr.h:57
uint64 MinBid
Definition: AuctionHousePackets.h:142
Definition: Opcodes.h:66
uint32 RunTime
Definition: AuctionHousePackets.h:143
Definition: AuctionHousePackets.h:291
Definition: AuctionHousePackets.h:91
AuctionCommandResult()
Definition: AuctionHousePackets.cpp:110
int32 BagResult
the bid error. Possible values are AuctionError
Definition: AuctionHousePackets.h:122
uint32 Result
Definition: AuctionHousePackets.h:348
AuctionPlaceBid(WorldPacket &&packet)
Definition: AuctionHousePackets.h:150
void Read() override
Definition: AuctionHousePackets.cpp:156
bool OnlyUsable
Definition: AuctionHousePackets.h:276
Definition: AuctionHousePackets.h:147
Definition: Opcodes.h:764
ObjectGuid Auctioneer
Definition: AuctionHousePackets.h:189
void Read() override
Definition: AuctionHousePackets.cpp:137
int32 ID
Definition: AuctionHousePackets.h:37
float ProceedsMailDelay
Definition: AuctionHousePackets.h:299
void Read() override
Definition: AuctionHousePackets.cpp:178
Definition: Opcodes.h:72
Definition: Opcodes.h:767
int32 Count
Definition: AuctionHousePackets.h:190
Definition: AuctionHousePackets.h:127
AuctionReplicateResponse()
Definition: AuctionHousePackets.h:340
uint64 MinIncrement
Definition: AuctionHousePackets.h:312
uint64 BuyoutPrice
Definition: AuctionHousePackets.h:52
Definition: Opcodes.h:763
uint8_t uint8
Definition: Define.h:152
int32 ChangeNumberGlobal
Definition: AuctionHousePackets.h:191
Definition: AuctionHousePackets.h:171
uint32 ChangeNumberGlobal
Definition: AuctionHousePackets.h:345
Definition: ItemPackets.h:40
ObjectGuid Owner
Definition: AuctionHousePackets.h:49
AuctionBidderNotification Info
Definition: AuctionHousePackets.h:322
Definition: ObjectGuid.h:189
AuctionHelloResponse()
Definition: AuctionHousePackets.h:94
AuctionListOwnerItems(WorldPacket &&packet)
Definition: AuctionHousePackets.h:244
uint32 EndTime
Definition: AuctionHousePackets.h:59
bool Sold
Definition: AuctionHousePackets.h:300
bool OpenForBusiness
Definition: AuctionHousePackets.h:99
Item::ItemInstance Item
Definition: AuctionHousePackets.h:70
AuctionReplicateItems(WorldPacket &&packet)
Definition: AuctionHousePackets.h:185
Definition: Opcodes.h:71
uint64 BuyoutPrice
Definition: AuctionHousePackets.h:140
std::vector< AuctionItem > Items
Definition: AuctionHousePackets.h:349
uint64 BidAmount
Definition: AuctionHousePackets.h:61
uint32 DesiredDelay
Definition: AuctionHousePackets.h:346
ObjectGuid Bidder
Definition: AuctionHousePackets.h:78
ObjectGuid OwnerAccountID
Definition: AuctionHousePackets.h:58
Definition: WorldPacket.h:26
Definition: AuctionHousePackets.h:159
AuctionHelloRequest(WorldPacket &&packet)
Definition: AuctionHousePackets.h:85
int32 AuctionItemID
Definition: AuctionHousePackets.h:156
int32 Charges
Definition: AuctionHousePackets.h:45
int32 Quality
Definition: AuctionHousePackets.h:272
AuctionRemoveItem(WorldPacket &&packet)
Definition: AuctionHousePackets.h:174
int32 AuctionItemID
Definition: AuctionHousePackets.h:48
WorldPacket const * Write() override
Definition: AuctionHousePackets.cpp:267
Definition: AuctionHousePackets.h:73