diff options
Diffstat (limited to 'src/game-server/player.hpp')
-rw-r--r-- | src/game-server/player.hpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/game-server/player.hpp b/src/game-server/player.hpp index 4ecef616..eaf4d9e9 100644 --- a/src/game-server/player.hpp +++ b/src/game-server/player.hpp @@ -46,53 +46,48 @@ class Player : public Being, public PlayerData /** * Updates the internal status. */ - void update();
-
+ void update(); + /** * Sets inventory. */ - void - setInventory(const Inventory &inven); + void setInventory(Inventory const &inven) + { inventory = inven; } /** * Adds item with ID to inventory. * * @return Item add success/failure */ - bool - addItem(unsigned int itemId, unsigned char amount = 1); + bool insertItem(int itemId, int amount); /** * Removes item with ID from inventory. * * @return Item delete success/failure */ - bool - removeItem(unsigned int itemId, unsigned char amount = 0); + bool removeItem(int itemId, int amount); /** * Checks if character has an item. * * @return true if being has item, false otherwise */ - bool - hasItem(unsigned int itemId); + bool hasItem(int itemId); /** * Equips item with ID in equipment slot. * * @return Equip success/failure */ - bool - equip(unsigned char slot); + bool equip(int slot); /** * Un-equips item. * * @return Un-equip success/failure */ - bool - unequip(unsigned char slot); + bool unequip(int slot); /** * Set attacking state |