the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#include "stdafx.h"
2#include <iostream>
3#include "InputOutputStream.h"
4#include "PacketListener.h"
5#include "TakeItemEntityPacket.h"
6
7
8
9TakeItemEntityPacket::TakeItemEntityPacket()
10{
11 itemId = -1;
12 playerId = -1;
13}
14
15TakeItemEntityPacket::TakeItemEntityPacket(int itemId, int playerId)
16{
17 this->itemId = itemId;
18 this->playerId = playerId;
19}
20
21void TakeItemEntityPacket::read(DataInputStream *dis) //throws IOException
22{
23 itemId = dis->readInt();
24 playerId = dis->readInt();
25}
26
27void TakeItemEntityPacket::write(DataOutputStream *dos) //throws IOException
28{
29 dos->writeInt(itemId);
30 dos->writeInt(playerId);
31}
32
33void TakeItemEntityPacket::handle(PacketListener *listener)
34{
35 listener->handleTakeItemEntity(shared_from_this());
36}
37
38int TakeItemEntityPacket::getEstimatedSize()
39{
40 return 8;
41}