1
0
cuberite-2a/source/packets/cPacket_WindowClick.cpp
lapayo94@gmail.com 02f05f7496 - Crafting fixed in 1.0.0
- Server compatible with the weapons and equip again. (Some Packets were incompatible)
- fixed bucket bugs (not all)
- Fixed clients getting crashed by wrong Pickups
- fixed nearly all mob drops. (Check wheather they are burning is missing Big Grin)
- maybe some other things I can´t recall atm Big Grin

git-svn-id: http://mc-server.googlecode.com/svn/trunk@94 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-21 20:42:34 +00:00

32 lines
810 B
C++

#include "cPacket_WindowClick.h"
#include "cPacket_WholeInventory.h"
#include "cPacket_ItemData.h"
bool cPacket_WindowClick::Parse(cSocket & a_Socket)
{
// LOG("-----------INV66-----------");
m_Socket = a_Socket;
if( !ReadByte(m_WindowID) ) return false;
if( !ReadShort(m_SlotNum) ) return false;
if( !ReadByte(m_RightMouse) ) return false;
if( !ReadShort(m_NumClicks) ) return false;
if( !ReadBool(m_Bool) ) return false;
// LOG("WindowID : %i", m_Type );
// LOG("FromSlot: %i", m_SlotNum );
// LOG("Right/Le: %i", m_RightMouse );
// LOG("NumClick: %i", m_NumClicks );
cPacket_ItemData Item;
Item.Parse(m_Socket);
m_ItemID = Item.m_ItemID;
m_ItemCount = Item.m_ItemCount;
m_ItemUses = Item.m_ItemUses;
m_EnchantNums = Item.m_EnchantNums;
return true;
}