1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

Stabilization

This commit is contained in:
Ivan Savenko
2023-11-01 16:10:33 +02:00
parent 8346d71c98
commit b42f073f0c
6 changed files with 19 additions and 25 deletions

View File

@ -128,7 +128,7 @@ void CGDwelling::pickRandomObject(CRandomGenerator & rand)
FactionID faction = randomizeFaction(rand);
int level = randomizeLevel(rand);
assert(faction != FactionID::NONE && faction != FactionID::NEUTRAL);
assert(level >= 1 && level <= 7);
assert(level >= 0 && level <= 6);
randomizationInfo.reset();
CreatureID cid = (*VLC->townh)[faction]->town->creatures[level][0];
@ -163,6 +163,8 @@ void CGDwelling::pickRandomObject(CRandomGenerator & rand)
ID = Obj::CREATURE_GENERATOR4;
subID = *RandomGeneratorUtil::nextItem(VLC->objtypeh->knownSubObjects(Obj::CREATURE_GENERATOR1), rand);
}
setType(ID, subID);
}
}