ManaPlus
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
Net::MessageIn Class Reference

#include <messagein.h>

Inheritance diagram for Net::MessageIn:
EAthena::MessageIn TmwAthena::MessageIn

Public Member Functions

virtual ~MessageIn ()
 
uint16_t readId () const
 
int getId () const
 
unsigned int getLength () const
 
unsigned char readUInt8 (const char *const str)
 
signed char readInt8 (const char *const str)
 
int16_t readInt16 (const char *const str)
 
uint16_t readUInt16 (const char *const str)
 
int32_t readInt32 (const char *const str)
 
uint32_t readUInt32 (const char *const str)
 
int readItemId (const char *const str)
 
int64_t readInt64 (const char *const str)
 
BeingId readBeingId (const char *const str)
 
float readFloat (const char *const str)
 
void readCoordinates (uint16_t &x, uint16_t &y, uint8_t &direction, const char *const str)
 
void readCoordinatePair (uint16_t &srcX, uint16_t &srcY, uint16_t &dstX, uint16_t &dstY, const char *const str)
 
void skip (const unsigned int length, const char *const str)
 
void skipToEnd (const char *const str)
 
std::string readString (int length, const char *const dstr)
 
std::string readRawString (int length, const char *const dstr)
 
unsigned char * readBytes (int length, const char *const dstr)
 
int getVersion () const
 
int getVersionMain () const
 
int getVersionRe () const
 
int getVersionZero () const
 

Static Public Member Functions

static uint8_t fromServerDirection (const uint8_t serverDir)
 

Protected Member Functions

 MessageIn (const char *const data, const unsigned int length)
 

Protected Attributes

const char * mData
 
unsigned int mLength
 
unsigned int mPos
 
int mVersion
 
uint16_t mId
 
bool mIgnore
 

Detailed Description

Used for parsing an incoming message.

Definition at line 40 of file messagein.h.

Constructor & Destructor Documentation

◆ ~MessageIn()

Net::MessageIn::~MessageIn ( )
virtual

Definition at line 65 of file messagein.cpp.

66 {
67  if (mLength != 0U)
68  {
69  if (mPos != mLength && mPos != 2)
70  {
71  logger->log("Wrong actual or planned inbound packet size!");
72  logger->log(" packet id: %u 0x%x",
73  CAST_U32(mId),
74  CAST_U32(mId));
75  logger->log(" planned size: %u", mLength);
76  logger->log(" read size: %u", mPos);
78  }
79  }
80  else
81  {
82  logger->log("Zero packet size: %d", CAST_S32(mId));
83  }
84 }

References CAST_S32, CAST_U32, Logger::log(), logger, mId, mLength, mPos, and WRONGPACKETSIZE.

◆ MessageIn()

Net::MessageIn::MessageIn ( const char *const  data,
const unsigned int  length 
)
protected

Constructor.

Definition at line 53 of file messagein.cpp.

54  :
55  mData(data),
56  mLength(length),
57  mPos(0),
58  mVersion(0),
59  mId(0),
60  mIgnore(false)
61 {
63 }

References PacketCounters::incInPackets().

Member Function Documentation

◆ fromServerDirection()

uint8_t Net::MessageIn::fromServerDirection ( const uint8_t  serverDir)
static

Definition at line 265 of file messagein.cpp.

266 {
267  // Translate from eAthena format
268  switch (serverDir)
269  {
270  case 0:
271  return 1;
272  case 1:
273  return 3;
274  case 2:
275  return 2;
276  case 3:
277  return 6;
278  case 4:
279  return 4;
280  case 5:
281  return 12;
282  case 6:
283  return 8;
284  case 7:
285  return 9;
286  case 8:
287  return 8;
288  default:
289  logger->log("incorrect direction: %d",
290  CAST_S32(serverDir));
291  return 0;
292  }
293 }

References CAST_S32, Logger::log(), and logger.

Referenced by TmwAthena::BeingRecv::processBeingChangeDirection(), EAthena::BeingRecv::processBeingChangeDirection(), Ea::NpcRecv::processNpcCommand(), and readCoordinates().

◆ getId()

int Net::MessageIn::getId ( ) const
inline

Returns the message ID.

Definition at line 52 of file messagein.h.

53  { return mId; }

References mId.

◆ getLength()

unsigned int Net::MessageIn::getLength ( ) const
inline

Returns the message length.

Definition at line 58 of file messagein.h.

59  { return mLength; }

References mLength.

◆ getVersion()

