mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Do not display "Spell Cancelled" message on right-click when no stack is
active
This commit is contained in:
parent
f2e7791326
commit
e21e3f8386
@ -999,7 +999,7 @@ void BattleActionsController::onHexRightClicked(BattleHex clickedHex)
|
||||
return action.spellcast();
|
||||
};
|
||||
|
||||
bool isCurrentStackInSpellcastMode = std::all_of(possibleActions.begin(), possibleActions.end(), spellcastActionPredicate);
|
||||
bool isCurrentStackInSpellcastMode = !possibleActions.empty() && std::all_of(possibleActions.begin(), possibleActions.end(), spellcastActionPredicate);
|
||||
|
||||
if (spellcastingModeActive() || isCurrentStackInSpellcastMode)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user