summaryrefslogtreecommitdiff
path: root/src/textcommand.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/textcommand.h')
-rw-r--r--src/textcommand.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/textcommand.h b/src/textcommand.h
index 79a6b6f7e..76749b51f 100644
--- a/src/textcommand.h
+++ b/src/textcommand.h
@@ -23,6 +23,8 @@
#ifndef TEXTCOMMAND_H
#define TEXTCOMMAND_H
+#include "enums/commandtarget.h"
+
#include <string>
#include "localconsts.h"
@@ -31,13 +33,6 @@ const unsigned int MAGIC_START_ID = 340;
class Image;
-enum SpellTarget
-{
- NOTARGET = 0,
- ALLOWTARGET = 1,
- NEEDTARGET = 2
-};
-
enum MagicSchool
{
SKILL_MAGIC = 340,
@@ -65,7 +60,7 @@ class TextCommand final
*/
TextCommand(const unsigned int id, const std::string &symbol,
const std::string &command,
- const std::string &comment, const SpellTarget type,
+ const std::string &comment, const CommandTargetT type,
const std::string &icon, const unsigned int basicLvl,
const MagicSchool school = SKILL_MAGIC,
const unsigned int schoolLvl = 0, const int mana = 0);
@@ -75,7 +70,7 @@ class TextCommand final
*/
TextCommand(const unsigned int id, const std::string &symbol,
const std::string &command, const std::string &comment,
- const SpellTarget type, const std::string &icon);
+ const CommandTargetT type, const std::string &icon);
/**
* Constructor.
@@ -104,7 +99,7 @@ class TextCommand final
unsigned int getId() const A_WARN_UNUSED
{ return mId; }
- SpellTarget getTargetType() const A_WARN_UNUSED
+ CommandTargetT getTargetType() const A_WARN_UNUSED
{ return mTargetType; }
std::string getIcon() const A_WARN_UNUSED
@@ -137,7 +132,7 @@ class TextCommand final
void setId(const unsigned int id)
{ mId = id; }
- void setTargetType(const SpellTarget targetType)
+ void setTargetType(const CommandTargetT targetType)
{ mTargetType = targetType; }
void setIcon(const std::string &icon)
@@ -171,7 +166,7 @@ class TextCommand final
std::string mCommand;
std::string mComment;
std::string mSymbol;
- SpellTarget mTargetType;
+ CommandTargetT mTargetType;
std::string mIcon;
unsigned int mId;
int mMana;