2012-01-29 14:28:19 -05:00
|
|
|
|
|
|
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
|
|
|
|
2011-10-03 14:41:19 -04:00
|
|
|
#include "cPacket_BlockPlace.h"
|
2011-12-21 15:42:34 -05:00
|
|
|
#include "cPacket_ItemData.h"
|
2011-10-03 14:41:19 -04:00
|
|
|
|
2012-01-29 14:28:19 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-10-03 14:41:19 -04:00
|
|
|
bool cPacket_BlockPlace::Parse(cSocket & a_Socket)
|
|
|
|
{
|
|
|
|
m_Socket = a_Socket;
|
|
|
|
if( !ReadInteger( m_PosX ) ) return false;
|
|
|
|
if( !ReadByte ( m_PosY ) ) return false;
|
|
|
|
if( !ReadInteger( m_PosZ ) ) return false;
|
|
|
|
if( !ReadByte ( m_Direction ) ) return false;
|
|
|
|
|
2011-12-21 15:42:34 -05:00
|
|
|
/*
|
2011-10-03 14:41:19 -04:00
|
|
|
if( !ReadShort ( m_ItemType ) ) return false;
|
|
|
|
if( m_ItemType > -1 )
|
|
|
|
{
|
|
|
|
if( !ReadByte ( m_Count ) ) return false;
|
|
|
|
if( !ReadShort ( m_Uses ) ) return false;
|
2011-12-21 15:42:34 -05:00
|
|
|
}*/
|
|
|
|
|
|
|
|
cPacket_ItemData Item;
|
|
|
|
|
|
|
|
Item.Parse(m_Socket);
|
|
|
|
|
|
|
|
m_ItemType = Item.m_ItemID;
|
|
|
|
m_Count = Item.m_ItemCount;
|
|
|
|
m_Uses = Item.m_ItemUses;
|
|
|
|
|
2011-10-03 14:41:19 -04:00
|
|
|
return true;
|
|
|
|
}
|