1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

IMarket suggestions

Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
This commit is contained in:
SoundSSGood
2024-08-17 22:06:48 +03:00
parent cd7ebea9e3
commit 58bb2b58e3
37 changed files with 128 additions and 94 deletions

View File

@@ -464,7 +464,7 @@ void CInteractableTownTooltip::init(const CGTownInstance * town)
std::vector<const CGTownInstance*> towns = LOCPLINT->cb->getTownsInfo(true);
for(auto & town : towns)
{
if(town->id == townId && town->builtBuildings.count(BuildingID::TAVERN))
if(town->id == townId && town->hasBuilt(BuildingID::TAVERN))
LOCPLINT->showTavernWindow(town, nullptr, QueryID::NONE);
}
}, [town]{
@@ -476,9 +476,9 @@ void CInteractableTownTooltip::init(const CGTownInstance * town)
std::vector<const CGTownInstance*> towns = LOCPLINT->cb->getTownsInfo(true);
for(auto & town : towns)
{
if(town->builtBuildings.count(BuildingID::MARKETPLACE))
if(town->hasBuilt(BuildingID::MARKETPLACE))
{
GH.windows().createAndPushWindow<CMarketWindow>(town, nullptr, town->id, nullptr, EMarketMode::RESOURCE_RESOURCE);
GH.windows().createAndPushWindow<CMarketWindow>(town, nullptr, nullptr, EMarketMode::RESOURCE_RESOURCE);
return;
}
}