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

Fix dismissing hero from opening hero window in town window that is

opened in kindom overview window
This commit is contained in:
Ivan Savenko
2023-07-15 16:09:07 +03:00
parent 8129cbc514
commit 3c0037efca

View File

@@ -404,9 +404,6 @@ void CPlayerInterface::heroKilled(const CGHeroInstance* hero)
adventureInt->onHeroChanged(hero); adventureInt->onHeroChanged(hero);
localState->erasePath(hero); localState->erasePath(hero);
for (auto ki : GH.windows().findWindows<CKingdomInterface>())
ki->heroRemoved();
} }
void CPlayerInterface::heroVisit(const CGHeroInstance * visitor, const CGObjectInstance * visitedObj, bool start) void CPlayerInterface::heroVisit(const CGHeroInstance * visitor, const CGObjectInstance * visitedObj, bool start)
@@ -1489,6 +1486,9 @@ void CPlayerInterface::objectRemovedAfter()
// visiting or garrisoned hero removed - recreate castle window // visiting or garrisoned hero removed - recreate castle window
if (castleInt) if (castleInt)
openTownWindow(castleInt->town); openTownWindow(castleInt->town);
for (auto ki : GH.windows().findWindows<CKingdomInterface>())
ki->heroRemoved();
} }
void CPlayerInterface::playerBlocked(int reason, bool start) void CPlayerInterface::playerBlocked(int reason, bool start)