diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-07-17 23:26:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-07-17 23:26:59 +0300 |
commit | 7e0a97d2521b9ce57003176e82a0b5564aa003c2 (patch) | |
tree | 5b2cfe1afe09bea1063f783050c1fb549daee76d /src/spellmanager.cpp | |
parent | f68cbf700a99f2f184715a5b8025bcb4b6525391 (diff) | |
download | mv-7e0a97d2521b9ce57003176e82a0b5564aa003c2.tar.gz mv-7e0a97d2521b9ce57003176e82a0b5564aa003c2.tar.bz2 mv-7e0a97d2521b9ce57003176e82a0b5564aa003c2.tar.xz mv-7e0a97d2521b9ce57003176e82a0b5564aa003c2.zip |
Fix more code style and additional warnings.
Diffstat (limited to 'src/spellmanager.cpp')
-rw-r--r-- | src/spellmanager.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
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<PlayerInfo::Attribute>( + SKILL_MAGIC)) >= static_cast<signed>(spell->getBaseLvl()) && PlayerInfo::getStatEffective( - spell->getSchool()) >= spell->getSchoolLvl() + static_cast<PlayerInfo::Attribute>(spell->getSchool())) + >= static_cast<signed>(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<unsigned>( + spell->getCommandType()), static_cast<unsigned>( + spell->getTargetType()), spell->getBaseLvl(), + static_cast<unsigned>(spell->getSchool()), + spell->getSchoolLvl(), static_cast<unsigned>( + spell->getMana()))); } else { |