summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/FashionStorageHairColor.cs
blob: 17ab2c87fd9a07e7a3914e0a70f258033d6ed327 (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
43
44
45
46
47
48
49
50
using System;
using XUtliPoolLib;

namespace XMainClient
{
	internal class FashionStorageHairColor : FashionStorageTabBase, IFashionStorageSelect
	{
		private FashionHair.RowData m_hairData;

		private string m_hairName;

		public FashionStorageHairColor(FashionHair.RowData hairData)
		{
			this.m_hairData = hairData;
			this.m_fashionList = new uint[this.m_hairData.UnLookColorID.Length + 1];
			int i = 0;
			int num = this.m_fashionList.Length;
			while (i < num)
			{
				bool flag = i == 0;
				if (flag)
				{
					this.m_fashionList[i] = this.m_hairData.DefaultColorID;
				}
				else
				{
					this.m_fashionList[i] = this.m_hairData.UnLookColorID[i - 1];
				}
				i++;
			}
			this.GetItems().Add(hairData.DefaultColorID);
			ItemList.RowData itemConf = XBagDocument.GetItemConf((int)this.m_hairData.HairID);
			bool flag2 = itemConf != null && itemConf.ItemName != null && itemConf.ItemName.Length != 0;
			if (flag2)
			{
				this.m_hairName = itemConf.ItemName[0];
			}
		}

		public override string GetName()
		{
			return this.m_hairName;
		}

		public override int GetID()
		{
			return (int)this.m_hairData.HairID;
		}
	}
}