1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

VCAI::performTypicalActions: always check that hero is still available

It's weird why this only appear now so if you have ideas check issue 2479.
This commit is contained in:
Arseniy Shestakov 2016-09-16 04:52:17 +03:00
parent c8090c78ec
commit 30042cac3d

View File

@ -2517,6 +2517,9 @@ void VCAI::performTypicalActions()
{
for(auto h : getUnblockedHeroes())
{
if(!h) //hero might be lost. getUnblockedHeroes() called once on start of turn
continue;
logAi->debugStream() << boost::format("Looking into %s, MP=%d") % h->name.c_str() % h->movement;
makePossibleUpgrades(*h);
pickBestArtifacts(*h);