1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Fix github #2335 - town garrison not updating in info box

This commit is contained in:
Dydzio
2023-07-16 10:18:43 +02:00
parent dbfcb5a749
commit f8fbafff2f

View File

@@ -572,7 +572,14 @@ void CPlayerInterface::garrisonsChanged(std::vector<const CGObjectInstance *> ob
auto * town = dynamic_cast<const CGTownInstance*>(object);
if (hero)
{
adventureInt->onHeroChanged(hero);
if(hero->inTownGarrison)
{
adventureInt->onTownChanged(hero->visitedTown);
}
}
if (town)
adventureInt->onTownChanged(town);
}