sodoff/src/Schema/ItemDataRelationship.cs
Spirtix cf931e4f3a mission deep copy
.net 8 deprecated BinaryFormatter serialization
apart from that proper deep copies are ~10x faster
2025-06-26 21:41:50 +02:00

33 lines
748 B
C#

using System.Xml.Serialization;
namespace sodoff.Schema;
[XmlRoot(ElementName = "IRE", Namespace = "")]
[Serializable]
public class ItemDataRelationship {
public ItemDataRelationship() {}
public ItemDataRelationship(ItemDataRelationship other) {
Type = other.Type;
ItemId = other.ItemId;
Weight = other.Weight;
Quantity = other.Quantity;
MaxQuantity = other.MaxQuantity;
}
[XmlElement(ElementName = "t")]
public string Type;
[XmlElement(ElementName = "id")]
public int ItemId;
[XmlElement(ElementName = "wt")]
public int Weight;
[XmlElement(ElementName = "q")]
public int Quantity;
[XmlElement(ElementName = "mxq")]
public int? MaxQuantity;
}