int Net::MessageIn::getVersion ( ) const
inline

Definition at line 135 of file messagein.h.

136  { return mVersion; }

References mVersion.

◆ getVersionMain()

int Net::MessageIn::getVersionMain ( ) const

Definition at line 499 of file messagein.cpp.

500 {
502  return mVersion;
503  return 0;
504 }

References mVersion, and packetVersionMain.

◆ getVersionRe()

int Net::MessageIn::getVersionRe ( ) const

Definition at line 506 of file messagein.cpp.

507 {
508  if (packetVersionRe >= mVersion)
509  return mVersion;
510  return 0;
511 }

References mVersion, and packetVersionRe.

◆ getVersionZero()

int Net::MessageIn::getVersionZero ( ) const

Definition at line 513 of file messagein.cpp.

514 {
516  return mVersion;
517  return 0;
518 }

References mVersion, and packetVersionZero.

◆ readBeingId()

BeingId Net::MessageIn::readBeingId ( const char *const  str)

Definition at line 223 of file messagein.cpp.

224 {
225  return fromInt(readUInt32(str), BeingId);
226 }

References fromInt, and readUInt32().

◆ readBytes()

unsigned char * Net::MessageIn::readBytes ( int  length,
const char *const  dstr 
)

Definition at line 453 of file messagein.cpp.

454 {
455  // Get string length
456  if (length < 0)
457  length = readInt16("len");
458 
459  // Make sure the string isn't erroneous
460  if (length < 0 || mPos + length > mLength)
461  {
462  DEBUGLOG2("readBytesString error", mPos, dstr);
463  mPos = mLength + 1;
464  return nullptr;
465  }
466 
467  unsigned char *const buf
468  = new unsigned char[CAST_SIZE(length + 2)];
469 
470  memcpy(buf, mData + CAST_SIZE(mPos), length);
471  buf[length] = 0;
472  buf[length + 1] = 0;
473  mPos += length;
474 
475 #ifdef ENABLEDEBUGLOG
476  if (!mIgnore)
477  {
478  std::string str;
479  for (int f = 0; f < length; f ++)
480  str.append(strprintf("%02x", CAST_U32(buf[f])));
481  str += " ";
482  for (int f = 0; f < length; f ++)
483  {
484  if (buf[f] != 0U)
485  str.append(strprintf("%c", buf[f]));
486  else
487  str.append("_");
488  }
489  if (dstr != nullptr)
490  logger->dlog(dstr);
491  logger->dlog("ReadBytes: " + str);
492  }
493 #endif // ENABLEDEBUGLOG
494 
496  return buf;
497 }

References CAST_SIZE, CAST_U32, DEBUGLOG2, Logger::dlog(), PacketCounters::incInBytes(), logger, mData, mIgnore, mLength, mPos, readInt16(), and strprintf().

◆ readCoordinatePair()

void Net::MessageIn::readCoordinatePair ( uint16_t &  srcX,
uint16_t &  srcY,
uint16_t &  dstX,
uint16_t &  dstY,
const char *const  str 
)

Reads a special 5 byte block used by eAthena, containing a source and destination coordinate pair.

Definition at line 327 of file messagein.cpp.

332 {
333  if (mPos + 5 <= mLength)
334  {
335  const char *const data = mData + CAST_SIZE(mPos);
336  uint16_t temp = MAKEWORD(data[3], data[2] & 0x000f);
337  dstX = CAST_U16(temp >> 2);
338 
339  dstY = MAKEWORD(data[4], data[3] & 0x0003);
340 
341  temp = MAKEWORD(data[1], data[0]);
342  srcX = CAST_U16(temp >> 6);
343 
344  temp = MAKEWORD(data[2], data[1] & 0x003f);
345  srcY = CAST_U16(temp >> 4);
346 
347  DEBUGLOG2(std::string("readCoordinatePair: ").append(toString(
348  CAST_S32(srcX))).append(",").append(toString(
349  CAST_S32(srcY))).append(" ").append(toString(
350  CAST_S32(dstX))).append(",").append(toString(
351  CAST_S32(dstY))), mPos, str);
352  }
353  else
354  {
355  srcX = 0;
356  srcY = 0;
357  dstX = 0;
358  dstY = 0;
359  logger->log("error: wrong readCoordinatePair packet");
360  }
361  mPos += 5;
363 }

References CAST_S32, CAST_SIZE, CAST_U16, data, DEBUGLOG2, PacketCounters::incInBytes(), Logger::log(), logger, MAKEWORD, mData, mLength, mPos, and Catch::toString().

