TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
AuctionHousePackets.cpp File Reference
#include "AuctionHousePackets.h"
#include "AuctionHouseMgr.h"
#include "ObjectGuid.h"
+ Include dependency graph for AuctionHousePackets.cpp:

Functions

ByteBufferoperator<< (ByteBuffer &data, WorldPackets::AuctionHouse::AuctionItem const &auctionItem)
 
ByteBufferoperator<< (ByteBuffer &data, WorldPackets::AuctionHouse::AuctionOwnerNotification const &ownerNotification)
 
ByteBufferoperator<< (ByteBuffer &data, WorldPackets::AuctionHouse::AuctionBidderNotification const &bidderNotification)
 

Function Documentation

ByteBuffer& operator<< ( ByteBuffer data,
WorldPackets::AuctionHouse::AuctionItem const auctionItem 
)
23 {
24  data << auctionItem.Item; // ItemInstance
25  data << int32(auctionItem.Count);
26  data << int32(auctionItem.Charges);
27  data << int32(auctionItem.Enchantments.size());
28  data << int32(auctionItem.Flags);
29  data << int32(auctionItem.AuctionItemID);
30  data << auctionItem.Owner;
31  data << uint64(auctionItem.MinBid);
32  data << uint64(auctionItem.MinIncrement);
33  data << uint64(auctionItem.BuyoutPrice);
34  data << int32(auctionItem.DurationLeft);
35  data << uint8(auctionItem.DeleteReason);
36 
37  for (auto const& enchant : auctionItem.Enchantments)
38  {
39  data << int32(enchant.ID);
40  data << uint32(enchant.Expiration);
41  data << int32(enchant.Charges);
42  data << uint8(enchant.Slot);
43  }
44 
45  data.FlushBits();
46 
47  bool censorServerSideInfo = !data.WriteBit(auctionItem.CensorServerSideInfo);
48  bool censorBidInfo = !data.WriteBit(auctionItem.CensorBidInfo);
49 
50  if (censorServerSideInfo)
51  {
52  data << auctionItem.ItemGuid;
53  data << auctionItem.OwnerAccountID;
54  data << int32(auctionItem.EndTime);
55  }
56 
57  if (censorBidInfo)
58  {
59  data << auctionItem.Bidder;
60  data << uint64(auctionItem.BidAmount);
61  }
62 
63  return data;
64 }
void FlushBits()
Definition: ByteBuffer.h:150
uint64_t uint64
Definition: g3dmath.h:170
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
uint8_t uint8
Definition: g3dmath.h:164
int32_t int32
Definition: g3dmath.h:167
uint32_t uint32
Definition: g3dmath.h:168

+ Here is the call graph for this function:

ByteBuffer& operator<< ( ByteBuffer data,
WorldPackets::AuctionHouse::AuctionOwnerNotification const ownerNotification 
)
67 {
68  data << int32(ownerNotification.AuctionItemID);
69  data << uint64(ownerNotification.BidAmount);
70  data << ownerNotification.Item;
71  return data;
72 }
uint64_t uint64
Definition: g3dmath.h:170
int32_t int32
Definition: g3dmath.h:167
ByteBuffer& operator<< ( ByteBuffer data,
WorldPackets::AuctionHouse::AuctionBidderNotification const bidderNotification 
)
75 {
76  data << int32(bidderNotification.AuctionItemID);
77  data << bidderNotification.Bidder;
78  data << bidderNotification.Item;
79  return data;
80 }
int32_t int32
Definition: g3dmath.h:167