Add saftey to code

This commit is contained in:
Chomp 2021-09-18 22:30:32 +01:00
parent 70f5907630
commit 8419a47988

View File

@ -456,7 +456,10 @@ namespace QuestValidator
CheckValuesMatch(availableForFinishItem._props.parentId, liveFinishItem._props.parentId, "AvailableForFinish parentId mismatch", availableForFinishItem._props.id);
// check AvailableForFinish resetOnSessionEnd
if (availableForFinishItem._props.resetOnSessionEnd.HasValue && liveFinishItem._props.resetOnSessionEnd.HasValue)
{
CheckValuesMatch(availableForFinishItem._props.resetOnSessionEnd.Value, liveFinishItem._props.resetOnSessionEnd.Value, "AvailableForFinish resetOnSessionEnd value mismatch", availableForFinishItem._props.id);
}
// check AvailableForFinish target
CheckValuesMatch(Convert.ToString(availableForFinishItem._props.target), Convert.ToString(liveFinishItem._props.target), "AvailableForFinish target value mismatch", availableForFinishItem._props.id);