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

Reverted changes from r2270. These strange callbacks were introduced for purpose (bugs 574 & 615).

Described crash after a battle is not reproductible now. Refer to these bug reports for more details.
This commit is contained in:
DjWarmonger
2011-07-30 18:02:31 +00:00
parent a5c39ca84b
commit 2272b4a316

View File

@@ -201,8 +201,10 @@ void CGameHandler::levelUpHero(int ID)
// required exp for at least 1 lvl-up hasn't been reached
if (hero->exp < VLC->heroh->reqExp(hero->level+1))
{
afterBattleCallback();
return;
}
//give prim skill
tlog5 << hero->name <<" got level "<<hero->level<<std::endl;
@@ -458,8 +460,8 @@ void CGameHandler::endBattle(int3 tile, const CGHeroInstance *hero1, const CGHer
changePrimSkill(hero1->id,4,battleResult.data->exp[0]);
else if (battleResult.data->exp[1] && hero2)
changePrimSkill(hero2->id,4,battleResult.data->exp[1]);
afterBattleCallback();
else
afterBattleCallback();
}
sendAndApply(&resultsApplied);
@@ -498,8 +500,6 @@ void CGameHandler::endBattle(int3 tile, const CGHeroInstance *hero1, const CGHer
sendAndApply(&sah);
}
delete battleResult.data;
}
void CGameHandler::afterBattleCallback() //object interaction after leveling up is done