1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

Do not visit building on forced construction, e.g. from events

This commit is contained in:
Ivan Savenko 2024-09-11 16:08:49 +00:00
parent 40dff8ac17
commit 76ee49f4ec

View File

@ -2142,10 +2142,13 @@ bool CGameHandler::buildStructure(ObjectInstanceID tid, BuildingID requestedID,
// now when everything is built - reveal tiles for lookout tower // now when everything is built - reveal tiles for lookout tower
changeFogOfWar(t->getSightCenter(), t->getSightRadius(), t->getOwner(), ETileVisibility::REVEALED); changeFogOfWar(t->getSightCenter(), t->getSightRadius(), t->getOwner(), ETileVisibility::REVEALED);
if(t->garrisonHero) //garrison hero first - consistent with original H3 Mana Vortex and Battle Scholar Academy levelup windows order if (!force)
objectVisited(t, t->garrisonHero); {
if(t->visitingHero) if(t->garrisonHero) //garrison hero first - consistent with original H3 Mana Vortex and Battle Scholar Academy levelup windows order
objectVisited(t, t->visitingHero); objectVisited(t, t->garrisonHero);
if(t->visitingHero)
objectVisited(t, t->visitingHero);
}
checkVictoryLossConditionsForPlayer(t->tempOwner); checkVictoryLossConditionsForPlayer(t->tempOwner);
return true; return true;