summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XArtifactItem.cs
blob: 733347cb4101e2ae4093ba46f18f4467b787a531 (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
using System;
using System.Collections.Generic;

namespace XMainClient
{
	internal class XArtifactItem : XAttrItem
	{
		public override bool bHasPPT
		{
			get
			{
				return true;
			}
		}

		public XRandAttrInfo RandAttrInfo = default(XRandAttrInfo);

		public List<XArtifactEffectInfo> EffectInfoList;

		public List<XItemChangeAttr> UnSavedAttr;

		public override string ToPPTString(XAttributes attributes = null)
		{
			uint ppt = this.GetPPT(attributes);
			string empty = string.Empty;
			return string.Format("{0} - {1}", 0, ppt);
		}

		public override void Init()
		{
			base.Init();
			this.RandAttrInfo.Init();
			bool flag = this.EffectInfoList == null;
			if (flag)
			{
				this.EffectInfoList = new List<XArtifactEffectInfo>();
			}
			else
			{
				this.EffectInfoList.Clear();
			}
			bool flag2 = this.UnSavedAttr == null;
			if (flag2)
			{
				this.UnSavedAttr = new List<XItemChangeAttr>();
			}
			else
			{
				this.UnSavedAttr.Clear();
			}
		}

		public override void Recycle()
		{
			base.Recycle();
			this.Init();
			XDataPool<XArtifactItem>.Recycle(this);
		}
	}
}