mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
Fix garrisons hero
This commit is contained in:
parent
7996123dfa
commit
92dcfd1f68
@ -444,7 +444,7 @@ void CTownRewardableBuilding::onHeroVisit(const CGHeroInstance *h) const
|
||||
cb->showBlockingDialog(&sd);
|
||||
};
|
||||
|
||||
if(!town->hasBuilt(bID))
|
||||
if(!town->hasBuilt(bID) || cb->isVisitCoveredByAnotherQuery(town, h))
|
||||
return;
|
||||
|
||||
if(!wasVisitedBefore(h))
|
||||
@ -496,7 +496,7 @@ void CTownRewardableBuilding::onHeroVisit(const CGHeroInstance *h) const
|
||||
if (!visitedRewards.empty())
|
||||
grantRewardWithMessage(visitedRewards[0]);
|
||||
else
|
||||
logMod->warn("No applicable message for visiting already visited object!");
|
||||
logMod->debug("No applicable message for visiting already visited object!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3614,7 +3614,7 @@ bool CGameHandler::buildStructure(ObjectInstanceID tid, BuildingID requestedID,
|
||||
if(t->visitingHero)
|
||||
objectVisited(t, t->visitingHero);
|
||||
if(t->garrisonHero)
|
||||
objectVisited(t, t->garrisonHero);
|
||||
visitCastleObjects(t, t->garrisonHero);
|
||||
|
||||
checkVictoryLossConditionsForPlayer(t->tempOwner);
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user