From 9482852020eb20fa325f1e1e6b18e815fcd463c7 Mon Sep 17 00:00:00 2001 From: AlexVinS Date: Thu, 19 Mar 2015 00:10:41 +0300 Subject: [PATCH] few tweaks --- client/battle/CBattleInterface.cpp | 6 +++--- client/battle/CBattleInterface.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/battle/CBattleInterface.cpp b/client/battle/CBattleInterface.cpp index a814f1ef9..6438bffd7 100644 --- a/client/battle/CBattleInterface.cpp +++ b/client/battle/CBattleInterface.cpp @@ -1712,8 +1712,8 @@ void CBattleInterface::endCastingSpell() { assert(spellDestSelectMode); - delete spellToCast; - spellToCast = nullptr; + vstd::clear_pointer(spellToCast); + sp = nullptr; spellDestSelectMode = false; CCS->curh->changeGraphic(ECursor::COMBAT, ECursor::COMBAT_POINTER); @@ -2283,7 +2283,7 @@ void CBattleInterface::handleHex(BattleHex myNumber, int eventType) if (vstd::contains(localActions, selectedAction)) //try to use last selected action by default currentAction = selectedAction; - else if (localActions.size()) //if not possible, select first available action 9they are sorted by suggested priority) + else if (localActions.size()) //if not possible, select first available action (they are sorted by suggested priority) currentAction = localActions.front(); else //no legal action possible { diff --git a/client/battle/CBattleInterface.h b/client/battle/CBattleInterface.h index 0d4fceb96..974ca5b41 100644 --- a/client/battle/CBattleInterface.h +++ b/client/battle/CBattleInterface.h @@ -155,7 +155,7 @@ private: shared_ptr tacticianInterface; //used during tactics mode, points to the interface of player with higher tactics (can be either attacker or defender in hot-seat), valid onloy for human players bool tacticsMode; - bool stackCanCastSpell; //if true, active stack could possibly cats some target spell + bool stackCanCastSpell; //if true, active stack could possibly cast some target spell bool creatureCasting; //if true, stack currently aims to cats a spell bool spellDestSelectMode; //if true, player is choosing destination for his spell - only for GUI / console PossibleActions spellSelMode;