From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Scripts/XMainClient/KKSG/ItemJadeSingle.cs | 128 +++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/KKSG/ItemJadeSingle.cs (limited to 'Client/Assets/Scripts/XMainClient/KKSG/ItemJadeSingle.cs') diff --git a/Client/Assets/Scripts/XMainClient/KKSG/ItemJadeSingle.cs b/Client/Assets/Scripts/XMainClient/KKSG/ItemJadeSingle.cs new file mode 100644 index 00000000..509f6076 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/KKSG/ItemJadeSingle.cs @@ -0,0 +1,128 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Xml.Serialization; +using ProtoBuf; + +namespace KKSG +{ + [ProtoContract(Name = "ItemJadeSingle")] + [Serializable] + public class ItemJadeSingle : IExtensible + { + [ProtoMember(1, IsRequired = false, Name = "SlotPos", DataFormat = DataFormat.TwosComplement)] + public uint SlotPos + { + get + { + return this._SlotPos ?? 0u; + } + set + { + this._SlotPos = new uint?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool SlotPosSpecified + { + get + { + return this._SlotPos != null; + } + set + { + bool flag = value == (this._SlotPos == null); + if (flag) + { + this._SlotPos = (value ? new uint?(this.SlotPos) : null); + } + } + } + + [ProtoMember(2, IsRequired = false, Name = "ItemId", DataFormat = DataFormat.TwosComplement)] + public uint ItemId + { + get + { + return this._ItemId ?? 0u; + } + set + { + this._ItemId = new uint?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool ItemIdSpecified + { + get + { + return this._ItemId != null; + } + set + { + bool flag = value == (this._ItemId == null); + if (flag) + { + this._ItemId = (value ? new uint?(this.ItemId) : null); + } + } + } + + [ProtoMember(3, Name = "AttrId", DataFormat = DataFormat.TwosComplement)] + public List AttrId + { + get + { + return this._AttrId; + } + } + + [ProtoMember(4, Name = "AttrValue", DataFormat = DataFormat.TwosComplement)] + public List AttrValue + { + get + { + return this._AttrValue; + } + } + + private uint? _SlotPos; + + private uint? _ItemId; + + private readonly List _AttrId = new List(); + + private readonly List _AttrValue = new List(); + + private IExtension extensionObject; + + private bool ShouldSerializeSlotPos() + { + return this.SlotPosSpecified; + } + + private void ResetSlotPos() + { + this.SlotPosSpecified = false; + } + + private bool ShouldSerializeItemId() + { + return this.ItemIdSpecified; + } + + private void ResetItemId() + { + this.ItemIdSpecified = false; + } + + IExtension IExtensible.GetExtensionObject(bool createIfMissing) + { + return Extensible.GetExtensionObject(ref this.extensionObject, createIfMissing); + } + } +} -- cgit v1.1-26-g67d0