summaryrefslogtreecommitdiff
path: root/src/resources/monsterdb.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-03-02 16:01:51 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-03-02 16:30:10 +0100
commit8546361abaa6123acd9dc1429575d1fd1cf6a4ec (patch)
treec104ef0073dbc93ba491ecb03352402c1a8f72c4 /src/resources/monsterdb.cpp
parentc7e48aaf7eb0f2df76327b963879416a0cc8d5e7 (diff)
downloadmana-8546361abaa6123acd9dc1429575d1fd1cf6a4ec.tar.gz
mana-8546361abaa6123acd9dc1429575d1fd1cf6a4ec.tar.bz2
mana-8546361abaa6123acd9dc1429575d1fd1cf6a4ec.tar.xz
mana-8546361abaa6123acd9dc1429575d1fd1cf6a4ec.zip
Added support for customizing NPC and Monster hover cursor
To match support for this in M+, since TMW uses this functionality on two of its NPCs.
Diffstat (limited to 'src/resources/monsterdb.cpp')
-rw-r--r--src/resources/monsterdb.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp
index fa1ac5af..fc860958 100644
--- a/src/resources/monsterdb.cpp
+++ b/src/resources/monsterdb.cpp
@@ -79,6 +79,8 @@ void MonsterDB::readMonsterNode(xmlNodePtr node, const std::string &filename)
currentInfo->setTargetCursorSize(XML::getProperty(node,
"targetCursor", "medium"));
+ currentInfo->setHoverCursor(XML::getProperty(node, "hoverCursor", "attack"));
+
SpriteDisplay display;
//iterate <sprite>s and <sound>s
@@ -147,7 +149,7 @@ void MonsterDB::readMonsterNode(xmlNodePtr node, const std::string &filename)
(const char*) spriteNode->xmlChildrenNode->content);
}
}
- currentInfo->setDisplay(display);
+ currentInfo->setDisplay(std::move(display));
mMonsterInfos[XML::getProperty(node, "id", 0) + mMonsterIdOffset] = currentInfo;
}