From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../XMainClient/DragonGuildLivenessRecord.cs | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/DragonGuildLivenessRecord.cs (limited to 'Client/Assets/Scripts/XMainClient/DragonGuildLivenessRecord.cs') diff --git a/Client/Assets/Scripts/XMainClient/DragonGuildLivenessRecord.cs b/Client/Assets/Scripts/XMainClient/DragonGuildLivenessRecord.cs new file mode 100644 index 00000000..40b5beca --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/DragonGuildLivenessRecord.cs @@ -0,0 +1,74 @@ +using System; +using KKSG; +using XMainClient.UI; +using XUtliPoolLib; + +namespace XMainClient +{ + public class DragonGuildLivenessRecord : LoopItemData + { + public string ShowString + { + get + { + return this.m_showString; + } + } + + public string ShowTimeStr + { + get + { + return this.m_showTimeStr; + } + } + + public string Name + { + get + { + return this.m_name; + } + } + + public uint Time + { + get + { + return this.m_time; + } + } + + private string m_showString = ""; + + private string m_showTimeStr = ""; + + private string m_name; + + private uint m_time; + + public DragonGuildLivenessRecord(PartnerLivenessItem item) + { + this.SetString(item); + this.m_time = item.time; + this.m_name = item.name; + this.m_showTimeStr = XSingleton.singleton.TimeAgoFormatString((int)item.time); + } + + private void SetString(PartnerLivenessItem item) + { + XDailyActivitiesDocument specificDocument = XDocuments.GetSpecificDocument(XDailyActivitiesDocument.uuID); + ActivityTable.RowData activityBasicInfo = specificDocument.GetActivityBasicInfo(item.actid); + bool flag = activityBasicInfo == null; + if (flag) + { + this.m_showString = null; + XSingleton.singleton.AddErrorLog(string.Format("id is error,{0}", item.actid), null, null, null, null, null); + } + else + { + this.m_showString = string.Format(XSingleton.singleton.GetString("PartnerLivenessRecord"), item.name, activityBasicInfo.name, activityBasicInfo.value); + } + } + } +} -- cgit v1.1-26-g67d0