summaryrefslogtreecommitdiff
path: root/src/textcommand.h
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.h
parent21fa38275fc8ec00d32dd1b2f7fe211a7925a596 (diff)
downloadplus-995bc5ba7d1b5e38cf294d6fa27db7ee89886a28.tar.gz
plus-995bc5ba7d1b5e38cf294d6fa27db7ee89886a28.tar.bz2
plus-995bc5ba7d1b5e38cf294d6fa27db7ee89886a28.tar.xz
plus-995bc5ba7d1b5e38cf294d6fa27db7ee89886a28.zip
Use magic command properties only if compiled for tmwa.
Diffstat (limited to 'src/textcommand.h')
-rw-r--r--src/textcommand.h45
1 files changed, 27 insertions, 18 deletions
diff --git a/src/textcommand.h b/src/textcommand.h
index 1b5bad71b..73a214a41 100644
--- a/src/textcommand.h
+++ b/src/textcommand.h
@@ -41,6 +41,7 @@ class Image;
class TextCommand final
{
public:
+#ifdef TMWA_SUPPORT
/**
* Constructor.
*/
@@ -54,13 +55,17 @@ class TextCommand final
const MagicSchoolT school = MagicSchool::SkillMagic,
const unsigned int schoolLvl = 0,
const int mana = 0);
+#endif
/**
* Constructor.
*/
- TextCommand(const unsigned int id, const std::string &symbol,
- const std::string &command, const std::string &comment,
- const CommandTargetT type, const std::string &icon);
+ TextCommand(const unsigned int id,
+ const std::string &symbol,
+ const std::string &command,
+ const std::string &comment,
+ const CommandTargetT type,
+ const std::string &icon);
/**
* Constructor.
@@ -95,6 +100,7 @@ class TextCommand final
std::string getIcon() const A_WARN_UNUSED
{ return mIcon; }
+#ifdef TMWA_SUPPORT
int getMana() const A_WARN_UNUSED
{ return mMana; }
@@ -107,9 +113,25 @@ class TextCommand final
unsigned getSchoolLvl() const A_WARN_UNUSED
{ return mSchoolLvl; }
+ void setMana(const unsigned int mana)
+ { mMana = mana; }
+
+ void setSchool(const MagicSchoolT school)
+ { mSchool = school; }
+
+ void setBaseLvl(const unsigned int baseLvl)
+ { mBaseLvl = baseLvl; }
+
+ void setSchoolLvl(const unsigned int schoolLvl)
+ { mSchoolLvl = schoolLvl; }
+
TextCommandTypeT getCommandType() const A_WARN_UNUSED
{ return mCommandType; }
+ void setCommandType(const TextCommandTypeT commandType)
+ { mCommandType = commandType; }
+#endif
+
void setCommand(const std::string &command)
{ mCommand = command; }
@@ -128,21 +150,6 @@ class TextCommand final
void setIcon(const std::string &icon)
{ mIcon = icon; loadImage(); }
- void setMana(const unsigned int mana)
- { mMana = mana; }
-
- void setSchool(const MagicSchoolT school)
- { mSchool = school; }
-
- void setBaseLvl(const unsigned int baseLvl)
- { mBaseLvl = baseLvl; }
-
- void setSchoolLvl(const unsigned int schoolLvl)
- { mSchoolLvl = schoolLvl; }
-
- void setCommandType(const TextCommandTypeT commandType)
- { mCommandType = commandType; }
-
bool isEmpty() const A_WARN_UNUSED
{ return mCommand.empty() && mSymbol.empty(); }
@@ -159,11 +166,13 @@ class TextCommand final
CommandTargetT mTargetType;
std::string mIcon;
unsigned int mId;
+#ifdef TMWA_SUPPORT
int mMana;
MagicSchoolT mSchool;
unsigned mBaseLvl;
unsigned mSchoolLvl;
TextCommandTypeT mCommandType;
+#endif
Image *mImage;
};