summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XArtifactItem.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-01-25 14:28:30 +0800
committerchai <chaifix@163.com>2021-01-25 14:28:30 +0800
commit6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch)
tree7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/XArtifactItem.cs
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/XArtifactItem.cs')
-rw-r--r--Client/Assets/Scripts/XMainClient/XArtifactItem.cs60
1 files changed, 60 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/XArtifactItem.cs b/Client/Assets/Scripts/XMainClient/XArtifactItem.cs
new file mode 100644
index 00000000..733347cb
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/XArtifactItem.cs
@@ -0,0 +1,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);
+ }
+ }
+}