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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user