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/LoginReward.cs | 160 +++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/KKSG/LoginReward.cs (limited to 'Client/Assets/Scripts/XMainClient/KKSG/LoginReward.cs') diff --git a/Client/Assets/Scripts/XMainClient/KKSG/LoginReward.cs b/Client/Assets/Scripts/XMainClient/KKSG/LoginReward.cs new file mode 100644 index 00000000..e1255f8f --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/KKSG/LoginReward.cs @@ -0,0 +1,160 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Xml.Serialization; +using ProtoBuf; + +namespace KKSG +{ + [ProtoContract(Name = "LoginReward")] + [Serializable] + public class LoginReward : IExtensible + { + [ProtoMember(1, IsRequired = false, Name = "day", DataFormat = DataFormat.TwosComplement)] + public int day + { + get + { + return this._day ?? 0; + } + set + { + this._day = new int?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool daySpecified + { + get + { + return this._day != null; + } + set + { + bool flag = value == (this._day == null); + if (flag) + { + this._day = (value ? new int?(this.day) : 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, IsRequired = false, Name = "state", DataFormat = DataFormat.TwosComplement)] + public LoginRewardState state + { + get + { + return this._state ?? LoginRewardState.LOGINRS_CANNOT; + } + set + { + this._state = new LoginRewardState?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool stateSpecified + { + get + { + return this._state != null; + } + set + { + bool flag = value == (this._state == null); + if (flag) + { + this._state = (value ? new LoginRewardState?(this.state) : null); + } + } + } + + [ProtoMember(4, Name = "items", DataFormat = DataFormat.Default)] + public List items + { + get + { + return this._items; + } + } + + private int? _day; + + private uint? _itemID; + + private LoginRewardState? _state; + + private readonly List _items = new List(); + + private IExtension extensionObject; + + private bool ShouldSerializeday() + { + return this.daySpecified; + } + + private void Resetday() + { + this.daySpecified = false; + } + + private bool ShouldSerializeitemID() + { + return this.itemIDSpecified; + } + + private void ResetitemID() + { + this.itemIDSpecified = false; + } + + private bool ShouldSerializestate() + { + return this.stateSpecified; + } + + private void Resetstate() + { + this.stateSpecified = false; + } + + IExtension IExtensible.GetExtensionObject(bool createIfMissing) + { + return Extensible.GetExtensionObject(ref this.extensionObject, createIfMissing); + } + } +} -- cgit v1.1-26-g67d0