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

Functions

ByteBufferoperator<< (ByteBuffer &buffer, WorldPackets::Trade::TradeUpdated::UnwrappedTradeItem const &unwrappedTradeItem)
 
ByteBufferoperator<< (ByteBuffer &buffer, WorldPackets::Trade::TradeUpdated::TradeItem const &tradeItem)
 

Function Documentation

ByteBuffer& operator<< ( ByteBuffer buffer,
WorldPackets::Trade::TradeUpdated::UnwrappedTradeItem const unwrappedTradeItem 
)
86 {
87  buffer << unwrappedTradeItem.Item;
88  buffer << int32(unwrappedTradeItem.EnchantID);
89  buffer << int32(unwrappedTradeItem.OnUseEnchantmentID);
90  buffer.append(unwrappedTradeItem.SocketEnchant, MAX_GEM_SOCKETS);
91  buffer << unwrappedTradeItem.Creator;
92  buffer << int32(unwrappedTradeItem.Charges);
93  buffer << uint32(unwrappedTradeItem.MaxDurability);
94  buffer << uint32(unwrappedTradeItem.Durability);
95  buffer.WriteBit(unwrappedTradeItem.Lock);
96  buffer.FlushBits();
97 
98  return buffer;
99 }
#define MAX_GEM_SOCKETS
Definition: Item.h:195
void FlushBits()
Definition: ByteBuffer.h:150
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
void append(T value)
Definition: ByteBuffer.h:143
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 buffer,
WorldPackets::Trade::TradeUpdated::TradeItem const tradeItem 
)
102 {
103  buffer << uint8(tradeItem.Slot);
104  buffer << uint32(tradeItem.EntryID);
105  buffer << uint32(tradeItem.StackCount);
106  buffer << tradeItem.GiftCreator;
107  if (buffer.WriteBit(tradeItem.Unwrapped.is_initialized()))
108  buffer << *tradeItem.Unwrapped;
109 
110  return buffer;
111 }
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
uint8_t uint8
Definition: g3dmath.h:164
uint32_t uint32
Definition: g3dmath.h:168

+ Here is the call graph for this function: