blob: c6152384220f4b29722e83c56812c4995b396924 (
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
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
|
using System;
using System.Collections.Generic;
using XUtliPoolLib;
namespace XMainClient
{
internal class XTeamCategory : IComparable<XTeamCategory>
{
public string Name
{
get
{
return XTeamCategory.GetCategoryName(this.category);
}
}
private XExpeditionDocument expDoc = null;
private XGuildDocument guildDoc = null;
private XLevelDocument levelDoc = null;
private XDragonNestDocument dnDoc = null;
private XLevelSealDocument levelSealDoc = null;
private XOperatingActivityDocument operatingDoc = null;
public int category;
public List<ExpeditionTable.RowData> expList = new List<ExpeditionTable.RowData>();
private XTeamCategoryMgr m_Mgr;
public static string GetCategoryName(int categoryID)
{
return XStringDefineProxy.GetString("TeamCategory" + categoryID.ToString());
}
public static int SortExp(ExpeditionTable.RowData left, ExpeditionTable.RowData right)
{
return left.SortID.CompareTo(right.SortID);
}
public XTeamCategory(XTeamCategoryMgr mgr)
{
this.m_Mgr = mgr;
}
public int CompareTo(XTeamCategory other)
{
return this.category.CompareTo(other.category);
}
public bool HasOpened()
{
return this.GetOpenedExpCount() > 0;
}
public bool IsExpOpened(ExpeditionTable.RowData rowData)
{
bool flag = rowData == null || XSingleton<XAttributeMgr>.singleton.XPlayerData == null;
bool result;
if (flag)
{
result = false;
}
else
{
uint level = XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
bool flag2 = (ulong)level < (ulong)((long)rowData.RequiredLevel);
if (flag2)
{
result = false;
}
else
{
bool flag3 = this.expDoc == null;
if (flag3)
{
this.expDoc = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
}
bool flag4 = this.guildDoc == null;
if (flag4)
{
this.guildDoc = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
}
bool flag5 = this.levelDoc == null;
if (flag5)
{
this.levelDoc = XDocuments.GetSpecificDocument<XLevelDocument>(XLevelDocument.uuID);
}
bool flag6 = this.dnDoc == null;
if (flag6)
{
this.dnDoc = XDocuments.GetSpecificDocument<XDragonNestDocument>(XDragonNestDocument.uuID);
}
bool flag7 = this.levelSealDoc == null;
if (flag7)
{
this.levelSealDoc = XDocuments.GetSpecificDocument<XLevelSealDocument>(XLevelSealDocument.uuID);
}
bool flag8 = this.operatingDoc == null;
if (flag8)
{
this.operatingDoc = XDocuments.GetSpecificDocument<XOperatingActivityDocument>(XOperatingActivityDocument.uuID);
}
bool flag9 = rowData.LevelSealType > 0u && rowData.LevelSealType != this.levelSealDoc.SealType;
if (flag9)
{
result = false;
}
else
{
TeamLevelType type = (TeamLevelType)rowData.Type;
TeamLevelType teamLevelType = type;
if (teamLevelType <= TeamLevelType.TeamLevelFestival)
{
switch (teamLevelType)
{
case TeamLevelType.TeamLevelNest:
{
bool flag10 = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Activity_Nest) && this.levelDoc.CanLevelOpen(this.expDoc.GetSceneIDByExpID(rowData.DNExpeditionID)) == SceneRefuseReason.Admit;
bool flag11 = !flag10;
if (flag11)
{
return false;
}
break;
}
case TeamLevelType.TeamLevelAbyss:
{
bool flag12 = this.levelDoc.CanLevelOpen(this.expDoc.GetSceneIDByExpID(rowData.DNExpeditionID)) == SceneRefuseReason.Admit;
bool flag13 = !flag12;
if (flag13)
{
return false;
}
break;
}
case (TeamLevelType)5:
break;
case TeamLevelType.TeamLevelDragonNest:
{
bool flag14 = !this.dnDoc.CheckCanFightByExpID((uint)rowData.DNExpeditionID);
if (flag14)
{
return false;
}
break;
}
case TeamLevelType.TeamLevelTeamTower:
{
bool flag15 = !this.expDoc.IsTeamTowerOpen(rowData.DNExpeditionID);
if (flag15)
{
return false;
}
break;
}
default:
switch (teamLevelType)
{
case TeamLevelType.TeamLevelGuildCamp:
{
bool flag16 = !this.guildDoc.bInGuild || (ulong)this.guildDoc.Level < (ulong)((long)rowData.GuildLevel);
if (flag16)
{
return false;
}
XGuildSmallMonsterDocument specificDocument = XDocuments.GetSpecificDocument<XGuildSmallMonsterDocument>(XGuildSmallMonsterDocument.uuID);
return specificDocument.IsOpen(rowData);
}
case TeamLevelType.TeamLevelWeekNest:
{
XWeekNestDocument doc = XWeekNestDocument.Doc;
bool flag17 = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_WeekNest);
if (flag17)
{
return false;
}
XActivityDocument specificDocument2 = XDocuments.GetSpecificDocument<XActivityDocument>(XActivityDocument.uuID);
bool flag18 = specificDocument2.ServerOpenDay < XSingleton<XGameSysMgr>.singleton.GetSysOpenServerDay(XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_WeekNest));
if (flag18)
{
return false;
}
return rowData.DNExpeditionID == doc.CurDNid;
}
case TeamLevelType.TeamLevelTeamLeague:
{
XFreeTeamVersusLeagueDocument specificDocument3 = XDocuments.GetSpecificDocument<XFreeTeamVersusLeagueDocument>(XFreeTeamVersusLeagueDocument.uuID);
return specificDocument3.IsOpen;
}
case TeamLevelType.TeamLevelFestival:
return this.operatingDoc.CheckFestivalIsOpen(this.expDoc.GetSceneIDByExpID(rowData.DNExpeditionID));
}
break;
}
}
else if (teamLevelType != TeamLevelType.TeamLevelWeekendParty)
{
if (teamLevelType == TeamLevelType.TeamLevelWedding)
{
return false;
}
if (teamLevelType == TeamLevelType.TeamLevelWeddingLicense)
{
return XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Wedding);
}
}
else
{
bool flag19 = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_MulActivity_WeekendParty);
if (flag19)
{
return false;
}
XWeekendPartyDocument specificDocument4 = XDocuments.GetSpecificDocument<XWeekendPartyDocument>(XWeekendPartyDocument.uuID);
return specificDocument4.CheckIsOpen(this.expDoc.GetSceneIDByExpID(rowData.DNExpeditionID));
}
result = true;
}
}
}
return result;
}
public int GetOpenedExpCount()
{
int num = 0;
bool flag = this.expDoc == null;
if (flag)
{
this.expDoc = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
}
for (int i = 0; i < this.expList.Count; i++)
{
bool flag2 = this.IsExpOpened(this.expList[i]);
if (flag2)
{
num++;
}
}
return num;
}
}
}
|