-
Notifications
You must be signed in to change notification settings - Fork 15
/
ghostdb.cpp
795 lines (585 loc) · 21.2 KB
/
ghostdb.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
/*
ent-ghost
Copyright [2011-2013] [Jack Lu]
This file is part of the ent-ghost source code.
ent-ghost is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ent-ghost source code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with ent-ghost source code. If not, see <http://www.gnu.org/licenses/>.
ent-ghost is modified from GHost++ (http://ghostplusplus.googlecode.com/)
GHost++ is Copyright [2008] [Trevor Hogan]
*/
#include "ghost.h"
#include "util.h"
#include "config.h"
#include "ghostdb.h"
#include "bnet.h"
//
// CGHostDB
//
CGHostDB :: CGHostDB( CConfig *CFG ) : m_HasError( false )
{
}
CGHostDB :: ~CGHostDB( )
{
}
void CGHostDB :: RecoverCallable( CBaseCallable *callable )
{
}
bool CGHostDB :: Begin( )
{
return true;
}
bool CGHostDB :: Commit( )
{
return true;
}
uint32_t CGHostDB :: AdminCount( string server )
{
return 0;
}
bool CGHostDB :: AdminCheck( string server, string user )
{
return false;
}
bool CGHostDB :: AdminAdd( string server, string user )
{
return false;
}
bool CGHostDB :: AdminRemove( string server, string user )
{
return false;
}
vector<string> CGHostDB :: AdminList( string server )
{
return vector<string>( );
}
uint32_t CGHostDB :: BanCount( string server )
{
return 0;
}
CDBBan *CGHostDB :: BanCheck( string server, string user, string ip, string hostname, string ownername )
{
return NULL;
}
uint32_t CGHostDB :: BanAdd( string server, string user, string ip, string gamename, string admin, string reason, uint32_t expiretime, string context )
{
return false;
}
bool CGHostDB :: BanRemove( string server, string user, string context )
{
return false;
}
bool CGHostDB :: BanRemove( string user, string context )
{
return false;
}
map<string, string> CGHostDB :: SpoofList( )
{
return map<string, string>( );
}
void CGHostDB :: ReconUpdate( uint32_t hostcounter, uint32_t seconds )
{
}
vector<string> CGHostDB :: CommandList( )
{
return vector<string>( );
}
uint32_t CGHostDB :: GameAdd( string server, string map, string gamename, string ownername, uint32_t duration, uint32_t gamestate, string creatorname, string creatorserver, string savetype )
{
return 0;
}
uint32_t CGHostDB :: GameUpdate( uint32_t id, string map, string gamename, string ownername, string creatorname, uint32_t players, string usernames, uint32_t slotsTotal, uint32_t totalGames, uint32_t totalPlayers, bool add )
{
return 0;
}
uint32_t CGHostDB :: GamePlayerAdd( uint32_t gameid, string name, string ip, uint32_t spoofed, string spoofedrealm, uint32_t reserved, uint32_t loadingtime, uint32_t left, string leftreason, uint32_t team, uint32_t colour, string savetype )
{
return 0;
}
uint32_t CGHostDB :: GamePlayerCount( string name )
{
return 0;
}
CDBGamePlayerSummary *CGHostDB :: GamePlayerSummaryCheck( string name, string realm )
{
return NULL;
}
CDBVampPlayerSummary *CGHostDB :: VampPlayerSummaryCheck( string name )
{
return NULL;
}
uint32_t CGHostDB :: DotAGameAdd( uint32_t gameid, uint32_t winner, uint32_t min, uint32_t sec, string saveType )
{
return 0;
}
uint32_t CGHostDB :: DotAPlayerAdd( uint32_t gameid, uint32_t colour, uint32_t kills, uint32_t deaths, uint32_t creepkills, uint32_t creepdenies, uint32_t assists, uint32_t gold, uint32_t neutralkills, string item1, string item2, string item3, string item4, string item5, string item6, string hero, uint32_t newcolour, uint32_t towerkills, uint32_t raxkills, uint32_t courierkills, string saveType )
{
return 0;
}
uint32_t CGHostDB :: DotAPlayerCount( string name )
{
return 0;
}
CDBDotAPlayerSummary *CGHostDB :: DotAPlayerSummaryCheck( string name, string realm, string saveType )
{
return NULL;
}
CDBTreePlayerSummary *CGHostDB :: TreePlayerSummaryCheck( string name, string realm )
{
return NULL;
}
CDBShipsPlayerSummary *CGHostDB :: ShipsPlayerSummaryCheck( string name, string realm )
{
return NULL;
}
CDBSnipePlayerSummary *CGHostDB :: SnipePlayerSummaryCheck( string name, string realm )
{
return NULL;
}
CDBW3MMDPlayerSummary *CGHostDB :: W3MMDPlayerSummaryCheck( string name, string realm, string category )
{
return NULL;
}
string CGHostDB :: FromCheck( uint32_t ip )
{
return "??";
}
bool CGHostDB :: FromAdd( uint32_t ip1, uint32_t ip2, string country )
{
return false;
}
bool CGHostDB :: DownloadAdd( string map, uint32_t mapsize, string name, string ip, uint32_t spoofed, string spoofedrealm, uint32_t downloadtime )
{
return false;
}
uint32_t CGHostDB :: W3MMDPlayerAdd( string category, uint32_t gameid, uint32_t pid, string name, string flag, uint32_t leaver, uint32_t practicing, string saveType )
{
return 0;
}
bool CGHostDB :: W3MMDVarAdd( uint32_t gameid, map<VarP,int32_t> var_ints, string saveType )
{
return false;
}
bool CGHostDB :: W3MMDVarAdd( uint32_t gameid, map<VarP,double> var_reals, string saveType )
{
return false;
}
bool CGHostDB :: W3MMDVarAdd( uint32_t gameid, map<VarP,string> var_strings, string saveType )
{
return false;
}
void CGHostDB :: CreateThread( CBaseCallable *callable )
{
callable->SetReady( true );
}
CCallableAdminCount *CGHostDB :: ThreadedAdminCount( string server )
{
return NULL;
}
CCallableAdminCheck *CGHostDB :: ThreadedAdminCheck( string server, string user )
{
return NULL;
}
CCallableAdminAdd *CGHostDB :: ThreadedAdminAdd( string server, string user )
{
return NULL;
}
CCallableAdminRemove *CGHostDB :: ThreadedAdminRemove( string server, string user )
{
return NULL;
}
CCallableAdminList *CGHostDB :: ThreadedAdminList( string server )
{
return NULL;
}
CCallableBanCount *CGHostDB :: ThreadedBanCount( string server )
{
return NULL;
}
CCallableBanCheck *CGHostDB :: ThreadedBanCheck( string server, string user, string ip, string hostname, string ownername )
{
return NULL;
}
CCallableBanAdd *CGHostDB :: ThreadedBanAdd( string server, string user, string ip, string gamename, string admin, string reason, uint32_t expiretime, string context )
{
return NULL;
}
CCallableBanRemove *CGHostDB :: ThreadedBanRemove( string server, string user, string context )
{
return NULL;
}
CCallableBanRemove *CGHostDB :: ThreadedBanRemove( string user, string context )
{
return NULL;
}
CCallableSpoofList *CGHostDB :: ThreadedSpoofList( )
{
return NULL;
}
CCallableReconUpdate *CGHostDB :: ThreadedReconUpdate( uint32_t hostcounter, uint32_t seconds )
{
return NULL;
}
CCallableCommandList *CGHostDB :: ThreadedCommandList( )
{
return NULL;
}
CCallableGameAdd *CGHostDB :: ThreadedGameAdd( string server, string map, string gamename, string ownername, uint32_t duration, uint32_t gamestate, string creatorname, string creatorserver, string savetype )
{
return NULL;
}
CCallableGameUpdate *CGHostDB :: ThreadedGameUpdate( uint32_t id, string map, string gamename, string ownername, string creatorname, uint32_t players, string usernames, uint32_t slotsTotal, uint32_t totalGames, uint32_t totalPlayers, bool add )
{
return NULL;
}
CCallableGamePlayerAdd *CGHostDB :: ThreadedGamePlayerAdd( uint32_t gameid, string name, string ip, uint32_t spoofed, string spoofedrealm, uint32_t reserved, uint32_t loadingtime, uint32_t left, string leftreason, uint32_t team, uint32_t colour, string savetype )
{
return NULL;
}
CCallableGamePlayerSummaryCheck *CGHostDB :: ThreadedGamePlayerSummaryCheck( string name, string realm )
{
return NULL;
}
CCallableVampPlayerSummaryCheck *CGHostDB :: ThreadedVampPlayerSummaryCheck( string name )
{
return NULL;
}
CCallableDotAGameAdd *CGHostDB :: ThreadedDotAGameAdd( uint32_t gameid, uint32_t winner, uint32_t min, uint32_t sec, string saveType )
{
return NULL;
}
CCallableDotAPlayerAdd *CGHostDB :: ThreadedDotAPlayerAdd( uint32_t gameid, uint32_t colour, uint32_t kills, uint32_t deaths, uint32_t creepkills, uint32_t creepdenies, uint32_t assists, uint32_t gold, uint32_t neutralkills, string item1, string item2, string item3, string item4, string item5, string item6, string hero, uint32_t newcolour, uint32_t towerkills, uint32_t raxkills, uint32_t courierkills, string saveType )
{
return NULL;
}
CCallableDotAPlayerSummaryCheck *CGHostDB :: ThreadedDotAPlayerSummaryCheck( string name, string realm, string saveType )
{
return NULL;
}
CCallableTreePlayerSummaryCheck *CGHostDB :: ThreadedTreePlayerSummaryCheck( string name, string realm )
{
return NULL;
}
CCallableShipsPlayerSummaryCheck *CGHostDB :: ThreadedShipsPlayerSummaryCheck( string name, string realm )
{
return NULL;
}
CCallableSnipePlayerSummaryCheck *CGHostDB :: ThreadedSnipePlayerSummaryCheck( string name, string realm )
{
return NULL;
}
CCallableW3MMDPlayerSummaryCheck *CGHostDB :: ThreadedW3MMDPlayerSummaryCheck( string name, string realm, string category )
{
return NULL;
}
CCallableDownloadAdd *CGHostDB :: ThreadedDownloadAdd( string map, uint32_t mapsize, string name, string ip, uint32_t spoofed, string spoofedrealm, uint32_t downloadtime )
{
return NULL;
}
CCallableScoreCheck *CGHostDB :: ThreadedScoreCheck( string category, string name, string server )
{
return NULL;
}
CCallableLeagueCheck *CGHostDB :: ThreadedLeagueCheck( string category, string name, string server, string gamename )
{
return NULL;
}
CCallableGetTournament *CGHostDB :: ThreadedGetTournament( string gamename )
{
return NULL;
}
CCallableTournamentChat *CGHostDB :: ThreadedTournamentChat( uint32_t chatid, string message )
{
return NULL;
}
CCallableTournamentUpdate *CGHostDB :: ThreadedTournamentUpdate( uint32_t matchid, string gamename, uint32_t status )
{
return NULL;
}
CCallableConnectCheck *CGHostDB :: ThreadedConnectCheck( string name, uint32_t sessionkey )
{
return NULL;
}
CCallableW3MMDPlayerAdd *CGHostDB :: ThreadedW3MMDPlayerAdd( string category, uint32_t gameid, uint32_t pid, string name, string flag, uint32_t leaver, uint32_t practicing, string saveType )
{
return NULL;
}
CCallableW3MMDVarAdd *CGHostDB :: ThreadedW3MMDVarAdd( uint32_t gameid, map<VarP,int32_t> var_ints, string saveType )
{
return NULL;
}
CCallableW3MMDVarAdd *CGHostDB :: ThreadedW3MMDVarAdd( uint32_t gameid, map<VarP,double> var_reals, string saveType )
{
return NULL;
}
CCallableW3MMDVarAdd *CGHostDB :: ThreadedW3MMDVarAdd( uint32_t gameid, map<VarP,string> var_strings, string saveType )
{
return NULL;
}
//
// Callables
//
void CBaseCallable :: Init( )
{
m_StartTicks = GetTicks( );
}
void CBaseCallable :: Close( )
{
m_EndTicks = GetTicks( );
m_Ready = true;
}
CCallableAdminCount :: ~CCallableAdminCount( )
{
}
CCallableAdminCheck :: ~CCallableAdminCheck( )
{
}
CCallableAdminAdd :: ~CCallableAdminAdd( )
{
}
CCallableAdminRemove :: ~CCallableAdminRemove( )
{
}
CCallableAdminList :: ~CCallableAdminList( )
{
}
CCallableBanCount :: ~CCallableBanCount( )
{
}
CCallableBanCheck :: ~CCallableBanCheck( )
{
delete m_Result;
}
CCallableBanAdd :: ~CCallableBanAdd( )
{
}
CCallableBanRemove :: ~CCallableBanRemove( )
{
}
CCallableSpoofList :: ~CCallableSpoofList( )
{
// don't delete anything in m_Result here, it's the caller's responsibility
}
CCallableReconUpdate :: ~CCallableReconUpdate( )
{
}
CCallableCommandList :: ~CCallableCommandList( )
{
// don't delete anything in m_Result here, it's the caller's responsibility
}
CCallableGameAdd :: ~CCallableGameAdd( )
{
}
CCallableGameUpdate :: ~CCallableGameUpdate( )
{
}
CCallableGamePlayerAdd :: ~CCallableGamePlayerAdd( )
{
}
CCallableGamePlayerSummaryCheck :: ~CCallableGamePlayerSummaryCheck( )
{
delete m_Result;
}
CCallableVampPlayerSummaryCheck :: ~CCallableVampPlayerSummaryCheck( )
{
delete m_Result;
}
CCallableDotAGameAdd :: ~CCallableDotAGameAdd( )
{
}
CCallableDotAPlayerAdd :: ~CCallableDotAPlayerAdd( )
{
}
CCallableDotAPlayerSummaryCheck :: ~CCallableDotAPlayerSummaryCheck( )
{
delete m_Result;
}
CCallableTreePlayerSummaryCheck :: ~CCallableTreePlayerSummaryCheck( )
{
delete m_Result;
}
CCallableShipsPlayerSummaryCheck :: ~CCallableShipsPlayerSummaryCheck( )
{
delete m_Result;
}
CCallableSnipePlayerSummaryCheck :: ~CCallableSnipePlayerSummaryCheck( )
{
delete m_Result;
}
CCallableW3MMDPlayerSummaryCheck :: ~CCallableW3MMDPlayerSummaryCheck( )
{
delete m_Result;
}
CCallableDownloadAdd :: ~CCallableDownloadAdd( )
{
}
CCallableScoreCheck :: ~CCallableScoreCheck( )
{
delete m_Result;
}
CCallableLeagueCheck :: ~CCallableLeagueCheck( )
{
}
CCallableGetTournament :: ~CCallableGetTournament( )
{
}
CCallableTournamentChat :: ~CCallableTournamentChat( )
{
}
CCallableTournamentUpdate :: ~CCallableTournamentUpdate( )
{
}
CCallableConnectCheck :: ~CCallableConnectCheck( )
{
}
CCallableW3MMDPlayerAdd :: ~CCallableW3MMDPlayerAdd( )
{
}
CCallableW3MMDVarAdd :: ~CCallableW3MMDVarAdd( )
{
}
//
// CDBBan
//
CDBBan :: CDBBan( uint32_t nId ) : m_Id( nId ), m_Delete( true ), m_CacheTime( 0 )
{
}
CDBBan :: CDBBan( uint32_t nId, string nServer, string nName, string nIP, string nDate, string nGameName, string nAdmin, string nReason, string nExpireDate, string nContext, uint32_t nCacheTime ) : m_Id( nId ), m_Server( nServer ), m_Name( nName ), m_IP( nIP ), m_Date( nDate ), m_GameName( nGameName ), m_Admin( nAdmin ), m_Reason( nReason ), m_ExpireDate( nExpireDate ), m_Context( nContext ), m_Delete( false ), m_CacheTime( nCacheTime )
{
}
CDBBan :: CDBBan( CDBBan *copy )
{
m_Id = copy->m_Id;
m_Server = copy->m_Server;
m_Name = copy->m_Name;
m_IP = copy->m_IP;
m_Date = copy->m_Date;
m_GameName = copy->m_GameName;
m_Admin = copy->m_Admin;
m_Reason = copy->m_Reason;
m_ExpireDate = copy->m_ExpireDate;
m_Context = copy->m_Context;
m_Delete = copy->m_Delete;
m_CacheTime = copy->m_CacheTime;
}
CDBBan :: ~CDBBan( )
{
}
//
// CDBGame
//
CDBGame :: CDBGame( uint32_t nID, string nServer, string nMap, string nDateTime, string nGameName, string nOwnerName, uint32_t nDuration ) : m_ID( nID ), m_Server( nServer ), m_Map( nMap ), m_DateTime( nDateTime ), m_GameName( nGameName ), m_OwnerName( nOwnerName ), m_Duration( nDuration )
{
}
CDBGame :: ~CDBGame( )
{
}
//
// CDBGamePlayer
//
CDBGamePlayer :: CDBGamePlayer( uint32_t nID, uint32_t nGameID, string nName, string nIP, uint32_t nSpoofed, string nSpoofedRealm, uint32_t nReserved, uint32_t nLoadingTime, uint32_t nLeft, string nLeftReason, uint32_t nTeam, uint32_t nColour )
: m_ID( nID ), m_GameID( nGameID ), m_Name( nName ), m_IP( nIP ), m_Spoofed( nSpoofed ), m_SpoofedRealm( nSpoofedRealm ), m_Reserved( nReserved ), m_LoadingTime( nLoadingTime ), m_Left( nLeft ), m_LeftReason( nLeftReason ), m_Team( nTeam ), m_Colour( nColour )
{
}
CDBGamePlayer :: ~CDBGamePlayer( )
{
}
//
// CDBGamePlayerSummary
//
CDBGamePlayerSummary :: CDBGamePlayerSummary( string nServer, string nName, uint32_t nTotalGames, double nLeftPercent, uint32_t nPlayingTime )
: m_Server( nServer ), m_Name( nName ), m_TotalGames( nTotalGames ), m_LeftPercent( nLeftPercent ), m_PlayingTime( nPlayingTime )
{
}
CDBGamePlayerSummary :: ~CDBGamePlayerSummary( )
{
}
//
// CDBVampPlayerSummary
//
CDBVampPlayerSummary :: CDBVampPlayerSummary( string nServer, string nName, uint32_t nTotalGames, uint32_t nTotalHumanGames, uint32_t nTotalVampGames, uint32_t nTotalHumanWins, uint32_t nTotalVampWins, uint32_t nTotalHumanLosses, uint32_t nTotalVampLosses, uint32_t nTotalVampKills, double nMinCommandCenter, double nAvgCommandCenter, double nMinBase, double nAvgBase )
: m_TotalGames( nTotalGames ), m_TotalHumanGames( nTotalHumanGames ), m_TotalVampGames( nTotalVampGames ), m_TotalHumanWins( nTotalHumanWins ), m_TotalVampWins( nTotalVampWins ), m_TotalHumanLosses( nTotalHumanLosses ), m_TotalVampLosses( nTotalVampLosses ), m_TotalVampKills( nTotalVampKills ), m_MinCommandCenter( nMinCommandCenter ), m_AvgCommandCenter( nAvgCommandCenter ), m_MinBase( nMinBase ), m_AvgBase( nAvgBase )
{
}
CDBVampPlayerSummary :: ~CDBVampPlayerSummary( )
{
}
//
// CDBDotAGame
//
CDBDotAGame :: CDBDotAGame( uint32_t nID, uint32_t nGameID, uint32_t nWinner, uint32_t nMin, uint32_t nSec ) : m_ID( nID ), m_GameID( nGameID ), m_Winner( nWinner ), m_Min( nMin ), m_Sec( nSec )
{
}
CDBDotAGame :: ~CDBDotAGame( )
{
}
//
// CDBDotAPlayer
//
CDBDotAPlayer :: CDBDotAPlayer( ) : m_ID( 0 ), m_GameID( 0 ), m_Colour( 0 ), m_Kills( 0 ), m_Deaths( 0 ), m_CreepKills( 0 ), m_CreepDenies( 0 ), m_Assists( 0 ), m_Gold( 0 ), m_NeutralKills( 0 ), m_NewColour( 0 ), m_TowerKills( 0 ), m_RaxKills( 0 ), m_CourierKills( 0 )
{
}
CDBDotAPlayer :: CDBDotAPlayer( uint32_t nID, uint32_t nGameID, uint32_t nColour, uint32_t nKills, uint32_t nDeaths, uint32_t nCreepKills, uint32_t nCreepDenies, uint32_t nAssists, uint32_t nGold, uint32_t nNeutralKills, string nItem1, string nItem2, string nItem3, string nItem4, string nItem5, string nItem6, string nHero, uint32_t nNewColour, uint32_t nTowerKills, uint32_t nRaxKills, uint32_t nCourierKills )
: m_ID( nID ), m_GameID( nGameID ), m_Colour( nColour ), m_Kills( nKills ), m_Deaths( nDeaths ), m_CreepKills( nCreepKills ), m_CreepDenies( nCreepDenies ), m_Assists( nAssists ), m_Gold( nGold ), m_NeutralKills( nNeutralKills ), m_Hero( nHero ), m_NewColour( nNewColour ), m_TowerKills( nTowerKills ), m_RaxKills( nRaxKills ), m_CourierKills( nCourierKills )
{
m_Items[0] = nItem1;
m_Items[1] = nItem2;
m_Items[2] = nItem3;
m_Items[3] = nItem4;
m_Items[4] = nItem5;
m_Items[5] = nItem6;
}
CDBDotAPlayer :: ~CDBDotAPlayer( )
{
}
string CDBDotAPlayer :: GetItem( unsigned int i )
{
if( i < 6 )
return m_Items[i];
return string( );
}
void CDBDotAPlayer :: SetItem( unsigned int i, string item )
{
if( i < 6 )
m_Items[i] = item;
}
//
// CDBDotAPlayerSummary
//
CDBDotAPlayerSummary :: CDBDotAPlayerSummary( string nServer, string nName, uint32_t nTotalGames, uint32_t nTotalWins, uint32_t nTotalLosses, uint32_t nTotalKills, uint32_t nTotalDeaths, uint32_t nTotalCreepKills, uint32_t nTotalCreepDenies, uint32_t nTotalAssists, uint32_t nTotalNeutralKills, uint32_t nTotalTowerKills, uint32_t nTotalRaxKills, uint32_t nTotalCourierKills, double nScore ) : m_Server( nServer ), m_Name( nName ), m_TotalGames( nTotalGames ), m_TotalWins( nTotalWins ), m_TotalLosses( nTotalLosses ), m_TotalKills( nTotalKills ), m_TotalDeaths( nTotalDeaths ), m_TotalCreepKills( nTotalCreepKills ), m_TotalCreepDenies( nTotalCreepDenies ), m_TotalAssists( nTotalAssists ), m_TotalNeutralKills( nTotalNeutralKills ), m_TotalTowerKills( nTotalTowerKills ), m_TotalRaxKills( nTotalRaxKills ), m_TotalCourierKills( nTotalCourierKills ), m_Score( nScore )
{
}
CDBDotAPlayerSummary :: ~CDBDotAPlayerSummary( )
{
}
CDBTreePlayerSummary :: CDBTreePlayerSummary( string nServer, string nName, uint32_t nTotalGames, uint32_t nTotalWins, uint32_t nTotalLosses, uint32_t nTotalKills, uint32_t nTotalTKs, uint32_t nTotalDeaths, uint32_t nTotalSaves, uint32_t nTotalEntGames, uint32_t nTotalInfernalGames, double nScore ) : m_Server( nServer ), m_Name( nName ), m_TotalGames( nTotalGames ), m_TotalWins( nTotalWins ), m_TotalLosses( nTotalLosses ), m_TotalKills( nTotalKills ), m_TotalTKs( nTotalTKs ), m_TotalDeaths( nTotalDeaths ), m_TotalSaves( nTotalSaves ), m_TotalEntGames( nTotalEntGames), m_TotalInfernalGames( nTotalInfernalGames), m_Score( nScore )
{
}
CDBTreePlayerSummary :: ~CDBTreePlayerSummary( )
{
}
CDBShipsPlayerSummary :: CDBShipsPlayerSummary( string nServer, string nName, uint32_t nTotalGames, uint32_t nTotalWins, uint32_t nTotalLosses, uint32_t nTotalKills, uint32_t nTotalDeaths, double nScore ) : m_Server( nServer ), m_Name( nName ), m_TotalGames( nTotalGames ), m_TotalWins( nTotalWins ), m_TotalLosses( nTotalLosses ), m_TotalKills( nTotalKills ), m_TotalDeaths( nTotalDeaths ), m_Score( nScore )
{
}
CDBShipsPlayerSummary :: ~CDBShipsPlayerSummary( )
{
}
CDBSnipePlayerSummary :: CDBSnipePlayerSummary( string nServer, string nName, uint32_t nTotalGames, uint32_t nTotalWins, uint32_t nTotalLosses, uint32_t nTotalKills, uint32_t nTotalDeaths, double nScore ) : m_Server( nServer ), m_Name( nName ), m_TotalGames( nTotalGames ), m_TotalWins( nTotalWins ), m_TotalLosses( nTotalLosses ), m_TotalKills( nTotalKills ), m_TotalDeaths( nTotalDeaths ), m_Score( nScore )
{
}
CDBSnipePlayerSummary :: ~CDBSnipePlayerSummary( )
{
}
CDBW3MMDPlayerSummary :: CDBW3MMDPlayerSummary( string nServer, string nName, string nCategory, uint32_t nTotalGames, uint32_t nTotalWins, uint32_t nTotalLosses, double nScore, uint32_t nRank ) : m_Server( nServer ), m_Name( nName ), m_Category( nCategory ), m_TotalGames( nTotalGames ), m_TotalWins( nTotalWins ), m_TotalLosses( nTotalLosses ), m_Score( nScore ), m_Rank( nRank )
{
}
CDBW3MMDPlayerSummary :: ~CDBW3MMDPlayerSummary( )
{
}