1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Rewritten VCAI::pickBestCreatures. Should fix the compilation error ( http://forum.vcmi.eu/viewtopic.php?p=6605#6605 ).

This commit is contained in:
Michał W. Urbańczyk
2012-03-11 01:26:11 +00:00
parent 59681be0a4
commit 76eb0ed429
3 changed files with 42 additions and 47 deletions

View File

@@ -403,6 +403,14 @@ void CCallback::validatePaths()
}
}
int CCallback::mergeOrSwapStacks(const CArmedInstance *s1, const CArmedInstance *s2, int p1, int p2)
{
if(s1->getCreature(p1) == s2->getCreature(p2))
return mergeStacks(s1, s2, p1, p2);
else
return swapCreatures(s1, s2, p1, p2);
}
CBattleCallback::CBattleCallback(CGameState *GS, int Player, CClient *C )
{
gs = GS;