summaryrefslogtreecommitdiff
path: root/src/resources/item/item.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/item/item.cpp')
-rw-r--r--src/resources/item/item.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/resources/item/item.cpp b/src/resources/item/item.cpp
index d738ca0e3..bc6614e52 100644
--- a/src/resources/item/item.cpp
+++ b/src/resources/item/item.cpp
@@ -30,10 +30,14 @@
#include "resources/iteminfo.h"
+#include "resources/item/itemoptionslist.h"
+
#include "resources/loaders/imageloader.h"
#include "net/serverfeatures.h"
+#include "utils/delete2.h"
+
#include "debug.h"
DragDrop dragDrop(nullptr, DragDropSource::Empty);
@@ -56,6 +60,7 @@ Item::Item(const int id,
mDescription(),
mTags(),
mCards(),
+ mOptions(nullptr),
mRefine(refine),
mInvIndex(0),
mType(type),
@@ -78,6 +83,7 @@ Item::~Item()
mImage->decRef();
mImage = nullptr;
}
+ delete2(mOptions);
dragDrop.clearItem(this);
}
@@ -176,6 +182,11 @@ void Item::addCard(const int card)
}
}
+void Item::setOptions(const ItemOptionsList *const options)
+{
+ mOptions = ItemOptionsList::copy(options);
+}
+
void Item::updateColor()
{
if (serverFeatures && serverFeatures->haveItemColors())