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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user