@@ -541,7 +541,7 @@ void TargetCondition::loadConditions(const JsonNode & source, bool exclusive, bo
CModHandler::parseIdentifier(keyValue.first, scope, type, identifier);
- item = itemFactory->createConfigurable(scope, type, identifier);
+ item = itemFactory->createConfigurable(keyValue.second.meta, type, identifier);
}
if(item)
@@ -250,7 +250,10 @@ void Timed::serializeJsonUnitEffect(JsonSerializeFormat & handler)
auto guard = handler.enterStruct(p.first);
const JsonNode & bonusNode = handler.getCurrent();
auto b = JsonUtils::parseBonus(bonusNode);
- bonus.push_back(b);
+ if (b)
+ bonus.push_back(b);
+ else
+ logMod->error("Failed to parse bonus '%s'!", p.first);