1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

more cc renaming; BuildingID get level index and upgrades; Creatures renaming

This commit is contained in:
Mircea TheHonestCTO
2025-08-17 12:24:35 +02:00
parent bf3d5627e0
commit a4a9927e9e
15 changed files with 122 additions and 121 deletions

View File

@@ -170,7 +170,7 @@ void CBuildingRect::showPopupWindow(const Point & cursorPosition)
}
else
{
int level = BuildingID::getLevelFromDwelling(bid);
int level = BuildingID::getLevelIndexFromDwelling(bid);
ENGINE->windows().createAndPushWindow<CDwellingInfoBox>(parent->pos.x+parent->pos.w / 2, parent->pos.y+parent->pos.h /2, town, level);
}
}
@@ -246,7 +246,7 @@ std::string CBuildingRect::getSubtitle()//hover text for building
return town->getTown()->buildings.at(getBuilding()->bid)->getNameTranslated();
else//dwellings - recruit %creature%
{
int level = BuildingID::getLevelFromDwelling(getBuilding()->bid);
int level = BuildingID::getLevelIndexFromDwelling(getBuilding()->bid);
auto & availableCreatures = town->creatures[level].second;
if(availableCreatures.size())
{
@@ -889,7 +889,7 @@ bool CCastleBuildings::buildingTryActivateCustomUI(BuildingID buildingToTest, Bu
if (buildingToTest.isDwelling())
{
enterDwelling((BuildingID::getLevelFromDwelling(buildingToTest)));
enterDwelling((BuildingID::getLevelIndexFromDwelling(buildingToTest)));
return true;
}
else