summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XDragonGuildBasicInfoDisplay.cs
blob: 4c73724c00ceac3747e49bae63eb41bcccd5898f (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
using System;
using UILib;
using UnityEngine;

namespace XMainClient
{
	internal class XDragonGuildBasicInfoDisplay
	{
		public Transform Root;

		public IXUILabel DragonGuildName;

		public IXUILabel LeaderName;

		public IXUILabel Level;

		public IXUILabel MemberCount;

		public IXUILabel PPT;

		public void Init(Transform go, bool bFirstInit)
		{
			this.Root = go;
			Transform transform = this.Root.Find("GuildName");
			bool flag = transform != null;
			if (flag)
			{
				this.DragonGuildName = (transform.GetComponent("XUILabel") as IXUILabel);
				if (bFirstInit)
				{
					this.DragonGuildName.SetText("");
				}
			}
			else
			{
				this.DragonGuildName = null;
			}
			transform = this.Root.Find("LeaderName");
			bool flag2 = transform != null;
			if (flag2)
			{
				this.LeaderName = (transform.GetComponent("XUILabel") as IXUILabel);
				if (bFirstInit)
				{
					this.LeaderName.SetText("");
				}
			}
			else
			{
				this.LeaderName = null;
			}
			transform = this.Root.Find("Level");
			bool flag3 = transform != null;
			if (flag3)
			{
				this.Level = (transform.GetComponent("XUILabel") as IXUILabel);
				if (bFirstInit)
				{
					this.Level.SetText("");
				}
			}
			else
			{
				this.Level = null;
			}
			transform = this.Root.Find("MemberCount");
			bool flag4 = transform != null;
			if (flag4)
			{
				this.MemberCount = (transform.GetComponent("XUILabel") as IXUILabel);
				if (bFirstInit)
				{
					this.MemberCount.SetText("");
				}
			}
			else
			{
				this.MemberCount = null;
			}
			transform = this.Root.Find("PPT");
			bool flag5 = transform != null;
			if (flag5)
			{
				this.PPT = (transform.GetComponent("XUILabel") as IXUILabel);
				if (bFirstInit)
				{
					this.PPT.SetText("");
				}
			}
			else
			{
				this.PPT = null;
			}
		}

		public void Set(XDragonGuildBaseData data)
		{
			bool flag = this.DragonGuildName != null;
			if (flag)
			{
				this.DragonGuildName.SetText(data.dragonGuildName);
			}
			bool flag2 = this.LeaderName != null;
			if (flag2)
			{
				this.LeaderName.SetText(data.leaderName);
			}
			bool flag3 = this.Level != null;
			if (flag3)
			{
				this.Level.SetText("Lv." + data.level);
			}
			bool flag4 = this.PPT != null;
			if (flag4)
			{
				this.PPT.SetText(data.totalPPT.ToString());
			}
			bool flag5 = this.MemberCount != null;
			if (flag5)
			{
				this.MemberCount.SetText(string.Format("{0}/{1}", data.memberCount, data.maxMemberCount));
			}
		}
	}
}