diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/Guild/XGuildRedPackageSendBrief.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/Guild/XGuildRedPackageSendBrief.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/Guild/XGuildRedPackageSendBrief.cs | 56 |
1 files changed, 56 insertions, 0 deletions
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<XGuildRedPackageSendBrief>
+ {
+ 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<XAttributeMgr>.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;
+ }
+ }
+}
|