summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/ForgeAttrDataMgr.cs
blob: 4ec0de3f41e5827598eb145eeb08a1b6797f613a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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);
						}
					}
				}
			}
		}
	}
}