diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-01-08 20:27:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-01-08 20:27:29 +0300 |
commit | 5d0b4c09a67f279847337aa06bc3066c07f63114 (patch) | |
tree | b2f8bbdb3252222c9bc50efa04a5689faa3b1760 /src/resources/inventory/inventory.h | |
parent | 4b014aa3f403ae02587f6a3d89180f75161d4b78 (diff) | |
download | plus-5d0b4c09a67f279847337aa06bc3066c07f63114.tar.gz plus-5d0b4c09a67f279847337aa06bc3066c07f63114.tar.bz2 plus-5d0b4c09a67f279847337aa06bc3066c07f63114.tar.xz plus-5d0b4c09a67f279847337aa06bc3066c07f63114.zip |
Impliment craft inventory for moving items one by one.
Diffstat (limited to 'src/resources/inventory/inventory.h')
-rw-r--r-- | src/resources/inventory/inventory.h | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/src/resources/inventory/inventory.h b/src/resources/inventory/inventory.h index 1e1a97dd4..9186fbd73 100644 --- a/src/resources/inventory/inventory.h +++ b/src/resources/inventory/inventory.h @@ -63,7 +63,7 @@ class Inventory notfinal /** * Destructor. */ - ~Inventory(); + virtual ~Inventory(); /** * Returns the size that this instance is configured for. @@ -103,22 +103,25 @@ class Inventory notfinal /** * Sets the item at the given position. */ - void setItem(const int index, - const int id, - const int type, - const int quantity, - const uint8_t refine, - const ItemColor color, - const Identified identified, - const Damaged damaged, - const Favorite favorite, - const Equipm equipment, - const Equipped equipped); + virtual void setItem(const int index, + const int id, + const int type, + const int quantity, + const uint8_t refine, + const ItemColor color, + const Identified identified, + const Damaged damaged, + const Favorite favorite, + const Equipm equipment, + const Equipped equipped); void setCards(const int index, const int *const cards, const int size) const; + void moveItem(const int index1, + const int index2); + /** * Remove a item from the inventory. */ @@ -176,8 +179,9 @@ class Inventory notfinal int findIndexByTag(const int tag) const; - bool addVirtualItem(const Item *const item, - int index); + virtual bool addVirtualItem(const Item *const item, + int index, + const int amount); void virtualRemove(Item *const item, const int amount); |