◆ readCoordinates()

void Net::MessageIn::readCoordinates ( uint16_t &  x,
uint16_t &  y,
uint8_t &  direction,
const char *const  str 
)

Reads a special 3 byte block used by eAthena, containing x and y coordinates and direction.

Definition at line 295 of file messagein.cpp.

299 {
300  if (mPos + 3 <= mLength)
301  {
302  const char *const data = mData + CAST_SIZE(mPos);
303  uint16_t temp = MAKEWORD(data[1] & 0x00c0, data[0] & 0x00ff);
304  x = CAST_U16(temp >> 6);
305  temp = MAKEWORD(data[2] & 0x00f0, data[1] & 0x003f);
306  y = CAST_U16(temp >> 4);
307 
308  const uint8_t serverDir = CAST_U8(data[2] & 0x000f);
309  direction = fromServerDirection(serverDir);
310 
311  DEBUGLOG2(std::string("readCoordinates: ").append(toString(
312  CAST_S32(x))).append(",").append(toString(
313  CAST_S32(y))).append(",").append(toString(
314  CAST_S32(serverDir))), mPos, str);
315  }
316  else
317  {
318  x = 0;
319  y = 0;
320  direction = 0;
321  logger->log("error: wrong readCoordinates packet");
322  }
323  mPos += 3;
325 }

References CAST_S32, CAST_SIZE, CAST_U16, CAST_U8, data, DEBUGLOG2, fromServerDirection(), PacketCounters::incInBytes(), Logger::log(), logger, MAKEWORD, mData, mLength, mPos, Catch::toString(), x, and y.

◆ readFloat()

float Net::MessageIn::readFloat ( const char *const  str)

Definition at line 249 of file messagein.cpp.

250 {
251  float value = 0;
252  if (mPos + 4 <= mLength)
253  {
254  memcpy(&value, mData + CAST_SIZE(mPos), sizeof(float));
255  }
256 #ifdef ENABLEDEBUGLOG
257  std::string text = strprintf("readFloat: %f", value);
258  DEBUGLOG2(str, mPos, text.c_str());
259 #endif
260  mPos += 4;
262  return value;
263 }

References CAST_SIZE, DEBUGLOG2, PacketCounters::incInBytes(), mData, mLength, mPos, and strprintf().

◆ readId()

uint16_t Net::MessageIn::readId ( ) const

Definition at line 86 of file messagein.cpp.

87 {
88  int16_t value = -1;
89  if (mPos + 2 <= mLength)
90  {
91 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
92  int16_t swap;
93  memcpy(&swap, mData + CAST_SIZE(mPos), sizeof(int16_t));
94  value = SDL_Swap16(swap);
95 #else // SDL_BYTEORDER == SDL_BIG_ENDIAN
96 
97  memcpy(&value, mData + CAST_SIZE(mPos), sizeof(int16_t));
98 #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN
99  }
100  return value;
101 }

References CAST_SIZE, mData, mLength, and mPos.

Referenced by EAthena::MessageIn::postInit(), and TmwAthena::MessageIn::postInit().

◆ readInt16()

int16_t Net::MessageIn::readInt16 ( const char *const  str)

Definition at line 130 of file messagein.cpp.

131 {
132  int16_t value = -1;
133  if (mPos + 2 <= mLength)
134  {
135 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
136  int16_t swap;
137  memcpy(&swap, mData + CAST_SIZE(mPos), sizeof(int16_t));
138  value = SDL_Swap16(swap);
139 #else // SDL_BYTEORDER == SDL_BIG_ENDIAN
140 
141  memcpy(&value, mData + CAST_SIZE(mPos), sizeof(int16_t));
142 #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN
143  }
144  DEBUGLOG2("readInt16: " + toStringPrint(CAST_U32(
145  CAST_U16(value))),
146  mPos, str);
147  mPos += 2;
149  return value;
150 }

References CAST_SIZE, CAST_U16, CAST_U32, DEBUGLOG2, PacketCounters::incInBytes(), mData, mLength, mPos, and toStringPrint().

Referenced by EAthena::MessageIn::postInit(), TmwAthena::MessageIn::postInit(), readBytes(), readItemId(), readRawString(), and readString().

◆ readInt32()

int32_t Net::MessageIn::readInt32 ( const char *const  str)

Definition at line 174 of file messagein.cpp.

