From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Assets/Scripts/XMainClient/KKSG/PkRoleInfo.cs | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/KKSG/PkRoleInfo.cs (limited to 'Client/Assets/Scripts/XMainClient/KKSG/PkRoleInfo.cs') diff --git a/Client/Assets/Scripts/XMainClient/KKSG/PkRoleInfo.cs b/Client/Assets/Scripts/XMainClient/KKSG/PkRoleInfo.cs new file mode 100644 index 00000000..4b1ada0d --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/KKSG/PkRoleInfo.cs @@ -0,0 +1,94 @@ +using System; +using System.ComponentModel; +using System.Xml.Serialization; +using ProtoBuf; + +namespace KKSG +{ + [ProtoContract(Name = "PkRoleInfo")] + [Serializable] + public class PkRoleInfo : IExtensible + { + [ProtoMember(1, IsRequired = false, Name = "pkrec", DataFormat = DataFormat.Default)] + [DefaultValue(null)] + public PkRoleRec pkrec + { + get + { + return this._pkrec; + } + set + { + this._pkrec = value; + } + } + + [ProtoMember(2, IsRequired = false, Name = "rolebrief", DataFormat = DataFormat.Default)] + [DefaultValue(null)] + public RoleSmallInfo rolebrief + { + get + { + return this._rolebrief; + } + set + { + this._rolebrief = value; + } + } + + [ProtoMember(3, IsRequired = false, Name = "serverid", DataFormat = DataFormat.TwosComplement)] + public uint serverid + { + get + { + return this._serverid ?? 0u; + } + set + { + this._serverid = new uint?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool serveridSpecified + { + get + { + return this._serverid != null; + } + set + { + bool flag = value == (this._serverid == null); + if (flag) + { + this._serverid = (value ? new uint?(this.serverid) : null); + } + } + } + + private PkRoleRec _pkrec = null; + + private RoleSmallInfo _rolebrief = null; + + private uint? _serverid; + + private IExtension extensionObject; + + private bool ShouldSerializeserverid() + { + return this.serveridSpecified; + } + + private void Resetserverid() + { + this.serveridSpecified = false; + } + + IExtension IExtensible.GetExtensionObject(bool createIfMissing) + { + return Extensible.GetExtensionObject(ref this.extensionObject, createIfMissing); + } + } +} -- cgit v1.1-26-g67d0