1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Unify rewardable map object and town building code

This commit is contained in:
Ivan Savenko
2024-09-27 15:40:09 +00:00
parent 072aa8aadd
commit f2c20b54d0
7 changed files with 226 additions and 264 deletions

View File

@ -1194,7 +1194,7 @@ void CGameHandler::visitCastleObjects(const CGTownInstance * t, std::vector<cons
for (auto & building : t->rewardableBuildings)
{
if (!t->town->buildings.at(building.first)->manualHeroVisit)
if (!t->town->buildings.at(building.first)->manualHeroVisit && t->hasBuilt(building.first))
buildingsToVisit.push_back(building.first);
}