TrinityCore
Loading...
Searching...
No Matches
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 TRINITYCORE_AUCTION_HOUSE_PACKETS_H
19#define TRINITYCORE_AUCTION_HOUSE_PACKETS_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 {
50
56
62
68
74
83
92
107
135
137 {
138 void Initialize(int32 auctionHouseId, ::AuctionPosting const* auction, ::Item const* item);
139
144 };
145
168
179
192
194 {
195 public:
197
198 void Read() override;
199
201 };
202
216
229
244
259
272
273 class AuctionPlaceBid final : public ClientPacket
274 {
275 public:
276 explicit AuctionPlaceBid(WorldPacket&& packet) : ClientPacket(CMSG_AUCTION_PLACE_BID, std::move(packet)) { }
277
278 void Read() override;
279
284 };
285
286 class AuctionRemoveItem final : public ClientPacket
287 {
288 public:
290
291 void Read() override;
292
297 };
298
313
327
342
344 {
345 public:
347
348 void Read() override;
349
351 bool IsNotFavorite = true;
352 };
353
366
368 {
369 public:
371
372 WorldPacket const* Write() override;
373
375 float ProceedsMailDelay = 0.0f;
376 bool Sold = true;
377 };
378
380 {
381 public:
382 explicit AuctionCommandResult() : ServerPacket(SMSG_AUCTION_COMMAND_RESULT, 4 + 4 + 4 + 8 + 4 + 8 + 8 + 8) { }
383
384 WorldPacket const* Write() override;
385
394 };
395
409
423
425 {
426 public:
428
429 WorldPacket const* Write() override;
430
431 std::vector<AuctionItem> Items;
433 bool HasMoreResults = false;
434 };
435
450
452 {
453 public:
455
456 WorldPacket const* Write() override;
457
459 std::vector<AuctionFavoriteInfo> Items;
460 };
461
477
479 {
480 public:
482
483 WorldPacket const* Write() override;
484
485 std::vector<AuctionItem> Items;
486 std::vector<AuctionItem> SoldItems;
488 bool HasMoreResults = false;
489 };
490
502
514
529
531 {
532 public:
534
535 WorldPacket const* Write() override;
536
538 };
539 }
540}
541
542#endif // TRINITYCORE_AUCTION_HOUSE_PACKETS_H
AuctionHouseListType
AuctionHouseSortOrder
AuctionHouseFilterMask
AuctionHouseBrowseMode
@ MAX_LEVEL
Definition DBCEnums.h:45
uint8_t uint8
Definition Define.h:156
int8_t int8
Definition Define.h:152
int32_t int32
Definition Define.h:150
uint64_t uint64
Definition Define.h:153
uint16_t uint16
Definition Define.h:155
uint32_t uint32
Definition Define.h:154
ItemClass
@ SMSG_AUCTION_LIST_BIDDED_ITEMS_RESULT
Definition Opcodes.h:1162
@ SMSG_AUCTION_LIST_OWNED_ITEMS_RESULT
Definition Opcodes.h:1165
@ SMSG_AUCTION_LIST_ITEMS_RESULT
Definition Opcodes.h:1164
@ SMSG_AUCTION_REPLICATE_RESPONSE
Definition Opcodes.h:1168
@ SMSG_AUCTION_CLOSED_NOTIFICATION
Definition Opcodes.h:1156
@ SMSG_AUCTION_OUTBID_NOTIFICATION
Definition Opcodes.h:1166
@ SMSG_AUCTION_COMMAND_RESULT
Definition Opcodes.h:1157
@ SMSG_AUCTION_GET_COMMODITY_QUOTE_RESULT
Definition Opcodes.h:1160
@ SMSG_AUCTION_WON_NOTIFICATION
Definition Opcodes.h:1169
@ SMSG_AUCTION_HELLO_RESPONSE
Definition Opcodes.h:1161
@ SMSG_AUCTION_OWNER_BID_NOTIFICATION
Definition Opcodes.h:1167
@ SMSG_AUCTION_LIST_BUCKETS_RESULT
Definition Opcodes.h:1163
@ SMSG_AUCTION_FAVORITE_LIST
Definition Opcodes.h:1159
@ CMSG_AUCTION_SELL_ITEM
Definition Opcodes.h:84
@ CMSG_AUCTION_LIST_ITEMS_BY_BUCKET_KEY
Definition Opcodes.h:77
@ CMSG_AUCTION_LIST_BIDDED_ITEMS
Definition Opcodes.h:75
@ CMSG_AUCTION_BROWSE_QUERY
Definition Opcodes.h:70
@ CMSG_AUCTION_CANCEL_COMMODITIES_PURCHASE
Definition Opcodes.h:71
@ CMSG_AUCTION_REMOVE_ITEM
Definition Opcodes.h:81
@ CMSG_AUCTION_GET_COMMODITY_QUOTE
Definition Opcodes.h:73
@ CMSG_AUCTION_PLACE_BID
Definition Opcodes.h:80
@ CMSG_AUCTION_LIST_BUCKETS_BY_BUCKET_KEYS
Definition Opcodes.h:76
@ CMSG_AUCTION_REPLICATE_ITEMS
Definition Opcodes.h:82
@ CMSG_AUCTION_SET_FAVORITE_ITEM
Definition Opcodes.h:85
@ CMSG_AUCTION_SELL_COMMODITY
Definition Opcodes.h:83
@ CMSG_AUCTION_LIST_ITEMS_BY_ITEM_ID
Definition Opcodes.h:78
@ CMSG_AUCTION_HELLO_REQUEST
Definition Opcodes.h:74
@ CMSG_AUCTION_CONFIRM_COMMODITIES_PURCHASE
Definition Opcodes.h:72
@ CMSG_AUCTION_LIST_OWNED_ITEMS
Definition Opcodes.h:79
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition Optional.h:25
Definition Item.h:179
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
STL namespace.
void Initialize(int32 auctionHouseId, ::AuctionPosting const *auction, ::Item const *item)
AuctionBucketKey & operator=(AuctionsBucketKey const &key)
std::vector< Item::ItemGemData > Gems
Optional< WorldPackets::AuctionHouse::AuctionBucketKey > AuctionBucketKey
std::vector< Item::ItemEnchantData > Enchantments
Array< AuctionListFilterSubClass, 31 > SubClassFilters