mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-14 02:33:51 +02:00
Revert the old code
This commit is contained in:
parent
29d6fb0f04
commit
28d859419c
@ -317,11 +317,17 @@ bool CRewardableObject::wasVisited(PlayerColor player) const
|
|||||||
case VISIT_UNLIMITED:
|
case VISIT_UNLIMITED:
|
||||||
case VISIT_BONUS:
|
case VISIT_BONUS:
|
||||||
return false;
|
return false;
|
||||||
case VISIT_ONCE:
|
case VISIT_ONCE: // FIXME: hide this info deeper and return same as player?
|
||||||
case VISIT_PLAYER:
|
// for (auto & visit : info)
|
||||||
|
// {
|
||||||
|
// if (visit.numOfGrants != 0)
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
return vstd::contains(cb->getPlayer(player)->visitedObjects, ObjectInstanceID(id));
|
return vstd::contains(cb->getPlayer(player)->visitedObjects, ObjectInstanceID(id));
|
||||||
case VISIT_HERO:
|
case VISIT_HERO:
|
||||||
return false;
|
return false;
|
||||||
|
case VISIT_PLAYER:
|
||||||
|
return vstd::contains(cb->getPlayer(player)->visitedObjects, ObjectInstanceID(id));
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user