summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/LoverLivenessRecord.cs
blob: 048fe0fc778b583af302e5396ccaabe7ae1f4ca6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
using System;
using KKSG;
using XMainClient.UI;
using XUtliPoolLib;

namespace XMainClient
{
	public class LoverLivenessRecord : 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 LoverLivenessRecord(PartnerLivenessItem item)
		{
			this.SetString(item);
			this.m_time = item.time;
			this.m_name = item.name;
			this.m_showTimeStr = XSingleton<UiUtility>.singleton.TimeAgoFormatString((int)item.time);
		}

		private void SetString(PartnerLivenessItem item)
		{
			XDailyActivitiesDocument specificDocument = XDocuments.GetSpecificDocument<XDailyActivitiesDocument>(XDailyActivitiesDocument.uuID);
			ActivityTable.RowData activityBasicInfo = specificDocument.GetActivityBasicInfo(item.actid);
			bool flag = activityBasicInfo == null;
			if (flag)
			{
				this.m_showString = null;
				XSingleton<XDebug>.singleton.AddErrorLog(string.Format("id is error,{0}", item.actid), null, null, null, null, null);
			}
			else
			{
				this.m_showString = string.Format(XSingleton<XStringTable>.singleton.GetString("WeddingLoverLivenessRecord"), item.name, activityBasicInfo.name, activityBasicInfo.value);
			}
		}
	}
}