summaryrefslogtreecommitdiff
path: root/src/resources/monsterdb.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-06-04 21:48:47 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-06-04 21:48:47 +0000
commita353543dd4da3c489a84f6f17125fdd0e1be2349 (patch)
tree5e447a0f9a3fd50f58a48f39bbb77d392d78af36 /src/resources/monsterdb.cpp
parentab072dddb231895ba7b6762eda9fa70af961b0fb (diff)
downloadmana-a353543dd4da3c489a84f6f17125fdd0e1be2349.tar.gz
mana-a353543dd4da3c489a84f6f17125fdd0e1be2349.tar.bz2
mana-a353543dd4da3c489a84f6f17125fdd0e1be2349.tar.xz
mana-a353543dd4da3c489a84f6f17125fdd0e1be2349.zip
Merged 0.0 changes from revision 3234 to 3317 to trunk.
Diffstat (limited to 'src/resources/monsterdb.cpp')
-rw-r--r--src/resources/monsterdb.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp
index ac3ac3bc..89afc549 100644
--- a/src/resources/monsterdb.cpp
+++ b/src/resources/monsterdb.cpp
@@ -83,6 +83,27 @@ MonsterDB::load()
currentInfo->setName (XML::getProperty(monsterNode, "name", "unnamed"));
+ std::string targetCursor;
+ targetCursor = XML::getProperty(monsterNode, "targetCursor", "medium");
+ if (targetCursor == "small")
+ {
+ currentInfo->setTargetCursorSize(Being::TC_SMALL);
+ }
+ else if (targetCursor == "medium")
+ {
+ currentInfo->setTargetCursorSize(Being::TC_MEDIUM);
+ }
+ else if (targetCursor == "large")
+ {
+ currentInfo->setTargetCursorSize(Being::TC_LARGE);
+ }
+ else
+ {
+ logger->log("MonsterDB: Unknown target cursor type \"%s\" for %s - using medium sized one",
+ targetCursor.c_str(), currentInfo->getName().c_str());
+ currentInfo->setTargetCursorSize(Being::TC_MEDIUM);
+ }
+
//iterate <sprite>s and <sound>s
for_each_xml_child_node(spriteNode, monsterNode)
{