diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-07-17 21:10:44 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-07-17 21:10:44 +0000 |
commit | 9bf3338f82bfbd425debb2855d015c7bd0e33989 (patch) | |
tree | ba390f42ebb7149e91c3494bc6a4ef3ac919ae22 /src/gui/inventory.h | |
parent | fbf19c2cdde592b126fe91c0dfff480f1318f50c (diff) | |
download | mana-client-9bf3338f82bfbd425debb2855d015c7bd0e33989.tar.gz mana-client-9bf3338f82bfbd425debb2855d015c7bd0e33989.tar.bz2 mana-client-9bf3338f82bfbd425debb2855d015c7bd0e33989.tar.xz mana-client-9bf3338f82bfbd425debb2855d015c7bd0e33989.zip |
Added Item and Equipment class and made the appropriate places make use of them. Plus some cleanups.
Diffstat (limited to 'src/gui/inventory.h')
-rw-r--r-- | src/gui/inventory.h | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/src/gui/inventory.h b/src/gui/inventory.h index 4fcc6870..e9924ead 100644 --- a/src/gui/inventory.h +++ b/src/gui/inventory.h @@ -51,41 +51,21 @@ class InventoryWindow : public Window, gcn::ActionListener void logic(); /** - * Add an item the inventory. - */ - int addItem(int index, int id, int quantity, bool equipment); - - /** - * Remove a item from the inventory. - */ - int removeItem(int id); - - /** * Equips an item. */ - void equipItem(int index); + void equipItem(Item *item); /** * Unequips an item. */ - void unequipItem(int index); - - /** - * Change quantity of an item. - */ - int changeQuantity(int index, int quantity); - - /** - * Increase quantity of an item. - */ - int increaseQuantity(int index, int quantity); + void unequipItem(Item *item); /** * Called when receiving actions from the widgets. */ void action(const std::string& eventId); - int dropItem(int index, int quantity); + int dropItem(Item *item, int quantity); void mouseClick(int x, int y, int button, int count); @@ -94,7 +74,7 @@ class InventoryWindow : public Window, gcn::ActionListener ItemContainer *items; private: - int useItem(int index, int id); + int useItem(Item *item); void updateWidgets(); /** Updates widgets size/position */ void updateButtons(); /** Updates button states */ |