mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Fixed CID 1288863
This commit is contained in:
parent
4b2bbd0d76
commit
30663f15ea
@ -785,7 +785,12 @@ void CInfoBar::CVisibleInfo::loadGameStatus()
|
|||||||
//get amount of halls of each level
|
//get amount of halls of each level
|
||||||
std::vector<int> halls(4, 0);
|
std::vector<int> halls(4, 0);
|
||||||
for(auto town : LOCPLINT->towns)
|
for(auto town : LOCPLINT->towns)
|
||||||
halls[town->hallLevel()]++;
|
{
|
||||||
|
int hallLevel = town->hallLevel();
|
||||||
|
//negative value means no village hall, unlikely but possible
|
||||||
|
if(hallLevel >= 0)
|
||||||
|
halls.at(hallLevel)++;
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<PlayerColor> allies, enemies;
|
std::vector<PlayerColor> allies, enemies;
|
||||||
|
|
||||||
|
@ -370,7 +370,6 @@ CGTownInstance::EFortLevel CGTownInstance::fortLevel() const //0 - none, 1 - for
|
|||||||
|
|
||||||
int CGTownInstance::hallLevel() const // -1 - none, 0 - village, 1 - town, 2 - city, 3 - capitol
|
int CGTownInstance::hallLevel() const // -1 - none, 0 - village, 1 - town, 2 - city, 3 - capitol
|
||||||
{
|
{
|
||||||
|
|
||||||
if (hasBuilt(BuildingID::CAPITOL))
|
if (hasBuilt(BuildingID::CAPITOL))
|
||||||
return 3;
|
return 3;
|
||||||
if (hasBuilt(BuildingID::CITY_HALL))
|
if (hasBuilt(BuildingID::CITY_HALL))
|
||||||
@ -381,6 +380,7 @@ int CGTownInstance::hallLevel() const // -1 - none, 0 - village, 1 - town, 2 - c
|
|||||||
return 0;
|
return 0;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CGTownInstance::mageGuildLevel() const
|
int CGTownInstance::mageGuildLevel() const
|
||||||
{
|
{
|
||||||
if (hasBuilt(BuildingID::MAGES_GUILD_5))
|
if (hasBuilt(BuildingID::MAGES_GUILD_5))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user