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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
using System;
using KKSG;
using UILib;
using UnityEngine;
using XUtliPoolLib;
namespace XMainClient
{
internal struct XGoldGroupData
{
public bool bActive
{
get
{
return this.index >= 0;
}
set
{
bool flag = !value;
if (flag)
{
this.index = -1;
this.type = GoldGroupType.GGT_NONE;
}
}
}
public GoldGroupType type;
public int index;
public int itemid;
public int itemcount;
public XTeamBriefData teamBrief;
public static string GetName(ref SeqListRef<uint> data, int index)
{
bool flag = index < 0 || index >= data.Count;
string result;
if (flag)
{
result = string.Empty;
}
else
{
int num = (int)data[index, 0];
int num2 = (int)data[index, 1];
GoldGroupType goldGroupType = (GoldGroupType)num;
if (goldGroupType != GoldGroupType.GGT_DIAMOND)
{
if (goldGroupType != GoldGroupType.GGT_TICKET)
{
result = string.Empty;
}
else
{
result = XStringDefineProxy.GetString(XSingleton<XCommon>.singleton.StringCombine("TeamGoldGroupName2_", num2.ToString()));
}
}
else
{
result = XStringDefineProxy.GetString(XSingleton<XCommon>.singleton.StringCombine("TeamGoldGroupName1_", num2.ToString()), new object[]
{
data[index, 2].ToString()
});
}
}
return result;
}
public void SetData(TeamExtraInfo extraInfo, ExpeditionTable.RowData rowData)
{
bool flag = extraInfo == null || rowData == null || !extraInfo.costindexSpecified;
if (flag)
{
this.bActive = false;
}
else
{
int costindex = (int)extraInfo.costindex;
bool flag2 = costindex < 0 || costindex >= rowData.CostType.Count;
if (flag2)
{
this.bActive = false;
}
else
{
this.index = costindex;
this.type = (GoldGroupType)rowData.CostType[this.index, 0];
this.itemid = (int)rowData.CostType[this.index, 1];
this.itemcount = (int)rowData.CostType[this.index, 2];
}
}
}
public void SetUI(GameObject go, bool bShowFinalRewardIcon = true)
{
bool flag = !this.bActive;
if (flag)
{
go.SetActive(false);
}
else
{
go.SetActive(true);
IXUILabel ixuilabel = go.transform.Find("Label").GetComponent("XUILabel") as IXUILabel;
IXUISprite ixuisprite = go.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
bool flag2 = bShowFinalRewardIcon && this.type == GoldGroupType.GGT_TICKET;
if (flag2)
{
ixuisprite.SetSprite(XBagDocument.GetItemSmallIcon(XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.DRAGON_COIN), 0u));
}
else
{
ixuisprite.SetSprite(XBagDocument.GetItemSmallIcon(this.itemid, 0u));
}
bool flag3 = this.type == GoldGroupType.GGT_TICKET;
if (flag3)
{
ixuilabel.SetText(XStringDefineProxy.GetString("GGT_TICKET"));
}
else
{
ixuilabel.SetText(this.itemcount.ToString());
}
Transform transform = go.transform.Find("Description");
bool flag4 = transform != null;
if (flag4)
{
IXUILabel ixuilabel2 = transform.GetComponent("XUILabel") as IXUILabel;
GoldGroupType goldGroupType = this.type;
if (goldGroupType != GoldGroupType.GGT_DIAMOND)
{
if (goldGroupType != GoldGroupType.GGT_TICKET)
{
ixuilabel2.SetText(string.Empty);
}
else
{
ixuilabel2.SetText(XStringDefineProxy.GetString(XSingleton<XCommon>.singleton.StringCombine("TeamGoldGroupDescription2_", this.itemid.ToString())));
}
}
else
{
ixuilabel2.SetText(XStringDefineProxy.GetString(XSingleton<XCommon>.singleton.StringCombine("TeamGoldGroupDescription1_", this.itemid.ToString()), new object[]
{
(this.teamBrief == null || this.teamBrief.totalMemberCount <= 1) ? this.itemcount : (this.itemcount / (this.teamBrief.totalMemberCount - 1))
}));
}
}
}
}
}
}
|