diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-11-16 20:02:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-11-16 20:02:04 +0300 |
commit | 18bd0722a9cebc3ba80bfb74a5b5ba0dd9e53c75 (patch) | |
tree | 179d12121a4e588efa53c67a207e2ab5392d99eb /src/resources | |
parent | 44cdf80268135a21ddb09710fc029e808fb3f519 (diff) | |
download | manaplus-18bd0722a9cebc3ba80bfb74a5b5ba0dd9e53c75.tar.gz manaplus-18bd0722a9cebc3ba80bfb74a5b5ba0dd9e53c75.tar.bz2 manaplus-18bd0722a9cebc3ba80bfb74a5b5ba0dd9e53c75.tar.xz manaplus-18bd0722a9cebc3ba80bfb74a5b5ba0dd9e53c75.zip |
Rename SpellTarget into CommandTarget enum and convert it to strong typed.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/db/commandsdb.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/resources/db/commandsdb.cpp b/src/resources/db/commandsdb.cpp index 091ae718c..2203cbaa8 100644 --- a/src/resources/db/commandsdb.cpp +++ b/src/resources/db/commandsdb.cpp @@ -46,14 +46,14 @@ void CommandsDB::load() mLoaded = true; } -static SpellTarget parseTarget(const std::string &text) +static CommandTargetT parseTarget(const std::string &text) { if (text == "allow target") - return ALLOWTARGET; + return CommandTarget::AllowTarget; else if (text == "need target") - return NEEDTARGET; + return CommandTarget::NeedTarget; else - return NOTARGET; + return CommandTarget::NoTarget; } void CommandsDB::loadXmlFile(const std::string &fileName) @@ -99,7 +99,7 @@ void CommandsDB::loadXmlFile(const std::string &fileName) commandNode, "command", ""); const std::string comment = XML::getProperty( commandNode, "comment", ""); - const SpellTarget targetType = parseTarget(XML::getProperty( + const CommandTargetT targetType = parseTarget(XML::getProperty( commandNode, "target", "")); const std::string icon = XML::getProperty( commandNode, "icon", ""); |