summaryrefslogtreecommitdiffstats
path: root/sigmod/Item.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sigmod/Item.cpp')
-rw-r--r--sigmod/Item.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/sigmod/Item.cpp b/sigmod/Item.cpp
index 8f5d4387..fa18fd34 100644
--- a/sigmod/Item.cpp
+++ b/sigmod/Item.cpp
@@ -43,7 +43,6 @@ Item::Item(const Item& item) :
Item::Item(const Game* parent, const int id) :
Object(parent, id),
m_name(""),
- m_sellable(false),
m_type(-1),
m_price(0),
m_sellPrice(0),
@@ -73,8 +72,7 @@ void Item::validate()
emit(error("Name is empty"));
TEST(type);
TEST(price);
- if (m_sellable)
- TEST(sellPrice);
+ TEST(sellPrice);
TEST(weight);
TEST_END();
}
@@ -83,7 +81,6 @@ void Item::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
- LOAD(sellable);
LOAD(type);
LOAD(price);
LOAD(sellPrice);
@@ -96,7 +93,6 @@ QDomElement Item::save() const
{
SAVE_CREATE();
SAVE(name);
- SAVE(sellable);
SAVE(type);
SAVE(price);
SAVE(sellPrice);
@@ -107,7 +103,6 @@ QDomElement Item::save() const
}
SETTER(Item, QString&, Name, name)
-SETTER(Item, bool, Sellable, sellable)
SETTER(Item, int, Type, type)
SETTER(Item, int, Price, price)
SETTER(Item, int, SellPrice, sellPrice)
@@ -116,7 +111,6 @@ SETTER(Item, QString&, Description, description)
SETTER(Item, Script&, Script, script)
GETTER(Item, QString, name)
-GETTER(Item, bool, sellable)
GETTER(Item, int, type)
GETTER(Item, int, price)
GETTER(Item, int, sellPrice)
@@ -125,10 +119,9 @@ GETTER(Item, QString, description)
GETTER(Item, Script, script)
CHECK(Item, QString&, name)
-CHECK(Item, bool, sellable)
CHECK_INDEX(Item, int, type, game(), itemType)
CHECK_BOUNDS(Item, int, price, 1, game()->rules()->maxMoney())
-CHECK_BOUNDS(Item, int, sellPrice, 0, m_price)
+CHECK_BOUNDS(Item, int, sellPrice, -1, m_price)
CHECK_BEGIN(Item, int, weight)
const ItemType* type = game()->itemTypeById(m_type);
if (type)
@@ -142,7 +135,6 @@ Item& Item::operator=(const Item& rhs)
if (this == &rhs)
return *this;
COPY(name);
- COPY(sellable);
COPY(type);
COPY(price);
COPY(sellPrice);