diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-03-01 00:43:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-03-01 00:43:10 +0300 |
commit | 9e755afa031f39172292aa82d3df42c1eaa01b03 (patch) | |
tree | 396cf53255eba81d80cfe9a0f6c04022c72e19a6 /src/spellmanager.cpp | |
parent | 50f96cb7f1069aee951a4ffabd17d2e9753b0987 (diff) | |
download | manaverse-9e755afa031f39172292aa82d3df42c1eaa01b03.tar.gz manaverse-9e755afa031f39172292aa82d3df42c1eaa01b03.tar.bz2 manaverse-9e755afa031f39172292aa82d3df42c1eaa01b03.tar.xz manaverse-9e755afa031f39172292aa82d3df42c1eaa01b03.zip |
Fix magic skill level checks.
Diffstat (limited to 'src/spellmanager.cpp')
-rw-r--r-- | src/spellmanager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/spellmanager.cpp b/src/spellmanager.cpp index 77248c68b..9c50ca65f 100644 --- a/src/spellmanager.cpp +++ b/src/spellmanager.cpp @@ -135,9 +135,9 @@ void SpellManager::invoke(const int spellId) if (spell->getCommandType() == TEXT_COMMAND_TEXT || (Net::getPlayerHandler()->canUseMagic() - && PlayerInfo::getStatEffective(SKILL_MAGIC) + && PlayerInfo::getSkillLevel(SKILL_MAGIC) >= static_cast<signed>(spell->getBaseLvl()) - && PlayerInfo::getStatEffective( + && PlayerInfo::getSkillLevel( spell->getSchool()) >= static_cast<signed>(spell->getSchoolLvl()) && PlayerInfo::getAttribute(PlayerInfo::MP) >= spell->getMana())) { |