From ff65a33d44967d809bfbd2a0f78632325c2417fc Mon Sep 17 00:00:00 2001 From: Laserlicht <13953785+Laserlicht@users.noreply.github.com> Date: Tue, 3 Sep 2024 11:03:37 +0200 Subject: [PATCH] fixes bug for 8th creature --- lib/mapObjects/CGTownInstance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mapObjects/CGTownInstance.cpp b/lib/mapObjects/CGTownInstance.cpp index 7903e5fcd..e19d80cee 100644 --- a/lib/mapObjects/CGTownInstance.cpp +++ b/lib/mapObjects/CGTownInstance.cpp @@ -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]);