mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-21 21:17:49 +02:00
* ubuntux's levelup patch
This commit is contained in:
parent
7319e5cb0e
commit
1dcb99254c
@ -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
|
if(which==4) //only for exp - hero may level up
|
||||||
{
|
{
|
||||||
CGHeroInstance *hero = static_cast<CGHeroInstance *>(gs->map->objects[ID]);
|
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
|
//give prim skill
|
||||||
tlog5 << hero->name <<" got level "<<hero->level<<std::endl;
|
tlog5 << hero->name <<" got level "<<hero->level<<std::endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user