From 862e8f821789014b6167f37976b80694d6d310e3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 21 Apr 2017 04:44:53 +0300 Subject: Add item options into item and get it from server. --- src/net/ea/inventoryitem.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/net/ea/inventoryitem.h') 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 #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 InventoryItems; -- cgit v1.2.3-70-g09d2