Răsfoiți Sursa

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

Dydzio 2 ani în urmă
părinte
comite
f8fbafff2f
1 a modificat fișierele cu 7 adăugiri și 0 ștergeri
  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);
 	}