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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user