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/CampRoleRecord.cs | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/KKSG/CampRoleRecord.cs (limited to 'Client/Assets/Scripts/XMainClient/KKSG/CampRoleRecord.cs') diff --git a/Client/Assets/Scripts/XMainClient/KKSG/CampRoleRecord.cs b/Client/Assets/Scripts/XMainClient/KKSG/CampRoleRecord.cs new file mode 100644 index 00000000..40ac91c4 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/KKSG/CampRoleRecord.cs @@ -0,0 +1,78 @@ +using System; +using System.ComponentModel; +using System.Xml.Serialization; +using ProtoBuf; + +namespace KKSG +{ + [ProtoContract(Name = "CampRoleRecord")] + [Serializable] + public class CampRoleRecord : IExtensible + { + [ProtoMember(1, IsRequired = false, Name = "lastCampID", DataFormat = DataFormat.TwosComplement)] + public uint lastCampID + { + get + { + return this._lastCampID ?? 0u; + } + set + { + this._lastCampID = new uint?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool lastCampIDSpecified + { + get + { + return this._lastCampID != null; + } + set + { + bool flag = value == (this._lastCampID == null); + if (flag) + { + this._lastCampID = (value ? new uint?(this.lastCampID) : null); + } + } + } + + [ProtoMember(2, IsRequired = false, Name = "taskInfo", DataFormat = DataFormat.Default)] + [DefaultValue(null)] + public CampTaskInfo2DB taskInfo + { + get + { + return this._taskInfo; + } + set + { + this._taskInfo = value; + } + } + + private uint? _lastCampID; + + private CampTaskInfo2DB _taskInfo = null; + + private IExtension extensionObject; + + private bool ShouldSerializelastCampID() + { + return this.lastCampIDSpecified; + } + + private void ResetlastCampID() + { + this.lastCampIDSpecified = false; + } + + IExtension IExtensible.GetExtensionObject(bool createIfMissing) + { + return Extensible.GetExtensionObject(ref this.extensionObject, createIfMissing); + } + } +} -- cgit v1.1-26-g67d0