From 3c404128c4669a1f4f190e20a89553677717fc50 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 23 Sep 2016 22:01:44 +0300 Subject: Add missing comments into defines. --- src/spellmanager.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/spellmanager.cpp') 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(school), schoolLvl, mana)); } else -#endif +#endif // TMWA_SUPPORT { addSpell(new TextCommand(i, symbol, cmd, comment, static_cast(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 { -- cgit v1.2.3-70-g09d2