From e462a9a5ef46776d974203bb44e0b89e8c980b29 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Wed, 7 Aug 2019 19:16:31 +0200 Subject: Unify wield item handling (#8677) This moves the wield item functions to Player and the tool utils for range calculation Also 'local_inventory' was removed due to redundancy in Client --- src/serverobject.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/serverobject.h') diff --git a/src/serverobject.h b/src/serverobject.h index 08f7a7e58..c81abb972 100644 --- a/src/serverobject.h +++ b/src/serverobject.h @@ -170,9 +170,7 @@ public: {} // Inventory and wielded item - virtual Inventory* getInventory() - { return NULL; } - virtual const Inventory* getInventory() const + virtual Inventory *getInventory() const { return NULL; } virtual InventoryLocation getInventoryLocation() const { return InventoryLocation(); } @@ -180,7 +178,7 @@ public: {} virtual std::string getWieldList() const { return ""; } - virtual int getWieldIndex() const + virtual u16 getWieldIndex() const { return 0; } virtual ItemStack getWieldedItem() const; virtual bool setWieldedItem(const ItemStack &item); -- cgit v1.2.3