From 7e0a97d2521b9ce57003176e82a0b5564aa003c2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 17 Jul 2012 23:26:59 +0300 Subject: Fix more code style and additional warnings. --- src/spellmanager.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/spellmanager.cpp') diff --git a/src/spellmanager.cpp b/src/spellmanager.cpp index 222004347..548fc94c1 100644 --- a/src/spellmanager.cpp +++ b/src/spellmanager.cpp @@ -138,9 +138,11 @@ void SpellManager::invoke(int spellId) if (spell->getCommandType() == TEXT_COMMAND_TEXT || (Net::getPlayerHandler()->canUseMagic() - && PlayerInfo::getStatEffective(SKILL_MAGIC) >= spell->getBaseLvl() + && PlayerInfo::getStatEffective(static_cast( + SKILL_MAGIC)) >= static_cast(spell->getBaseLvl()) && PlayerInfo::getStatEffective( - spell->getSchool()) >= spell->getSchoolLvl() + static_cast(spell->getSchool())) + >= static_cast(spell->getSchoolLvl()) && PlayerInfo::getAttribute(PlayerInfo::MP) >= spell->getMana())) { Being* target = player_node->getTarget(); @@ -336,10 +338,12 @@ void SpellManager::save() if (spell->getCommand() != "" && spell->getSymbol() != "") { serverConfig.setValue("commandShortcutFlags" + toString(i), - strprintf("%u %u %u %u %u %u", spell->getCommandType(), - spell->getTargetType(), spell->getBaseLvl(), - spell->getSchool(), spell->getSchoolLvl(), - spell->getMana())); + strprintf("%u %u %u %u %u %u", static_cast( + spell->getCommandType()), static_cast( + spell->getTargetType()), spell->getBaseLvl(), + static_cast(spell->getSchool()), + spell->getSchoolLvl(), static_cast( + spell->getMana()))); } else { -- cgit v1.2.3-60-g2f50