1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

abstraction layer

This commit is contained in:
Laserlicht
2024-08-05 23:51:07 +02:00
parent 3afddbbf29
commit ebeeff5aa3
6 changed files with 42 additions and 22 deletions

View File

@@ -520,7 +520,7 @@ void CGTownInstance::initObj(vstd::RNG & rand) ///initialize town structures
for (int level = 0; level < town->creatures.size(); level++)
{
BuildingID buildID = BuildingID(BuildingID::DWELL_FIRST + level);
BuildingID buildID = BuildingID(BuildingID::getDwelling(level));
int upgradeNum = 0;
for (; town->buildings.count(buildID); upgradeNum++, buildID.advance(town->creatures.size()))