Explorar o código

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

Dydzio %!s(int64=2) %!d(string=hai) anos
pai
achega
f8fbafff2f
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      client/CPlayerInterface.cpp

+ 7 - 0
client/CPlayerInterface.cpp

@@ -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);
 	}