From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../XMainClient/Guild/XGuildRedPackageSendBrief.cs | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/Guild/XGuildRedPackageSendBrief.cs (limited to 'Client/Assets/Scripts/XMainClient/Guild/XGuildRedPackageSendBrief.cs') diff --git a/Client/Assets/Scripts/XMainClient/Guild/XGuildRedPackageSendBrief.cs b/Client/Assets/Scripts/XMainClient/Guild/XGuildRedPackageSendBrief.cs new file mode 100644 index 00000000..f5de4284 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/Guild/XGuildRedPackageSendBrief.cs @@ -0,0 +1,56 @@ +using System; +using KKSG; +using UnityEngine; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class XGuildRedPackageSendBrief : IComparable + { + public uint typeID; + + public ulong uid; + + public uint itemid; + + public string senderName; + + public uint fetchedCount; + + public uint maxCount; + + public float endTime; + + public BonusSender senderType; + + public GuildBonusTable.RowData bonusInfo; + + public void SendData(GuildBonusAppear data) + { + this.typeID = data.bonusContentType; + this.uid = (ulong)data.bonusID; + this.itemid = data.bonusType; + this.senderName = data.sourceName; + this.fetchedCount = data.alreadyGetPeopleNum; + this.maxCount = data.maxPeopleNum; + this.endTime = Time.time + data.leftOpenTime; + this.bonusInfo = XGuildRedPacketDocument.GetRedPacketConfig(this.typeID); + this.senderType = ((XSingleton.singleton.XPlayerData.RoleID == data.sourceID) ? BonusSender.Bonus_Self : BonusSender.Bonus_Other); + } + + public int CompareTo(XGuildRedPackageSendBrief other) + { + bool flag = this.senderType == other.senderType; + int result; + if (flag) + { + result = this.endTime.CompareTo(other.endTime); + } + else + { + result = this.senderType.CompareTo(other.senderType); + } + return result; + } + } +} -- cgit v1.1-26-g67d0