diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-02-24 01:30:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-02-24 01:32:02 +0300 |
commit | 3da7fa61442364be6713359690a35f89aa8e613a (patch) | |
tree | 48a941dbbb0234b897478aa50518112407d08e5b /src/spellmanager.cpp | |
parent | 470aaad15a0f9a08dd12ab34c8602cd93fc57b76 (diff) | |
download | manaplus-3da7fa61442364be6713359690a35f89aa8e613a.tar.gz manaplus-3da7fa61442364be6713359690a35f89aa8e613a.tar.bz2 manaplus-3da7fa61442364be6713359690a35f89aa8e613a.tar.xz manaplus-3da7fa61442364be6713359690a35f89aa8e613a.zip |
Add support for show quest variables in skills window (evol only)
This allow use pseudo skills controlled by quest variables.
Diffstat (limited to 'src/spellmanager.cpp')
-rw-r--r-- | src/spellmanager.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/spellmanager.cpp b/src/spellmanager.cpp index 27b6f45e7..93480fb63 100644 --- a/src/spellmanager.cpp +++ b/src/spellmanager.cpp @@ -135,11 +135,10 @@ void SpellManager::invoke(const int spellId) if (spell->getCommandType() == TEXT_COMMAND_TEXT || (Net::getPlayerHandler()->canUseMagic() - && PlayerInfo::getStatEffective(static_cast<PlayerInfo::Attribute>( - SKILL_MAGIC)) >= static_cast<signed>(spell->getBaseLvl()) + && PlayerInfo::getStatEffective(SKILL_MAGIC) + >= static_cast<signed>(spell->getBaseLvl()) && PlayerInfo::getStatEffective( - static_cast<PlayerInfo::Attribute>(spell->getSchool())) - >= static_cast<signed>(spell->getSchoolLvl()) + spell->getSchool()) >= static_cast<signed>(spell->getSchoolLvl()) && PlayerInfo::getAttribute(PlayerInfo::MP) >= spell->getMana())) { const Being *const target = player_node->getTarget(); |