mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Fixed CID 1288863
This commit is contained in:
		| @@ -785,7 +785,12 @@ void CInfoBar::CVisibleInfo::loadGameStatus() | ||||
| 	//get amount of halls of each level | ||||
| 	std::vector<int> halls(4, 0); | ||||
| 	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; | ||||
|  | ||||
|   | ||||
| @@ -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 | ||||
| { | ||||
|  | ||||
| 	if (hasBuilt(BuildingID::CAPITOL)) | ||||
| 		return 3; | ||||
| 	if (hasBuilt(BuildingID::CITY_HALL)) | ||||
| @@ -381,6 +380,7 @@ int CGTownInstance::hallLevel() const // -1 - none, 0 - village, 1 - town, 2 - c | ||||
| 		return 0; | ||||
| 	return -1; | ||||
| } | ||||
|  | ||||
| int CGTownInstance::mageGuildLevel() const | ||||
| { | ||||
| 	if (hasBuilt(BuildingID::MAGES_GUILD_5)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user