mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-07 23:33:15 +02:00
Implemented tracking of objects destroyed by players
This commit is contained in:
@@ -124,20 +124,6 @@ TurnTimerInfo CGameInfoCallback::getPlayerTurnTime(PlayerColor color) const
|
||||
return TurnTimerInfo{};
|
||||
}
|
||||
|
||||
const CGObjectInstance * CGameInfoCallback::getObjByQuestIdentifier(ObjectInstanceID identifier) const
|
||||
{
|
||||
if(gs->map->questIdentifierToId.empty())
|
||||
{
|
||||
//assume that it is VCMI map and quest identifier equals instance identifier
|
||||
return getObj(identifier, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_RET_VAL_IF(!vstd::contains(gs->map->questIdentifierToId, identifier.getNum()), "There is no object with such quest identifier!", nullptr);
|
||||
return getObj(gs->map->questIdentifierToId[identifier.getNum()]);
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user