summaryrefslogtreecommitdiffstats
path: root/source/cCreativeInventory.cpp
diff options
context:
space:
mode:
authorlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-01-01 05:55:17 +0100
committerlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-01-01 05:55:17 +0100
commitd7068b35a85f0c0248a5533240087747d02e1a17 (patch)
tree7d40a34bdda09c0fbccc9e8052043709cfd88d7b /source/cCreativeInventory.cpp
parentChests, furnaces and dispensers face the correct way now. (diff)
downloadcuberite-d7068b35a85f0c0248a5533240087747d02e1a17.tar
cuberite-d7068b35a85f0c0248a5533240087747d02e1a17.tar.gz
cuberite-d7068b35a85f0c0248a5533240087747d02e1a17.tar.bz2
cuberite-d7068b35a85f0c0248a5533240087747d02e1a17.tar.lz
cuberite-d7068b35a85f0c0248a5533240087747d02e1a17.tar.xz
cuberite-d7068b35a85f0c0248a5533240087747d02e1a17.tar.zst
cuberite-d7068b35a85f0c0248a5533240087747d02e1a17.zip
Diffstat (limited to 'source/cCreativeInventory.cpp')
-rw-r--r--source/cCreativeInventory.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/source/cCreativeInventory.cpp b/source/cCreativeInventory.cpp
new file mode 100644
index 000000000..b1606f077
--- /dev/null
+++ b/source/cCreativeInventory.cpp
@@ -0,0 +1,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;
+}
+