diff options
Diffstat (limited to 'src/spellmanager.cpp')
-rw-r--r-- | src/spellmanager.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/spellmanager.cpp b/src/spellmanager.cpp index 9409c6c1c..4383f9331 100644 --- a/src/spellmanager.cpp +++ b/src/spellmanager.cpp @@ -134,7 +134,7 @@ void SpellManager::invoke(const int spellId) const if (!playerHandler || spell->getCommand().empty()) return; - if (spell->getCommandType() == TEXT_COMMAND_TEXT + if (spell->getCommandType() == TextCommandType::Text || (playerHandler->canUseMagic() && PlayerInfo::getSkillLevel(static_cast<int>(MagicSchool::SkillMagic)) >= static_cast<signed>(spell->getBaseLvl()) @@ -148,7 +148,7 @@ void SpellManager::invoke(const int spellId) const invokeSpell(spell); } if ((target && (target->getType() != ActorType::Monster - || spell->getCommandType() == TEXT_COMMAND_TEXT)) + || spell->getCommandType() == TextCommandType::Text)) && (spell->getTargetType() == CommandTarget::AllowTarget || spell->getTargetType() == CommandTarget::NeedTarget)) { @@ -284,7 +284,8 @@ void SpellManager::load(const bool oldConfig) std::string icon = cfg->getValue("commandShortcutIcon" + toString(i), ""); - if (static_cast<TextCommandType>(commandType) == TEXT_COMMAND_MAGIC) + if (static_cast<TextCommandType>(commandType) == + TextCommandType::Magic) { addSpell(new TextCommand(i, symbol, cmd, comment, static_cast<CommandTargetT>(targetType), icon, basicLvl, |