1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

Merge pull request #2524 from Nordsoft91/reward_canrefuse

[1.3.1] Reward can refuse fix
This commit is contained in:
Ivan Savenko 2023-08-09 20:06:26 +03:00 committed by GitHub
commit 1f9ee6aa38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -356,6 +356,9 @@ void CTownRewardableBuilding::heroLevelUpDone(const CGHeroInstance *hero) const
void CTownRewardableBuilding::blockingDialogAnswered(const CGHeroInstance *hero, ui32 answer) const
{
if(answer == 0)
return; // player refused
if(visitors.find(hero->id) != visitors.end())
return; // query not for this building