From 995bc5ba7d1b5e38cf294d6fa27db7ee89886a28 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 17 Nov 2015 20:16:14 +0300 Subject: Use magic command properties only if compiled for tmwa. --- src/resources/db/commandsdb.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/resources') diff --git a/src/resources/db/commandsdb.cpp b/src/resources/db/commandsdb.cpp index 69c918f86..992d194df 100644 --- a/src/resources/db/commandsdb.cpp +++ b/src/resources/db/commandsdb.cpp @@ -103,6 +103,7 @@ void CommandsDB::loadXmlFile(const std::string &fileName) commandNode, "target", "")); const std::string icon = XML::getProperty( commandNode, "icon", ""); +#ifdef TMWA_SUPPORT const int skill1 = XML::getIntProperty( commandNode, "skill1", 0, 0, 1000000); const int level1 = XML::getIntProperty( @@ -113,8 +114,10 @@ void CommandsDB::loadXmlFile(const std::string &fileName) commandNode, "level2", 0, 0, 1000); const int mana = XML::getIntProperty( commandNode, "mana", 0, 0, 100000); +#endif TextCommand *cmd = nullptr; +#ifdef TMWA_SUPPORT if (skill1) { cmd = new TextCommand(id, @@ -129,6 +132,7 @@ void CommandsDB::loadXmlFile(const std::string &fileName) mana); } else +#endif { cmd = new TextCommand(id, name, -- cgit v1.2.3-70-g09d2