From d7068b35a85f0c0248a5533240087747d02e1a17 Mon Sep 17 00:00:00 2001 From: "lapayo94@gmail.com" Date: Sun, 1 Jan 2012 04:55:17 +0000 Subject: - implemented separated inventory for creative mode (cSurvivalInventory and cCreativeInventory) (Separation is not perfect yet, because maybe there are some mayor changes needed :D) - implemented CreativeInventoryAction (was mistakenly called CreateInventoryAction) -> Fixed meta data for creative selected blocks ->->Slabs/Steps are now placed correctly - slabs can now be build to a double slab - fixed a bug in the inventory which put items with different meta values in the same slot git-svn-id: http://mc-server.googlecode.com/svn/trunk@160 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cInventory.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'source/cInventory.h') diff --git a/source/cInventory.h b/source/cInventory.h index 7d98af853..849cfb440 100644 --- a/source/cInventory.h +++ b/source/cInventory.h @@ -12,10 +12,9 @@ namespace Json class cItem; class cClientHandle; class cPlayer; -class cPacket_WindowClick; +class cPacket; class cPacket_EntityEquipment; -class cInventory //tolua_export - : public cWindowOwner +class cInventory //tolua_export { //tolua_export public: cInventory(cPlayer* a_Owner); @@ -28,7 +27,6 @@ public: bool AddItem( cItem & a_Item ); //tolua_export bool RemoveItem( cItem & a_Item ); //tolua_export - void DrawInventory(); void SaveToJson(Json::Value & a_Value); bool LoadFromJson(Json::Value & a_Value); @@ -42,7 +40,7 @@ public: cItem & GetEquippedItem(); //tolua_export void SetEquippedSlot( int a_SlotNum ); //tolua_export - void Clicked( cPacket_WindowClick* a_ClickPacket ); + virtual void Clicked( cPacket* a_ClickPacket ) = 0; void SendSlot( int a_SlotNum ); //tolua_export @@ -56,7 +54,8 @@ public: static const unsigned int c_ArmorOffset = 5; static const unsigned int c_MainOffset = 9; static const unsigned int c_HotOffset = 36; -private: + +protected: bool AddToBar( cItem & a_Item, const int a_Offset, const int a_Size, bool* a_bChangedSlots, int a_Mode = 0 ); cItem* m_Slots; -- cgit v1.2.3