1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Some very early work towards autofight feature.

Added EmptyAI to the solution.
Passing callbacks by shared_ptr.
This commit is contained in:
Michał W. Urbańczyk
2013-06-22 14:47:20 +00:00
parent 06dbdd234f
commit 254f194220
18 changed files with 175 additions and 78 deletions

View File

@@ -4384,6 +4384,9 @@ bool CGameHandler::makeCustomAction( BattleAction &ba )
{
case Battle::HERO_SPELL:
{
COMPLAIN_RET_FALSE_IF(ba.side > 1, "Side must be 0 or 1!");
const CGHeroInstance *h = gs->curB->heroes[ba.side];
const CGHeroInstance *secondHero = gs->curB->heroes[!ba.side];
if(!h)