1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-22 00:27:58 +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

@@ -88,7 +88,7 @@ void CGMine::onHeroVisit( const CGHeroInstance * h ) const
BlockingDialog ynd(true,false);
ynd.player = h->tempOwner;
ynd.text.appendLocalString(EMetaText::ADVOB_TXT, isAbandoned() ? 84 : 187);
cb->showBlockingDialog(&ynd);
cb->showBlockingDialog(this, &ynd);
return;
}
@@ -310,7 +310,7 @@ void CGResource::onHeroVisit( const CGHeroInstance * h ) const
BlockingDialog ynd(true,false);
ynd.player = h->getOwner();
ynd.text = message;
cb->showBlockingDialog(&ynd);
cb->showBlockingDialog(this, &ynd);
}
else
{
@@ -879,7 +879,7 @@ void CGArtifact::onHeroVisit(const CGHeroInstance * h) const
ynd.text.replaceRawString(getArmyDescription());
ynd.text.replaceLocalString(EMetaText::GENERAL_TXT, 43); // creatures
}
cb->showBlockingDialog(&ynd);
cb->showBlockingDialog(this, &ynd);
}
break;
case Obj::SPELL_SCROLL:
@@ -889,7 +889,7 @@ void CGArtifact::onHeroVisit(const CGHeroInstance * h) const
BlockingDialog ynd(true,false);
ynd.player = h->getOwner();
ynd.text = message;
cb->showBlockingDialog(&ynd);
cb->showBlockingDialog(this, &ynd);
}
else
blockingDialogAnswered(h, true);