summaryrefslogtreecommitdiff
path: root/src/spellmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-16 20:23:30 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-16 20:23:30 +0300
commit11000f010f19a2de85ba26660b451c7c41ab3a97 (patch)
tree65eee18b5fcb17f35cb90fcc930242e02b0a79f1 /src/spellmanager.cpp
parent18bd0722a9cebc3ba80bfb74a5b5ba0dd9e53c75 (diff)
downloadmv-11000f010f19a2de85ba26660b451c7c41ab3a97.tar.gz
mv-11000f010f19a2de85ba26660b451c7c41ab3a97.tar.bz2
mv-11000f010f19a2de85ba26660b451c7c41ab3a97.tar.xz
mv-11000f010f19a2de85ba26660b451c7c41ab3a97.zip
Move MagicSchool enum into separate file and convert to strong typed.
Diffstat (limited to 'src/spellmanager.cpp')
-rw-r--r--src/spellmanager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/spellmanager.cpp b/src/spellmanager.cpp
index 84d05bc12..9409c6c1c 100644
--- a/src/spellmanager.cpp
+++ b/src/spellmanager.cpp
@@ -136,7 +136,7 @@ void SpellManager::invoke(const int spellId) const
if (spell->getCommandType() == TEXT_COMMAND_TEXT
|| (playerHandler->canUseMagic()
- && PlayerInfo::getSkillLevel(SKILL_MAGIC)
+ && PlayerInfo::getSkillLevel(static_cast<int>(MagicSchool::SkillMagic))
>= static_cast<signed>(spell->getBaseLvl())
&& PlayerInfo::getSkillLevel(static_cast<int>(
spell->getSchool())) >= static_cast<signed>(spell->getSchoolLvl())
@@ -288,7 +288,7 @@ void SpellManager::load(const bool oldConfig)
{
addSpell(new TextCommand(i, symbol, cmd, comment,
static_cast<CommandTargetT>(targetType), icon, basicLvl,
- static_cast<MagicSchool>(school), schoolLvl, mana));
+ static_cast<MagicSchoolT>(school), schoolLvl, mana));
}
else
{