mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Fix Orrin as starting hero on some maps
Fixes a bug that led to Orrin being replaced with a different randomly selected hero on maps where starting hero is not generated in town, but pre-placed on map
This commit is contained in:
@ -661,8 +661,10 @@ void CGHeroInstance::pickRandomObject(vstd::RNG & rand)
|
||||
|
||||
if (ID == Obj::RANDOM_HERO)
|
||||
{
|
||||
auto selectedHero = cb->gameState()->pickNextHeroType(getOwner());
|
||||
|
||||
ID = Obj::HERO;
|
||||
subID = cb->gameState()->pickNextHeroType(getOwner());
|
||||
subID = selectedHero;
|
||||
randomizeArmy(getHeroClass()->faction);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user