summaryrefslogtreecommitdiff
path: root/src/resources/itemdb.cpp
diff options
context:
space:
mode:
authorStefan Dombrowski <stefan@uni-bonn.de>2011-04-29 11:16:21 +0200
committerStefan Dombrowski <stefan@uni-bonn.de>2011-04-29 11:16:21 +0200
commit18ea964add44d3d0211785c59b28e7afdc5e45fb (patch)
treef65677e61a3b773db549a347fa6c9e8ccf1a3cd6 /src/resources/itemdb.cpp
parentf450d1e7d0238a8126f2fe419aa019767290f9fb (diff)
downloadmana-18ea964add44d3d0211785c59b28e7afdc5e45fb.tar.gz
mana-18ea964add44d3d0211785c59b28e7afdc5e45fb.tar.bz2
mana-18ea964add44d3d0211785c59b28e7afdc5e45fb.tar.xz
mana-18ea964add44d3d0211785c59b28e7afdc5e45fb.zip
Remove default assignment of an attack action to non-weapons
This avoids log warnings for missing weapon range. Reviewed-by: thorbjorn, bcs86
Diffstat (limited to 'src/resources/itemdb.cpp')
-rw-r--r--src/resources/itemdb.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index bb8e3bce..5e1b2a2f 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -196,7 +196,8 @@ void ItemDB::loadCommonRef(ItemInfo *itemInfo, xmlNodePtr node)
std::string name = XML::getProperty(node, "name", "");
std::string image = XML::getProperty(node, "image", "");
std::string description = XML::getProperty(node, "description", "");
- std::string attackAction = XML::getProperty(node, "attack-action", "");
+ std::string attackAction = XML::getProperty(node, "attack-action",
+ SpriteAction::INVALID);
int attackRange = XML::getProperty(node, "attack-range", 0);
std::string missileParticle = XML::getProperty(node, "missile-particle", "");
@@ -215,7 +216,7 @@ void ItemDB::loadCommonRef(ItemInfo *itemInfo, xmlNodePtr node)
itemInfo->mDescription = description;
itemInfo->mView = view;
itemInfo->mWeight = weight;
- itemInfo->setAttackAction(attackAction);
+ itemInfo->mAttackAction = attackAction;
itemInfo->mAttackRange = attackRange;
itemInfo->setMissileParticle(missileParticle);