mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
fixes bug for 8th creature
This commit is contained in:
parent
ee64928454
commit
ff65a33d44
@ -478,7 +478,7 @@ void CGTownInstance::initObj(vstd::RNG & rand) ///initialize town structures
|
||||
BuildingID buildID = BuildingID(BuildingID::getDwellingFromLevel(level, 0));
|
||||
int upgradeNum = 0;
|
||||
|
||||
for (; town->buildings.count(buildID); upgradeNum++, buildID.advance(town->creatures.size()))
|
||||
for (; town->buildings.count(buildID); upgradeNum++, BuildingID::advanceDwelling(buildID))
|
||||
{
|
||||
if (hasBuilt(buildID) && town->creatures.at(level).size() > upgradeNum)
|
||||
creatures[level].second.push_back(town->creatures[level][upgradeNum]);
|
||||
|
Loading…
Reference in New Issue
Block a user