mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-25 00:37:24 +02:00
Skip unresolved identifier from list of allowed heroes/artifacts in vmap
This commit is contained in:
@ -135,9 +135,16 @@ void JsonSerializeFormat::readLICPart(const JsonNode & part, const JsonSerialize
|
|||||||
{
|
{
|
||||||
const std::string & identifier = index.String();
|
const std::string & identifier = index.String();
|
||||||
|
|
||||||
const si32 rawId = decoder(identifier);
|
try
|
||||||
if(rawId != -1)
|
{
|
||||||
|
const si32 rawId = decoder(identifier);
|
||||||
value.insert(rawId);
|
value.insert(rawId);
|
||||||
|
}
|
||||||
|
catch (const IdentifierResolutionException & e)
|
||||||
|
{
|
||||||
|
// downgrade exception to warning (printed as part of exception generation
|
||||||
|
// this is usually caused by loading allowed heroes / artifacts list from vmap's
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user