1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

Refactoring of setBattleCursor & fromWhichHexAttack methods

This commit is contained in:
Ivan Savenko
2022-12-19 01:12:26 +02:00
parent e2cc73d67b
commit a57eec23e6
6 changed files with 173 additions and 319 deletions

View File

@ -864,6 +864,10 @@ void BattleStacksController::updateHoveredStacks()
std::vector<const CStack *> BattleStacksController::selectHoveredStacks()
{
// only allow during our turn - do not try to highlight creatures while they are in the middle of actions
if (!activeStack)
return {};
auto hoveredHex = owner.fieldController->getHoveredHex();
if (!hoveredHex.isValid())