Debian Codegraph @

src/bnetd/ladder.cpp

raw symbols SCIP
1 /*
2 * Copyright (C) 1999 Rob Crittenden ([email protected])
3 * Copyright (C) 1999,2000 Ross Combs ([email protected])
4 * Copyright (C) 1999,2000 D.Moreaux ([email protected])
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20 #include "common/setup_before.h"cxx . . $ `<file>/src/common/setup_before.h`/
21 #define LADDER_INTERNAL_ACCESScxx . . $ `src/bnetd/ladder.cpp:21:9`!
22 #include "ladder.h"cxx . . $ `<file>/src/bnetd/ladder.h`/
23
24 #include <cstdio>
25 #include <cerrno>
26 #include <cstring>
27 #include <fstream>
28 #include <iostream>
29 #include <sstream>
30 #include <string>
31 #include <list>
32 #include <map>
33 #include <cmath>
34 #include <algorithm>
35 #include <vector>
36
37 #ifdef HAVE_SYS_STAT_Hcxx . . $ `build/config.h:21:9`!
38 # include <sys/stat.h>
39 #endif
40
41 #include "compat/strerror.h"cxx . . $ `<file>/src/compat/strerror.h`/
42 #include "common/tag.h"cxx . . $ `<file>/src/common/tag.h`/
43 #include "common/eventlog.h"cxx . . $ `<file>/src/common/eventlog.h`/
44 #include "common/list.h"cxx . . $ `<file>/src/common/list.h`/
45 #include "common/hashtable.h"cxx . . $ `<file>/src/common/hashtable.h`/
46 #include "common/bnettime.h"cxx . . $ `<file>/src/common/bnettime.h`/
47 #include "common/bnet_protocol.h"cxx . . $ `<file>/src/common/bnet_protocol.h`/
48
49 #include "account.h"cxx . . $ `<file>/src/bnetd/account.h`/
50 #include "account_wrap.h"cxx . . $ `<file>/src/bnetd/account_wrap.h`/
51 #include "prefs.h"cxx . . $ `<file>/src/bnetd/prefs.h`/
52 #include "ladder_calc.h"cxx . . $ `<file>/src/bnetd/ladder_calc.h`/
53 #include "team.h"cxx . . $ `<file>/src/bnetd/team.h`/
54 #include "common/setup_after.h"cxx . . $ `<file>/src/common/setup_after.h`/
55
56 #define MaxRankKeptInLaddercxx . . $ `src/bnetd/ladder.cpp:56:9`! 1000
57
58 namespace pvpgncxx . . $ pvpgn/
59 {
60
61 namespace bnetdcxx . . $ pvpgn/bnetd/
62 {
63
64 /* for War3 XP computations */
65 static t_xpcalc_entrycxx . . $ pvpgn/bnetd/t_xpcalc_entry# * xpcalccxx . . $ pvpgn/bnetd/xpcalc.;
66 static t_xplevel_entrycxx . . $ pvpgn/bnetd/t_xplevel_entry# * xplevelscxx . . $ pvpgn/bnetd/xplevels.;
67 int w3_xpcalc_maxleveldiffcxx . . $ pvpgn/bnetd/w3_xpcalc_maxleveldiff.;
68
69 const stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#> ladder_id_strcxx . . $ pvpgn/bnetd/ladder_id_str. = {cxx . . $ std/vector#vector(9619226211e5a241). "0", "1", "", "3", "", "solo", "team", "ffa" };
70 const stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#> bin_ladder_id_strcxx . . $ pvpgn/bnetd/bin_ladder_id_str. = {cxx . . $ std/vector#vector(9619226211e5a241). "", "", "", "I", "", "SOLO", "TEAM", "FFA", "AT" };
71 const stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#> bin_ladder_sort_strcxx . . $ pvpgn/bnetd/bin_ladder_sort_str. = {cxx . . $ std/vector#vector(9619226211e5a241). "R", "W", "G", "" };
72 const stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#> bin_ladder_time_strcxx . . $ pvpgn/bnetd/bin_ladder_time_str. = {cxx . . $ std/vector#vector(9619226211e5a241). "A", "C", "" };
73
74 Ladderscxx . . $ pvpgn/bnetd/Ladders# ladderscxx . . $ pvpgn/bnetd/ladders.;
75
76
77 /*
78 * Prepare an account for first ladder play if necessary.
79 */
80 extern int ladder_init_accountcxx . . $ pvpgn/bnetd/ladder_init_account(829aa05f631ee398).(t_accountcxx . . $ pvpgn/bnetd/t_account# * account, t_clienttagcxx . . $ pvpgn/t_clienttag# clienttag, t_ladder_idcxx . . $ pvpgn/bnetd/t_ladder_id# id)
81 {
82 unsigned int uid, rating;
83
84 if (!account)
85 {
86 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL account");
87 return -1;
88 }
89 if (!clienttag)
90 {
91 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got bad clienttag");
92 return -1;
93 }
94
95 if (account_get_ladder_ratingcxx . . $ pvpgn/bnetd/account_get_ladder_rating(44091a2c7ac3910).(account, clienttag, id) == 0)
96 {
97 if (account_get_ladder_winscxx . . $ pvpgn/bnetd/account_get_ladder_wins(44091a2c7ac3910).(account, clienttag, id) +
98 account_get_ladder_lossescxx . . $ pvpgn/bnetd/account_get_ladder_losses(44091a2c7ac3910).(account, clienttag, id) > 0) /* no ladder games so far... */
99 {
100 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_warncxx . . $ pvpgn/eventlog_level_warn., __FUNCTION__, "account for \"{}\" ({}) has {} wins and {} losses but has zero rating", account_get_namecxx . . $ `src/bnetd/account.h:115:10`!(account), clienttag_uint_to_str(clienttag), account_get_ladder_winscxx . . $ pvpgn/bnetd/account_get_ladder_wins(44091a2c7ac3910).(account, clienttag, id), account_get_ladder_lossescxx . . $ pvpgn/bnetd/account_get_ladder_losses(44091a2c7ac3910).(account, clienttag, id));
101 return -1;
102 }
103 account_adjust_ladder_ratingcxx . . $ pvpgn/bnetd/account_adjust_ladder_rating(364efa9fab2c2e8c).(account, clienttag, id, prefs_get_ladder_init_ratingcxx . . $ pvpgn/bnetd/prefs_get_ladder_init_rating(db52760e79bf9054).());
104
105 uid = account_get_uidcxx . . $ `src/bnetd/account.h:91:9`!(account);
106 rating = account_get_ladder_ratingcxx . . $ pvpgn/bnetd/account_get_ladder_rating(44091a2c7ac3910).(account, clienttag, id);
107
108 LadderListcxx . . $ pvpgn/bnetd/LadderList#* ladderlist_cr = ladderscxx . . $ pvpgn/bnetd/ladders..getLadderListcxx . . $ pvpgn/bnetd/Ladders#getLadderList(2c0c64fbd1351270).(LadderKeycxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(id, clienttag, ladder_sort_highestratedcxx . . $ pvpgn/bnetd/ladder_sort_highestrated., ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.));
109 LadderListcxx . . $ pvpgn/bnetd/LadderList#* ladderlist_cw = ladderscxx . . $ pvpgn/bnetd/ladders..getLadderListcxx . . $ pvpgn/bnetd/Ladders#getLadderList(2c0c64fbd1351270).(LadderKeycxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(id, clienttag, ladder_sort_mostwinscxx . . $ pvpgn/bnetd/ladder_sort_mostwins., ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.));
110 LadderListcxx . . $ pvpgn/bnetd/LadderList#* ladderlist_cg = ladderscxx . . $ pvpgn/bnetd/ladders..getLadderListcxx . . $ pvpgn/bnetd/Ladders#getLadderList(2c0c64fbd1351270).(LadderKeycxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(id, clienttag, ladder_sort_mostgamescxx . . $ pvpgn/bnetd/ladder_sort_mostgames., ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.));
111
112 LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject# referencecxx . . $ pvpgn/bnetd/LadderReferencedObject#LadderReferencedObject(a405232c11a3fb7b).(account);
113
114 ladderlist_cr->updateEntrycxx . . $ pvpgn/bnetd/LadderList#updateEntry(f0ac5109e0f18056).(uid, rating, 0, 0, reference);
115 ladderlist_cg->updateEntrycxx . . $ pvpgn/bnetd/LadderList#updateEntry(f0ac5109e0f18056).(uid, 0, rating, 0, reference);
116 ladderlist_cw->updateEntrycxx . . $ pvpgn/bnetd/LadderList#updateEntry(f0ac5109e0f18056).(uid, 0, rating, 0, reference);
117
118 INFO2cxx . . $ `src/common/eventlog.h:85:9`!("initialized account for \"{}\" for \"{}\" ladder", account_get_namecxx . . $ `src/bnetd/account.h:115:10`!(account), clienttag_uint_to_str(clienttag));
119 }
120
121 return 0;
122 }
123
124 extern int ladder_init_account_wolcxx . . $ pvpgn/bnetd/ladder_init_account_wol(829aa05f631ee398).(t_accountcxx . . $ pvpgn/bnetd/t_account# * account, t_clienttagcxx . . $ pvpgn/t_clienttag# clienttag, t_ladder_idcxx . . $ pvpgn/bnetd/t_ladder_id# id)
125 {
126 unsigned int uid;
127
128 if (!account)
129 {
130 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL account");
131 return -1;
132 }
133 if (!clienttag)
134 {
135 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got bad clienttag");
136 return -1;
137 }
138
139 if ((account_get_ladder_pointscxx . . $ pvpgn/bnetd/account_get_ladder_points(829aa05f631ee398).(account, clienttag, id) == 0) && (account_get_ladder_winscxx . . $ pvpgn/bnetd/account_get_ladder_wins(44091a2c7ac3910).(account, clienttag, id) == 0)
140 && (account_get_ladder_lossescxx . . $ pvpgn/bnetd/account_get_ladder_losses(44091a2c7ac3910).(account, clienttag, id) == 0))
141 {
142 uid = account_get_uidcxx . . $ `src/bnetd/account.h:91:9`!(account);
143
144 LadderListcxx . . $ pvpgn/bnetd/LadderList#* ladderlist = ladderscxx . . $ pvpgn/bnetd/ladders..getLadderListcxx . . $ pvpgn/bnetd/Ladders#getLadderList(2c0c64fbd1351270).(LadderKeycxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(id, clienttag, ladder_sort_defaultcxx . . $ pvpgn/bnetd/ladder_sort_default., ladder_time_defaultcxx . . $ pvpgn/bnetd/ladder_time_default.));
145
146 LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject# referencecxx . . $ pvpgn/bnetd/LadderReferencedObject#LadderReferencedObject(a405232c11a3fb7b).(account);
147
148 ladderlist->updateEntrycxx . . $ pvpgn/bnetd/LadderList#updateEntry(f0ac5109e0f18056).(uid, 0, 0, 0, reference);
149
150 INFO2cxx . . $ `src/common/eventlog.h:85:9`!("initialized WOL account for \"{}\" for \"{}\" ladder", account_get_namecxx . . $ `src/bnetd/account.h:115:10`!(account), clienttag_uint_to_str(clienttag));
151 }
152
153 return 0;
154 }
155
156 /*
157 * Update player ratings, rankings, etc due to game results.
158 */
159 extern int ladder_updatecxx . . $ pvpgn/bnetd/ladder_update(4752c89782a4cabb).(t_clienttagcxx . . $ pvpgn/t_clienttag# clienttag, t_ladder_idcxx . . $ pvpgn/bnetd/t_ladder_id# id, unsigned int count, t_accountcxx . . $ pvpgn/bnetd/t_account# * * players, t_game_result * results, t_ladder_infocxx . . $ pvpgn/bnetd/t_ladder_info# * info)
160 {
161 unsigned int curr;
162 unsigned int ratio = 0;
163 int uid;
164
165 if (count<1 || count>8)
166 {
167 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got invalid player count {}", count);
168 return -1;
169 }
170 if (!players)
171 {
172 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL players");
173 return -1;
174 }
175 if (!results)
176 {
177 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL results");
178 return -1;
179 }
180 if (!clienttag)
181 {
182 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got bad clienttag");
183 return -1;
184 }
185 if (!info)
186 {
187 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL info");
188 return -1;
189 }
190
191 if (ladder_calc_infocxx . . $ pvpgn/bnetd/ladder_calc_info(4752c89782a4cabb).(clienttag, id, count, players, results, info) < 0)
192 {
193 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "unable to calculate info from game results");
194 return -1;
195 }
196
197 for (curr = 0; curr < count; curr++)
198 {
199 unsigned int wins, games;
200 t_accountcxx . . $ pvpgn/bnetd/t_account# * account;
201
202 account = players[curr];
203 uid = account_get_uidcxx . . $ `src/bnetd/account.h:91:9`!(account);
204 wins = account_get_ladder_winscxx . . $ pvpgn/bnetd/account_get_ladder_wins(44091a2c7ac3910).(account, clienttag, id);
205 games = wins + account_get_ladder_lossescxx . . $ pvpgn/bnetd/account_get_ladder_losses(44091a2c7ac3910).(account, clienttag, id) +
206 account_get_ladder_disconnectscxx . . $ pvpgn/bnetd/account_get_ladder_disconnects(44091a2c7ac3910).(account, clienttag, id) +
207 account_get_ladder_drawscxx . . $ pvpgn/bnetd/account_get_ladder_draws(44091a2c7ac3910).(account, clienttag, id);
208
209 //reasonable close to 1000 ;-)
210 ratio = (wins << 10) / games;
211
212 account_adjust_ladder_ratingcxx . . $ pvpgn/bnetd/account_adjust_ladder_rating(364efa9fab2c2e8c).(account, clienttag, id, info[curr].adjcxx . . $ pvpgn/bnetd/$anonymous_type_45ff37c90d47142d_0#adj.);
213 unsigned int rating = account_get_ladder_ratingcxx . . $ pvpgn/bnetd/account_get_ladder_rating(44091a2c7ac3910).(account, clienttag, id);
214
215 LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject# referencecxx . . $ pvpgn/bnetd/LadderReferencedObject#LadderReferencedObject(a405232c11a3fb7b).(account);
216
217 LadderListcxx . . $ pvpgn/bnetd/LadderList#* ladderlist = ladderscxx . . $ pvpgn/bnetd/ladders..getLadderListcxx . . $ pvpgn/bnetd/Ladders#getLadderList(2c0c64fbd1351270).(LadderKeycxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(id, clienttag, ladder_sort_highestratedcxx . . $ pvpgn/bnetd/ladder_sort_highestrated., ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.));
218 ladderlist->updateEntrycxx . . $ pvpgn/bnetd/LadderList#updateEntry(f0ac5109e0f18056).(uid, rating, wins, ratio, reference);
219
220 ladderlist = ladderscxx . . $ pvpgn/bnetd/ladders..getLadderListcxx . . $ pvpgn/bnetd/Ladders#getLadderList(2c0c64fbd1351270).(LadderKeycxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(id, clienttag, ladder_sort_mostgamescxx . . $ pvpgn/bnetd/ladder_sort_mostgames., ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.));
221 ladderlist->updateEntrycxx . . $ pvpgn/bnetd/LadderList#updateEntry(f0ac5109e0f18056).(uid, games, rating, ratio, reference);
222
223 ladderlist = ladderscxx . . $ pvpgn/bnetd/ladders..getLadderListcxx . . $ pvpgn/bnetd/Ladders#getLadderList(2c0c64fbd1351270).(LadderKeycxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(id, clienttag, ladder_sort_mostwinscxx . . $ pvpgn/bnetd/ladder_sort_mostwins., ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.));
224 ladderlist->updateEntrycxx . . $ pvpgn/bnetd/LadderList#updateEntry(f0ac5109e0f18056).(uid, wins, rating, ratio, reference);
225 }
226
227 ladderscxx . . $ pvpgn/bnetd/ladders..updatecxx . . $ pvpgn/bnetd/Ladders#update(49f6e7a06ebc5aa8).();
228 return 0;
229 }
230
231 static int _cb_count_pointscxx . . $ pvpgn/bnetd/_cb_count_points(6f1610a751d796b9).(int * points_win, int * points_loss, int pl1_points, int pl2_points)
232 {
233 *points_win = static_cast<int>(64 * (1 - 1 / (powf(10, static_cast<float>(pl2_points - pl1_points) / 400) + 1)) + 0.5);
234 *points_loss = stdcxx . . $ std/::mincxx . . $ std/min(2a338fce5842aa6a).(64 - *points_win, pl1_points / 10);
235
236 return 0;
237 }
238
239 extern int ladder_update_wolcxx . . $ pvpgn/bnetd/ladder_update_wol(d1ed5ef110d0cee8).(t_clienttagcxx . . $ pvpgn/t_clienttag# clienttag, t_ladder_idcxx . . $ pvpgn/bnetd/t_ladder_id# id, t_accountcxx . . $ pvpgn/bnetd/t_account# * * players, t_game_result * results)
240 {
241 unsigned int wins, losses, points;
242 int curr;
243 int uid;
244
245 if (!players) {
246 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL players");
247 return -1;
248 }
249
250 if (!results) {
251 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL results");
252 return -1;
253 }
254
255 if (!clienttag) {
256 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got bad clienttag");
257 return -1;
258 }
259
260 if (((results[0]) && (results[1])) && ((results[0] == results[1]) && (results[0] == game_result_disconnect))) {
261 DEBUG0cxx . . $ `src/common/eventlog.h:88:9`!("Both players got game_result_disconnect - points counting terminated");
262 return 0;
263 }
264
265 int pl1_points = account_get_ladder_pointscxx . . $ pvpgn/bnetd/account_get_ladder_points(829aa05f631ee398).(players[0], clienttag, id);
266 int pl2_points = account_get_ladder_pointscxx . . $ pvpgn/bnetd/account_get_ladder_points(829aa05f631ee398).(players[1], clienttag, id);
267
268 for (curr = 0; curr < 2; curr++) {
269 t_accountcxx . . $ pvpgn/bnetd/t_account# * account = players[curr];
270 int mypoints = account_get_ladder_pointscxx . . $ pvpgn/bnetd/account_get_ladder_points(829aa05f631ee398).(players[curr], clienttag, id);
271 int points_win = 0;
272 int points_loss = 0;
273 uid = account_get_uidcxx . . $ `src/bnetd/account.h:91:9`!(account);
274
275 if (results[curr] == game_result_win) {
276 _cb_count_pointscxx . . $ pvpgn/bnetd/_cb_count_points(6f1610a751d796b9).(&points_win, &points_loss, mypoints, (mypoints == pl1_points ? pl2_points : pl1_points));
277 account_set_ladder_pointscxx . . $ pvpgn/bnetd/account_set_ladder_points(8c7f1be2c24befe).(players[curr], clienttag, id, mypoints + points_win);
278 DEBUG3cxx . . $ `src/common/eventlog.h:91:9`!("Player {} WIN, had {} points and now have {} points", account_get_namecxx . . $ `src/bnetd/account.h:115:10`!(account), mypoints, mypoints + points_win);
279 }
280 else {
281 _cb_count_pointscxx . . $ pvpgn/bnetd/_cb_count_points(6f1610a751d796b9).(&points_win, &points_loss, mypoints, (mypoints == pl1_points ? pl2_points : pl1_points));
282 account_set_ladder_pointscxx . . $ pvpgn/bnetd/account_set_ladder_points(8c7f1be2c24befe).(players[curr], clienttag, id, mypoints - points_loss);
283 DEBUG3cxx . . $ `src/common/eventlog.h:91:9`!("Player {} LOSS, had {} points and now have {} points", account_get_namecxx . . $ `src/bnetd/account.h:115:10`!(account), mypoints, mypoints - points_loss);
284 }
285
286 LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject# referencecxx . . $ pvpgn/bnetd/LadderReferencedObject#LadderReferencedObject(a405232c11a3fb7b).(account);
287 wins = account_get_ladder_winscxx . . $ pvpgn/bnetd/account_get_ladder_wins(44091a2c7ac3910).(account, clienttag, id);
288 losses = account_get_ladder_lossescxx . . $ pvpgn/bnetd/account_get_ladder_losses(44091a2c7ac3910).(account, clienttag, id);
289 points = account_get_ladder_pointscxx . . $ pvpgn/bnetd/account_get_ladder_points(829aa05f631ee398).(account, clienttag, id);
290
291 LadderListcxx . . $ pvpgn/bnetd/LadderList#* ladderlist = ladderscxx . . $ pvpgn/bnetd/ladders..getLadderListcxx . . $ pvpgn/bnetd/Ladders#getLadderList(2c0c64fbd1351270).(LadderKeycxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(id, clienttag, ladder_sort_defaultcxx . . $ pvpgn/bnetd/ladder_sort_default., ladder_time_defaultcxx . . $ pvpgn/bnetd/ladder_time_default.));
292 ladderlist->updateEntrycxx . . $ pvpgn/bnetd/LadderList#updateEntry(f0ac5109e0f18056).(uid, points, wins, 0, reference);
293 }
294
295 ladderscxx . . $ pvpgn/bnetd/ladders..updatecxx . . $ pvpgn/bnetd/Ladders#update(49f6e7a06ebc5aa8).();
296 return 0;
297 }
298
299 extern int ladder_check_mapcxx . . $ pvpgn/bnetd/ladder_check_map(d9e7688701682d37).(char const * mapname, t_game_maptype maptype, t_clienttagcxx . . $ pvpgn/t_clienttag# clienttag)
300 {
301 if (!mapname)
302 {
303 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL mapname");
304 return -1;
305 }
306 if (!clienttag)
307 {
308 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got bad clienttag");
309 return -1;
310 }
311
312 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_debugcxx . . $ pvpgn/eventlog_level_debug., __FUNCTION__, "checking mapname \"{}\" maptype={}", mapname, (int)maptype);
313 if (maptype == game_maptype_ladder) /* FIXME: what about Ironman? */
314 return 1;
315
316 return 0;
317 }
318
319 /* *********************************************************************************************************************
320 * handling of bnxpcalc and bnxplevel stuff (old code)
321 * *********************************************************************************************************************/
322
323 extern int ladder_createxptablecxx . . $ pvpgn/bnetd/ladder_createxptable(5ae29d726ae57f88).(const char *xplevelfile, const char *xpcalcfile)
324 {
325 stdcxx . . $ std/::FILEcxx . . $ std/FILE# *fd1, *fd2;
326 char buffer[256];
327 char *p;
328 t_xpcalc_entrycxx . . $ pvpgn/bnetd/t_xpcalc_entry# * newxpcalc;
329 int len, i, j;
330 int level, startxp, neededxp, mingames;
331 float lossfactor;
332 int minlevel, leveldiff, higher_xpgained, higher_xplost, lower_xpgained, lower_xplost = 10;
333
334 if (xplevelfile == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! || xpcalcfile == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) {
335 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., "ladder_createxptable", "got NULL filename(s)");
336 return -1;
337 }
338
339 /* first lets open files */
340 if ((fd1 = stdcxx . . $ std/::fopencxx . . $ std/fopen(82ec0787cd37e0a3).(xplevelfile, "rt")) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) {
341 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., "ladder_createxptable", "could not open XP level file : \"{}\"", xplevelfile);
342 return -1;
343 }
344
345 if ((fd2 = stdcxx . . $ std/::fopencxx . . $ std/fopen(82ec0787cd37e0a3).(xpcalcfile, "rt")) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) {
346 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., "ladder_createxptable", "could not open XP calc file : \"{}\"", xpcalcfile);
347 stdcxx . . $ std/::fclosecxx . . $ std/fclose(89bc1efcdac0ca22).(fd1);
348 return -1;
349 }
350
351 /* then lets allocate mem for all the arrays */
352 xpcalccxx . . $ pvpgn/bnetd/xpcalc. = (t_xpcalc_entrycxx . . $ pvpgn/bnetd/t_xpcalc_entry#*)xmalloccxx . . $ `src/common/xalloc.h:43:9`!(sizeof(t_xpcalc_entry)* W3_XPCALC_MAXLEVELcxx . . $ `src/bnetd/ladder.h:30:9`!); //presume the maximal leveldiff is level number
353
354 w3_xpcalc_maxleveldiffcxx . . $ pvpgn/bnetd/w3_xpcalc_maxleveldiff. = -1;
355 stdcxx . . $ std/::memset(xpcalccxx . . $ pvpgn/bnetd/xpcalc., 0, sizeof(t_xpcalc_entrycxx . . $ pvpgn/bnetd/t_xpcalc_entry#)* W3_XPCALC_MAXLEVELcxx . . $ `src/bnetd/ladder.h:30:9`!);
356 xplevelscxx . . $ pvpgn/bnetd/xplevels. = (t_xplevel_entrycxx . . $ pvpgn/bnetd/t_xplevel_entry#*)xmalloccxx . . $ `src/common/xalloc.h:43:9`!(sizeof(t_xplevel_entry)* W3_XPCALC_MAXLEVELcxx . . $ `src/bnetd/ladder.h:30:9`!);
357 stdcxx . . $ std/::memset(xplevelscxx . . $ pvpgn/bnetd/xplevels., 0, sizeof(t_xplevel_entrycxx . . $ pvpgn/bnetd/t_xplevel_entry#)* W3_XPCALC_MAXLEVELcxx . . $ `src/bnetd/ladder.h:30:9`!);
358
359 /* finally, lets read from the files */
360
361 while (stdcxx . . $ std/::fgetscxx . . $ std/fgets(efb0aaba7ac866ae).(buffer, 256, fd1)) {
362 len = stdcxx . . $ std/::strlen(buffer);
363 if (len < 2) continue;
364 if (buffer[len - 1] == '\n') buffer[len - 1] = '\0';
365
366 /* support comments */
367 for (p = buffer; *p && *p != '#'; p++);
368 if (*p == '#') *p = '\0';
369
370 if (stdcxx . . $ std/::sscanfcxx . . $ std/sscanf(6246fabbf6b5312d).(buffer, "%d %d %d %f %d", &level, &startxp, &neededxp, &lossfactor, &mingames) != 5)
371 continue;
372
373 if (level < 1 || level > W3_XPCALC_MAXLEVELcxx . . $ `src/bnetd/ladder.h:30:9`!) { /* invalid level */
374 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., "ladder_createxptable", "read INVALID player level : {}", level);
375 continue;
376 }
377
378 level--; /* the index in a C array starts from 0 */
379 xplevelscxx . . $ pvpgn/bnetd/xplevels.[level].startxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#startxp. = startxp;
380 xplevelscxx . . $ pvpgn/bnetd/xplevels.[level].neededxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#neededxp. = neededxp;
381 xplevelscxx . . $ pvpgn/bnetd/xplevels.[level].lossfactorcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#lossfactor. = (int)(lossfactor * 100); /* we store the loss factor as % */
382 xplevelscxx . . $ pvpgn/bnetd/xplevels.[level].mingamescxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#mingames. = mingames;
383 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_tracecxx . . $ pvpgn/eventlog_level_trace., "ladder_createxptable", "inserting level XP info (level: {}, startxp: {} neededxp: {} lossfactor: {} mingames: {})", level + 1, xplevelscxx . . $ pvpgn/bnetd/xplevels.[level].startxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#startxp., xplevelscxx . . $ pvpgn/bnetd/xplevels.[level].neededxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#neededxp., xplevelscxx . . $ pvpgn/bnetd/xplevels.[level].lossfactorcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#lossfactor., xplevelscxx . . $ pvpgn/bnetd/xplevels.[level].mingamescxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#mingames.);
384 }
385 stdcxx . . $ std/::fclosecxx . . $ std/fclose(89bc1efcdac0ca22).(fd1);
386
387 while (stdcxx . . $ std/::fgetscxx . . $ std/fgets(efb0aaba7ac866ae).(buffer, 256, fd2)) {
388 len = stdcxx . . $ std/::strlen(buffer);
389 if (len < 2) continue;
390 if (buffer[len - 1] == '\n') buffer[len - 1] = '\0';
391
392 /* support comments */
393 for (p = buffer; *p && *p != '#'; p++);
394 if (*p == '#') *p = '\0';
395
396 if (stdcxx . . $ std/::sscanfcxx . . $ std/sscanf(6246fabbf6b5312d).(buffer, " %d %d %d %d %d %d ", &minlevel, &leveldiff, &higher_xpgained, &higher_xplost, &lower_xpgained, &lower_xplost) != 6)
397 continue;
398
399 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_tracecxx . . $ pvpgn/eventlog_level_trace., "ladder_createxptable", "parsed xpcalc leveldiff : {}", leveldiff);
400
401 if (leveldiff <0) {
402 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., "ladder_createxptable", "got invalid level diff : {}", leveldiff);
403 continue;
404 }
405
406 if (leveldiff>(w3_xpcalc_maxleveldiffcxx . . $ pvpgn/bnetd/w3_xpcalc_maxleveldiff. + 1)) {
407 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "expected entry for leveldiff={} but found {}", w3_xpcalc_maxleveldiffcxx . . $ pvpgn/bnetd/w3_xpcalc_maxleveldiff. + 1, leveldiff);
408 continue;
409 }
410
411 w3_xpcalc_maxleveldiffcxx . . $ pvpgn/bnetd/w3_xpcalc_maxleveldiff. = leveldiff;
412
413 xpcalccxx . . $ pvpgn/bnetd/xpcalc.[leveldiff].higher_winxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_6#higher_winxp. = higher_xpgained;
414 xpcalccxx . . $ pvpgn/bnetd/xpcalc.[leveldiff].higher_lossxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_6#higher_lossxp. = higher_xplost;
415 xpcalccxx . . $ pvpgn/bnetd/xpcalc.[leveldiff].lower_winxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_6#lower_winxp. = lower_xpgained;
416 xpcalccxx . . $ pvpgn/bnetd/xpcalc.[leveldiff].lower_lossxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_6#lower_lossxp. = lower_xplost;
417 }
418 stdcxx . . $ std/::fclosecxx . . $ std/fclose(89bc1efcdac0ca22).(fd2);
419
420 newxpcalc = (t_xpcalc_entrycxx . . $ pvpgn/bnetd/t_xpcalc_entry#*)xrealloccxx . . $ `src/common/xalloc.h:47:9`!(xpcalc, sizeof(t_xpcalc_entry)* (w3_xpcalc_maxleveldiff + 1));
421 xpcalccxx . . $ pvpgn/bnetd/xpcalc. = newxpcalc;
422
423 /* OK, now we need to test couse if the user forgot to put some values
424 * lots of profiles could get screwed up
425 */
426
427 if (w3_xpcalc_maxleveldiffcxx . . $ pvpgn/bnetd/w3_xpcalc_maxleveldiff. < 0)
428 {
429 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "found no valid entries for WAR3 xp calculation");
430 ladder_destroyxptablecxx . . $ pvpgn/bnetd/ladder_destroyxptable(49f6e7a06ebc5aa8).();
431 return -1;
432 }
433
434 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_infocxx . . $ pvpgn/eventlog_level_info., __FUNCTION__, "set war3 xpcalc maxleveldiff to {}", w3_xpcalc_maxleveldiffcxx . . $ pvpgn/bnetd/w3_xpcalc_maxleveldiff.);
435
436 for (j = 0; j <= w3_xpcalc_maxleveldiffcxx . . $ pvpgn/bnetd/w3_xpcalc_maxleveldiff.; j++)
437 if (xpcalccxx . . $ pvpgn/bnetd/xpcalc.[j].higher_winxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_6#higher_winxp. == 0 || xpcalccxx . . $ pvpgn/bnetd/xpcalc.[j].higher_lossxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_6#higher_lossxp. == 0 ||
438 xpcalccxx . . $ pvpgn/bnetd/xpcalc.[j].lower_winxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_6#lower_winxp. == 0 || xpcalccxx . . $ pvpgn/bnetd/xpcalc.[j].lower_lossxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_6#lower_lossxp. == 0) {
439 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "I found 0 for a win/loss XP, please check your config file");
440 ladder_destroyxptablecxx . . $ pvpgn/bnetd/ladder_destroyxptable(49f6e7a06ebc5aa8).();
441 return -1;
442 }
443
444 for (i = 0; i<W3_XPCALC_MAXLEVELcxx . . $ `src/bnetd/ladder.h:30:9`!; i++)
445 if ((i > 0 && xplevelscxx . . $ pvpgn/bnetd/xplevels.[i].neededxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#neededxp. == 0) || xplevelscxx . . $ pvpgn/bnetd/xplevels.[i].lossfactorcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#lossfactor. == 0
446 || (i > 0 && (xplevelscxx . . $ pvpgn/bnetd/xplevels.[i].startxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#startxp. <= xplevelscxx . . $ pvpgn/bnetd/xplevels.[i - 1].startxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#startxp. || xplevelscxx . . $ pvpgn/bnetd/xplevels.[i].neededxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#neededxp. < xplevelscxx . . $ pvpgn/bnetd/xplevels.[i - 1].neededxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#neededxp.))) {
447 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "I found 0 for a level XP, please check your config file (level: {} neededxp: {} lossfactor: {})", i + 1, xplevelscxx . . $ pvpgn/bnetd/xplevels.[i].neededxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#neededxp., xplevelscxx . . $ pvpgn/bnetd/xplevels.[i].lossfactorcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#lossfactor.);
448 ladder_destroyxptablecxx . . $ pvpgn/bnetd/ladder_destroyxptable(49f6e7a06ebc5aa8).();
449 return -1;
450 }
451
452 return 0;
453 }
454
455 extern void ladder_destroyxptablecxx . . $ pvpgn/bnetd/ladder_destroyxptable(49f6e7a06ebc5aa8).()
456 {
457 if (xpcalccxx . . $ pvpgn/bnetd/xpcalc. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) xfreecxx . . $ `src/common/xalloc.h:51:9`!(xpcalc);
458 if (xplevelscxx . . $ pvpgn/bnetd/xplevels. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) xfreecxx . . $ `src/common/xalloc.h:51:9`!(xplevels);
459 }
460
461 extern int war3_get_maxleveldiffcxx . . $ pvpgn/bnetd/war3_get_maxleveldiff(b126dc7c1de90089).()
462 {
463 return w3_xpcalc_maxleveldiffcxx . . $ pvpgn/bnetd/w3_xpcalc_maxleveldiff.;
464 }
465
466
467 extern int ladder_war3_xpdiffcxx . . $ pvpgn/bnetd/ladder_war3_xpdiff(61837cdd6f1cbbd0).(unsigned int winnerlevel, unsigned int looserlevel, int *winxpdiff, int *loosxpdiff)
468 {
469 int diff, absdiff;
470
471 diff = winnerlevel - looserlevel;
472 absdiff = (diff < 0) ? (-diff) : diff;
473
474 if (absdiff > w3_xpcalc_maxleveldiffcxx . . $ pvpgn/bnetd/w3_xpcalc_maxleveldiff.) {
475 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., "ladder_war3_xpdiff", "got invalid level difference : {}", absdiff);
476 return -1;
477 }
478
479 if (winnerlevel > W3_XPCALC_MAXLEVELcxx . . $ `src/bnetd/ladder.h:30:9`! || looserlevel > W3_XPCALC_MAXLEVELcxx . . $ `src/bnetd/ladder.h:30:9`! || winnerlevel < 1 || looserlevel < 1) {
480 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., "ladder_war3_xpdiff", "got invalid account levels (win: {} loss: {})", winnerlevel, looserlevel);
481 return -1;
482 }
483
484 if (winxpdiff == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! || loosxpdiff == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) {
485 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., "ladder_war3_xpdiff", "got NULL winxpdiff, loosxpdiff");
486 return -1;
487 }
488 /* we return the xp difference for the winner and the looser
489 * we compute that from the xp charts also applying the loss factor for
490 * lower level profiles
491 * FIXME: ?! loss factor doesnt keep the sum of xp won/lost constant
492 * DON'T CARE, cause current win/loss values aren't symetrical any more
493 */
494 if (diff >= 0) {
495 *winxpdiff = xpcalccxx . . $ pvpgn/bnetd/xpcalc.[absdiff].higher_winxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_6#higher_winxp.;
496 *loosxpdiff = -(xpcalccxx . . $ pvpgn/bnetd/xpcalc.[absdiff].lower_lossxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_6#lower_lossxp. * xplevelscxx . . $ pvpgn/bnetd/xplevels.[looserlevel - 1].lossfactorcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#lossfactor.) / 100;
497 }
498 else {
499 *winxpdiff = xpcalccxx . . $ pvpgn/bnetd/xpcalc.[absdiff].lower_winxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_6#lower_winxp.;
500 *loosxpdiff = -(xpcalccxx . . $ pvpgn/bnetd/xpcalc.[absdiff].higher_lossxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_6#higher_lossxp. * xplevelscxx . . $ pvpgn/bnetd/xplevels.[looserlevel - 1].lossfactorcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#lossfactor.) / 100;
501 }
502
503 return 0;
504 }
505
506 extern int ladder_war3_updatelevelcxx . . $ pvpgn/bnetd/ladder_war3_updatelevel(1cb9ad283036edc7).(unsigned int oldlevel, int xp)
507 {
508 int i, mylevel;
509
510 if (oldlevel < 1 || oldlevel > W3_XPCALC_MAXLEVELcxx . . $ `src/bnetd/ladder.h:30:9`!) {
511 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., "ladder_war3_updatelevel", "got invalid level: {}", oldlevel);
512 return oldlevel;
513 }
514
515 if (xp <= 0) return 1;
516
517 mylevel = oldlevel;
518
519 for (i = mylevel; i < W3_XPCALC_MAXLEVELcxx . . $ `src/bnetd/ladder.h:30:9`!; i++)
520 if (xplevelscxx . . $ pvpgn/bnetd/xplevels.[i].startxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#startxp. > xp) { mylevel = i; break; }
521
522 for (i = mylevel - 1; i > 0; i--)
523 if (xplevelscxx . . $ pvpgn/bnetd/xplevels.[i - 1].startxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#startxp. < xp) { mylevel = i + 1; break; }
524
525 return mylevel;
526 }
527
528 extern int ladder_war3_get_min_xpcxx . . $ pvpgn/bnetd/ladder_war3_get_min_xp(4c679297bf94b9eb).(unsigned int Level)
529 {
530 if (Level < 1 || Level > W3_XPCALC_MAXLEVELcxx . . $ `src/bnetd/ladder.h:30:9`!)
531 {
532 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got invalid Level {}", Level);
533 return -1;
534 }
535 return xplevelscxx . . $ pvpgn/bnetd/xplevels.[Level - 1].startxpcxx . . $ pvpgn/bnetd/$anonymous_type_2475ee68166332f8_5#startxp.;
536 }
537
538
539 /* *********************************************************************************************************************
540 * start of new ladder codes
541 * *********************************************************************************************************************/
542
543
544 LadderKeycxx . . $ pvpgn/bnetd/LadderKey#::LadderKeycxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(t_ladder_idcxx . . $ pvpgn/bnetd/t_ladder_id# ladderId_, t_clienttagcxx . . $ pvpgn/t_clienttag# clienttag_, t_ladder_sortcxx . . $ pvpgn/bnetd/t_ladder_sort# ladderSort_, t_ladder_timecxx . . $ pvpgn/bnetd/t_ladder_time# ladderTime_)
545 :ladderIdcxx . . $ pvpgn/bnetd/LadderKey#ladderId.(ladderId_), clienttagcxx . . $ pvpgn/bnetd/LadderKey#clienttag.(clienttag_), ladderSortcxx . . $ pvpgn/bnetd/LadderKey#ladderSort.(ladderSort_), ladderTimecxx . . $ pvpgn/bnetd/LadderKey#ladderTime.(ladderTime_)
546 {
547 }
548
549
550 LadderKeycxx . . $ pvpgn/bnetd/LadderKey#::~cxx . . $ pvpgn/bnetd/LadderKey#`~LadderKey`(ced63f7c635d850d).LadderKeycxx . . $ pvpgn/bnetd/LadderKey#() throw ()
551 {}
552
553
554 bool
555 LadderKeycxx . . $ pvpgn/bnetd/LadderKey#::operatorcxx . . $ pvpgn/bnetd/LadderKey#`operator==`(7e4c339e17ad259f).== (const LadderKeycxx . . $ pvpgn/bnetd/LadderKey#& right) const
556 {
557 return ((ladderIdcxx . . $ pvpgn/bnetd/LadderKey#ladderId. == right.ladderIdcxx . . $ pvpgn/bnetd/LadderKey#ladderId.) &&
558 (clienttagcxx . . $ pvpgn/bnetd/LadderKey#clienttag. == right.clienttagcxx . . $ pvpgn/bnetd/LadderKey#clienttag.) &&
559 (ladderSortcxx . . $ pvpgn/bnetd/LadderKey#ladderSort. == right.ladderSortcxx . . $ pvpgn/bnetd/LadderKey#ladderSort.) &&
560 (ladderTimecxx . . $ pvpgn/bnetd/LadderKey#ladderTime. == right.ladderTimecxx . . $ pvpgn/bnetd/LadderKey#ladderTime.));
561 }
562
563
564 bool
565 LadderKeycxx . . $ pvpgn/bnetd/LadderKey#::operatorcxx . . $ pvpgn/bnetd/LadderKey#`operator<`(7e4c339e17ad259f).< (const LadderKeycxx . . $ pvpgn/bnetd/LadderKey#& right) const
566 {
567 if (ladderIdcxx . . $ pvpgn/bnetd/LadderKey#ladderId. != right.ladderIdcxx . . $ pvpgn/bnetd/LadderKey#ladderId.)
568 return (ladderIdcxx . . $ pvpgn/bnetd/LadderKey#ladderId. < right.ladderIdcxx . . $ pvpgn/bnetd/LadderKey#ladderId.);
569 else if (clienttagcxx . . $ pvpgn/bnetd/LadderKey#clienttag. != right.clienttagcxx . . $ pvpgn/bnetd/LadderKey#clienttag.)
570 return (clienttagcxx . . $ pvpgn/bnetd/LadderKey#clienttag. < right.clienttagcxx . . $ pvpgn/bnetd/LadderKey#clienttag.);
571 else if (ladderSortcxx . . $ pvpgn/bnetd/LadderKey#ladderSort. != right.ladderSortcxx . . $ pvpgn/bnetd/LadderKey#ladderSort.)
572 return ladderSortcxx . . $ pvpgn/bnetd/LadderKey#ladderSort. < right.ladderSortcxx . . $ pvpgn/bnetd/LadderKey#ladderSort.;
573 else
574 return (ladderTimecxx . . $ pvpgn/bnetd/LadderKey#ladderTime. < right.ladderTimecxx . . $ pvpgn/bnetd/LadderKey#ladderTime.);
575 }
576
577
578 t_ladder_idcxx . . $ pvpgn/bnetd/t_ladder_id#
579 LadderKeycxx . . $ pvpgn/bnetd/LadderKey#::getLadderIdcxx . . $ pvpgn/bnetd/LadderKey#getLadderId(ceffab98f24dad29).() const
580 {
581 return ladderIdcxx . . $ pvpgn/bnetd/LadderKey#ladderId.;
582 }
583
584
585 t_clienttagcxx . . $ pvpgn/t_clienttag#
586 LadderKeycxx . . $ pvpgn/bnetd/LadderKey#::getClienttagcxx . . $ pvpgn/bnetd/LadderKey#getClienttag(ddd8539a2fcdd4ce).() const
587 {
588 return clienttagcxx . . $ pvpgn/bnetd/LadderKey#clienttag.;
589 }
590
591
592 t_ladder_sortcxx . . $ pvpgn/bnetd/t_ladder_sort#
593 LadderKeycxx . . $ pvpgn/bnetd/LadderKey#::getLadderSortcxx . . $ pvpgn/bnetd/LadderKey#getLadderSort(f222824a3f7f9f).() const
594 {
595 return ladderSortcxx . . $ pvpgn/bnetd/LadderKey#ladderSort.;
596 }
597
598
599 t_ladder_timecxx . . $ pvpgn/bnetd/t_ladder_time#
600 LadderKeycxx . . $ pvpgn/bnetd/LadderKey#::getLadderTimecxx . . $ pvpgn/bnetd/LadderKey#getLadderTime(95c8d306b18567f).() const
601 {
602 return ladderTimecxx . . $ pvpgn/bnetd/LadderKey#ladderTime.;
603 }
604
605 LadderKeycxx . . $ pvpgn/bnetd/LadderKey#
606 LadderKeycxx . . $ pvpgn/bnetd/LadderKey#::getOpposingKeycxx . . $ pvpgn/bnetd/LadderKey#getOpposingKey(277d860c897d83c9).() const
607 {
608 if (ladderTimecxx . . $ pvpgn/bnetd/LadderKey#ladderTime. == ladder_time_activecxx . . $ pvpgn/bnetd/ladder_time_active.)
609 return LadderKeycxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladderIdcxx . . $ pvpgn/bnetd/LadderKey#ladderId., clienttagcxx . . $ pvpgn/bnetd/LadderKey#clienttag., ladderSortcxx . . $ pvpgn/bnetd/LadderKey#ladderSort., ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.);
610 else if (ladderTimecxx . . $ pvpgn/bnetd/LadderKey#ladderTime. == ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.)
611 return LadderKeycxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladderIdcxx . . $ pvpgn/bnetd/LadderKey#ladderId., clienttagcxx . . $ pvpgn/bnetd/LadderKey#clienttag., ladderSortcxx . . $ pvpgn/bnetd/LadderKey#ladderSort., ladder_time_activecxx . . $ pvpgn/bnetd/ladder_time_active.);
612 else
613 return LadderKeycxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladderIdcxx . . $ pvpgn/bnetd/LadderKey#ladderId., clienttagcxx . . $ pvpgn/bnetd/LadderKey#clienttag., ladderSortcxx . . $ pvpgn/bnetd/LadderKey#ladderSort., ladderTimecxx . . $ pvpgn/bnetd/LadderKey#ladderTime.);;
614 }
615
616
617 LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject#::LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject#LadderReferencedObject(a405232c11a3fb7b).(t_accountcxx . . $ pvpgn/bnetd/t_account# *account_)
618 :referenceTypecxx . . $ pvpgn/bnetd/LadderReferencedObject#referenceType.(referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.), accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account.(account_), teamcxx . . $ pvpgn/bnetd/LadderReferencedObject#team.(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!)
619 {
620 }
621
622
623 LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject#::LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject#LadderReferencedObject(5f5c25e2d1d679ca).(t_teamcxx . . $ pvpgn/bnetd/t_team# *team_)
624 : referenceTypecxx . . $ pvpgn/bnetd/LadderReferencedObject#referenceType.(referenceTypeTeamcxx . . $ pvpgn/bnetd/referenceTypeTeam.), accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account.(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!), teamcxx . . $ pvpgn/bnetd/LadderReferencedObject#team.(team_)
625 {
626 }
627
628
629 LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject#::~cxx . . $ pvpgn/bnetd/LadderReferencedObject#`~LadderReferencedObject`(ced63f7c635d850d).LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject#() throw()
630 {
631 }
632
633
634 bool
635 LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject#::getDatacxx . . $ pvpgn/bnetd/LadderReferencedObject#getData(f2382695747ae1).(const LadderKeycxx . . $ pvpgn/bnetd/LadderKey#& ladderKey_, unsigned int& uid_, unsigned int& primary_, unsigned int& secondary_, unsigned int& tertiary_) const
636 {
637 // returns false in case of failures - and also when no need to add this referencedObject to ladder
638 t_clienttagcxx . . $ pvpgn/t_clienttag# clienttag = ladderKey_.getClienttagcxx . . $ pvpgn/bnetd/LadderKey#getClienttag(ddd8539a2fcdd4ce).();
639 t_ladder_idcxx . . $ pvpgn/bnetd/t_ladder_id# ladderId = ladderKey_.getLadderIdcxx . . $ pvpgn/bnetd/LadderKey#getLadderId(ceffab98f24dad29).();
640
641 if (referenceTypecxx . . $ pvpgn/bnetd/LadderReferencedObject#referenceType. == referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)
642 {
643 uid_ = account_get_uidcxx . . $ `src/bnetd/account.h:91:9`!(account);
644 if (clienttag == CLIENTTAG_WARCRAFT3_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:111:9`! || clienttag == CLIENTTAG_WAR3XP_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:113:9`!) {
645 if (!(primary_ = account_get_ladder_levelcxx . . $ pvpgn/bnetd/account_get_ladder_level(829aa05f631ee398).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId)))
646 return false;
647 secondary_ = account_get_ladder_xpcxx . . $ pvpgn/bnetd/account_get_ladder_xp(829aa05f631ee398).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId);
648 tertiary_ = 0;
649 return true;
650 }
651 else if (tag_check_wolv1(clienttag) || tag_check_wolv2(clienttag)) {
652 if (!(primary_ = account_get_ladder_pointscxx . . $ pvpgn/bnetd/account_get_ladder_points(829aa05f631ee398).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId)))
653 return false;
654 secondary_ = account_get_ladder_winscxx . . $ pvpgn/bnetd/account_get_ladder_wins(44091a2c7ac3910).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId);
655 tertiary_ = 0;
656 return true;
657 }
658 else{
659 t_ladder_sortcxx . . $ pvpgn/bnetd/t_ladder_sort# ladderSort = ladderKey_.getLadderSortcxx . . $ pvpgn/bnetd/LadderKey#getLadderSort(f222824a3f7f9f).();
660 unsigned int rating, wins, games;
661 // current ladders
662 if (ladderKey_.getLadderTimecxx . . $ pvpgn/bnetd/LadderKey#getLadderTime(95c8d306b18567f).() == ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.)
663 {
664 rating = account_get_ladder_ratingcxx . . $ pvpgn/bnetd/account_get_ladder_rating(44091a2c7ac3910).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId);
665 if (!rating) return false;
666 wins = account_get_ladder_winscxx . . $ pvpgn/bnetd/account_get_ladder_wins(44091a2c7ac3910).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId);
667 games = wins +
668 account_get_ladder_lossescxx . . $ pvpgn/bnetd/account_get_ladder_losses(44091a2c7ac3910).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId) +
669 account_get_ladder_disconnectscxx . . $ pvpgn/bnetd/account_get_ladder_disconnects(44091a2c7ac3910).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId) +
670 account_get_ladder_drawscxx . . $ pvpgn/bnetd/account_get_ladder_draws(44091a2c7ac3910).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId);
671 }
672 else{ // active ladders
673 rating = account_get_ladder_active_ratingcxx . . $ pvpgn/bnetd/account_get_ladder_active_rating(44091a2c7ac3910).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId);
674 if (!rating) return false;
675 wins = account_get_ladder_active_winscxx . . $ pvpgn/bnetd/account_get_ladder_active_wins(44091a2c7ac3910).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId);
676 games = wins +
677 account_get_ladder_active_lossescxx . . $ pvpgn/bnetd/account_get_ladder_active_losses(44091a2c7ac3910).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId) +
678 account_get_ladder_active_disconnectscxx . . $ pvpgn/bnetd/account_get_ladder_active_disconnects(44091a2c7ac3910).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId) +
679 account_get_ladder_active_drawscxx . . $ pvpgn/bnetd/account_get_ladder_active_draws(44091a2c7ac3910).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId);
680 }
681 if (games == 0)
682 return false;
683
684 unsigned int ratio = (wins << 10) / games;
685 switch (ladderSort)
686 {
687 case ladder_sort_highestratedcxx . . $ pvpgn/bnetd/ladder_sort_highestrated.:
688 primary_ = rating;
689 secondary_ = wins;
690 tertiary_ = ratio;
691 return true;
692 case ladder_sort_mostwinscxx . . $ pvpgn/bnetd/ladder_sort_mostwins.:
693 primary_ = wins;
694 secondary_ = rating;
695 tertiary_ = ratio;
696 return true;
697 case ladder_sort_mostgamescxx . . $ pvpgn/bnetd/ladder_sort_mostgames.:
698 primary_ = games;
699 secondary_ = rating;
700 tertiary_ = ratio;
701 return true;
702 default:
703 return false;
704 }
705 }
706 }
707 else if (referenceTypecxx . . $ pvpgn/bnetd/LadderReferencedObject#referenceType. == referenceTypeTeamcxx . . $ pvpgn/bnetd/referenceTypeTeam.)
708 {
709 uid_ = team_get_teamidcxx . . $ pvpgn/bnetd/team_get_teamid(3d0b4ed7d37a7d35).(teamcxx . . $ pvpgn/bnetd/LadderReferencedObject#team.);
710 if (!(primary_ = team_get_levelcxx . . $ pvpgn/bnetd/team_get_level(bfd9c5af88c00d10).(teamcxx . . $ pvpgn/bnetd/LadderReferencedObject#team.)))
711 return false;
712 secondary_ = team_get_xpcxx . . $ pvpgn/bnetd/team_get_xp(bfd9c5af88c00d10).(teamcxx . . $ pvpgn/bnetd/LadderReferencedObject#team.);
713 tertiary_ = 0;
714 return true;
715 }
716
717 return false;
718 }
719
720 unsigned int
721 LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject#::getRankcxx . . $ pvpgn/bnetd/LadderReferencedObject#getRank(6eafb4033dcbea84).(const LadderKeycxx . . $ pvpgn/bnetd/LadderKey#& ladderKey_) const
722 {
723 t_clienttagcxx . . $ pvpgn/t_clienttag# clienttag = ladderKey_.getClienttagcxx . . $ pvpgn/bnetd/LadderKey#getClienttag(ddd8539a2fcdd4ce).();
724 t_ladder_idcxx . . $ pvpgn/bnetd/t_ladder_id# ladderId = ladderKey_.getLadderIdcxx . . $ pvpgn/bnetd/LadderKey#getLadderId(ceffab98f24dad29).();
725 t_ladder_timecxx . . $ pvpgn/bnetd/t_ladder_time# ladderTime = ladderKey_.getLadderTimecxx . . $ pvpgn/bnetd/LadderKey#getLadderTime(95c8d306b18567f).();
726 t_ladder_sortcxx . . $ pvpgn/bnetd/t_ladder_sort# ladderSort = ladderKey_.getLadderSortcxx . . $ pvpgn/bnetd/LadderKey#getLadderSort(f222824a3f7f9f).();
727
728 if (referenceTypecxx . . $ pvpgn/bnetd/LadderReferencedObject#referenceType. == referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)
729 {
730 if (ladderSort == ladder_sort_defaultcxx . . $ pvpgn/bnetd/ladder_sort_default. || ladderSort == ladder_sort_highestratedcxx . . $ pvpgn/bnetd/ladder_sort_highestrated.)
731 {
732 if (ladderTime == ladder_time_activecxx . . $ pvpgn/bnetd/ladder_time_active.)
733 {
734 return account_get_ladder_active_rankcxx . . $ pvpgn/bnetd/account_get_ladder_active_rank(829aa05f631ee398).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId);
735 }
736 else{
737 return account_get_ladder_rankcxx . . $ pvpgn/bnetd/account_get_ladder_rank(829aa05f631ee398).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId);
738 }
739 }
740 else{
741 // the account rank is only determined by highestrated/default ladder sort
742 return 0;
743 }
744 }
745 else if (referenceTypecxx . . $ pvpgn/bnetd/LadderReferencedObject#referenceType. == referenceTypeTeamcxx . . $ pvpgn/bnetd/referenceTypeTeam.)
746 {
747 return team_get_rankcxx . . $ pvpgn/bnetd/team_get_rank(bfd9c5af88c00d10).(teamcxx . . $ pvpgn/bnetd/LadderReferencedObject#team.);
748 }
749 return 0;
750 }
751
752 bool
753 LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject#::setRankcxx . . $ pvpgn/bnetd/LadderReferencedObject#setRank(f9e795c3fd74e783).(const LadderKeycxx . . $ pvpgn/bnetd/LadderKey#& ladderKey_, unsigned int rank_) const
754 {
755 t_clienttagcxx . . $ pvpgn/t_clienttag# clienttag = ladderKey_.getClienttagcxx . . $ pvpgn/bnetd/LadderKey#getClienttag(ddd8539a2fcdd4ce).();
756 t_ladder_idcxx . . $ pvpgn/bnetd/t_ladder_id# ladderId = ladderKey_.getLadderIdcxx . . $ pvpgn/bnetd/LadderKey#getLadderId(ceffab98f24dad29).();
757 t_ladder_timecxx . . $ pvpgn/bnetd/t_ladder_time# ladderTime = ladderKey_.getLadderTimecxx . . $ pvpgn/bnetd/LadderKey#getLadderTime(95c8d306b18567f).();
758 t_ladder_sortcxx . . $ pvpgn/bnetd/t_ladder_sort# ladderSort = ladderKey_.getLadderSortcxx . . $ pvpgn/bnetd/LadderKey#getLadderSort(f222824a3f7f9f).();
759
760 if (referenceTypecxx . . $ pvpgn/bnetd/LadderReferencedObject#referenceType. == referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)
761 {
762 if (ladderSort == ladder_sort_defaultcxx . . $ pvpgn/bnetd/ladder_sort_default. || ladderSort == ladder_sort_highestratedcxx . . $ pvpgn/bnetd/ladder_sort_highestrated.)
763 {
764 if (ladderTime == ladder_time_activecxx . . $ pvpgn/bnetd/ladder_time_active.)
765 {
766 account_set_ladder_active_rankcxx . . $ pvpgn/bnetd/account_set_ladder_active_rank(8c7f1be2c24befe).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId, rank_);
767 }
768 else{
769 account_set_ladder_rankcxx . . $ pvpgn/bnetd/account_set_ladder_rank(8c7f1be2c24befe).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId, rank_);
770 }
771 }
772 else{
773 // the account rank is only determined by highestrated/default ladder sort
774 return false;
775 }
776 }
777 else if (referenceTypecxx . . $ pvpgn/bnetd/LadderReferencedObject#referenceType. == referenceTypeTeamcxx . . $ pvpgn/bnetd/referenceTypeTeam.)
778 {
779 team_set_rankcxx . . $ pvpgn/bnetd/team_set_rank(635b0a799ca96413).(teamcxx . . $ pvpgn/bnetd/LadderReferencedObject#team., rank_);
780 }
781 return true;
782 }
783
784
785 void
786 LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject#::activatecxx . . $ pvpgn/bnetd/LadderReferencedObject#activate(de7834775c645ebb).(const LadderKeycxx . . $ pvpgn/bnetd/LadderKey#& ladderKey_) const
787 {
788 if (referenceTypecxx . . $ pvpgn/bnetd/LadderReferencedObject#referenceType. == referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)
789 {
790 if (ladderKey_.getLadderSortcxx . . $ pvpgn/bnetd/LadderKey#getLadderSort(f222824a3f7f9f).() == ladder_sort_highestratedcxx . . $ pvpgn/bnetd/ladder_sort_highestrated.)
791 {
792
793 t_clienttagcxx . . $ pvpgn/t_clienttag# clienttag = ladderKey_.getClienttagcxx . . $ pvpgn/bnetd/LadderKey#getClienttag(ddd8539a2fcdd4ce).();
794 t_ladder_idcxx . . $ pvpgn/bnetd/t_ladder_id# ladderId = ladderKey_.getLadderIdcxx . . $ pvpgn/bnetd/LadderKey#getLadderId(ceffab98f24dad29).();
795 char const * timestr;
796 t_bnettimecxx . . $ pvpgn/t_bnettime# bt;
797
798 account_set_ladder_active_winscxx . . $ pvpgn/bnetd/account_set_ladder_active_wins(8c7f1be2c24befe).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId,
799 account_get_ladder_winscxx . . $ pvpgn/bnetd/account_get_ladder_wins(44091a2c7ac3910).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId));
800 account_set_ladder_active_lossescxx . . $ pvpgn/bnetd/account_set_ladder_active_losses(8c7f1be2c24befe).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId,
801 account_get_ladder_lossescxx . . $ pvpgn/bnetd/account_get_ladder_losses(44091a2c7ac3910).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId));
802 account_set_ladder_active_drawscxx . . $ pvpgn/bnetd/account_set_ladder_active_draws(8c7f1be2c24befe).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId,
803 account_get_ladder_drawscxx . . $ pvpgn/bnetd/account_get_ladder_draws(44091a2c7ac3910).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId));
804 account_set_ladder_active_disconnectscxx . . $ pvpgn/bnetd/account_set_ladder_active_disconnects(8c7f1be2c24befe).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId,
805 account_get_ladder_disconnectscxx . . $ pvpgn/bnetd/account_get_ladder_disconnects(44091a2c7ac3910).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId));
806 account_set_ladder_active_ratingcxx . . $ pvpgn/bnetd/account_set_ladder_active_rating(8c7f1be2c24befe).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId,
807 account_get_ladder_ratingcxx . . $ pvpgn/bnetd/account_get_ladder_rating(44091a2c7ac3910).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId));
808 account_set_ladder_active_rankcxx . . $ pvpgn/bnetd/account_set_ladder_active_rank(8c7f1be2c24befe).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId,
809 account_get_ladder_rankcxx . . $ pvpgn/bnetd/account_get_ladder_rank(829aa05f631ee398).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId));
810 if (!(timestr = account_get_ladder_last_timecxx . . $ pvpgn/bnetd/account_get_ladder_last_time(195610fd04255b8f).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId)))
811 timestr = BNETD_LADDER_DEFAULT_TIMEcxx . . $ `src/common/setup_before.h:118:9`!;
812 bnettime_set_strcxx . . $ pvpgn/bnettime_set_str(faeb564d2075bce7).(&bt, timestr);
813 account_set_ladder_active_last_timecxx . . $ pvpgn/bnetd/account_set_ladder_active_last_time(32ef04081d2febf2).(accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account., clienttag, ladderId, bt);
814 }
815 }
816 }
817
818
819 const t_referenceTypecxx . . $ pvpgn/bnetd/t_referenceType#
820 LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject#::getReferenceTypecxx . . $ pvpgn/bnetd/LadderReferencedObject#getReferenceType(e852590b553adecf).() const
821 {
822 return referenceTypecxx . . $ pvpgn/bnetd/LadderReferencedObject#referenceType.;
823 }
824
825
826 t_accountcxx . . $ pvpgn/bnetd/t_account# *
827 LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject#::getAccountcxx . . $ pvpgn/bnetd/LadderReferencedObject#getAccount(bd50dfe41cbbfab3).() const
828 {
829 if (referenceTypecxx . . $ pvpgn/bnetd/LadderReferencedObject#referenceType. == referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)
830 return accountcxx . . $ pvpgn/bnetd/LadderReferencedObject#account.;
831 else
832 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
833 }
834
835 t_teamcxx . . $ pvpgn/bnetd/t_team# *
836 LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject#::getTeamcxx . . $ pvpgn/bnetd/LadderReferencedObject#getTeam(d86d4840e1570a5a).() const
837 {
838 if (referenceTypecxx . . $ pvpgn/bnetd/LadderReferencedObject#referenceType. == referenceTypeTeamcxx . . $ pvpgn/bnetd/referenceTypeTeam.)
839 return teamcxx . . $ pvpgn/bnetd/LadderReferencedObject#team.;
840 else
841 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
842 }
843
844
845 LadderEntrycxx . . $ pvpgn/bnetd/LadderEntry#::LadderEntrycxx . . $ pvpgn/bnetd/LadderEntry#LadderEntry(2009b3a2f6ee1637).(unsigned int uid_, unsigned int primary_, unsigned int secondary_, unsigned int tertiary_, LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject# referencedObject_)
846 :uidcxx . . $ pvpgn/bnetd/LadderEntry#uid.(uid_), primarycxx . . $ pvpgn/bnetd/LadderEntry#primary.(primary_), secondarycxx . . $ pvpgn/bnetd/LadderEntry#secondary.(secondary_), tertiarycxx . . $ pvpgn/bnetd/LadderEntry#tertiary.(tertiary_), rankcxx . . $ pvpgn/bnetd/LadderEntry#rank.(0), referencedObjectcxx . . $ pvpgn/bnetd/LadderEntry#referencedObject.(referencedObject_)
847 {
848 }
849
850
851 LadderEntrycxx . . $ pvpgn/bnetd/LadderEntry#::~cxx . . $ pvpgn/bnetd/LadderEntry#`~LadderEntry`(ced63f7c635d850d).LadderEntrycxx . . $ pvpgn/bnetd/LadderEntry#() throw()
852 {
853 }
854
855
856 unsigned int
857 LadderEntrycxx . . $ pvpgn/bnetd/LadderEntry#::getUidcxx . . $ pvpgn/bnetd/LadderEntry#getUid(ddd8539a2fcdd4ce).() const
858 {
859 return uidcxx . . $ pvpgn/bnetd/LadderEntry#uid.;
860 }
861
862
863 unsigned int
864 LadderEntrycxx . . $ pvpgn/bnetd/LadderEntry#::getPrimarycxx . . $ pvpgn/bnetd/LadderEntry#getPrimary(ddd8539a2fcdd4ce).() const
865 {
866 return primarycxx . . $ pvpgn/bnetd/LadderEntry#primary.;
867 }
868
869
870 unsigned int
871 LadderEntrycxx . . $ pvpgn/bnetd/LadderEntry#::getSecondarycxx . . $ pvpgn/bnetd/LadderEntry#getSecondary(ddd8539a2fcdd4ce).() const
872 {
873 return secondarycxx . . $ pvpgn/bnetd/LadderEntry#secondary.;
874 }
875
876
877 unsigned int
878 LadderEntrycxx . . $ pvpgn/bnetd/LadderEntry#::getTertiarycxx . . $ pvpgn/bnetd/LadderEntry#getTertiary(ddd8539a2fcdd4ce).() const
879 {
880 return tertiarycxx . . $ pvpgn/bnetd/LadderEntry#tertiary.;
881 }
882
883
884 unsigned int
885 LadderEntrycxx . . $ pvpgn/bnetd/LadderEntry#::getRankcxx . . $ pvpgn/bnetd/LadderEntry#getRank(ddd8539a2fcdd4ce).() const
886 {
887 return rankcxx . . $ pvpgn/bnetd/LadderEntry#rank.;
888 }
889
890
891 const LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject#&
892 LadderEntrycxx . . $ pvpgn/bnetd/LadderEntry#::getReferencedObjectcxx . . $ pvpgn/bnetd/LadderEntry#getReferencedObject(10d5159f3188c785).() const
893 {
894 return referencedObjectcxx . . $ pvpgn/bnetd/LadderEntry#referencedObject.;
895 }
896
897
898 bool
899 LadderEntrycxx . . $ pvpgn/bnetd/LadderEntry#::setRankcxx . . $ pvpgn/bnetd/LadderEntry#setRank(8ac21354512918e8).(unsigned int rank_, const LadderKeycxx . . $ pvpgn/bnetd/LadderKey#& ladderKey_)
900 {
901 if (referencedObjectcxx . . $ pvpgn/bnetd/LadderEntry#referencedObject..getRankcxx . . $ pvpgn/bnetd/LadderReferencedObject#getRank(6eafb4033dcbea84).(ladderKey_) != rank_)
902 {
903 rankcxx . . $ pvpgn/bnetd/LadderEntry#rank. = rank_;
904 return referencedObjectcxx . . $ pvpgn/bnetd/LadderEntry#referencedObject..setRankcxx . . $ pvpgn/bnetd/LadderReferencedObject#setRank(f9e795c3fd74e783).(ladderKey_, rank_);
905 }
906 else{
907 return false;
908 }
909 }
910
911
912 void
913 LadderEntrycxx . . $ pvpgn/bnetd/LadderEntry#::updatecxx . . $ pvpgn/bnetd/LadderEntry#update(6df00707c193238d).(unsigned int primary_, unsigned int secondary_, unsigned int tertiary_)
914 {
915 primarycxx . . $ pvpgn/bnetd/LadderEntry#primary. = primary_;
916 secondarycxx . . $ pvpgn/bnetd/LadderEntry#secondary. = secondary_;
917 tertiarycxx . . $ pvpgn/bnetd/LadderEntry#tertiary. = tertiary_;
918 }
919
920 stdcxx . . $ std/::stringcxx . . $ std/string#
921 LadderEntrycxx . . $ pvpgn/bnetd/LadderEntry#::statuscxx . . $ pvpgn/bnetd/LadderEntry#status(219584694fe2b248).() const
922 {
923 stdcxx . . $ std/::ostringstreamcxx . . $ std/ostringstream# resultcxx . . $ std/__cxx11/basic_ostringstream#basic_ostringstream(49f6e7a06ebc5aa8).;
924 result <<cxx . . $ std/basic_ostream#`operator<<`(b4c055c363850233). uidcxx . . $ pvpgn/bnetd/LadderEntry#uid. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "," <<cxx . . $ std/basic_ostream#`operator<<`(b4c055c363850233). primarycxx . . $ pvpgn/bnetd/LadderEntry#primary. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "," <<cxx . . $ std/basic_ostream#`operator<<`(b4c055c363850233). secondarycxx . . $ pvpgn/bnetd/LadderEntry#secondary. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "," <<cxx . . $ std/basic_ostream#`operator<<`(b4c055c363850233). tertiarycxx . . $ pvpgn/bnetd/LadderEntry#tertiary.;
925
926 return result.strcxx . . $ std/__cxx11/basic_ostringstream#str(d33e1a6fd36255f7).();
927 }
928
929 bool
930 LadderEntrycxx . . $ pvpgn/bnetd/LadderEntry#::operatorcxx . . $ pvpgn/bnetd/LadderEntry#`operator==`(255513136de1971d).== (const LadderEntrycxx . . $ pvpgn/bnetd/LadderEntry#& right) const
931 {
932 return ((uidcxx . . $ pvpgn/bnetd/LadderEntry#uid. == right.uidcxx . . $ pvpgn/bnetd/LadderEntry#uid.) &&
933 (primarycxx . . $ pvpgn/bnetd/LadderEntry#primary. == right.primarycxx . . $ pvpgn/bnetd/LadderEntry#primary.) &&
934 (secondarycxx . . $ pvpgn/bnetd/LadderEntry#secondary. == right.secondarycxx . . $ pvpgn/bnetd/LadderEntry#secondary.) &&
935 (tertiarycxx . . $ pvpgn/bnetd/LadderEntry#tertiary. == right.tertiarycxx . . $ pvpgn/bnetd/LadderEntry#tertiary.));
936 }
937
938
939 bool
940 LadderEntrycxx . . $ pvpgn/bnetd/LadderEntry#::operatorcxx . . $ pvpgn/bnetd/LadderEntry#`operator<`(255513136de1971d).< (const LadderEntrycxx . . $ pvpgn/bnetd/LadderEntry#& right) const
941 {
942 if (primarycxx . . $ pvpgn/bnetd/LadderEntry#primary. != right.primarycxx . . $ pvpgn/bnetd/LadderEntry#primary.)
943 return (primarycxx . . $ pvpgn/bnetd/LadderEntry#primary.>right.primarycxx . . $ pvpgn/bnetd/LadderEntry#primary.);
944 else if (secondarycxx . . $ pvpgn/bnetd/LadderEntry#secondary. != right.secondarycxx . . $ pvpgn/bnetd/LadderEntry#secondary.)
945 return (secondarycxx . . $ pvpgn/bnetd/LadderEntry#secondary. > right.secondarycxx . . $ pvpgn/bnetd/LadderEntry#secondary.);
946 else if (tertiarycxx . . $ pvpgn/bnetd/LadderEntry#tertiary. != right.tertiarycxx . . $ pvpgn/bnetd/LadderEntry#tertiary.)
947 return (tertiarycxx . . $ pvpgn/bnetd/LadderEntry#tertiary. > right.tertiarycxx . . $ pvpgn/bnetd/LadderEntry#tertiary.);
948 else
949 return (uidcxx . . $ pvpgn/bnetd/LadderEntry#uid. > right.uidcxx . . $ pvpgn/bnetd/LadderEntry#uid.);
950 }
951
952
953
954 LadderListcxx . . $ pvpgn/bnetd/LadderList#::LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(LadderKeycxx . . $ pvpgn/bnetd/LadderKey# ladderKey_, t_referenceTypecxx . . $ pvpgn/bnetd/t_referenceType# referenceType_)
955 :ladderKeycxx . . $ pvpgn/bnetd/LadderList#ladderKey.(ladderKey_), dirtycxx . . $ pvpgn/bnetd/LadderList#dirty.(true), savedcxx . . $ pvpgn/bnetd/LadderList#saved.(false), referenceTypecxx . . $ pvpgn/bnetd/LadderList#referenceType.(referenceType_)
956 {
957 ladderFilenamecxx . . $ pvpgn/bnetd/LadderList#ladderFilename. =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). clienttag_uint_to_str(ladderKey_.getClienttagcxx . . $ pvpgn/bnetd/LadderKey#getClienttag(ddd8539a2fcdd4ce).());
958 ladderFilenamecxx . . $ pvpgn/bnetd/LadderList#ladderFilename. +=cxx . . $ std/__cxx11/basic_string#`operator+=`(978ca1133b5f6e74). "_";
959 ladderFilenamecxx . . $ pvpgn/bnetd/LadderList#ladderFilename. +=cxx . . $ std/__cxx11/basic_string#`operator+=`(c0b47be1fddc0e75). bin_ladder_time_strcxx . . $ pvpgn/bnetd/bin_ladder_time_str..atcxx . . $ std/vector#at(b61e45a10b63f40a).(static_cast<size_t>(ladderKey_.getLadderTimecxx . . $ pvpgn/bnetd/LadderKey#getLadderTime(95c8d306b18567f).()));
960 ladderFilenamecxx . . $ pvpgn/bnetd/LadderList#ladderFilename. +=cxx . . $ std/__cxx11/basic_string#`operator+=`(c0b47be1fddc0e75). bin_ladder_sort_strcxx . . $ pvpgn/bnetd/bin_ladder_sort_str..atcxx . . $ std/vector#at(b61e45a10b63f40a).(static_cast<size_t>(ladderKey_.getLadderSortcxx . . $ pvpgn/bnetd/LadderKey#getLadderSort(f222824a3f7f9f).()));
961 ladderFilenamecxx . . $ pvpgn/bnetd/LadderList#ladderFilename. +=cxx . . $ std/__cxx11/basic_string#`operator+=`(c0b47be1fddc0e75). bin_ladder_id_strcxx . . $ pvpgn/bnetd/bin_ladder_id_str..atcxx . . $ std/vector#at(b61e45a10b63f40a).(static_cast<size_t>(ladderKey_.getLadderIdcxx . . $ pvpgn/bnetd/LadderKey#getLadderId(ceffab98f24dad29).()));
962 ladderFilenamecxx . . $ pvpgn/bnetd/LadderList#ladderFilename. +=cxx . . $ std/__cxx11/basic_string#`operator+=`(978ca1133b5f6e74). "_LADDER";
963 }
964
965
966 LadderListcxx . . $ pvpgn/bnetd/LadderList#::~cxx . . $ pvpgn/bnetd/LadderList#`~LadderList`(ced63f7c635d850d).LadderListcxx . . $ pvpgn/bnetd/LadderList#() throw ()
967 {
968 }
969
970
971 bool
972 LadderListcxx . . $ pvpgn/bnetd/LadderList#::loadcxx . . $ pvpgn/bnetd/LadderList#load(c9857a73d68e59ba).()
973 {
974 return loadBinarycxx . . $ pvpgn/bnetd/LadderList#loadBinary(c9857a73d68e59ba).();
975 }
976
977
978 bool
979 LadderListcxx . . $ pvpgn/bnetd/LadderList#::savecxx . . $ pvpgn/bnetd/LadderList#save(c9857a73d68e59ba).()
980 {
981 sortAndUpdatecxx . . $ pvpgn/bnetd/LadderList#sortAndUpdate(49f6e7a06ebc5aa8).();
982 return saveBinarycxx . . $ pvpgn/bnetd/LadderList#saveBinary(c9857a73d68e59ba).();
983 }
984
985
986 void
987 LadderListcxx . . $ pvpgn/bnetd/LadderList#::sortAndUpdatecxx . . $ pvpgn/bnetd/LadderList#sortAndUpdate(49f6e7a06ebc5aa8).()
988 {
989 if (!(dirtycxx . . $ pvpgn/bnetd/LadderList#dirty.))
990 return;
991
992 unsigned int rank = 1;
993 unsigned int changed = 0;
994 LListcxx . . $ pvpgn/bnetd/LadderList#LList#::iteratorcxx . . $ std/vector#iterator# endMarker = laddercxx . . $ pvpgn/bnetd/LadderList#ladder..endcxx . . $ std/vector#end(55a6de06420d4903).();
995
996 sortcxx . . $ std/sort(249673c20e2b8d5).(laddercxx . . $ pvpgn/bnetd/LadderList#ladder..begincxx . . $ std/vector#begin(55a6de06420d4903).(), laddercxx . . $ pvpgn/bnetd/LadderList#ladder..endcxx . . $ std/vector#end(55a6de06420d4903).());
997
998 for (LListcxx . . $ pvpgn/bnetd/LadderList#LList#::iteratorcxx . . $ std/vector#iterator# lit(laddercxx . . $ pvpgn/bnetd/LadderList#ladder..begincxx . . $ std/vector#begin(55a6de06420d4903).()); lit !=cxx . . $ __gnu_cxx/`operator!=`(30ee64f2df4eef8b). laddercxx . . $ pvpgn/bnetd/LadderList#ladder..endcxx . . $ std/vector#end(55a6de06420d4903).(); lit++cxx . . $ __gnu_cxx/__normal_iterator#operator++(6cefca3db4774be2)., rank++)
999 {
1000 if (rank <= MaxRankKeptInLaddercxx . . $ `src/bnetd/ladder.cpp:56:9`!)
1001 {
1002 if (lit->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).getRankcxx . . $ pvpgn/bnetd/LadderEntry#getRank(ddd8539a2fcdd4ce).() != rank)
1003 {
1004 if (lit->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).setRankcxx . . $ pvpgn/bnetd/LadderEntry#setRank(8ac21354512918e8).(rank, ladderKeycxx . . $ pvpgn/bnetd/LadderList#ladderKey.))
1005 changed++;
1006 }
1007 }
1008 else
1009 {
1010 lit->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).setRankcxx . . $ pvpgn/bnetd/LadderEntry#setRank(8ac21354512918e8).(0, ladderKeycxx . . $ pvpgn/bnetd/LadderList#ladderKey.);
1011 if (endMarker ==cxx . . $ __gnu_cxx/`operator==`(30ee64f2df4eef8b). laddercxx . . $ pvpgn/bnetd/LadderList#ladder..endcxx . . $ std/vector#end(55a6de06420d4903).())
1012 endMarker =cxx . . $ __gnu_cxx/__normal_iterator#`operator=`(e3635669ff7430df). lit;
1013 }
1014 }
1015
1016 if (endMarker !=cxx . . $ __gnu_cxx/`operator!=`(30ee64f2df4eef8b). laddercxx . . $ pvpgn/bnetd/LadderList#ladder..endcxx . . $ std/vector#end(55a6de06420d4903).())
1017 laddercxx . . $ pvpgn/bnetd/LadderList#ladder..erasecxx . . $ std/vector#erase(cc2a997b00bceed8).(endMarkercxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(459a7e7b9fbe7640)., laddercxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(459a7e7b9fbe7640)..endcxx . . $ std/vector#end(55a6de06420d4903).());
1018
1019 if ((changed))
1020 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_tracecxx . . $ pvpgn/eventlog_level_trace., __FUNCTION__, "adjusted rank for {} accounts", changed);
1021 savedcxx . . $ pvpgn/bnetd/LadderList#saved. = false;
1022 dirtycxx . . $ pvpgn/bnetd/LadderList#dirty. = false;
1023 }
1024
1025
1026 const unsigned int magickcxx . . $ pvpgn/bnetd/magick. = 0xdeadc0de;
1027
1028
1029 inline void
1030 LadderListcxx . . $ pvpgn/bnetd/LadderList#::readdatacxx . . $ pvpgn/bnetd/LadderList#readdata(2dd7fd59b847c6c5).(stdcxx . . $ std/::ifstreamcxx . . $ std/ifstream# &fp, unsigned int &data)
1031 {
1032 fp.readcxx . . $ std/basic_istream#read(ec7d6f01d31dcb96).((char *)(&data), sizeof(unsigned int));
1033 }
1034
1035
1036 inline void
1037 LadderListcxx . . $ pvpgn/bnetd/LadderList#::readdatacxx . . $ pvpgn/bnetd/LadderList#readdata(468530e3cea018c6).(stdcxx . . $ std/::ifstreamcxx . . $ std/ifstream# &fp, unsigned int data[], unsigned int membercount)
1038 {
1039 fp.readcxx . . $ std/basic_istream#read(ec7d6f01d31dcb96).((char *)(data), sizeof(*data)*membercount);
1040 }
1041
1042
1043 bool
1044 LadderListcxx . . $ pvpgn/bnetd/LadderList#::loadBinarycxx . . $ pvpgn/bnetd/LadderList#loadBinary(c9857a73d68e59ba).()
1045 {
1046 stdcxx . . $ std/::stringcxx . . $ std/string# filename = prefs_get_ladderdircxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).();
1047 filename +=cxx . . $ std/__cxx11/basic_string#`operator+=`(978ca1133b5f6e74). "/";
1048 filename +=cxx . . $ std/__cxx11/basic_string#`operator+=`(c0b47be1fddc0e75). ladderFilenamecxx . . $ pvpgn/bnetd/LadderList#ladderFilename.;
1049
1050 stdcxx . . $ std/::ifstreamcxx . . $ std/ifstream# fpcxx . . $ std/basic_ifstream#basic_ifstream(b8cd37071ce335df).(filename.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).(), stdcxx . . $ std/::ioscxx . . $ std/ios#::incxx . . $ std/ios_base#in. |cxx . . $ std/`operator|`(2dd9eb40323da8bf). stdcxx . . $ std/::ioscxx . . $ std/ios#::binarycxx . . $ std/ios_base#binary.);
1051
1052 if (!cxx . . $ std/basic_ios#`operator!`(50ce9a9e25b4a850).(fp))
1053 {
1054 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_infocxx . . $ pvpgn/eventlog_level_info., __FUNCTION__, "could not open ladder file \"{}\" - maybe ladder still empty (std::ifstream: {})", filename.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).(), stdcxx . . $ std/::strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!));
1055 return false;
1056 }
1057
1058 unsigned int checksum = 0;
1059 readdatacxx . . $ pvpgn/bnetd/LadderList#readdata(2dd7fd59b847c6c5).(fp, checksum);
1060
1061 if (checksum != magickcxx . . $ pvpgn/bnetd/magick.)
1062 {
1063 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "{} not starting with magick", ladderFilenamecxx . . $ pvpgn/bnetd/LadderList#ladderFilename..c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).());
1064 return false;
1065 }
1066
1067 struct stat sfile;
1068 if (stat(filename.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).(), &sfile) < 0)
1069 {
1070 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "failed to retrieve size of {}", ladderFilenamecxx . . $ pvpgn/bnetd/LadderList#ladderFilename..c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).());
1071 return false;
1072 }
1073
1074 unsigned int filesize = sfile.st_size;
1075 if (filesize%sizeof(unsigned int) != 0)
1076 {
1077 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "{} has unexpected size of {} bytes (not multiple of sizeof(unsigned int)", ladderFilenamecxx . . $ pvpgn/bnetd/LadderList#ladderFilename..c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).(), filesize);
1078 return false;
1079 }
1080
1081 unsigned int noe = (filesize) / sizeof(unsigned int)-2;
1082
1083 if (noe % 4 != 0)
1084 {
1085 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "{} has unexpected count of entries ({}) ", ladderFilenamecxx . . $ pvpgn/bnetd/LadderList#ladderFilename..c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).(), noe);
1086 return false;
1087 }
1088
1089 checksum = 0;
1090 unsigned int values[4];
1091 unsigned int uid, primary, secondary, tertiary;
1092
1093 while (noe >= 4)
1094 {
1095 readdatacxx . . $ pvpgn/bnetd/LadderList#readdata(468530e3cea018c6).(fp, values, 4);
1096 noe -= 4;
1097
1098 //handle differently dependant on ladderKey->ladderId
1099 if (t_accountcxx . . $ pvpgn/bnetd/t_account#* account = accountlist_find_account_by_uidcxx . . $ pvpgn/bnetd/accountlist_find_account_by_uid(c4505e327c9ccd36).(values[0]))
1100 {
1101 uid = values[0];
1102 primary = values[2];
1103 secondary = values[1];
1104 tertiary = values[3];
1105 LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject# referencecxx . . $ pvpgn/bnetd/LadderReferencedObject#LadderReferencedObject(a405232c11a3fb7b).(account);
1106 addEntrycxx . . $ pvpgn/bnetd/LadderList#addEntry(f0ac5109e0f18056).(uid, primary, secondary, tertiary, reference);
1107 }
1108 else{
1109 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_debugcxx . . $ pvpgn/eventlog_level_debug., __FUNCTION__, "no known entry for uid {}", values[0]);
1110 }
1111 for (int count = 0; count < 4; count++) checksum += values[count];
1112 }
1113
1114 unsigned int filechecksum = 0;
1115 readdatacxx . . $ pvpgn/bnetd/LadderList#readdata(2dd7fd59b847c6c5).(fp, filechecksum);
1116
1117 if (filechecksum != checksum)
1118 {
1119 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "{} has invalid checksum... fall back to old loading mode", ladderFilenamecxx . . $ pvpgn/bnetd/LadderList#ladderFilename..c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).());
1120 laddercxx . . $ pvpgn/bnetd/LadderList#ladder..clearcxx . . $ std/vector#clear(ced63f7c635d850d).();
1121 return false;
1122 }
1123
1124 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_infocxx . . $ pvpgn/eventlog_level_info., __FUNCTION__, "successfully loaded {}", filename.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).());
1125 return true;
1126 }
1127
1128
1129 inline void
1130 LadderListcxx . . $ pvpgn/bnetd/LadderList#::writedatacxx . . $ pvpgn/bnetd/LadderList#writedata(8c8c5c3d814e776b).(stdcxx . . $ std/::ofstreamcxx . . $ std/ofstream# &fp, unsigned int &data)
1131 {
1132 fp.writecxx . . $ std/basic_ostream#write(3c866fa06c201852).((char *)(&data), sizeof(unsigned int));
1133 }
1134
1135
1136 inline void
1137 LadderListcxx . . $ pvpgn/bnetd/LadderList#::writedatacxx . . $ pvpgn/bnetd/LadderList#writedata(4edc63c324985b75).(stdcxx . . $ std/::ofstreamcxx . . $ std/ofstream# &fp, const unsigned int &data)
1138 {
1139 fp.writecxx . . $ std/basic_ostream#write(3c866fa06c201852).((char *)(&data), sizeof(unsigned int));
1140 }
1141
1142
1143 inline void
1144 LadderListcxx . . $ pvpgn/bnetd/LadderList#::writedatacxx . . $ pvpgn/bnetd/LadderList#writedata(d1a88e30a0b4da4).(stdcxx . . $ std/::ofstreamcxx . . $ std/ofstream# &fp, unsigned int data[], unsigned int membercount)
1145 {
1146 fp.writecxx . . $ std/basic_ostream#write(3c866fa06c201852).((char *)(data), sizeof(*data)*membercount);
1147 }
1148
1149
1150 bool
1151 LadderListcxx . . $ pvpgn/bnetd/LadderList#::saveBinarycxx . . $ pvpgn/bnetd/LadderList#saveBinary(c9857a73d68e59ba).()
1152 {
1153
1154 if (savedcxx . . $ pvpgn/bnetd/LadderList#saved.)
1155 return true;
1156
1157 stdcxx . . $ std/::stringcxx . . $ std/string# filename = prefs_get_ladderdircxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).();
1158 filename +=cxx . . $ std/__cxx11/basic_string#`operator+=`(978ca1133b5f6e74). "/";
1159 filename +=cxx . . $ std/__cxx11/basic_string#`operator+=`(c0b47be1fddc0e75). ladderFilenamecxx . . $ pvpgn/bnetd/LadderList#ladderFilename.;
1160
1161 stdcxx . . $ std/::ofstreamcxx . . $ std/ofstream# fpcxx . . $ std/basic_ofstream#basic_ofstream(b8cd37071ce335df).(filename.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).(), stdcxx . . $ std/::ioscxx . . $ std/ios#::outcxx . . $ std/ios_base#out. |cxx . . $ std/`operator|`(2dd9eb40323da8bf). stdcxx . . $ std/::ioscxx . . $ std/ios#::binarycxx . . $ std/ios_base#binary.);
1162
1163 if (!cxx . . $ std/basic_ios#`operator!`(50ce9a9e25b4a850).(fp))
1164 {
1165 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "could not open file \"{}\" for writing (std::ofstream: {})", filename.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).(), stdcxx . . $ std/::strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!));
1166 return false;
1167 }
1168
1169 writedatacxx . . $ pvpgn/bnetd/LadderList#writedata(4edc63c324985b75).(fp, magickcxx . . $ pvpgn/bnetd/magick.); //write the magick int as header
1170
1171 unsigned int checksum = 0;
1172 unsigned int results[4];
1173
1174 for (LListcxx . . $ pvpgn/bnetd/LadderList#LList#::const_iteratorcxx . . $ std/vector#const_iterator# litcxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(459a7e7b9fbe7640).(laddercxx . . $ pvpgn/bnetd/LadderList#ladder..begincxx . . $ std/vector#begin(55a6de06420d4903).()); lit !=cxx . . $ __gnu_cxx/`operator!=`(835b2e373b0459fa). laddercxx . . $ pvpgn/bnetd/LadderList#ladder..endcxx . . $ std/vector#end(55a6de06420d4903).(); lit++cxx . . $ __gnu_cxx/__normal_iterator#operator++(6cefca3db4774be2).)
1175 {
1176 results[0] = lit->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).getUidcxx . . $ pvpgn/bnetd/LadderEntry#getUid(ddd8539a2fcdd4ce).();
1177 results[1] = lit->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).getSecondarycxx . . $ pvpgn/bnetd/LadderEntry#getSecondary(ddd8539a2fcdd4ce).();
1178 results[2] = lit->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).getPrimarycxx . . $ pvpgn/bnetd/LadderEntry#getPrimary(ddd8539a2fcdd4ce).();
1179 results[3] = 0;
1180 writedatacxx . . $ pvpgn/bnetd/LadderList#writedata(d1a88e30a0b4da4).(fp, results, 4);
1181
1182 //calculate a checksum over saved data
1183 for (int count = 0; count < 4; count++) checksum += results[count];
1184 }
1185
1186 writedatacxx . . $ pvpgn/bnetd/LadderList#writedata(8c8c5c3d814e776b).(fp, checksum); // add checksum at the en
1187
1188 savedcxx . . $ pvpgn/bnetd/LadderList#saved. = true;
1189 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_infocxx . . $ pvpgn/eventlog_level_info., __FUNCTION__, "successfully saved {}", filename.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).());
1190 return true;
1191 }
1192
1193
1194 void
1195 LadderListcxx . . $ pvpgn/bnetd/LadderList#::addEntrycxx . . $ pvpgn/bnetd/LadderList#addEntry(f0ac5109e0f18056).(unsigned int uid_, unsigned int primary_, unsigned int secondary_, unsigned int tertiary_, const LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject#& referencedObject_)
1196 {
1197 if (referenceTypecxx . . $ pvpgn/bnetd/LadderList#referenceType. != referencedObject_.getReferenceTypecxx . . $ pvpgn/bnetd/LadderReferencedObject#getReferenceType(e852590b553adecf).())
1198 {
1199 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "referenceType of LadderList and referencedObject do mismatch");
1200 return;
1201 }
1202
1203 LadderEntrycxx . . $ pvpgn/bnetd/LadderEntry# entrycxx . . $ pvpgn/bnetd/LadderEntry#LadderEntry(2009b3a2f6ee1637).(uid_, primary_, secondary_, tertiary_, referencedObject_);
1204 laddercxx . . $ pvpgn/bnetd/LadderList#ladder..push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(entry);
1205 dirtycxx . . $ pvpgn/bnetd/LadderList#dirty. = true;
1206 }
1207
1208
1209 void
1210 LadderListcxx . . $ pvpgn/bnetd/LadderList#::updateEntrycxx . . $ pvpgn/bnetd/LadderList#updateEntry(f0ac5109e0f18056).(unsigned int uid_, unsigned int primary_, unsigned int secondary_, unsigned int tertiary_, const LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject#& referencedObject_)
1211 {
1212 if (referenceTypecxx . . $ pvpgn/bnetd/LadderList#referenceType. != referencedObject_.getReferenceTypecxx . . $ pvpgn/bnetd/LadderReferencedObject#getReferenceType(e852590b553adecf).())
1213 {
1214 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "referenceType of LadderList and referencedObject do mismatch");
1215 return;
1216 }
1217
1218 LListcxx . . $ pvpgn/bnetd/LadderList#LList#::iteratorcxx . . $ std/vector#iterator# lit(laddercxx . . $ pvpgn/bnetd/LadderList#ladder..begincxx . . $ std/vector#begin(55a6de06420d4903).());
1219 for (; lit !=cxx . . $ __gnu_cxx/`operator!=`(30ee64f2df4eef8b). laddercxx . . $ pvpgn/bnetd/LadderList#ladder..endcxx . . $ std/vector#end(55a6de06420d4903).() && lit->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).getUidcxx . . $ pvpgn/bnetd/LadderEntry#getUid(ddd8539a2fcdd4ce).() != uid_; lit++cxx . . $ __gnu_cxx/__normal_iterator#operator++(6cefca3db4774be2).);
1220
1221 if (lit ==cxx . . $ __gnu_cxx/`operator==`(30ee64f2df4eef8b). laddercxx . . $ pvpgn/bnetd/LadderList#ladder..endcxx . . $ std/vector#end(55a6de06420d4903).())
1222 {
1223 LadderEntrycxx . . $ pvpgn/bnetd/LadderEntry# entrycxx . . $ pvpgn/bnetd/LadderEntry#LadderEntry(2009b3a2f6ee1637).(uid_, primary_, secondary_, tertiary_, referencedObject_);
1224 laddercxx . . $ pvpgn/bnetd/LadderList#ladder..push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(entry);
1225 }
1226 else{
1227 lit->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).updatecxx . . $ pvpgn/bnetd/LadderEntry#update(6df00707c193238d).(primary_, secondary_, tertiary_);
1228 }
1229 dirtycxx . . $ pvpgn/bnetd/LadderList#dirty. = true;
1230 }
1231
1232
1233 bool
1234 LadderListcxx . . $ pvpgn/bnetd/LadderList#::delEntrycxx . . $ pvpgn/bnetd/LadderList#delEntry(dfa6e707f7696010).(unsigned int uid_)
1235 {
1236 LListcxx . . $ pvpgn/bnetd/LadderList#LList#::iteratorcxx . . $ std/vector#iterator# lit(laddercxx . . $ pvpgn/bnetd/LadderList#ladder..begincxx . . $ std/vector#begin(55a6de06420d4903).());
1237 for (; lit !=cxx . . $ __gnu_cxx/`operator!=`(30ee64f2df4eef8b). laddercxx . . $ pvpgn/bnetd/LadderList#ladder..endcxx . . $ std/vector#end(55a6de06420d4903).() && lit->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).getUidcxx . . $ pvpgn/bnetd/LadderEntry#getUid(ddd8539a2fcdd4ce).() != uid_; lit++cxx . . $ __gnu_cxx/__normal_iterator#operator++(6cefca3db4774be2).);
1238
1239 if (lit ==cxx . . $ __gnu_cxx/`operator==`(30ee64f2df4eef8b). laddercxx . . $ pvpgn/bnetd/LadderList#ladder..endcxx . . $ std/vector#end(55a6de06420d4903).())
1240 return false; //account not on ladder
1241 else{
1242
1243 lit->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).setRankcxx . . $ pvpgn/bnetd/LadderEntry#setRank(8ac21354512918e8).(0, ladderKeycxx . . $ pvpgn/bnetd/LadderList#ladderKey.);
1244 laddercxx . . $ pvpgn/bnetd/LadderList#ladder..erasecxx . . $ std/vector#erase(351407f384f345bc).(litcxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(459a7e7b9fbe7640).);
1245 dirtycxx . . $ pvpgn/bnetd/LadderList#dirty. = true;
1246 return true;
1247 }
1248 }
1249
1250
1251 const LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject#*
1252 LadderListcxx . . $ pvpgn/bnetd/LadderList#::getReferencedObjectcxx . . $ pvpgn/bnetd/LadderList#getReferencedObject(56fd0941de524e93).(unsigned int rank_) const
1253 {
1254 if (rank_ > laddercxx . . $ pvpgn/bnetd/LadderList#ladder..sizecxx . . $ std/vector#size(c9b1e749b64d5edc).())
1255 return 0;
1256 else
1257 return &laddercxx . . $ pvpgn/bnetd/LadderList#ladder.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).rank_ - 1].getReferencedObjectcxx . . $ pvpgn/bnetd/LadderEntry#getReferencedObject(10d5159f3188c785).();
1258 }
1259
1260
1261 unsigned int
1262 LadderListcxx . . $ pvpgn/bnetd/LadderList#::getRankcxx . . $ pvpgn/bnetd/LadderList#getRank(560347b7e9428769).(unsigned int uid_) const
1263 {
1264 unsigned int rank;
1265 LListcxx . . $ pvpgn/bnetd/LadderList#LList#::const_iteratorcxx . . $ std/vector#const_iterator# lit(laddercxx . . $ pvpgn/bnetd/LadderList#ladder..begincxx . . $ std/vector#begin(d1e1699016b9d7e6).());
1266 for (rank = 1; lit !=cxx . . $ __gnu_cxx/`operator!=`(30ee64f2df4eef8b). laddercxx . . $ pvpgn/bnetd/LadderList#ladder..endcxx . . $ std/vector#end(d1e1699016b9d7e6).() && lit->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).getUidcxx . . $ pvpgn/bnetd/LadderEntry#getUid(ddd8539a2fcdd4ce).() != uid_; lit++cxx . . $ __gnu_cxx/__normal_iterator#operator++(6cefca3db4774be2).);
1267
1268 if (lit ==cxx . . $ __gnu_cxx/`operator==`(30ee64f2df4eef8b). laddercxx . . $ pvpgn/bnetd/LadderList#ladder..endcxx . . $ std/vector#end(d1e1699016b9d7e6).())
1269 return 0;
1270 else
1271 return lit->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).getRankcxx . . $ pvpgn/bnetd/LadderEntry#getRank(ddd8539a2fcdd4ce).();
1272 }
1273
1274
1275 const LadderKeycxx . . $ pvpgn/bnetd/LadderKey#&
1276 LadderListcxx . . $ pvpgn/bnetd/LadderList#::getLadderKeycxx . . $ pvpgn/bnetd/LadderList#getLadderKey(5d9c31ea96ca8688).() const
1277 {
1278 return ladderKeycxx . . $ pvpgn/bnetd/LadderList#ladderKey.;
1279 }
1280
1281
1282 const t_referenceTypecxx . . $ pvpgn/bnetd/t_referenceType#
1283 LadderListcxx . . $ pvpgn/bnetd/LadderList#::getReferenceTypecxx . . $ pvpgn/bnetd/LadderList#getReferenceType(e852590b553adecf).() const
1284 {
1285
1286 return referenceTypecxx . . $ pvpgn/bnetd/LadderList#referenceType.;
1287 }
1288
1289
1290 void
1291 LadderListcxx . . $ pvpgn/bnetd/LadderList#::activateFromcxx . . $ pvpgn/bnetd/LadderList#activateFrom(b602ba72ad058ae7).(const LadderListcxx . . $ pvpgn/bnetd/LadderList# * currentLadder_)
1292 {
1293 const LListcxx . . $ pvpgn/bnetd/LadderList#LList#* currentList = &currentLadder_->laddercxx . . $ pvpgn/bnetd/LadderList#ladder.;
1294 for (LListcxx . . $ pvpgn/bnetd/LadderList#LList#::const_iteratorcxx . . $ std/vector#const_iterator# lit(currentList->begincxx . . $ std/vector#begin(d1e1699016b9d7e6).()); lit !=cxx . . $ __gnu_cxx/`operator!=`(30ee64f2df4eef8b). currentList->endcxx . . $ std/vector#end(d1e1699016b9d7e6).(); lit++cxx . . $ __gnu_cxx/__normal_iterator#operator++(6cefca3db4774be2).)
1295 {
1296 const LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject#& referencedObject = lit->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).getReferencedObjectcxx . . $ pvpgn/bnetd/LadderEntry#getReferencedObject(10d5159f3188c785).();
1297 updateEntrycxx . . $ pvpgn/bnetd/LadderList#updateEntry(f0ac5109e0f18056).(lit->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).getUidcxx . . $ pvpgn/bnetd/LadderEntry#getUid(ddd8539a2fcdd4ce).(), lit->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).getPrimarycxx . . $ pvpgn/bnetd/LadderEntry#getPrimary(ddd8539a2fcdd4ce).(), lit->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).getSecondarycxx . . $ pvpgn/bnetd/LadderEntry#getSecondary(ddd8539a2fcdd4ce).(), lit->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).getTertiarycxx . . $ pvpgn/bnetd/LadderEntry#getTertiary(ddd8539a2fcdd4ce).(), referencedObject);
1298 referencedObject.activatecxx . . $ pvpgn/bnetd/LadderReferencedObject#activate(de7834775c645ebb).(ladderKeycxx . . $ pvpgn/bnetd/LadderList#ladderKey.);
1299 }
1300 return;
1301 }
1302
1303
1304 void
1305 LadderListcxx . . $ pvpgn/bnetd/LadderList#::writeStatusfilecxx . . $ pvpgn/bnetd/LadderList#writeStatusfile(83f5f38750778ac8).() const
1306 {
1307 stdcxx . . $ std/::stringcxx . . $ std/string# filenamecxx . . $ std/__cxx11/basic_string#basic_string(925dcc5e17f50391).;
1308
1309 filename =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). prefs_get_outputdircxx . . $ pvpgn/bnetd/prefs_get_outputdir(33a1f659e94feb42).();
1310 filename +=cxx . . $ std/__cxx11/basic_string#`operator+=`(978ca1133b5f6e74). "/";
1311 filename +=cxx . . $ std/__cxx11/basic_string#`operator+=`(c0b47be1fddc0e75). ladderFilenamecxx . . $ pvpgn/bnetd/LadderList#ladderFilename.;
1312
1313 stdcxx . . $ std/::ofstreamcxx . . $ std/ofstream# fpcxx . . $ std/basic_ofstream#basic_ofstream(b8cd37071ce335df).(filename.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).());
1314
1315 if (!cxx . . $ std/basic_ios#`operator!`(50ce9a9e25b4a850).(fp))
1316 {
1317 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "could not open file \"{}\" for writing (std::ofstream: {})", filename.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).(), stdcxx . . $ std/::strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!));
1318 return;
1319 }
1320
1321 unsigned int rank = 1;
1322 for (LListcxx . . $ pvpgn/bnetd/LadderList#LList#::const_iteratorcxx . . $ std/vector#const_iterator# lit(laddercxx . . $ pvpgn/bnetd/LadderList#ladder..begincxx . . $ std/vector#begin(d1e1699016b9d7e6).()); lit !=cxx . . $ __gnu_cxx/`operator!=`(30ee64f2df4eef8b). laddercxx . . $ pvpgn/bnetd/LadderList#ladder..endcxx . . $ std/vector#end(d1e1699016b9d7e6).(); lit++cxx . . $ __gnu_cxx/__normal_iterator#operator++(6cefca3db4774be2)., rank++)
1323 {
1324 fp <<cxx . . $ std/basic_ostream#`operator<<`(b4c055c363850233). rank <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "," <<cxx . . $ std/`operator<<`(88df5bef833f7f83). lit->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).statuscxx . . $ pvpgn/bnetd/LadderEntry#status(219584694fe2b248).() <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "\n";
1325 }
1326
1327 }
1328
1329
1330 Ladderscxx . . $ pvpgn/bnetd/Ladders#::Ladderscxx . . $ pvpgn/bnetd/Ladders#Ladders(49f6e7a06ebc5aa8).()
1331 {
1332 // WAR3 ladders
1333 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# WAR3_solocxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_solocxx . . $ pvpgn/bnetd/ladder_id_solo., CLIENTTAG_WARCRAFT3_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:111:9`!, ladder_sort_defaultcxx . . $ pvpgn/bnetd/ladder_sort_default., ladder_time_defaultcxx . . $ pvpgn/bnetd/ladder_time_default.);
1334 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(WAR3_solo, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(WAR3_solo, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1335
1336 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# WAR3_teamcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_teamcxx . . $ pvpgn/bnetd/ladder_id_team., CLIENTTAG_WARCRAFT3_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:111:9`!, ladder_sort_defaultcxx . . $ pvpgn/bnetd/ladder_sort_default., ladder_time_defaultcxx . . $ pvpgn/bnetd/ladder_time_default.);
1337 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(WAR3_team, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(WAR3_team, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1338
1339 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# WAR3_ffacxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_ffacxx . . $ pvpgn/bnetd/ladder_id_ffa., CLIENTTAG_WARCRAFT3_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:111:9`!, ladder_sort_defaultcxx . . $ pvpgn/bnetd/ladder_sort_default., ladder_time_defaultcxx . . $ pvpgn/bnetd/ladder_time_default.);
1340 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(WAR3_ffa, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(WAR3_ffa, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1341
1342 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# WAR3_ateamcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_ateamcxx . . $ pvpgn/bnetd/ladder_id_ateam., CLIENTTAG_WARCRAFT3_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:111:9`!, ladder_sort_defaultcxx . . $ pvpgn/bnetd/ladder_sort_default., ladder_time_defaultcxx . . $ pvpgn/bnetd/ladder_time_default.);
1343 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(WAR3_ateam, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(WAR3_ateam, referenceTypeTeamcxx . . $ pvpgn/bnetd/referenceTypeTeam.)));
1344
1345
1346 //W3XP ladders
1347 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# W3XP_solocxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_solocxx . . $ pvpgn/bnetd/ladder_id_solo., CLIENTTAG_WAR3XP_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:113:9`!, ladder_sort_defaultcxx . . $ pvpgn/bnetd/ladder_sort_default., ladder_time_defaultcxx . . $ pvpgn/bnetd/ladder_time_default.);
1348 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(W3XP_solo, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(W3XP_solo, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1349
1350 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# W3XP_teamcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_teamcxx . . $ pvpgn/bnetd/ladder_id_team., CLIENTTAG_WAR3XP_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:113:9`!, ladder_sort_defaultcxx . . $ pvpgn/bnetd/ladder_sort_default., ladder_time_defaultcxx . . $ pvpgn/bnetd/ladder_time_default.);
1351 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(W3XP_team, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(W3XP_team, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1352
1353 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# W3XP_ffacxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_ffacxx . . $ pvpgn/bnetd/ladder_id_ffa., CLIENTTAG_WAR3XP_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:113:9`!, ladder_sort_defaultcxx . . $ pvpgn/bnetd/ladder_sort_default., ladder_time_defaultcxx . . $ pvpgn/bnetd/ladder_time_default.);
1354 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(W3XP_ffa, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(W3XP_ffa, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1355
1356 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# W3XP_ateamcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_ateamcxx . . $ pvpgn/bnetd/ladder_id_ateam., CLIENTTAG_WAR3XP_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:113:9`!, ladder_sort_defaultcxx . . $ pvpgn/bnetd/ladder_sort_default., ladder_time_defaultcxx . . $ pvpgn/bnetd/ladder_time_default.);
1357 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(W3XP_ateam, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(W3XP_ateam, referenceTypeTeamcxx . . $ pvpgn/bnetd/referenceTypeTeam.)));
1358
1359 //STAR ladders
1360 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# STAR_arcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_normalcxx . . $ pvpgn/bnetd/ladder_id_normal., CLIENTTAG_STARCRAFT_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:87:9`!, ladder_sort_highestratedcxx . . $ pvpgn/bnetd/ladder_sort_highestrated., ladder_time_activecxx . . $ pvpgn/bnetd/ladder_time_active.);
1361 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(STAR_ar, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(STAR_ar, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1362
1363 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# STAR_awcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_normalcxx . . $ pvpgn/bnetd/ladder_id_normal., CLIENTTAG_STARCRAFT_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:87:9`!, ladder_sort_mostwinscxx . . $ pvpgn/bnetd/ladder_sort_mostwins., ladder_time_activecxx . . $ pvpgn/bnetd/ladder_time_active.);
1364 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(STAR_aw, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(STAR_aw, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1365
1366 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# STAR_agcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_normalcxx . . $ pvpgn/bnetd/ladder_id_normal., CLIENTTAG_STARCRAFT_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:87:9`!, ladder_sort_mostgamescxx . . $ pvpgn/bnetd/ladder_sort_mostgames., ladder_time_activecxx . . $ pvpgn/bnetd/ladder_time_active.);
1367 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(STAR_ag, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(STAR_ag, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1368
1369 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# STAR_crcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_normalcxx . . $ pvpgn/bnetd/ladder_id_normal., CLIENTTAG_STARCRAFT_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:87:9`!, ladder_sort_highestratedcxx . . $ pvpgn/bnetd/ladder_sort_highestrated., ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.);
1370 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(STAR_cr, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(STAR_cr, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1371
1372 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# STAR_cwcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_normalcxx . . $ pvpgn/bnetd/ladder_id_normal., CLIENTTAG_STARCRAFT_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:87:9`!, ladder_sort_mostwinscxx . . $ pvpgn/bnetd/ladder_sort_mostwins., ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.);
1373 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(STAR_cw, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(STAR_cw, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1374
1375 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# STAR_cgcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_normalcxx . . $ pvpgn/bnetd/ladder_id_normal., CLIENTTAG_STARCRAFT_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:87:9`!, ladder_sort_mostgamescxx . . $ pvpgn/bnetd/ladder_sort_mostgames., ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.);
1376 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(STAR_cg, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(STAR_cg, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1377
1378 //SEXP ladders
1379 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# SEXP_arcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_normalcxx . . $ pvpgn/bnetd/ladder_id_normal., CLIENTTAG_BROODWARS_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:89:9`!, ladder_sort_highestratedcxx . . $ pvpgn/bnetd/ladder_sort_highestrated., ladder_time_activecxx . . $ pvpgn/bnetd/ladder_time_active.);
1380 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(SEXP_ar, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(SEXP_ar, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1381
1382 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# SEXP_awcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_normalcxx . . $ pvpgn/bnetd/ladder_id_normal., CLIENTTAG_BROODWARS_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:89:9`!, ladder_sort_mostwinscxx . . $ pvpgn/bnetd/ladder_sort_mostwins., ladder_time_activecxx . . $ pvpgn/bnetd/ladder_time_active.);
1383 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(SEXP_aw, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(SEXP_aw, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1384
1385 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# SEXP_agcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_normalcxx . . $ pvpgn/bnetd/ladder_id_normal., CLIENTTAG_BROODWARS_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:89:9`!, ladder_sort_mostgamescxx . . $ pvpgn/bnetd/ladder_sort_mostgames., ladder_time_activecxx . . $ pvpgn/bnetd/ladder_time_active.);
1386 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(SEXP_ag, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(SEXP_ag, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1387
1388 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# SEXP_crcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_normalcxx . . $ pvpgn/bnetd/ladder_id_normal., CLIENTTAG_BROODWARS_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:89:9`!, ladder_sort_highestratedcxx . . $ pvpgn/bnetd/ladder_sort_highestrated., ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.);
1389 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(SEXP_cr, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(SEXP_cr, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1390
1391 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# SEXP_cwcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_normalcxx . . $ pvpgn/bnetd/ladder_id_normal., CLIENTTAG_BROODWARS_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:89:9`!, ladder_sort_mostwinscxx . . $ pvpgn/bnetd/ladder_sort_mostwins., ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.);
1392 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(SEXP_cw, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(SEXP_cw, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1393
1394 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# SEXP_cgcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_normalcxx . . $ pvpgn/bnetd/ladder_id_normal., CLIENTTAG_BROODWARS_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:89:9`!, ladder_sort_mostgamescxx . . $ pvpgn/bnetd/ladder_sort_mostgames., ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.);
1395 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(SEXP_cg, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(SEXP_cg, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1396
1397 //W2BN ladders
1398 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# W2BN_arcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_normalcxx . . $ pvpgn/bnetd/ladder_id_normal., CLIENTTAG_WARCIIBNE_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:97:9`!, ladder_sort_highestratedcxx . . $ pvpgn/bnetd/ladder_sort_highestrated., ladder_time_activecxx . . $ pvpgn/bnetd/ladder_time_active.);
1399 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(W2BN_ar, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(W2BN_ar, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1400
1401 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# W2BN_awcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_normalcxx . . $ pvpgn/bnetd/ladder_id_normal., CLIENTTAG_WARCIIBNE_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:97:9`!, ladder_sort_mostwinscxx . . $ pvpgn/bnetd/ladder_sort_mostwins., ladder_time_activecxx . . $ pvpgn/bnetd/ladder_time_active.);
1402 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(W2BN_aw, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(W2BN_aw, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1403
1404 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# W2BN_agcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_normalcxx . . $ pvpgn/bnetd/ladder_id_normal., CLIENTTAG_WARCIIBNE_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:97:9`!, ladder_sort_mostgamescxx . . $ pvpgn/bnetd/ladder_sort_mostgames., ladder_time_activecxx . . $ pvpgn/bnetd/ladder_time_active.);
1405 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(W2BN_ag, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(W2BN_ag, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1406
1407 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# W2BN_crcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_normalcxx . . $ pvpgn/bnetd/ladder_id_normal., CLIENTTAG_WARCIIBNE_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:97:9`!, ladder_sort_highestratedcxx . . $ pvpgn/bnetd/ladder_sort_highestrated., ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.);
1408 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(W2BN_cr, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(W2BN_cr, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1409
1410 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# W2BN_cwcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_normalcxx . . $ pvpgn/bnetd/ladder_id_normal., CLIENTTAG_WARCIIBNE_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:97:9`!, ladder_sort_mostwinscxx . . $ pvpgn/bnetd/ladder_sort_mostwins., ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.);
1411 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(W2BN_cw, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(W2BN_cw, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1412
1413 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# W2BN_cgcxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_normalcxx . . $ pvpgn/bnetd/ladder_id_normal., CLIENTTAG_WARCIIBNE_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:97:9`!, ladder_sort_mostgamescxx . . $ pvpgn/bnetd/ladder_sort_mostgames., ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.);
1414 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(W2BN_cg, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(W2BN_cg, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1415
1416 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# W2BN_aricxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_ironmancxx . . $ pvpgn/bnetd/ladder_id_ironman., CLIENTTAG_WARCIIBNE_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:97:9`!, ladder_sort_highestratedcxx . . $ pvpgn/bnetd/ladder_sort_highestrated., ladder_time_activecxx . . $ pvpgn/bnetd/ladder_time_active.);
1417 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(W2BN_ari, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(W2BN_ari, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1418
1419 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# W2BN_awicxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_ironmancxx . . $ pvpgn/bnetd/ladder_id_ironman., CLIENTTAG_WARCIIBNE_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:97:9`!, ladder_sort_mostwinscxx . . $ pvpgn/bnetd/ladder_sort_mostwins., ladder_time_activecxx . . $ pvpgn/bnetd/ladder_time_active.);
1420 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(W2BN_awi, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(W2BN_awi, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1421
1422 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# W2BN_agicxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_ironmancxx . . $ pvpgn/bnetd/ladder_id_ironman., CLIENTTAG_WARCIIBNE_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:97:9`!, ladder_sort_mostgamescxx . . $ pvpgn/bnetd/ladder_sort_mostgames., ladder_time_activecxx . . $ pvpgn/bnetd/ladder_time_active.);
1423 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(W2BN_agi, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(W2BN_agi, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1424
1425 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# W2BN_cricxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_ironmancxx . . $ pvpgn/bnetd/ladder_id_ironman., CLIENTTAG_WARCIIBNE_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:97:9`!, ladder_sort_highestratedcxx . . $ pvpgn/bnetd/ladder_sort_highestrated., ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.);
1426 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(W2BN_cri, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(W2BN_cri, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1427
1428 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# W2BN_cwicxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_ironmancxx . . $ pvpgn/bnetd/ladder_id_ironman., CLIENTTAG_WARCIIBNE_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:97:9`!, ladder_sort_mostwinscxx . . $ pvpgn/bnetd/ladder_sort_mostwins., ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.);
1429 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(W2BN_cwi, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(W2BN_cwi, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1430
1431 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# W2BN_cgicxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_ironmancxx . . $ pvpgn/bnetd/ladder_id_ironman., CLIENTTAG_WARCIIBNE_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:97:9`!, ladder_sort_mostgamescxx . . $ pvpgn/bnetd/ladder_sort_mostgames., ladder_time_currentcxx . . $ pvpgn/bnetd/ladder_time_current.);
1432 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(W2BN_cgi, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(W2BN_cgi, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1433
1434 //TSUN ladders
1435 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# TSUN_solocxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_solocxx . . $ pvpgn/bnetd/ladder_id_solo., CLIENTTAG_TIBERNSUN_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:122:9`!, ladder_sort_defaultcxx . . $ pvpgn/bnetd/ladder_sort_default., ladder_time_defaultcxx . . $ pvpgn/bnetd/ladder_time_default.);
1436 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(TSUN_solo, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(TSUN_solo, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1437
1438 //TSXP ladders
1439 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# TSXP_solocxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_solocxx . . $ pvpgn/bnetd/ladder_id_solo., CLIENTTAG_TIBSUNXP_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:124:9`!, ladder_sort_defaultcxx . . $ pvpgn/bnetd/ladder_sort_default., ladder_time_defaultcxx . . $ pvpgn/bnetd/ladder_time_default.);
1440 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(TSXP_solo, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(TSXP_solo, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1441
1442 //RAL2 ladders
1443 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# RAL2_solocxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_solocxx . . $ pvpgn/bnetd/ladder_id_solo., CLIENTTAG_REDALERT2_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:128:9`!, ladder_sort_defaultcxx . . $ pvpgn/bnetd/ladder_sort_default., ladder_time_defaultcxx . . $ pvpgn/bnetd/ladder_time_default.);
1444 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(RAL2_solo, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(RAL2_solo, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1445
1446 //YURI ladders
1447 LadderKeycxx . . $ pvpgn/bnetd/LadderKey# YURI_solocxx . . $ pvpgn/bnetd/LadderKey#LadderKey(f0da15e05d48c065).(ladder_id_solocxx . . $ pvpgn/bnetd/ladder_id_solo., CLIENTTAG_YURISREV_UINTcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/tag.h:140:9`!, ladder_sort_defaultcxx . . $ pvpgn/bnetd/ladder_sort_default., ladder_time_defaultcxx . . $ pvpgn/bnetd/ladder_time_default.);
1448 ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..insertcxx . . $ std/map#insert(92111883a3599ede).(stdcxx . . $ std/::make_paircxx . . $ std/make_pair(1d30b6e115203116).(YURI_solo, LadderListcxx . . $ pvpgn/bnetd/LadderList#LadderList(fed12b10a0cb88d6).(YURI_solo, referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)));
1449
1450 }
1451
1452 Ladderscxx . . $ pvpgn/bnetd/Ladders#::~cxx . . $ pvpgn/bnetd/Ladders#`~Ladders`(ced63f7c635d850d).Ladderscxx . . $ pvpgn/bnetd/Ladders#() throw ()
1453 {
1454 }
1455
1456
1457 LadderListcxx . . $ pvpgn/bnetd/LadderList#*
1458 Ladderscxx . . $ pvpgn/bnetd/Ladders#::getLadderListcxx . . $ pvpgn/bnetd/Ladders#getLadderList(2c0c64fbd1351270).(const LadderKeycxx . . $ pvpgn/bnetd/LadderKey#& ladderKey_)
1459 {
1460 KeyLadderMapcxx . . $ pvpgn/bnetd/Ladders#KeyLadderMap#::iteratorcxx . . $ std/map#iterator# kit(ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..begincxx . . $ std/map#begin(7e4de33083b6e738).());
1461 for (; kit !=cxx . . $ std/`operator!=`(be6a71a859368080). ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..endcxx . . $ std/map#end(7e4de33083b6e738).() && (!(ladderKey_ ==cxx . . $ pvpgn/bnetd/LadderKey#`operator==`(7e4c339e17ad259f). (*cxx . . $ std/_Rb_tree_iterator#`operator*`(d426bc7b625886b7).kit).firstcxx . . $ std/pair#first.)); kit++cxx . . $ std/_Rb_tree_iterator#operator++(2987e7ff93f61dc1).);
1462
1463 if (kit ==cxx . . $ std/`operator==`(be6a71a859368080). ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..endcxx . . $ std/map#end(7e4de33083b6e738).())
1464 {
1465 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "found no matching ladderlist");
1466 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
1467 }
1468 else{
1469 return &(*cxx . . $ std/_Rb_tree_iterator#`operator*`(d426bc7b625886b7).kit).secondcxx . . $ std/pair#second.;
1470 }
1471 }
1472
1473
1474 void
1475 Ladderscxx . . $ pvpgn/bnetd/Ladders#::loadcxx . . $ pvpgn/bnetd/Ladders#load(49f6e7a06ebc5aa8).()
1476 {
1477 stdcxx . . $ std/::listcxx . . $ std/__cxx11/list#<LadderListcxx . . $ pvpgn/bnetd/LadderList#*> laddersToRebuildcxx . . $ std/__cxx11/list#list(49f6e7a06ebc5aa8).;
1478 for (KeyLadderMapcxx . . $ pvpgn/bnetd/Ladders#KeyLadderMap#::iteratorcxx . . $ std/map#iterator# kit(ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..begincxx . . $ std/map#begin(7e4de33083b6e738).()); kit !=cxx . . $ std/`operator!=`(be6a71a859368080). ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..endcxx . . $ std/map#end(7e4de33083b6e738).(); kit++cxx . . $ std/_Rb_tree_iterator#operator++(2987e7ff93f61dc1).)
1479 {
1480 if (!kit->cxx . . $ std/_Rb_tree_iterator#`operator->`(34d6acfd341ba7ab).secondcxx . . $ std/pair#second..loadcxx . . $ pvpgn/bnetd/LadderList#load(c9857a73d68e59ba).())
1481 {
1482 //loading failed, add to rebuild list
1483 laddersToRebuild.push_backcxx . . $ std/__cxx11/list#push_back(fe7a8a4d1eddb70).(&kit->cxx . . $ std/_Rb_tree_iterator#`operator->`(34d6acfd341ba7ab).secondcxx . . $ std/pair#second.);
1484 }
1485 }
1486
1487 if (!laddersToRebuild.emptycxx . . $ std/__cxx11/list#empty(3482b152b9333168).())
1488 rebuildcxx . . $ pvpgn/bnetd/Ladders#rebuild(3f050cc5f374e5b7).(laddersToRebuild);
1489
1490 updatecxx . . $ pvpgn/bnetd/Ladders#update(49f6e7a06ebc5aa8).();
1491 savecxx . . $ pvpgn/bnetd/Ladders#save(49f6e7a06ebc5aa8).();
1492 }
1493
1494 void
1495 Ladderscxx . . $ pvpgn/bnetd/Ladders#::rebuildcxx . . $ pvpgn/bnetd/Ladders#rebuild(3f050cc5f374e5b7).(stdcxx . . $ std/::listcxx . . $ std/__cxx11/list#<LadderListcxx . . $ pvpgn/bnetd/LadderList#*>& laddersToRebuild)
1496 {
1497 t_entrycxx . . $ pvpgn/t_entry# * curr;
1498 t_accountcxx . . $ pvpgn/bnetd/t_account# * account;
1499 unsigned int uid, primary, secondary, tertiary;
1500
1501 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_debugcxx . . $ pvpgn/eventlog_level_debug., __FUNCTION__, "start rebuilding ladders");
1502
1503 if (accountlist_load_allcxx . . $ pvpgn/bnetd/accountlist_load_all(7864480464b09eea).(ST_FORCEcxx . . $ `src/bnetd/storage.h:27:9`!)) {
1504 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "error loading all accounts");
1505 return;
1506 }
1507
1508 HASHTABLE_TRAVERSEcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/hashtable.h:107:9`!(accountlist(), curr)
1509 {
1510 if ((account = ((t_accountcxx . . $ pvpgn/bnetd/t_account# *)entry_get_data(curr))))
1511 {
1512
1513 LadderReferencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject# referencedObjectcxx . . $ pvpgn/bnetd/LadderReferencedObject#LadderReferencedObject(a405232c11a3fb7b).(account);
1514 for (stdcxx . . $ std/::listcxx . . $ std/__cxx11/list#<LadderList*>::iteratorcxx . . $ std/__cxx11/list#iterator# lit(laddersToRebuild.begincxx . . $ std/__cxx11/list#begin(57ce810e58fbcab0).()); lit !=cxx . . $ std/`operator!=`(2ff7fa6cf5bdfcad). laddersToRebuild.endcxx . . $ std/__cxx11/list#end(57ce810e58fbcab0).(); lit++cxx . . $ std/_List_iterator#operator++(42220274f0bb161f).)
1515 {
1516 // only do handle referenceTypeAccount ladders here
1517 if ((*cxx . . $ std/_List_iterator#`operator*`(d426bc7b625886b7).lit)->getReferenceTypecxx . . $ pvpgn/bnetd/LadderList#getReferenceType(e852590b553adecf).() != referenceTypeAccountcxx . . $ pvpgn/bnetd/referenceTypeAccount.)
1518 {
1519 continue;
1520 }
1521
1522 if (referencedObject.getDatacxx . . $ pvpgn/bnetd/LadderReferencedObject#getData(f2382695747ae1).((*cxx . . $ std/_List_iterator#`operator*`(d426bc7b625886b7).lit)->getLadderKeycxx . . $ pvpgn/bnetd/LadderList#getLadderKey(5d9c31ea96ca8688).(), uid, primary, secondary, tertiary))
1523 {
1524 (*cxx . . $ std/_List_iterator#`operator*`(d426bc7b625886b7).lit)->addEntrycxx . . $ pvpgn/bnetd/LadderList#addEntry(f0ac5109e0f18056).(uid, primary, secondary, tertiary, referencedObject);
1525 }
1526 }
1527 }
1528 }
1529
1530 // now we would need to traverse teamlist, too.
1531 // how about comletly moving this code into team?
1532
1533 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_debugcxx . . $ pvpgn/eventlog_level_debug., __FUNCTION__, "done rebuilding ladders");
1534
1535 }
1536
1537 void
1538 Ladderscxx . . $ pvpgn/bnetd/Ladders#::updatecxx . . $ pvpgn/bnetd/Ladders#update(49f6e7a06ebc5aa8).()
1539 {
1540 for (KeyLadderMapcxx . . $ pvpgn/bnetd/Ladders#KeyLadderMap#::iteratorcxx . . $ std/map#iterator# kit(ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..begincxx . . $ std/map#begin(7e4de33083b6e738).()); kit !=cxx . . $ std/`operator!=`(be6a71a859368080). ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..endcxx . . $ std/map#end(7e4de33083b6e738).(); kit++cxx . . $ std/_Rb_tree_iterator#operator++(2987e7ff93f61dc1).)
1541 {
1542 kit->cxx . . $ std/_Rb_tree_iterator#`operator->`(34d6acfd341ba7ab).secondcxx . . $ std/pair#second..sortAndUpdatecxx . . $ pvpgn/bnetd/LadderList#sortAndUpdate(49f6e7a06ebc5aa8).();
1543 }
1544 }
1545
1546
1547 void
1548 Ladderscxx . . $ pvpgn/bnetd/Ladders#::activatecxx . . $ pvpgn/bnetd/Ladders#activate(49f6e7a06ebc5aa8).()
1549 {
1550 for (KeyLadderMapcxx . . $ pvpgn/bnetd/Ladders#KeyLadderMap#::iteratorcxx . . $ std/map#iterator# kit(ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..begincxx . . $ std/map#begin(7e4de33083b6e738).()); kit !=cxx . . $ std/`operator!=`(be6a71a859368080). ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..endcxx . . $ std/map#end(7e4de33083b6e738).(); kit++cxx . . $ std/_Rb_tree_iterator#operator++(2987e7ff93f61dc1).)
1551 {
1552 if (kit->cxx . . $ std/_Rb_tree_iterator#`operator->`(34d6acfd341ba7ab).secondcxx . . $ std/pair#second..getLadderKeycxx . . $ pvpgn/bnetd/LadderList#getLadderKey(5d9c31ea96ca8688).().getLadderTimecxx . . $ pvpgn/bnetd/LadderKey#getLadderTime(95c8d306b18567f).() == ladder_time_activecxx . . $ pvpgn/bnetd/ladder_time_active.)
1553 {
1554 LadderListcxx . . $ pvpgn/bnetd/LadderList#* activeLadder = &kit->cxx . . $ std/_Rb_tree_iterator#`operator->`(34d6acfd341ba7ab).secondcxx . . $ std/pair#second.;
1555 LadderListcxx . . $ pvpgn/bnetd/LadderList#* currentLadder = getLadderListcxx . . $ pvpgn/bnetd/Ladders#getLadderList(2c0c64fbd1351270).(activeLadder->getLadderKeycxx . . $ pvpgn/bnetd/LadderList#getLadderKey(5d9c31ea96ca8688).().getOpposingKeycxx . . $ pvpgn/bnetd/LadderKey#getOpposingKey(277d860c897d83c9).());
1556
1557 if (currentLadder == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!){
1558 eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "found active ladder, but no matching current ladder");
1559 continue;
1560 }
1561 activeLadder->activateFromcxx . . $ pvpgn/bnetd/LadderList#activateFrom(b602ba72ad058ae7).(currentLadder);
1562 }
1563 }
1564 updatecxx . . $ pvpgn/bnetd/Ladders#update(49f6e7a06ebc5aa8).();
1565 }
1566
1567
1568 void
1569 Ladderscxx . . $ pvpgn/bnetd/Ladders#::savecxx . . $ pvpgn/bnetd/Ladders#save(49f6e7a06ebc5aa8).()
1570 {
1571 for (KeyLadderMapcxx . . $ pvpgn/bnetd/Ladders#KeyLadderMap#::iteratorcxx . . $ std/map#iterator# kit(ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..begincxx . . $ std/map#begin(7e4de33083b6e738).()); kit !=cxx . . $ std/`operator!=`(be6a71a859368080). ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..endcxx . . $ std/map#end(7e4de33083b6e738).(); kit++cxx . . $ std/_Rb_tree_iterator#operator++(2987e7ff93f61dc1).)
1572 {
1573 kit->cxx . . $ std/_Rb_tree_iterator#`operator->`(34d6acfd341ba7ab).secondcxx . . $ std/pair#second..savecxx . . $ pvpgn/bnetd/LadderList#save(c9857a73d68e59ba).();
1574 }
1575 }
1576
1577
1578 void
1579 Ladderscxx . . $ pvpgn/bnetd/Ladders#::statuscxx . . $ pvpgn/bnetd/Ladders#status(83f5f38750778ac8).() const
1580 {
1581 for (KeyLadderMapcxx . . $ pvpgn/bnetd/Ladders#KeyLadderMap#::const_iteratorcxx . . $ std/map#const_iterator# kit(ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..begincxx . . $ std/map#begin(b953fec338ad1a3b).()); kit !=cxx . . $ std/`operator!=`(a84eb84a7a5e8237). ladderMapcxx . . $ pvpgn/bnetd/Ladders#ladderMap..endcxx . . $ std/map#end(b953fec338ad1a3b).(); kit++cxx . . $ std/_Rb_tree_const_iterator#operator++(bc8647ccc78a993a).)
1582 {
1583 kit->cxx . . $ std/_Rb_tree_const_iterator#`operator->`(8e614c7de0b1573e).secondcxx . . $ std/pair#second..writeStatusfilecxx . . $ pvpgn/bnetd/LadderList#writeStatusfile(83f5f38750778ac8).();
1584 }
1585 }
1586
1587
1588 }
1589
1590 }
1591