summaryrefslogtreecommitdiff
path: root/src/resources/item
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/item')
-rw-r--r--src/resources/item/item.cpp8
-rw-r--r--src/resources/item/item.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/src/resources/item/item.cpp b/src/resources/item/item.cpp
index 9d3a1b3f8..4627225f2 100644
--- a/src/resources/item/item.cpp
+++ b/src/resources/item/item.cpp
@@ -181,3 +181,11 @@ void Item::updateColor()
if (serverFeatures && serverFeatures->haveItemColors())
setId(mId, ItemColorManager::getColorFromCards(&mCards[0]));
}
+
+bool Item::isItem(const int id)
+{
+ return id != 0 &&
+ id != CARD0_FORGE &&
+ id != CARD0_CREATE &&
+ id != CARD0_PET;
+}
diff --git a/src/resources/item/item.h b/src/resources/item/item.h
index 5ae0cbc99..64e5fa063 100644
--- a/src/resources/item/item.h
+++ b/src/resources/item/item.h
@@ -227,6 +227,8 @@ class Item notfinal
void updateColor();
+ static bool isItem(const int id);
+
int mId; /**< Item id. */
ItemColor mColor;
int mQuantity; /**< Number of items. */