From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Scripts/XMainClient/XArtifactBuffInfo.cs | 96 ++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/XArtifactBuffInfo.cs (limited to 'Client/Assets/Scripts/XMainClient/XArtifactBuffInfo.cs') diff --git a/Client/Assets/Scripts/XMainClient/XArtifactBuffInfo.cs b/Client/Assets/Scripts/XMainClient/XArtifactBuffInfo.cs new file mode 100644 index 00000000..04682282 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XArtifactBuffInfo.cs @@ -0,0 +1,96 @@ +using System; +using System.Collections.Generic; +using XUtliPoolLib; + +namespace XMainClient +{ + internal struct XArtifactBuffInfo + { + public uint Type + { + get + { + return this.m_type; + } + } + + public uint Id + { + get + { + return this.m_id; + } + } + + public List Values + { + get + { + return this.m_values; + } + } + + public uint SortId + { + get + { + return this.m_sortId; + } + } + + private uint m_type; + + private uint m_id; + + private uint m_sortId; + + private List m_values; + + public void Init() + { + this.m_type = 1u; + this.m_id = 0u; + this.m_sortId = 0u; + bool flag = this.m_values == null; + if (flag) + { + this.m_values = new List(); + } + else + { + this.m_values.Clear(); + } + } + + public void SetData(uint effectId, uint type, uint id, List values) + { + this.m_type = type; + this.m_id = id; + this.m_values = values; + EffectTable.RowData rowData = null; + bool flag = type == 1u; + if (flag) + { + rowData = ArtifactDocument.Doc.GetArtifactSkillEffect(effectId, id); + } + else + { + bool flag2 = type == 2u; + if (flag2) + { + rowData = ArtifactDocument.Doc.GetArtifactSkillEffect(effectId, id); + } + } + bool flag3 = rowData != null; + if (flag3) + { + this.m_sortId = (uint)rowData.SortID; + } + else + { + this.m_sortId = 0u; + XSingleton.singleton.AddGreenLog(string.Format("cannot find this effectTable data effectId = {0},id = {1}", effectId, id), null, null, null, null, null); + } + } + } +} -- cgit v1.1-26-g67d0