From 724a052e17eee1d00fcf3a5b2e682b6708aa2552 Mon Sep 17 00:00:00 2001 From: Spirtix Date: Sat, 5 Aug 2023 20:17:50 +0200 Subject: [PATCH] fix server error caused by blueprints --- src/Schema/BluePrintSpecification.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Schema/BluePrintSpecification.cs b/src/Schema/BluePrintSpecification.cs index f296fc2..6f235b7 100644 --- a/src/Schema/BluePrintSpecification.cs +++ b/src/Schema/BluePrintSpecification.cs @@ -10,6 +10,8 @@ public class BluePrintSpecification [XmlElement(ElementName = "BPIID", IsNullable = false)] public int BluePrintItemID { get; set; } + public bool ShouldSerializeBluePrintItemID() { return BluePrintItemID != 0; } + [XmlElement(ElementName = "IID", IsNullable = true)] public int? ItemID { get; set; } @@ -25,6 +27,8 @@ public class BluePrintSpecification [XmlElement(ElementName = "QTY", IsNullable = false)] public int Quantity { get; set; } - [XmlElement(ElementName = "ST", IsNullable = false)] - public SpecificationType SpecificationType { get; set; } + [XmlElement(ElementName = "ST", IsNullable = true)] + public SpecificationType? SpecificationType { get; set; } + + public bool ShouldSerializeSpecificationType() { return SpecificationType != null; } }