TrinityCore
AuctionHousePackets.h
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#ifndef AuctionHousePackets_h__
19#define AuctionHousePackets_h__
20
21#include "Packet.h"
22#include "AddonPackets.h"
23#include "DBCEnums.h"
24#include "ItemPacketsCommon.h"
25#include "ObjectGuid.h"
26
28struct AuctionPosting;
29enum class AuctionHouseBrowseMode : uint8;
31enum class AuctionHouseListType : uint8;
32enum class AuctionHouseSortOrder : uint8;
33
34namespace WorldPackets
35{
36 namespace AuctionHouse
37 {
39 {
41 AuctionBucketKey(AuctionsBucketKey const& key) { *this = key; }
42
44
49 };
50
52 {
55 };
56
58 {
61 };
62
64 {
66 bool ReverseSort = false;
67 };
68
70 {
73 };
74
76 {
82 };
83
85 {
86 void Initialize(::AuctionPosting const* auction);
87
91 };
92
94 {
99 std::vector<int32> ItemModifiedAppearanceIDs;
104 bool ContainsOwnerItem = false;
106 };
107
109 {
113 std::vector<Item::ItemEnchantData> Enchantments;
124 bool CensorBidInfo = false;
130 std::vector<Item::ItemGemData> Gems;
133 };
134
136 {
137 void Initialize(::AuctionPosting const* auction, ::Item const* item);
138
142 };
143
144 class AuctionBrowseQuery final : public ClientPacket
145 {
146 public:
148
149 void Read() override;
150
158 std::vector<uint8> KnownPets; // size checked separately in Read()
161 std::string Name;
164 };
165
167 {
168 public:
170
171 void Read() override;
172
175 };
176
178 {
179 public:
181
182 void Read() override;
183
188 };
189
191 {
192 public:
194
195 void Read() override;
196
198 };
199
201 {
202 public:
204
205 void Read() override;
206
212 };
213
215 {
216 public:
218
219 void Read() override;
220
225 };
226
228 {
229 public:
231
232 void Read() override;
233
240 };
241
243 {
244 public:
246
247 void Read() override;
248
255 };
256
258 {
259 public:
261
262 void Read() override;
263
268 };
269
270 class AuctionPlaceBid final : public ClientPacket
271 {
272 public:
274
275 void Read() override;
276
281 };
282
283 class AuctionRemoveItem final : public ClientPacket
284 {
285 public:
287
288 void Read() override;
289
294 };
295
297 {
298 public:
300
301 void Read() override;
302
309 };
310
312 {
313 public:
315
316 void Read() override { }
317 };
318
320 {
321 public:
323
324 void Read() override;
325
331 };
332
333 class AuctionSellItem final : public ClientPacket
334 {
335 public:
337
338 void Read() override;
339
346 };
347
349 {
350 public:
352
353 void Read() override;
354
356 bool IsNotFavorite = true;
357 };
358
360 {
361 public:
363
364 void Read() override;
365
370 };
371
373 {
374 public:
376
377 WorldPacket const* Write() override;
378
380 float ProceedsMailDelay = 0.0f;
381 bool Sold = true;
382 };
383
385 {
386 public:
387 AuctionCommandResult() : ServerPacket(SMSG_AUCTION_COMMAND_RESULT, 4 + 4 + 4 + 8 + 4 + 8 + 8 + 8) { }
388
389 WorldPacket const* Write() override;
390
399 };
400
402 {
403 public:
405
406 WorldPacket const* Write() override;
407
413 };
414
416 {
417 public:
419
420 WorldPacket const* Write() override;
421
425 bool OpenForBusiness = true;
426 };
427
429 {
430 public:
432
433 WorldPacket const* Write() override;
434
435 std::vector<AuctionItem> Items;
437 bool HasMoreResults = false;
438 };
439
441 {
442 public:
444
445 WorldPacket const* Write() override;
446
447 std::vector<BucketInfo> Buckets;
452 bool HasMoreResults = false;
453 };
454
456 {
457 public:
459
460 WorldPacket const* Write() override;
461
463 std::vector<AuctionFavoriteInfo> Items;
464 };
465
467 {
468 public:
470
471 WorldPacket const* Write() override;
472
473 std::vector<AuctionItem> Items;
478 bool HasMoreResults = false;
480 };
481
483 {
484 public:
486
487 WorldPacket const* Write() override;
488
489 std::vector<AuctionItem> Items;
490 std::vector<AuctionItem> SoldItems;
492 bool HasMoreResults = false;
493 };
494
496 {
497 public:
499
500 WorldPacket const* Write() override;
501
505 };
506
508 {
509 public:
511
512 WorldPacket const* Write() override;
513
517 };
518
520 {
521 public:
523
524 WorldPacket const* Write() override;
525
531 std::vector<AuctionItem> Items;
532 };
533
535 {
536 public:
538
539 WorldPacket const* Write() override;
540
542 };
543 }
544}
545
546#endif // AuctionHousePackets_h__
AuctionHouseListType
AuctionHouseSortOrder
AuctionHouseFilterMask
AuctionHouseBrowseMode
@ MAX_LEVEL
Definition: DBCEnums.h:51
uint8_t uint8
Definition: Define.h:144
int8_t int8
Definition: Define.h:140
int32_t int32
Definition: Define.h:138
uint64_t uint64
Definition: Define.h:141
uint16_t uint16
Definition: Define.h:143
uint32_t uint32
Definition: Define.h:142
ItemClass
Definition: ItemTemplate.h:419
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition: Optional.h:25
Definition: Item.h:170
Array< AuctionListFilterClass, 7 > ItemClassFilters
uint64 Money
the amount of money that the player bid in copper
uint64 MinIncrement
the sum of outbid is (1% of current bid) * 5, if the bid is too small, then this value is 1 copper.
int32 BagResult
the bid error. Possible values are AuctionError
ObjectGuid Guid
the GUID of the bidder for this auction.
int32 ErrorCode
the error code that was generated when trying to perform the action. Possible values are AuctionError
int32 AuctionID
the id of the auction that triggered this notification
int32 Command
the type of action that triggered this notification. Possible values are AuctionAction
@ CMSG_AUCTION_SELL_ITEM
Definition: Opcodes.h:91
@ CMSG_AUCTION_LIST_ITEMS_BY_BUCKET_KEY
Definition: Opcodes.h:83
@ CMSG_AUCTION_LIST_BIDDED_ITEMS
Definition: Opcodes.h:81
@ CMSG_AUCTION_BROWSE_QUERY
Definition: Opcodes.h:76
@ CMSG_AUCTION_CANCEL_COMMODITIES_PURCHASE
Definition: Opcodes.h:77
@ CMSG_AUCTION_REMOVE_ITEM
Definition: Opcodes.h:87
@ CMSG_AUCTION_GET_COMMODITY_QUOTE
Definition: Opcodes.h:79
@ CMSG_AUCTION_PLACE_BID
Definition: Opcodes.h:86
@ CMSG_AUCTION_LIST_BUCKETS_BY_BUCKET_KEYS
Definition: Opcodes.h:82
@ CMSG_AUCTION_REPLICATE_ITEMS
Definition: Opcodes.h:88
@ CMSG_AUCTION_SET_FAVORITE_ITEM
Definition: Opcodes.h:92
@ CMSG_AUCTION_SELL_COMMODITY
Definition: Opcodes.h:90
@ CMSG_AUCTION_REQUEST_FAVORITE_LIST
Definition: Opcodes.h:89
@ CMSG_AUCTION_LIST_ITEMS_BY_ITEM_ID
Definition: Opcodes.h:84
@ CMSG_AUCTION_HELLO_REQUEST
Definition: Opcodes.h:80
@ CMSG_AUCTION_CONFIRM_COMMODITIES_PURCHASE
Definition: Opcodes.h:78
@ CMSG_AUCTION_LIST_OWNED_ITEMS
Definition: Opcodes.h:85
@ SMSG_AUCTION_LIST_BIDDED_ITEMS_RESULT
Definition: Opcodes.h:968
@ SMSG_AUCTION_LIST_OWNED_ITEMS_RESULT
Definition: Opcodes.h:971
@ SMSG_AUCTION_LIST_ITEMS_RESULT
Definition: Opcodes.h:970
@ SMSG_AUCTION_REPLICATE_RESPONSE
Definition: Opcodes.h:974
@ SMSG_AUCTION_CLOSED_NOTIFICATION
Definition: Opcodes.h:962
@ SMSG_AUCTION_OUTBID_NOTIFICATION
Definition: Opcodes.h:972
@ SMSG_AUCTION_COMMAND_RESULT
Definition: Opcodes.h:963
@ SMSG_AUCTION_GET_COMMODITY_QUOTE_RESULT
Definition: Opcodes.h:966
@ SMSG_AUCTION_WON_NOTIFICATION
Definition: Opcodes.h:975
@ SMSG_AUCTION_HELLO_RESPONSE
Definition: Opcodes.h:967
@ SMSG_AUCTION_OWNER_BID_NOTIFICATION
Definition: Opcodes.h:973
@ SMSG_AUCTION_LIST_BUCKETS_RESULT
Definition: Opcodes.h:969
@ SMSG_AUCTION_FAVORITE_LIST
Definition: Opcodes.h:965
STL namespace.
void Initialize(::AuctionPosting const *auction, ::Item const *item)
AuctionBucketKey & operator=(AuctionsBucketKey const &key)
AuctionBucketKey(AuctionsBucketKey const &key)
std::vector< Item::ItemGemData > Gems
Optional< WorldPackets::AuctionHouse::AuctionBucketKey > AuctionBucketKey
std::vector< Item::ItemEnchantData > Enchantments
Optional< Item::ItemInstance > Item
Array< AuctionListFilterSubClass, 31 > SubClassFilters