diff --git a/lib/mapObjects/CRewardableObject.cpp b/lib/mapObjects/CRewardableObject.cpp index 0e671b028..c1f9d546c 100644 --- a/lib/mapObjects/CRewardableObject.cpp +++ b/lib/mapObjects/CRewardableObject.cpp @@ -181,7 +181,26 @@ void CRewardableObject::heroLevelUpDone(const CGHeroInstance *hero) const void CRewardableObject::blockingDialogAnswered(const CGHeroInstance *hero, ui32 answer) const { if(answer == 0) + { + switch (configuration.visitMode) + { + case Rewardable::VISIT_UNLIMITED: + case Rewardable::VISIT_BONUS: + case Rewardable::VISIT_HERO: + case Rewardable::VISIT_LIMITER: + { + // workaround for object with refusable reward not getting marked as visited + // TODO: better solution that would also work for player-visitable objects + if (!wasScouted(hero->getOwner())) + { + ChangeObjectVisitors cov(ChangeObjectVisitors::VISITOR_ADD_TEAM, id, hero->id); + cb->sendAndApply(&cov); + } + } + } + return; // player refused + } if(answer > 0 && answer-1 < configuration.info.size()) {