From 926a702799f919bbe75f3e8adcac30129749a963 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 10 Dec 2014 13:25:38 +0300 Subject: Show custom menu for npc. Also fix loading menu. --- src/resources/db/npcdb.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/resources') 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( 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); } -- cgit v1.2.3-70-g09d2