From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Scripts/XMainClient/RandomAttrDataMgr.cs | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/RandomAttrDataMgr.cs (limited to 'Client/Assets/Scripts/XMainClient/RandomAttrDataMgr.cs') diff --git a/Client/Assets/Scripts/XMainClient/RandomAttrDataMgr.cs b/Client/Assets/Scripts/XMainClient/RandomAttrDataMgr.cs new file mode 100644 index 00000000..a0a3cd71 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/RandomAttrDataMgr.cs @@ -0,0 +1,42 @@ +using System; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class RandomAttrDataMgr : EquipAttrDataMgr + { + private RandomAttributes m_randomTab = null; + + public RandomAttrDataMgr(RandomAttributes table) + { + this.m_randomTab = table; + } + + protected override void SetAttrByItemId(uint itemId) + { + bool flag = this.m_randomTab == null; + if (!flag) + { + for (int i = 0; i < this.m_randomTab.Table.Length; i++) + { + RandomAttributes.RowData rowData = this.m_randomTab.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