1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00

Merge pull request #3852 from SoundSSGood/dismiss-hero-fix

Dismiss hero with picked artifact. Fixed.
This commit is contained in:
Ivan Savenko 2024-04-28 21:46:01 +03:00 committed by GitHub
commit c5d7fd543a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -319,9 +319,12 @@ void CHeroWindow::update(const CGHeroInstance * hero, bool redrawNeeded)
void CHeroWindow::dismissCurrent()
{
CFunctionList<void()> ony = [=](){ close(); };
ony += [=](){ LOCPLINT->cb->dismissHero(curHero); };
LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[22], ony, nullptr);
LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[22], [this]()
{
arts->putBackPickedArtifact();
close();
LOCPLINT->cb->dismissHero(curHero);
}, nullptr);
}
void CHeroWindow::createBackpackWindow()