blob: b1606f077b4064d371f7e2bd127f472ecfdb920e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#include "cCreativeInventory.h"
#include <string> //memset
#include "cPlayer.h"
#include "cClientHandle.h"
#include "cMCLogger.h"
#include "cWindow.h"
#include "cItem.h"
#include "cRecipeChecker.h"
#include "cRoot.h"
#include <json/json.h>
#include "packets/cPacket_CreativeInventoryAction.h"
#include "packets/cPacket_WholeInventory.h"
#include "packets/cPacket_InventorySlot.h"
cCreativeInventory::~cCreativeInventory()
{
}
cCreativeInventory::cCreativeInventory(cPlayer* a_Owner)
: cInventory(a_Owner)
{
}
void cCreativeInventory::Clicked( cPacket* a_ClickPacket )
{
cPacket_CreativeInventoryAction* Packet = reinterpret_cast<cPacket_CreativeInventoryAction *>(a_ClickPacket);
short Slot = Packet->m_Slot;
cItem* SlotItem = &(this->m_Slots[Slot]);
SlotItem->m_ItemID = (ENUM_ITEM_ID) Packet->m_ItemID;
SlotItem->m_ItemHealth = Packet->m_Damage;
SlotItem->m_ItemCount = Packet->m_Quantity;
}
|