mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
Implemented tracking of objects destroyed by players
This commit is contained in:
@ -1420,10 +1420,7 @@ bool CGameState::checkForVictory(const PlayerColor & player, const EventConditio
|
||||
{
|
||||
if (condition.objectID != ObjectInstanceID::NONE) // mode A - destroy specific object of this type
|
||||
{
|
||||
if(const auto * hero = getHero(condition.objectID))
|
||||
return boost::range::find(gs->map->heroesOnMap, hero) == gs->map->heroesOnMap.end();
|
||||
else
|
||||
return getObj(condition.objectID) == nullptr;
|
||||
return p->destroyedObjects.count(condition.objectID);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user