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

Revert the old code

This commit is contained in:
Piotr Wójcik 2016-09-16 22:01:21 +02:00
parent 29d6fb0f04
commit 28d859419c

View File

@ -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;
}