diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-04-21 04:44:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-04-21 20:37:02 +0300 |
commit | 862e8f821789014b6167f37976b80694d6d310e3 (patch) | |
tree | 7c4d77a370f4da3d84a649b0d10e4d0a05725e6a /src/net/ea/inventoryitem.h | |
parent | 62fa051ace7097e78134d46505070a70c08e128f (diff) | |
download | manaplus-862e8f821789014b6167f37976b80694d6d310e3.tar.gz manaplus-862e8f821789014b6167f37976b80694d6d310e3.tar.bz2 manaplus-862e8f821789014b6167f37976b80694d6d310e3.tar.xz manaplus-862e8f821789014b6167f37976b80694d6d310e3.zip |
Add item options into item and get it from server.
Diffstat (limited to 'src/net/ea/inventoryitem.h')
-rw-r--r-- | src/net/ea/inventoryitem.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/net/ea/inventoryitem.h b/src/net/ea/inventoryitem.h index bc5611dfc..da0f63283 100644 --- a/src/net/ea/inventoryitem.h +++ b/src/net/ea/inventoryitem.h @@ -33,6 +33,8 @@ #include "enums/simpletypes/identified.h" #include "enums/simpletypes/itemcolor.h" +#include "resources/item/itemoptionslist.h" + #include <vector> #include "localconsts.h" @@ -50,6 +52,7 @@ class InventoryItem final int id; ItemTypeT type; int cards[maxCards]; + ItemOptionsList *options; int quantity; uint8_t refine; ItemColor color; @@ -62,6 +65,7 @@ class InventoryItem final const int id0, const ItemTypeT type0, const int *const cards0, + ItemOptionsList *options0, const int quantity0, const uint8_t refine0, const ItemColor color0, @@ -72,6 +76,8 @@ class InventoryItem final slot(slot0), id(id0), type(type0), + cards(), + options(ItemOptionsList::copy(options0)), quantity(quantity0), refine(refine0), color(color0), @@ -87,6 +93,11 @@ class InventoryItem final } A_DEFAULT_COPY(InventoryItem) + + ~InventoryItem() + { + delete [] options; + } }; typedef std::vector<InventoryItem> InventoryItems; |