diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-09-23 22:01:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-09-23 22:01:44 +0300 |
commit | 3c404128c4669a1f4f190e20a89553677717fc50 (patch) | |
tree | 2db4e5031089c800c4e00fd6244e578f44a7c910 /src/spellmanager.cpp | |
parent | 89b267d6d73bbc59f7c313b8a22b97fbb27f99a8 (diff) | |
download | mv-3c404128c4669a1f4f190e20a89553677717fc50.tar.gz mv-3c404128c4669a1f4f190e20a89553677717fc50.tar.bz2 mv-3c404128c4669a1f4f190e20a89553677717fc50.tar.xz mv-3c404128c4669a1f4f190e20a89553677717fc50.zip |
Add missing comments into defines.
Diffstat (limited to 'src/spellmanager.cpp')
-rw-r--r-- | src/spellmanager.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/spellmanager.cpp b/src/spellmanager.cpp index 35ccbf651..3000bc0fb 100644 --- a/src/spellmanager.cpp +++ b/src/spellmanager.cpp @@ -147,7 +147,7 @@ void SpellManager::invoke(const int spellId) const && PlayerInfo::getAttribute(Attributes::PLAYER_MP) >= CAST_S32(spell->getMana())) ) -#endif +#endif // TMWA_SUPPORT { const Being *const target = localPlayer->getTarget(); if (spell->getTargetType() == CommandTarget::NoTarget) @@ -159,11 +159,12 @@ void SpellManager::invoke(const int spellId) const spell->getCommandType() == TextCommandType::Text)) && (spell->getTargetType() == CommandTarget::AllowTarget || spell->getTargetType() == CommandTarget::NeedTarget)) -#else +#else // TMWA_SUPPORT + if (target && (spell->getTargetType() == CommandTarget::AllowTarget || spell->getTargetType() == CommandTarget::NeedTarget)) -#endif +#endif // TMWA_SUPPORT { invokeSpell(spell, target); } @@ -302,7 +303,7 @@ void SpellManager::load() static_cast<MagicSchoolT>(school), schoolLvl, mana)); } else -#endif +#endif // TMWA_SUPPORT { addSpell(new TextCommand(i, symbol, cmd, comment, static_cast<CommandTargetT>(targetType), icon)); @@ -340,7 +341,8 @@ void SpellManager::save() const CAST_U32(spell->getSchool()), spell->getSchoolLvl(), CAST_U32(spell->getMana()))); -#else +#else // TMWA_SUPPORT + serverConfig.setValue("commandShortcutFlags" + toString(i), strprintf("%u %u %u %u %u %u", 1U, CAST_U32(spell->getTargetType()), @@ -348,7 +350,7 @@ void SpellManager::save() const 0U, 0U, 0U)); -#endif +#endif // TMWA_SUPPORT } else { |