TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
WorldPackets::Trade::TradeUpdated Class Referencefinal

#include <TradePackets.h>

Classes

struct  TradeItem
 
struct  UnwrappedTradeItem
 

Public Member Functions

 TradeUpdated ()
 
WorldPacket constWrite () override
 
- Public Member Functions inherited from WorldPackets::ServerPacket
 ServerPacket (OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
 
void Read () overridefinal
 
void Clear ()
 
WorldPacket && Move ()
 
OpcodeServer GetOpcode () const
 
- Public Member Functions inherited from WorldPackets::Packet
 Packet (WorldPacket &&worldPacket)
 
virtual ~Packet ()=default
 
 Packet (Packet const &right)=delete
 
Packetoperator= (Packet const &right)=delete
 
WorldPacket constGetRawPacket () const
 
size_t GetSize () const
 
ConnectionType GetConnection () const
 

Public Attributes

uint64 Gold = 0
 
uint32 CurrentStateIndex = 0
 
uint8 WhichPlayer = 0
 
uint32 ClientStateIndex = 0
 
std::vector< TradeItemItems
 
int32 CurrencyType = 0
 
uint32 ID = 0
 
int32 ProposedEnchantment = 0
 
int32 CurrencyQuantity = 0
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::Trade::TradeUpdated::TradeUpdated ( )
inline
175 : ServerPacket(SMSG_TRADE_UPDATED, 8 + 4 + 1 + 4 + 7 * sizeof(UnwrappedTradeItem) + 4 + 4 + 4 + 4) { }
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49
Definition: Opcodes.h:1580

Member Function Documentation

WorldPacket const * WorldPackets::Trade::TradeUpdated::Write ( )
overridevirtual

Implements WorldPackets::Packet.

114 {
116  _worldPacket << uint32(ID);
123  _worldPacket << uint32(Items.size());
124 
125  for (TradeItem const& item : Items)
126  _worldPacket << item;
127 
128  return &_worldPacket;
129 }
int32 ProposedEnchantment
Definition: TradePackets.h:186
uint32 ID
Definition: TradePackets.h:185
uint64 Gold
Definition: TradePackets.h:179
uint8 WhichPlayer
Definition: TradePackets.h:181
uint64_t uint64
Definition: g3dmath.h:170
WorldPacket _worldPacket
Definition: Packet.h:43
int32 CurrencyType
Definition: TradePackets.h:184
int32 CurrencyQuantity
Definition: TradePackets.h:187
std::vector< TradeItem > Items
Definition: TradePackets.h:183
uint32 ClientStateIndex
Definition: TradePackets.h:182
uint8_t uint8
Definition: g3dmath.h:164
int32_t int32
Definition: g3dmath.h:167
uint32_t uint32
Definition: g3dmath.h:168
uint32 CurrentStateIndex
Definition: TradePackets.h:180

+ Here is the caller graph for this function:

Member Data Documentation

uint32 WorldPackets::Trade::TradeUpdated::ClientStateIndex = 0
int32 WorldPackets::Trade::TradeUpdated::CurrencyQuantity = 0
int32 WorldPackets::Trade::TradeUpdated::CurrencyType = 0
uint32 WorldPackets::Trade::TradeUpdated::CurrentStateIndex = 0
uint64 WorldPackets::Trade::TradeUpdated::Gold = 0
uint32 WorldPackets::Trade::TradeUpdated::ID = 0
std::vector<TradeItem> WorldPackets::Trade::TradeUpdated::Items
int32 WorldPackets::Trade::TradeUpdated::ProposedEnchantment = 0
uint8 WorldPackets::Trade::TradeUpdated::WhichPlayer = 0

The documentation for this class was generated from the following files: