From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- Client/Assets/Scripts/XMainClient/XArtifactItem.cs | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/XArtifactItem.cs (limited to 'Client/Assets/Scripts/XMainClient/XArtifactItem.cs') 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 EffectInfoList; + + public List 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(); + } + else + { + this.EffectInfoList.Clear(); + } + bool flag2 = this.UnSavedAttr == null; + if (flag2) + { + this.UnSavedAttr = new List(); + } + else + { + this.UnSavedAttr.Clear(); + } + } + + public override void Recycle() + { + base.Recycle(); + this.Init(); + XDataPool.Recycle(this); + } + } +} -- cgit v1.1-26-g67d0