summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XEmblemItemDrawer.cs
blob: 887a111a3665a9a56875c30042b396bc176a42bf (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
using System;
using UnityEngine;

namespace XMainClient
{
	internal class XEmblemItemDrawer : XItemDrawer
	{
		public override void DrawItem(GameObject go, XItem realItem, bool bForceShowNum = false)
		{
			this._GetUI(go);
			bool flag = realItem == null;
			if (flag)
			{
				this.DrawEmpty();
				this._ClearVariables();
			}
			else
			{
				base._GetItemData(realItem.itemID);
				this._SetupIcon();
				this._SetupAttrIcon(null);
				this._SetupName(realItem);
				this._SetupNum(realItem);
				this._SetupNumTop(realItem);
				this.SetCorner(realItem);
				this._ClearVariables();
			}
		}

		private void SetCorner(XItem realItem)
		{
			bool flag = realItem == null;
			if (!flag)
			{
				XEmblemItem xemblemItem = realItem as XEmblemItem;
				base._SetupLeftDownCorner(base._GetBindingState(realItem));
				base._SetupLeftUpCorner(xemblemItem.emblemInfo.thirdslot == 2u && !xemblemItem.bIsSkillEmblem, "");
				base._SetupRightDownCorner(xemblemItem.emblemInfo.thirdslot == 1u && !xemblemItem.bIsSkillEmblem);
				base._SetupRightUpCorner(realItem.Type == ItemType.FRAGMENT);
				base._SetUpProf(false);
				base._SetupMask();
			}
		}
	}
}