diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-10 13:25:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-10 13:25:38 +0300 |
commit | 926a702799f919bbe75f3e8adcac30129749a963 (patch) | |
tree | 387e4b0bf80904863e056bd71d36ff36f5a221b6 /src/resources | |
parent | b4de7c68b240dd1b63ac1b78feb0721977cdb171 (diff) | |
download | manaplus-926a702799f919bbe75f3e8adcac30129749a963.tar.gz manaplus-926a702799f919bbe75f3e8adcac30129749a963.tar.bz2 manaplus-926a702799f919bbe75f3e8adcac30129749a963.tar.xz manaplus-926a702799f919bbe75f3e8adcac30129749a963.zip |
Show custom menu for npc.
Also fix loading menu.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/db/npcdb.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resources/db/npcdb.cpp b/src/resources/db/npcdb.cpp index 5f7c48b0b..4d9fea247 100644 --- a/src/resources/db/npcdb.cpp +++ b/src/resources/db/npcdb.cpp @@ -111,11 +111,11 @@ void NPCDB::loadXmlFile(const std::string &fileName) SpriteDisplay display; for_each_xml_child_node(spriteNode, npcNode) { - if (!spriteNode->xmlChildrenNode) - continue; - if (xmlNameEqual(spriteNode, "sprite")) { + if (!spriteNode->xmlChildrenNode) + continue; + SpriteReference *const currentSprite = new SpriteReference; currentSprite->sprite = reinterpret_cast<const char*>( spriteNode->xmlChildrenNode->content); @@ -131,7 +131,7 @@ void NPCDB::loadXmlFile(const std::string &fileName) else if (xmlNameEqual(spriteNode, "menu")) { std::string name = XML::getProperty(spriteNode, "name", ""); - std::string command = XML::getProperty(spriteNode, + std::string command = XML::langProperty(spriteNode, "command", ""); currentInfo->addMenu(name, command); } |