diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-02-11 17:21:55 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-02-11 17:21:55 +0000 |
commit | 448fe8430f5f0ae81101fe86d664f98be1a92201 (patch) | |
tree | 76737e4447cca1dd24c4e9203a2d2ea674d72a1e /src/gui/itemcontainer.cpp | |
parent | 528ded235f60c349272ecbf428731b2f579ed758 (diff) | |
download | mana-448fe8430f5f0ae81101fe86d664f98be1a92201.tar.gz mana-448fe8430f5f0ae81101fe86d664f98be1a92201.tar.bz2 mana-448fe8430f5f0ae81101fe86d664f98be1a92201.tar.xz mana-448fe8430f5f0ae81101fe86d664f98be1a92201.zip |
Working on equipment
Diffstat (limited to 'src/gui/itemcontainer.cpp')
-rw-r--r-- | src/gui/itemcontainer.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp index 123270c2..0bd236e2 100644 --- a/src/gui/itemcontainer.cpp +++ b/src/gui/itemcontainer.cpp @@ -37,6 +37,7 @@ ItemContainer::ItemContainer() for (int i = 0; i < INVENTORY_SIZE; i++) { items[i].id = -1; items[i].quantity = 0; + items[i].equipment = false; } } @@ -113,10 +114,11 @@ int ItemContainer::getQuantity(int index) return items[index].quantity; } -void ItemContainer::addItem(int index, int id, int quantity) +void ItemContainer::addItem(int index, int id, int quantity, bool equipment) { items[index].id = id; items[index].quantity += quantity; + items[index].equipment = equipment; } void ItemContainer::removeItem(int id) @@ -155,3 +157,7 @@ void ItemContainer::_mouseInputMessage(const gcn::MouseInput &mouseInput) } } +bool ItemContainer::isEquipment(int index) +{ + return items[index].equipment; +} |