175 {
176  int32_t value = -1;
177  if (mPos + 4 <= mLength)
178  {
179 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
180  int32_t swap;
181  memcpy(&swap, mData + CAST_SIZE(mPos), sizeof(int32_t));
182  value = SDL_Swap32(swap);
183 #else // SDL_BYTEORDER == SDL_BIG_ENDIAN
184 
185  memcpy(&value, mData + CAST_SIZE(mPos), sizeof(int32_t));
186 #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN
187  }
188  DEBUGLOG2("readInt32: " + toStringPrint(CAST_S32(value)),
189  mPos, str);
190  mPos += 4;
192  return value;
193 }

References CAST_S32, CAST_SIZE, DEBUGLOG2, PacketCounters::incInBytes(), mData, mLength, mPos, and toStringPrint().

Referenced by readItemId().

◆ readInt64()

int64_t Net::MessageIn::readInt64 ( const char *const  str)

Definition at line 228 of file messagein.cpp.

229 {
230  int64_t value = -1;
231  if (mPos + 8 <= mLength)
232  {
233 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
234  int64_t swap;
235  memcpy(&swap, mData + CAST_SIZE(mPos), sizeof(int64_t));
236  value = SDL_Swap64(swap);
237 #else // SDL_BYTEORDER == SDL_BIG_ENDIAN
238 
239  memcpy(&value, mData + CAST_SIZE(mPos), sizeof(int64_t));
240 #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN
241  }
242  DEBUGLOG2("readInt64: " + toStringPrint(CAST_U32(value)),
243  mPos, str);
244  mPos += 8;
246  return value;
247 }

References CAST_SIZE, CAST_U32, DEBUGLOG2, PacketCounters::incInBytes(), mData, mLength, mPos, and toStringPrint().

◆ readInt8()

signed char Net::MessageIn::readInt8 ( const char *const  str)

Reads a short.

Definition at line 116 of file messagein.cpp.

117 {
118  signed char value = CAST_S8(-1);
119  if (mPos < mLength)
120  value = CAST_S8(mData[mPos]);
121 
122  DEBUGLOG2("readInt8: " + toStringPrint(CAST_U32(
123  CAST_U8(value))),
124  mPos, str);
125  mPos += 1;
127  return value;
128 }

References CAST_S8, CAST_U32, CAST_U8, DEBUGLOG2, PacketCounters::incInBytes(), mData, mLength, mPos, and toStringPrint().

◆ readItemId()

int Net::MessageIn::readItemId ( const char *const  str)

Definition at line 216 of file messagein.cpp.

217 {
218  if (itemIdLen == 2)
219  return readInt16(str);
220  return readInt32(str);
221 }

References itemIdLen, readInt16(), and readInt32().

◆ readRawString()

std::string Net::MessageIn::readRawString ( int  length,
const char *const  dstr 
)

Definition at line 410 of file messagein.cpp.

411 {
412  // Get string length
413  if (length < 0)
414  length = readInt16("len");
415 
416  // Make sure the string isn't erroneous
417  if (length < 0 || mPos + length > mLength)
418  {
419  mPos = mLength + 1;
420  return "";
421  }
422 
423  // Read the string
424  const char *const stringBeg = mData + CAST_SIZE(mPos);
425  const char *const stringEnd
426  = static_cast<const char *>(memchr(stringBeg, '\0', length));
427  std::string str(stringBeg, stringEnd != nullptr
428  ? stringEnd - stringBeg : CAST_SIZE(length));
429 
430  DEBUGLOG2("readString: " + str, mPos, dstr);
431 
432  if (stringEnd != nullptr)
433  {
434  const size_t len2 = CAST_SIZE(length)
435  - (stringEnd - stringBeg) - 1;
436  const char *const stringBeg2 = stringEnd + 1;
437  const char *const stringEnd2
438  = static_cast<const char *>(memchr(stringBeg2, '\0', len2));
439  const std::string hiddenPart = std::string(stringBeg2,
440  stringEnd2 != nullptr ? stringEnd2 - stringBeg2 : len2);
441  if (hiddenPart.length() > 0)
442  {
443  DEBUGLOG2("readString2: " + hiddenPart, mPos, dstr);
444  return str.append("|").append(hiddenPart);
445  }
446  }
447  mPos += length;
449 
450  return str;
451 }

References CAST_SIZE, DEBUGLOG2, PacketCounters::incInBytes(), mData, mLength, mPos, and readInt16().

◆ readString()

