From 191479cd81d4f5dc6bc31a1d0b023528b2a62d3f Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Thu, 30 May 2013 08:40:13 +0000 Subject: Implemented left-click inventory painting git-svn-id: http://mc-server.googlecode.com/svn/trunk@1529 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Player.h | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'source/Player.h') diff --git a/source/Player.h b/source/Player.h index 378c5d782..82a932cd0 100644 --- a/source/Player.h +++ b/source/Player.h @@ -31,6 +31,7 @@ public: // tolua_end CLASS_PROTODEF(cPlayer) + cPlayer(cClientHandle * a_Client, const AString & a_PlayerName); virtual ~cPlayer(); @@ -144,15 +145,23 @@ public: void UseEquippedItem(void); - void SendHealth(); + void SendHealth(void); // In UI windows, the item that the player is dragging: bool IsDraggingItem(void) const { return !m_DraggingItem.IsEmpty(); } cItem & GetDraggingItem(void) {return m_DraggingItem; } + + // In UI windows, when inventory-painting: + /// Clears the list of slots that are being inventory-painted. To be used by cWindow only + void ClearInventoryPaintSlots(void); + + /// Adds a slot to the list for inventory painting. To be used by cWindow only + void AddInventoryPaintSlot(int a_SlotNum); + + /// Returns the list of slots currently stored for inventory painting. To be used by cWindow only + const cSlotNums & GetInventoryPaintSlots(void) const; protected: - virtual void Destroyed(); - typedef std::map< std::string, bool > PermissionMap; PermissionMap m_ResolvedPermissions; PermissionMap m_Permissions; @@ -197,7 +206,12 @@ protected: long long m_LastPlayerListTime; static const unsigned short PLAYER_LIST_TIME_MS = 1000; // 1000 = once per second - cClientHandle* m_ClientHandle; + cClientHandle * m_ClientHandle; + + cSlotNums m_InventoryPaintSlots; + + + virtual void Destroyed(void); /// Filters out damage for creative mode virtual void DoTakeDamage(TakeDamageInfo & TDI) override; -- cgit v1.2.3