From 28d859419c80d710805ab39ba592674fca07efa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Fri, 16 Sep 2016 22:01:21 +0200 Subject: [PATCH] Revert the old code --- lib/mapObjects/CRewardableObject.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/mapObjects/CRewardableObject.cpp b/lib/mapObjects/CRewardableObject.cpp index df56f7103..69286d5b1 100644 --- a/lib/mapObjects/CRewardableObject.cpp +++ b/lib/mapObjects/CRewardableObject.cpp @@ -317,11 +317,17 @@ bool CRewardableObject::wasVisited(PlayerColor player) const case VISIT_UNLIMITED: case VISIT_BONUS: return false; - case VISIT_ONCE: - case VISIT_PLAYER: + case VISIT_ONCE: // FIXME: hide this info deeper and return same as player? +// for (auto & visit : info) +// { +// if (visit.numOfGrants != 0) +// return true; +// } return vstd::contains(cb->getPlayer(player)->visitedObjects, ObjectInstanceID(id)); case VISIT_HERO: return false; + case VISIT_PLAYER: + return vstd::contains(cb->getPlayer(player)->visitedObjects, ObjectInstanceID(id)); default: return false; }