std::string Net::MessageIn::readString ( int  length,
const char *const  dstr 
)

Reads a string. If a length is not given (-1), it is assumed that the length of the string is stored in a short at the start of the string.

Definition at line 383 of file messagein.cpp.

384 {
385  // Get string length
386  if (length < 0)
387  length = readInt16("len");
388 
389  // Make sure the string isn't erroneous
390  if (length < 0 || mPos + length > mLength)
391  {
392  DEBUGLOG2("readString error", mPos, dstr);
393  mPos = mLength + 1;
394  return "";
395  }
396 
397  // Read the string
398  const char *const stringBeg = mData + CAST_SIZE(mPos);
399  const char *const stringEnd
400  = static_cast<const char *>(memchr(stringBeg, '\0', length));
401 
402  const std::string str(stringBeg, stringEnd != nullptr
403  ? stringEnd - stringBeg : CAST_SIZE(length));
404  DEBUGLOG2("readString: " + str, mPos, dstr);
405  mPos += length;
407  return str;
408 }

References CAST_SIZE, DEBUGLOG2, PacketCounters::incInBytes(), mData, mLength, mPos, and readInt16().

◆ readUInt16()

uint16_t Net::MessageIn::readUInt16 ( const char *const  str)

Reads a long.

Definition at line 152 of file messagein.cpp.

153 {
154  uint16_t value = 0xffU;
155  if (mPos + 2 <= mLength)
156  {
157 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
158  uint16_t swap;
159  memcpy(&swap, mData + CAST_SIZE(mPos), sizeof(uint16_t));
160  value = SDL_Swap16(swap);
161 #else // SDL_BYTEORDER == SDL_BIG_ENDIAN
162 
163  memcpy(&value, mData + CAST_SIZE(mPos), sizeof(uint16_t));
164 #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN
165  }
166  DEBUGLOG2("readUInt16: " + toStringPrint(CAST_U32(
167  CAST_U16(value))),
168  mPos, str);
169  mPos += 2;
171  return value;
172 }

References CAST_SIZE, CAST_U16, CAST_U32, DEBUGLOG2, PacketCounters::incInBytes(), mData, mLength, mPos, and toStringPrint().

◆ readUInt32()

uint32_t Net::MessageIn::readUInt32 ( const char *const  str)

Definition at line 195 of file messagein.cpp.

196 {
197  uint32_t value = 0;
198  if (mPos + 4 <= mLength)
199  {
200 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
201  uint32_t swap;
202  memcpy(&swap, mData + CAST_SIZE(mPos), sizeof(int32_t));
203  value = SDL_Swap32(swap);
204 #else // SDL_BYTEORDER == SDL_BIG_ENDIAN
205 
206  memcpy(&value, mData + CAST_SIZE(mPos), sizeof(int32_t));
207 #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN
208  }
209  DEBUGLOG2("readInt32: " + toStringPrint(CAST_U32(value)),
210  mPos, str);
211  mPos += 4;
213  return value;
214 }

References CAST_SIZE, CAST_U32, DEBUGLOG2, PacketCounters::incInBytes(), mData, mLength, mPos, and toStringPrint().

Referenced by readBeingId().

◆ readUInt8()

unsigned char Net::MessageIn::readUInt8 ( const char *const  str)

Reads a byte.

Definition at line 103 of file messagein.cpp.

104 {
105  unsigned char value = CAST_U8(-1);
106  if (mPos < mLength)
107  value = CAST_U8(mData[mPos]);
108 
109  DEBUGLOG2("readUInt8: " + toStringPrint(CAST_U32(value)),
110  mPos, str);
111  mPos += 1;
113  return value;
114 }

References CAST_U32, CAST_U8, DEBUGLOG2, PacketCounters::incInBytes(), mData, mLength, mPos, and toStringPrint().

◆ skip()

void Net::MessageIn::skip ( const unsigned int  length,
const char *const  str 
)

Skips a given number of bytes.

Definition at line 365 of file messagein.cpp.

366 {
367  DEBUGLOG2("skip: " + toString(CAST_S32(length)), mPos, str);
368  mPos += length;
370 }

References CAST_S32, DEBUGLOG2, PacketCounters::incInBytes(), mPos, and Catch::toString().

◆ skipToEnd()

void Net::MessageIn::skipToEnd ( const char *const  str)

Definition at line 372 of file messagein.cpp.

