1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

Pass pointer to actual caller in showBlockingDialog callWith

Fixes activation of all rewardable buildings in town on blocking dialog
answer
This commit is contained in:
Ivan Savenko
2024-09-04 15:14:56 +00:00
parent d34b4a141e
commit b09d9d501b
17 changed files with 28 additions and 31 deletions

View File

@@ -301,12 +301,6 @@ void CGTownInstance::setOwner(const PlayerColor & player) const
cb->setOwner(this, player);
}
void CGTownInstance::blockingDialogAnswered(const CGHeroInstance *hero, int32_t answer) const
{
for (auto building : rewardableBuildings)
building.second->blockingDialogAnswered(hero, answer); // FIXME: why call for every building?
}
void CGTownInstance::onHeroVisit(const CGHeroInstance * h) const
{
if(cb->gameState()->getPlayerRelations( getOwner(), h->getOwner() ) == PlayerRelations::ENEMIES)