1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-05 00:49:09 +02:00

bugfix, a bit more of hero window

This commit is contained in:
mateuszb
2008-01-12 12:55:45 +00:00
parent b976857c6c
commit 7968aebe1a
3 changed files with 49 additions and 3 deletions

View File

@ -1880,6 +1880,10 @@ std::string CMapHandler::getRandomizedDefName(CGDefInfo *di, CGObjectInstance *
}
}
}
if(fraction == -1)
{
fraction = rand()%F_NUMBER; //TODO: check it more
}
int lvl = atoi(di->name.substr(7, 8).c_str()) - 1;
return creGenNames[fraction][lvl];
}