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/CustomBattleResult.cs | 277 +++++++++++++++++++++ 1 file changed, 277 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/KKSG/CustomBattleResult.cs (limited to 'Client/Assets/Scripts/XMainClient/KKSG/CustomBattleResult.cs') diff --git a/Client/Assets/Scripts/XMainClient/KKSG/CustomBattleResult.cs b/Client/Assets/Scripts/XMainClient/KKSG/CustomBattleResult.cs new file mode 100644 index 00000000..6abc8260 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/KKSG/CustomBattleResult.cs @@ -0,0 +1,277 @@ +using System; +using System.ComponentModel; +using System.Xml.Serialization; +using ProtoBuf; + +namespace KKSG +{ + [ProtoContract(Name = "CustomBattleResult")] + [Serializable] + public class CustomBattleResult : IExtensible + { + [ProtoMember(1, IsRequired = false, Name = "result", DataFormat = DataFormat.TwosComplement)] + public PkResultType result + { + get + { + return this._result ?? PkResultType.PkResult_Win; + } + set + { + this._result = new PkResultType?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool resultSpecified + { + get + { + return this._result != null; + } + set + { + bool flag = value == (this._result == null); + if (flag) + { + this._result = (value ? new PkResultType?(this.result) : null); + } + } + } + + [ProtoMember(2, IsRequired = false, Name = "type", DataFormat = DataFormat.TwosComplement)] + public CustomBattleType type + { + get + { + return this._type ?? CustomBattleType.CustomBattle_PK_Normal; + } + set + { + this._type = new CustomBattleType?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool typeSpecified + { + get + { + return this._type != null; + } + set + { + bool flag = value == (this._type == null); + if (flag) + { + this._type = (value ? new CustomBattleType?(this.type) : null); + } + } + } + + [ProtoMember(3, IsRequired = false, Name = "point", DataFormat = DataFormat.TwosComplement)] + public int point + { + get + { + return this._point ?? 0; + } + set + { + this._point = new int?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool pointSpecified + { + get + { + return this._point != null; + } + set + { + bool flag = value == (this._point == null); + if (flag) + { + this._point = (value ? new int?(this.point) : null); + } + } + } + + [ProtoMember(4, IsRequired = false, Name = "rank", DataFormat = DataFormat.TwosComplement)] + public int rank + { + get + { + return this._rank ?? 0; + } + set + { + this._rank = new int?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool rankSpecified + { + get + { + return this._rank != null; + } + set + { + bool flag = value == (this._rank == null); + if (flag) + { + this._rank = (value ? new int?(this.rank) : null); + } + } + } + + [ProtoMember(5, IsRequired = false, Name = "fightgroup", DataFormat = DataFormat.TwosComplement)] + public uint fightgroup + { + get + { + return this._fightgroup ?? 0u; + } + set + { + this._fightgroup = new uint?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool fightgroupSpecified + { + get + { + return this._fightgroup != null; + } + set + { + bool flag = value == (this._fightgroup == null); + if (flag) + { + this._fightgroup = (value ? new uint?(this.fightgroup) : null); + } + } + } + + [ProtoMember(6, IsRequired = false, Name = "ismvp", DataFormat = DataFormat.Default)] + public bool ismvp + { + get + { + return this._ismvp ?? false; + } + set + { + this._ismvp = new bool?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool ismvpSpecified + { + get + { + return this._ismvp != null; + } + set + { + bool flag = value == (this._ismvp == null); + if (flag) + { + this._ismvp = (value ? new bool?(this.ismvp) : null); + } + } + } + + private PkResultType? _result; + + private CustomBattleType? _type; + + private int? _point; + + private int? _rank; + + private uint? _fightgroup; + + private bool? _ismvp; + + private IExtension extensionObject; + + private bool ShouldSerializeresult() + { + return this.resultSpecified; + } + + private void Resetresult() + { + this.resultSpecified = false; + } + + private bool ShouldSerializetype() + { + return this.typeSpecified; + } + + private void Resettype() + { + this.typeSpecified = false; + } + + private bool ShouldSerializepoint() + { + return this.pointSpecified; + } + + private void Resetpoint() + { + this.pointSpecified = false; + } + + private bool ShouldSerializerank() + { + return this.rankSpecified; + } + + private void Resetrank() + { + this.rankSpecified = false; + } + + private bool ShouldSerializefightgroup() + { + return this.fightgroupSpecified; + } + + private void Resetfightgroup() + { + this.fightgroupSpecified = false; + } + + private bool ShouldSerializeismvp() + { + return this.ismvpSpecified; + } + + private void Resetismvp() + { + this.ismvpSpecified = false; + } + + IExtension IExtensible.GetExtensionObject(bool createIfMissing) + { + return Extensible.GetExtensionObject(ref this.extensionObject, createIfMissing); + } + } +} -- cgit v1.1-26-g67d0