1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Multiple minor fixes:

- fixed starting armies of some heroes, including Bron #1602
- (debian) added vcmi-dbg package with debug information
- proper randomization of hero secondary skills, fixes #1603
- second capitol will show up as disabled immediately #1604
- proper deserialization of boost::variant
- empty file will no longer crash JsonNode parser
- fixed some compiler warnings
This commit is contained in:
Ivan Savenko
2013-12-03 09:03:37 +00:00
parent ee1b0459e6
commit 3d3f93275d
13 changed files with 157 additions and 72 deletions

View File

@@ -205,9 +205,9 @@ void CGameHandler::levelUpHero(const CGHeroInstance * hero)
else if(hlu.skills.size() == 1 || hero->tempOwner == PlayerColor::NEUTRAL) //choose skill automatically
{
sendAndApply(&hlu);
auto rng = [&]()-> ui32
auto rng = [&]() mutable -> ui32
{
return hero->skillsInfo.randomSeed; //must be determined
return hero->skillsInfo.distribution(); //must be determined
};
levelUpHero(hero, vstd::pickRandomElementOf (hlu.skills, rng));
}