1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-19 21:10:12 +02:00

* ubuntux's levelup patch

This commit is contained in:
mateuszb 2009-04-17 09:12:24 +00:00
parent 7319e5cb0e
commit 1dcb99254c

View File

@ -216,7 +216,7 @@ void CGameHandler::changePrimSkill(int ID, int which, int val, bool abs)
if(which==4) //only for exp - hero may level up
{
CGHeroInstance *hero = static_cast<CGHeroInstance *>(gs->map->objects[ID]);
if(hero->exp >= VLC->heroh->reqExp(hero->level+1)) //new level
while (hero->exp >= VLC->heroh->reqExp(hero->level+1)) //new level
{
//give prim skill
tlog5 << hero->name <<" got level "<<hero->level<<std::endl;