summaryrefslogtreecommitdiff
path: root/src/item.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-11 12:16:03 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-11 12:16:03 +0300
commit4a337b7a42d0c92bc2ed26b7e206188dc04c569d (patch)
tree97c59c86246afce0710795c6ba545d40004c6810 /src/item.cpp
parent067410031057ffc9bdb36b976bc2a658b23acb1b (diff)
downloadmanaverse-4a337b7a42d0c92bc2ed26b7e206188dc04c569d.tar.gz
manaverse-4a337b7a42d0c92bc2ed26b7e206188dc04c569d.tar.bz2
manaverse-4a337b7a42d0c92bc2ed26b7e206188dc04c569d.tar.xz
manaverse-4a337b7a42d0c92bc2ed26b7e206188dc04c569d.zip
Add typed bool type Equipm.
Diffstat (limited to 'src/item.cpp')
-rw-r--r--src/item.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/item.cpp b/src/item.cpp
index 07c33dc49..bd4cb25de 100644
--- a/src/item.cpp
+++ b/src/item.cpp
@@ -45,7 +45,7 @@ Item::Item(const int id,
const Identified identified,
const Damaged damaged,
const Favorite favorite,
- const bool equipment,
+ const Equipm equipment,
const bool equipped) :
mId(0),
mColor(0),
@@ -85,7 +85,8 @@ void Item::setId(const int id, const unsigned char color)
mColor = color;
// Types 0 and 1 are not equippable items.
- mEquipment = id && static_cast<int>(getInfo().getType()) >= 2;
+ mEquipment = fromBool(id && static_cast<int>(getInfo().getType())
+ >= 2, Equipm);
if (mImage)
mImage->decRef();