summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/ArtifactTotalAttrData.cs
blob: e7e82fc060cc6e4133c06e3ffdaa9c12b690e773 (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
75
76
77
78
79
80
81
82
83
84
using System;

namespace XMainClient
{
	internal class ArtifactTotalAttrData
	{
		public uint NameId
		{
			get
			{
				return this._nameId;
			}
		}

		public string Name
		{
			get
			{
				return XAttributeCommon.GetAttrStr((int)this._nameId);
			}
		}

		public string NumStr
		{
			get
			{
				bool flag = XAttributeCommon.IsPercentRange((int)this._nameId);
				string result;
				if (flag)
				{
					result = string.Format((this._num >= 0u) ? "+{0}%" : "{0}%", this._num.ToString("0.#"));
				}
				else
				{
					result = string.Format((this._num >= 0u) ? "+{0}" : "{0}", this._num).ToString();
				}
				return result;
			}
		}

		public string RightStr
		{
			get
			{
				return this.m_rightStr;
			}
		}

		public string LeftStr
		{
			get
			{
				return this.m_leftStr;
			}
		}

		private uint _nameId;

		private uint _num;

		private string m_leftStr;

		private string m_rightStr;

		public string SuitName = string.Empty;

		public ArtifactTotalAttrData(XItemChangeAttr attr)
		{
			this._nameId = attr.AttrID;
			this._num = attr.AttrValue;
		}

		public ArtifactTotalAttrData(string leftStr, string rightStr)
		{
			this.m_leftStr = leftStr;
			this.m_rightStr = rightStr;
		}

		public void Add(uint num)
		{
			this._num += num;
		}
	}
}