373 {
374  const int diff = CAST_S32(mLength - mPos);
375  if (diff != 0)
376  {
377  DEBUGLOG2("skip: " + toString(diff), mPos, str);
378  mPos = mLength;
380  }
381 }

References CAST_S32, DEBUGLOG2, PacketCounters::incInBytes(), mLength, mPos, and Catch::toString().

Field Documentation

◆ mData

const char* Net::MessageIn::mData
protected

◆ mId

uint16_t Net::MessageIn::mId
protected

The message ID.

Definition at line 160 of file messagein.h.

Referenced by getId(), EAthena::MessageIn::postInit(), TmwAthena::MessageIn::postInit(), and ~MessageIn().

◆ mIgnore

bool Net::MessageIn::mIgnore
protected

Definition at line 161 of file messagein.h.

Referenced by readBytes().

◆ mLength

unsigned int Net::MessageIn::mLength
protected

◆ mPos

unsigned int Net::MessageIn::mPos
protected

Actual position in the packet. From 0 to packet->length. A value bigger than packet->length means EOP was reached when reading it.

Definition at line 158 of file messagein.h.

Referenced by readBytes(), readCoordinatePair(), readCoordinates(), readFloat(), readId(), readInt16(), readInt32(), readInt64(), readInt8(), readRawString(), readString(), readUInt16(), readUInt32(), readUInt8(), skip(), skipToEnd(), and ~MessageIn().

◆ mVersion

int Net::MessageIn::mVersion
protected

The documentation for this class was generated from the following files:
toStringPrint
std::string toStringPrint(const unsigned int val)
Definition: stringutils.cpp:776
BeingId
int BeingId
Definition: beingid.h:29
CAST_SIZE
#define CAST_SIZE
Definition: cast.h:33
DEBUGLOG2
#define DEBUGLOG2(str, pos, comment)
Definition: logger.h:41
CAST_U32
#define CAST_U32
Definition: cast.h:30
Net::MessageIn::mLength
unsigned int mLength
Definition: messagein.h:151
WRONGPACKETSIZE
#define WRONGPACKETSIZE
Definition: logger.h:61
Catch::toString
std::string toString(T const &value)
converts any type to a string
Definition: catch.hpp:1774
logger
Logger * logger
Definition: logger.cpp:88
Net::MessageIn::readInt32
int32_t readInt32(const char *const str)
Definition: messagein.cpp:174
Net::MessageIn::fromServerDirection
static uint8_t fromServerDirection(const uint8_t serverDir)
Definition: messagein.cpp:265
CAST_U8
#define CAST_U8
Definition: cast.h:26
strprintf
std::string strprintf(const char *const format,...)
Definition: stringutils.cpp:99
Net::MessageIn::mVersion
int mVersion
Definition: messagein.h:159
CAST_S8
#define CAST_S8
Definition: cast.h:25
data
uint32_t data
Definition: maptypeproperty2.h:3
Logger::dlog
void dlog(const std::string &str)
Definition: logger.cpp:147
x
x
Definition: graphics_calcImageRect.hpp:72
CAST_U16
#define CAST_U16
Definition: cast.h:28
MAKEWORD
#define MAKEWORD(low, high)
Definition: messagein.cpp:41
Net::MessageIn::mId
uint16_t mId
Definition: messagein.h:160
Net::MessageIn::readUInt32
uint32_t readUInt32(const char *const str)
Definition: messagein.cpp:195
packetVersionRe
int packetVersionRe
Definition: client.cpp:126
Net::MessageIn::mIgnore
bool mIgnore
Definition: messagein.h:161
packetVersionMain
int packetVersionMain
Definition: client.cpp:125
fromInt
#define fromInt(val, name)
Definition: intdefines.h:45
CAST_S32
#define CAST_S32
Definition: cast.h:29
PacketCounters::incInPackets
static void incInPackets()
Definition: packetcounters.cpp:54
Net::MessageIn::readInt16
int16_t readInt16(const char *const str)
Definition: messagein.cpp:130
Net::MessageIn::mPos
unsigned int mPos
Definition: messagein.h:158
PacketCounters::incInBytes
static void incInBytes(const int cnt)
Definition: packetcounters.cpp:43
packetVersionZero
int packetVersionZero
Definition: client.cpp:127
y
y
Definition: graphics_calcImageRect.hpp:72
itemIdLen
int itemIdLen
Definition: client.cpp:129
Logger::log
void log(const char *const log_text,...)
Definition: logger.cpp:268
Net::MessageIn::mData
const char * mData
Definition: messagein.h:150