From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Assets/Scripts/XMainClient/ForgeAttrDataMgr.cs | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/ForgeAttrDataMgr.cs (limited to 'Client/Assets/Scripts/XMainClient/ForgeAttrDataMgr.cs') diff --git a/Client/Assets/Scripts/XMainClient/ForgeAttrDataMgr.cs b/Client/Assets/Scripts/XMainClient/ForgeAttrDataMgr.cs new file mode 100644 index 00000000..4ec0de3f --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/ForgeAttrDataMgr.cs @@ -0,0 +1,42 @@ +using System; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class ForgeAttrDataMgr : EquipAttrDataMgr + { + private ForgeAttributes m_forgeTab = null; + + public ForgeAttrDataMgr(ForgeAttributes table) + { + this.m_forgeTab = table; + } + + protected override void SetAttrByItemId(uint itemId) + { + bool flag = this.m_forgeTab == null; + if (!flag) + { + for (int i = 0; i < this.m_forgeTab.Table.Length; i++) + { + ForgeAttributes.RowData rowData = this.m_forgeTab.Table[i]; + bool flag2 = rowData.EquipID == itemId; + if (flag2) + { + bool flag3 = !this.m_attrDic.ContainsKey(rowData.EquipID); + if (flag3) + { + EquipSlotAttrDatas equipSlotAttrDatas = new EquipSlotAttrDatas(rowData.EquipID); + equipSlotAttrDatas.Add(rowData); + this.m_attrDic.Add(rowData.EquipID, equipSlotAttrDatas); + } + else + { + this.m_attrDic[rowData.EquipID].Add(rowData); + } + } + } + } + } + } +} -- cgit v1.1-26-g67d0