diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-05-23 13:11:40 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-05-23 13:16:11 +0200 |
commit | 2a9f8e05312c210ec204e09861f47c3d017706eb (patch) | |
tree | a3aceadb77f5d54dd065f69fa348969a0c31eac2 /src/resources/iteminfo.h | |
parent | 4deff8569279d5cf23a73fdc1c986592ca4f7ed2 (diff) | |
download | mana-2a9f8e05312c210ec204e09861f47c3d017706eb.tar.gz mana-2a9f8e05312c210ec204e09861f47c3d017706eb.tar.bz2 mana-2a9f8e05312c210ec204e09861f47c3d017706eb.tar.xz mana-2a9f8e05312c210ec204e09861f47c3d017706eb.zip |
Fixed the empty item link crash differently
The crash was due to an assertion which shouldn't have been there, so I
removed the assertion instead. I've also made sure the unknown item has
its id initialized to 0, so that it can be used to check against instead
of the item name.
Normalization of item names was moved within the item database.
Diffstat (limited to 'src/resources/iteminfo.h')
-rw-r--r-- | src/resources/iteminfo.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index 3329d95b..0c87b585 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -118,6 +118,7 @@ class ItemInfo mType(ITEM_UNUSABLE), mWeight(0), mView(0), + mId(0), mAttackType(ACTION_DEFAULT) { } @@ -162,10 +163,10 @@ class ItemInfo ItemType getType() const { return mType; } - void setWeight(short weight) + void setWeight(int weight) { mWeight = weight; } - short getWeight() const + int getWeight() const { return mWeight; } void setView(int view) @@ -198,7 +199,7 @@ class ItemInfo std::string mEffect; /**< Description of effects. */ ItemType mType; /**< Item type. */ std::string mParticle; /**< Particle effect used with this item */ - short mWeight; /**< Weight in grams. */ + int mWeight; /**< Weight in grams. */ int mView; /**< Item ID of how this item looks. */ int mId; /**< Item ID */ |