From 2f15ca9406af6d6b36ba49f178c22f26d4d632d0 Mon Sep 17 00:00:00 2001 From: Dydzio Date: Tue, 4 Jun 2019 22:29:07 +0200 Subject: [PATCH] Do not build pseudo-buildings explicitly with events --- lib/mapping/MapFormatH3M.cpp | 24 ++++++++++++------------ server/CGameHandler.cpp | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/mapping/MapFormatH3M.cpp b/lib/mapping/MapFormatH3M.cpp index 4f75499ef..69441f087 100644 --- a/lib/mapping/MapFormatH3M.cpp +++ b/lib/mapping/MapFormatH3M.cpp @@ -2104,19 +2104,19 @@ std::set CMapLoaderH3M::convertBuildings(const std::set { //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; diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index 550932453..ecabe1ebd 100644 --- a/server/CGameHandler.cpp +++ b/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);