From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../XMainClient/Guild/XGuildRedPacketLog.cs | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/Guild/XGuildRedPacketLog.cs (limited to 'Client/Assets/Scripts/XMainClient/Guild/XGuildRedPacketLog.cs') diff --git a/Client/Assets/Scripts/XMainClient/Guild/XGuildRedPacketLog.cs b/Client/Assets/Scripts/XMainClient/Guild/XGuildRedPacketLog.cs new file mode 100644 index 00000000..7ba1f2bc --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/Guild/XGuildRedPacketLog.cs @@ -0,0 +1,58 @@ +using System; +using KKSG; +using XMainClient.UI; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class XGuildRedPacketLog : ILogData, IComparable + { + public ulong uid; + + public string name; + + public int itemid; + + public int itemcount; + + public int time; + + public void SetData(GetGuildBonusInfo data) + { + this.uid = data.roleID; + this.name = data.roleName; + this.itemcount = (int)data.getNum; + this.time = (int)data.getTime; + } + + public string GetContent() + { + return XStringDefineProxy.GetString("GUILD_REDPACKET_LOG", new object[] + { + XLabelSymbolHelper.FormatName(this.name, this.uid, "00ffff"), + XLabelSymbolHelper.FormatCostWithIcon(this.itemcount, (ItemEnum)this.itemid) + }); + } + + public string GetTime() + { + return XSingleton.singleton.TimeAgoFormatString(this.time); + } + + public int CompareTo(ILogData otherLog) + { + XGuildRedPacketLog xguildRedPacketLog = otherLog as XGuildRedPacketLog; + bool flag = xguildRedPacketLog.time == this.time; + int result; + if (flag) + { + result = this.uid.CompareTo(xguildRedPacketLog.uid); + } + else + { + result = this.time.CompareTo(xguildRedPacketLog.time); + } + return result; + } + } +} -- cgit v1.1-26-g67d0