blob: 66c2f4e36306e42d9dc89bbbb7959eb14189465e (
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
|
using System;
using System.Collections.Generic;
using KKSG;
using XMainClient.UI;
using XUtliPoolLib;
namespace XMainClient
{
internal class XGuildBasicData : XDataBase
{
public string announcement
{
get
{
bool flag = this._announcement == null || this._announcement == "";
string result;
if (flag)
{
result = XStringDefineProxy.GetString("GUILD_DEFAULT_ANNOUNCEMENT");
}
else
{
result = this._announcement;
}
return result;
}
set
{
this._announcement = value;
}
}
public string actualAnnoucement
{
get
{
return this._announcement;
}
}
public ulong uid;
public string guildName;
public string leaderName;
public ulong leaderuid;
public uint level;
public uint memberCount;
public uint maxMemberCount;
private string _announcement;
public int portraitIndex;
public uint exp;
public int rank;
public uint liveness;
public List<uint> liveList = new List<uint>();
public uint popularity;
public uint technology;
public uint resource;
public string GetLiveness()
{
string text = string.Empty;
bool flag = this.liveList.Count > 0;
if (flag)
{
int i = 0;
int count = this.liveList.Count;
while (i < count)
{
bool flag2 = this.liveness < this.liveList[i];
if (flag2)
{
text = string.Format("GUILD_LIVENESS_{0}", i + 1);
break;
}
i++;
}
}
bool flag3 = string.IsNullOrEmpty(text);
string result;
if (flag3)
{
result = this.liveness.ToString();
}
else
{
result = XStringDefineProxy.GetString(text, new object[]
{
this.liveness
});
}
return result;
}
public string GetLivenessTips()
{
bool flag = this.liveList.Count != 3;
string result;
if (flag)
{
result = string.Empty;
}
else
{
result = string.Format(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("GUILD_LIVENESS_TIPS")), new object[]
{
this.liveList[0],
this.liveList[0],
this.liveList[1],
this.liveList[1],
this.liveList[2],
this.liveList[2]
});
}
return result;
}
public virtual void Init(GuildInfo info)
{
this.uid = info.id;
this.guildName = info.name;
this.leaderuid = info.leaderID;
this.leaderName = info.leaderName;
this.level = (uint)info.level;
this.memberCount = (uint)info.memberCount;
this.maxMemberCount = (uint)info.capacity;
this.portraitIndex = info.icon;
this.announcement = info.annoucement;
this.popularity = info.prestige;
}
public void Init(GuildBriefRes info)
{
this.guildName = info.name;
this.leaderName = info.leaderName;
this.leaderuid = info.leaderID;
this.level = (uint)info.level;
this.memberCount = (uint)info.membercount;
this.maxMemberCount = (uint)info.capacity;
this.announcement = info.annoucement;
this.portraitIndex = info.icon;
this.exp = info.exp;
this.rank = info.rank;
this.liveness = info.activity;
this.liveList.Clear();
this.liveList.Add(info.activityOne);
this.liveList.Add(info.activityTwo);
this.liveList.Add(info.activityThree);
this.popularity = info.prestige;
this.technology = info.schoolpoint;
this.resource = info.hallpoint;
}
public virtual string ToGuildNameString()
{
return this.guildName;
}
}
}
|