summaryrefslogtreecommitdiff
path: root/src/gui/models
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-24 23:29:04 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-24 23:29:04 +0300
commit4e97da8e138b21a5f5bea75e6a8d3211e4f28594 (patch)
treec10d3cad963066a908ebd42041723e110a0c9bf0 /src/gui/models
parentca0ca278d0c4aed9a6d50bb9a8982f5261151ab8 (diff)
downloadmanaplus-4e97da8e138b21a5f5bea75e6a8d3211e4f28594.tar.gz
manaplus-4e97da8e138b21a5f5bea75e6a8d3211e4f28594.tar.bz2
manaplus-4e97da8e138b21a5f5bea75e6a8d3211e4f28594.tar.xz
manaplus-4e97da8e138b21a5f5bea75e6a8d3211e4f28594.zip
Add enum for item types.
Diffstat (limited to 'src/gui/models')
-rw-r--r--src/gui/models/shopitems.cpp6
-rw-r--r--src/gui/models/shopitems.h8
2 files changed, 8 insertions, 6 deletions
diff --git a/src/gui/models/shopitems.cpp b/src/gui/models/shopitems.cpp
index 2a2b75ae8..c25664cdd 100644
--- a/src/gui/models/shopitems.cpp
+++ b/src/gui/models/shopitems.cpp
@@ -52,7 +52,7 @@ std::string ShopItems::getElementAt(int i)
}
ShopItem *ShopItems::addItem(const int id,
- const int type,
+ const ItemTypeT type,
const ItemColor color,
const int amount,
const int price)
@@ -64,7 +64,7 @@ ShopItem *ShopItems::addItem(const int id,
}
ShopItem *ShopItems::addItemNoDup(const int id,
- const int type,
+ const ItemTypeT type,
const ItemColor color,
const int amount,
const int price)
@@ -81,7 +81,7 @@ ShopItem *ShopItems::addItemNoDup(const int id,
ShopItem *ShopItems::addItem2(const int inventoryIndex,
const int id,
- const int type,
+ const ItemTypeT type,
const ItemColor color,
const int quantity,
const int price)
diff --git a/src/gui/models/shopitems.h b/src/gui/models/shopitems.h
index d346c38b7..0aedce83f 100644
--- a/src/gui/models/shopitems.h
+++ b/src/gui/models/shopitems.h
@@ -23,6 +23,8 @@
#ifndef GUI_MODELS_SHOPITEMS_H
#define GUI_MODELS_SHOPITEMS_H
+#include "enums/resources/itemtype.h"
+
#include "enums/simpletypes/itemcolor.h"
#include "gui/models/listmodel.h"
@@ -61,7 +63,7 @@ class ShopItems final : public ListModel
* Adds an item to the list.
*/
ShopItem *addItem(const int id,
- const int type,
+ const ItemTypeT type,
const ItemColor color,
const int amount,
const int price);
@@ -77,13 +79,13 @@ class ShopItems final : public ListModel
*/
ShopItem *addItem2(const int inventoryIndex,
const int id,
- const int type,
+ const ItemTypeT type,
const ItemColor color,
const int amount,
const int price);
ShopItem *addItemNoDup(const int id,
- const int type,
+ const ItemTypeT type,
const ItemColor color,
const int amount,
const int price);