summaryrefslogtreecommitdiff
path: root/src/textcommand.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-17 20:16:14 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-17 20:16:14 +0300
commit995bc5ba7d1b5e38cf294d6fa27db7ee89886a28 (patch)
treee4d553b28cc68de9a629d0174503146624c63f27 /src/textcommand.cpp
parent21fa38275fc8ec00d32dd1b2f7fe211a7925a596 (diff)
downloadmv-995bc5ba7d1b5e38cf294d6fa27db7ee89886a28.tar.gz
mv-995bc5ba7d1b5e38cf294d6fa27db7ee89886a28.tar.bz2
mv-995bc5ba7d1b5e38cf294d6fa27db7ee89886a28.tar.xz
mv-995bc5ba7d1b5e38cf294d6fa27db7ee89886a28.zip
Use magic command properties only if compiled for tmwa.
Diffstat (limited to 'src/textcommand.cpp')
-rw-r--r--src/textcommand.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/textcommand.cpp b/src/textcommand.cpp
index 04d479ece..3674ac9dc 100644
--- a/src/textcommand.cpp
+++ b/src/textcommand.cpp
@@ -34,6 +34,7 @@
#include "debug.h"
+#ifdef TMWA_SUPPORT
TextCommand::TextCommand(const unsigned int id,
const std::string &symbol,
const std::string &command,
@@ -59,23 +60,27 @@ TextCommand::TextCommand(const unsigned int id,
{
loadImage();
}
+#endif
-
-TextCommand::TextCommand(const unsigned int id, const std::string &symbol,
+TextCommand::TextCommand(const unsigned int id,
+ const std::string &symbol,
const std::string &command,
const std::string &comment,
- const CommandTargetT type, const std::string &icon) :
+ const CommandTargetT type,
+ const std::string &icon) :
mCommand(command),
mComment(comment),
mSymbol(symbol),
mTargetType(type),
mIcon(icon),
mId(id),
+#ifdef TMWA_SUPPORT
mMana(0),
mSchool(MagicSchool::SkillMagic),
mBaseLvl(0),
mSchoolLvl(0),
mCommandType(TextCommandType::Text),
+#endif
mImage(nullptr)
{
loadImage();
@@ -88,11 +93,13 @@ TextCommand::TextCommand(const unsigned int id) :
mTargetType(CommandTarget::NoTarget),
mIcon(""),
mId(id),
+#ifdef TMWA_SUPPORT
mMana(0),
mSchool(MagicSchool::SkillMagic),
mBaseLvl(0),
mSchoolLvl(0),
mCommandType(TextCommandType::Text),
+#endif
mImage(nullptr)
{
loadImage();