소스 검색

Do not build pseudo-buildings explicitly with events

Dydzio 6 년 전
부모
커밋
2f15ca9406
2개의 변경된 파일13개의 추가작업 그리고 13개의 파일을 삭제
  1. 12 12
      lib/mapping/MapFormatH3M.cpp
  2. 1 1
      server/CGameHandler.cpp

+ 12 - 12
lib/mapping/MapFormatH3M.cpp

@@ -2104,19 +2104,19 @@ std::set<BuildingID> CMapLoaderH3M::convertBuildings(const std::set<BuildingID>
 	{
 		//village hall is always present
 		ret.insert(BuildingID::VILLAGE_HALL);
-	}
 
-	if(ret.find(BuildingID::CITY_HALL) != ret.end())
-	{
-		ret.insert(BuildingID::EXTRA_CITY_HALL);
-	}
-	if(ret.find(BuildingID::TOWN_HALL) != ret.end())
-	{
-		ret.insert(BuildingID::EXTRA_TOWN_HALL);
-	}
-	if(ret.find(BuildingID::CAPITOL) != ret.end())
-	{
-		ret.insert(BuildingID::EXTRA_CAPITOL);
+		if(ret.find(BuildingID::CITY_HALL) != ret.end())
+		{
+			ret.insert(BuildingID::EXTRA_CITY_HALL);
+		}
+		if(ret.find(BuildingID::TOWN_HALL) != ret.end())
+		{
+			ret.insert(BuildingID::EXTRA_TOWN_HALL);
+		}
+		if(ret.find(BuildingID::CAPITOL) != ret.end())
+		{
+			ret.insert(BuildingID::EXTRA_CAPITOL);
+		}
 	}
 
 	return ret;

+ 1 - 1
server/CGameHandler.cpp

@@ -3009,7 +3009,7 @@ bool CGameHandler::buildStructure(ObjectInstanceID tid, BuildingID requestedID,
 	if (!t)
 		COMPLAIN_RETF("No such town (ID=%s)!", tid);
 	if (!t->town->buildings.count(requestedID))
-		COMPLAIN_RETF("Town of faction %s does not have info about building ID=%s!", t->town->faction->name % tid);
+		COMPLAIN_RETF("Town of faction %s does not have info about building ID=%s!", t->town->faction->name % requestedID);
 	if (t->hasBuilt(requestedID))
 		COMPLAIN_RETF("Building %s is already built in %s", t->town->buildings.at(requestedID)->Name() % t->name);