1
0

Packets now parse themselves from a cByteBuffer object (1st part of packeting rewrite, http://forum.mc-server.org/showthread.php?tid=524 )

git-svn-id: http://mc-server.googlecode.com/svn/trunk@744 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2012-08-17 10:18:07 +00:00
parent 33ca4d5003
commit 70a4ca5bc1
57 changed files with 684 additions and 352 deletions

View File

@@ -21,13 +21,13 @@ cPacket_CreativeInventoryAction::cPacket_CreativeInventoryAction( const cPacket_
int cPacket_CreativeInventoryAction::Parse(const char * a_Data, int a_Size)
int cPacket_CreativeInventoryAction::Parse(cByteBuffer & a_Buffer)
{
int TotalBytes = 0;
HANDLE_PACKET_READ(ReadShort, m_Slot, TotalBytes);
HANDLE_PACKET_READ(ReadBEShort, m_Slot, TotalBytes);
cPacket_ItemData Item;
int res = Item.Parse(a_Data + TotalBytes, a_Size - TotalBytes);
int res = Item.Parse(a_Buffer);
if (res < 0)
{
return res;