Skip to content

Commit c1f72a5

Browse files
JusicPSmilexGamer
andauthored
Code refactoring using patterns (#32)
* Completely implement singleton for CManager * Check if duplicate manager when adding to manager list * Create manager class documentation * Fix message printing * Make managers created when program starts Add Reload method to the server instance class Add user database proxy to measure methods execution time * Add documentation for command classes * Check for command duplicate when adding to list * Remove temporary DB_PROXY define (should be defined when using SERVER_DB_PROXY option) * Add missing EOL in CManager::AddManager log * Don't print this message if client leaves * Separate loading and parsing event quests in CQuestManager Add tasks and conditions in constructors, not in parse method * Add manager tests * Add ModeEvent.csv metadata Send ban list only if it exists in database * Replace int with size_t in CSendPacket::WriteData method * Move server command definitions to separate file * Fix a problem where user info and inventory not showing on client Add new room settings variable Add sendpacket command * Add missing packet ids and rename existing ones * Add unknown hostserver packet ids and add transfer function * Update metadata to latest * Don't change FD_SETSIZE define value to avoid memory corruption and crash in random places * Rewrite server events Use target_compile_definitions instead of add_definitions in cmakelists * Add test for events * Refactoring logging code: - separate logging to file and console - composite logging * Some fixes in tests * Template method for CBaseLogger * Move logger test classes inside test case * Delete readme.txt * Add test for commands --------- Co-authored-by: Smilex_Gamer <[email protected]>
1 parent 7785190 commit c1f72a5

File tree

105 files changed

+5403
-3436
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+5403
-3436
lines changed

bin/Data/ClientTable.csv

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
rp,20135,2561,0,,Luckybox2_plusone,,,3,Luckybox2_plusone,,,,,
2-
rp,2739,2739,,4100,,,,,,,,,,
3-
rp,2740,2740,,4100,,,,,,,,,,
4-
rp,2741,2741,,4100,,,,,,,,,,
5-
rp,2742,2742,,4100,,,,,,,,,,
1+
rp,20135,2561,0,,Luckybox2_plusone,,,3,Luckybox2_plusone
2+
rp,2739,2739,,4100,,,,,
3+
rp,2740,2740,,4100,,,,,
4+
rp,2741,2741,,4100,,,,,
5+
rp,2742,2742,,4100,,,,,
6+
rp,20240,,,2000,classy24s1bpackage,,,,classy24s1bpackage
7+
rp,20239,,,2000,classy24s1apackage,,,,classy24s1apackage
8+
rp,20242,,,,Ritsukacouponset_240403,,,,weaponticket
9+
rp,20241,,,,zombiecouponset_240403,,,,weaponticket

bin/Data/CodisData.csv

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,57 @@
11
; id,�̸�,BasePrice,WinPrice,WinProb,WinPricePerEnhance,WinProbPerEnhance
2-
8876,���̺� ���޼�,500,10000,600000,7500,450000
3-
8869,M3 ��������ī,500,10000,600000,7500,450000
4-
8825,�� ��������,500,10000,600000,7500,450000
5-
8787,�ƹٷ���Ʈ,500,10000,600000,7500,450000
6-
8794,hecate II ����,500,10000,600000,7500,450000
2+
8901,�鿵�ֺ�,500,10000,600000,7500,450000
3+
8663,������ ��Ƽ��,500,10000,600000,7500,450000
74
8699,�����,500,10000,600000,7500,450000
85
8702,�Ⱓƽ �帱,500,10000,600000,7500,450000
9-
8663,������ ��Ƽ�� ,500,10000,600000,7500,450000
106
8621,���� ȣ������,500,10000,600000,7500,450000
117
8622,����ű ������,500,10000,600000,7500,450000
128
8530,�濵�ֺ�,500,10000,600000,7500,450000
13-
8532,�ƽ�Ʈ�� ,500,10000,600000,7500,450000
9+
8532,�ƽ�Ʈ��,500,10000,600000,7500,450000
1410
8487,����������,500,10000,600000,7500,450000
1511
8474,����� ��������,500,10000,600000,7500,450000
16-
8480,�������,500,10000,600000,7500,450000
1712
8381,���̵� ���,500,10000,600000,7500,450000
18-
8382,���۳� ij��,500,10000,600000,7500,450000
1913
8314,��õȭ����,500,10000,600000,7500,450000
2014
8248,�巹����,500,10000,600000,7500,450000
2115
8171,�ôϸ�,500,10000,600000,7500,450000
22-
8425,��ũ��Ÿ,500,10000,600000,7500,450000
16+
8480,�������,500,10000,600000,7500,450000
17+
8382,���۳� ij��,500,10000,600000,7500,450000
18+
8425,��ũ ��Ÿ,500,10000,600000,7500,450000
19+
8787,�ƹٷ���Ʈ,500,10000,600000,7500,450000
20+
8794,Hecate II ����,500,10000,600000,7500,450000
21+
8825,�� ��������,500,10000,600000,7500,450000
22+
8876,���̺� ���޼�,500,10000,600000,7500,450000
23+
8869,M3 ��������ī,500,10000,600000,7500,450000
24+
8936,���� ��ó,500,8000,400000,6000,300000
25+
8955,������ ���̺���,500,8000,400000,6000,300000
2326
8865,�������� �ظ�,500,8000,400000,6000,300000
2427
8835,Ÿ�̷�Ʈ ���̽�,500,8000,400000,6000,300000
2528
8820,�����佺,500,8000,400000,6000,300000
2629
8767,Ʈ�� ȣũ,500,8000,400000,6000,300000
2730
8753,��ƮŬ����,500,8000,400000,6000,300000
2831
8720,ŰŬ�ӽ�,500,8000,400000,6000,300000
29-
8568,��������,500,8000,400000,6000,300000
30-
8667,������ ���� ,500,8000,400000,6000,300000
31-
8666,��������,500,8000,400000,6000,300000
32+
8667,������ ����,500,8000,400000,6000,300000
33+
8666,���� ����,500,8000,400000,6000,300000
3234
8656,�纹��,500,8000,400000,6000,300000
3335
8611,SKULL-T9,500,8000,400000,6000,300000
36+
8568,��������,500,8000,400000,6000,300000
3437
8555,SG552 �ɸ����ν�,500,8000,400000,6000,300000
3538
8563,���ϳ�Ʈ,500,8000,400000,6000,300000
3639
8456,�ű׳ѽ���,500,8000,400000,6000,300000
3740
8525,���ٽ�������,500,8000,400000,6000,300000
3841
8523,���罺��,500,8000,400000,6000,300000
3942
8483,��Ʋ����Ʈ ����,500,8000,400000,6000,300000
40-
8426,��â ��Į�� ���� ,500,8000,400000,6000,300000
41-
8414,NEGEV NG7 ���̾ƽ�,500,8000,400000,6000,300000
43+
8426,��â ��Į�� ����,500,8000,400000,6000,300000
4244
8385,���ʹ�Ƽ ������ �ǽ�Ʈ,500,8000,400000,6000,300000
4345
8351,����Ʈ�� ǻ��,500,8000,400000,6000,300000
4446
8286,���Ͽ��,500,8000,400000,6000,300000
45-
8148,Ʈ����Ƽ �׷����̵�,500,8000,400000,6000,300000
46-
8133,Ȧ���ҵ� ����� ����,500,8000,400000,6000,300000
47-
8106,�ʿ� ������ ���,500,8000,400000,6000,300000
48-
8055,�ʿ� �ű׳� �帱 ���,500,8000,400000,6000,300000
47+
8148,Ʈ����Ƽ�׷����̵�,500,8000,400000,6000,300000
48+
8133,Ȧ���ҵ����ο���,500,8000,400000,6000,300000
49+
8106,�ʿ����������,500,8000,400000,6000,300000
50+
8055,�ʿ��ű׳ѵ帱���,500,8000,400000,6000,300000
4951
8850,AUG�������,500,7000,84000,5250,63000
50-
8633,ī�᷹�� BIG-EYE,500,7000,84000,5250,63000
51-
8634,������ �ҵ� ,500,7000,84000,5250,63000
52-
8635,����Ʈ ����,500,7000,84000,5250,63000
52+
8633,�߿��� ī�᷹�� ��,500,7000,84000,5250,63000
53+
8634,�߿��� ������ �ҵ�,500,7000,84000,5250,63000
54+
8635,�߿��� ���� ����,500,7000,84000,5250,63000
5355
246,AWP CAMO,500,7000,84000,5250,63000
5456
907,VICTORY ij����,500,7000,84000,5250,63000
5557
906,VICTORY �̱�,500,7000,84000,5250,63000
@@ -83,14 +85,15 @@
8385
686,BALROG-�� BLUE,500,7000,84000,5250,63000
8486
685,BALROG-I BLUE,500,7000,84000,5250,63000
8587
342,TRG-42 ȭ��Ʈ���,500,7000,84000,5250,63000
88+
8414,NEGEV NG7 ���̾ƽ�,500,5000,45000,3750,33750
8689
8356,����ű �ϸ�Ͽ�,500,5000,45000,3750,33750
8790
8258,X-TRACKER,500,5000,45000,3750,33750
88-
8094,�ű׳� ��ó,500,5000,45000,3750,33750
89-
8221,���Ǵ�Ƽ ������ �ǽ�Ʈ,500,5000,45000,3750,33750
90-
8108,��� ����Ÿ �ǽ�����,500,5000,45000,3750,33750
91-
8143,�ٷ� M95 ȭ��Ʈ Ÿ�̰�,500,5000,45000,3750,33750
92-
8110,M3 ���� �巡��,500,5000,45000,3750,33750
93-
8047,���ҵ� ���� �����̾�,500,5000,45000,3750,33750
91+
8094,�ű׳ѷ�ó,500,5000,45000,3750,33750
92+
8221,���Ǵ�Ƽ�������ǽ�Ʈ,500,5000,45000,3750,33750
93+
8108,��󺣷�Ÿ�ǽ�����,500,5000,45000,3750,33750
94+
8143,�ٷ�M95ȭ��ƮŸ�̰�,500,5000,45000,3750,33750
95+
8110,M3�����巡��,500,5000,45000,3750,33750
96+
8047,���ҵ����ҽ����̾�,500,5000,45000,3750,33750
9497
8194,��� ����Ʈ ��Ŀ,500,4000,24000,3000,18000
9598
8117,M249 �Ǵн�,500,4000,24000,3000,18000
9699
825,AWP ���췹����,500,4000,24000,3000,18000
@@ -289,14 +292,15 @@
289292
171,M4A1 ������,500,1000,2000,500,1000
290293
170,AKM ��忡���,500,1000,2000,500,1000
291294
169,M200,500,1000,2000,500,1000
295+
8944,AK-47 60R Classic,500,1000,2000,300,600
292296
8871,DESERT MG3,500,1000,2000,300,600
293297
8872,DESERT M2,500,1000,2000,300,600
294298
8873,DESERT SPAS-12,500,1000,2000,300,600
295299
8874,DESERT HAMMER,500,1000,2000,300,600
296300
8875,DESERT WA2000,500,1000,2000,300,600
297-
8883,DESERT M60E4,500,1000,2000,300,600
298301
8884,DESERT M95,500,1000,2000,300,600
299-
8885,DESERT ��� ���Ǵ�Ƽ ���̳�,500,1000,2000,300,600
302+
8885,DESERT ������,500,1000,2000,300,600
303+
8883,DESERT M60E4,500,1000,2000,300,600
300304
8100,TURBULENT-11,500,800,800,240,240
301305
8086,TURBULENT-1,500,800,800,240,240
302306
8077,TURBULENT-3,500,800,800,240,240

bin/Data/HonorMoneyShop.csv

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,7 @@
7474
30230107,8908,50,0,0,0,0,0,0,0,0,2,100,8908,1,0,0,0,0,0,0,0,0,0,0,0,0,0
7575
30230108,8909,50,0,0,0,0,0,0,0,0,2,100,8909,1,0,0,0,0,0,0,0,0,0,0,0,0,0
7676
30230109,8910,50,0,0,0,0,0,0,0,0,2,100,8910,1,0,0,0,0,0,0,0,0,0,0,0,0,0
77+
32102068,8958,5,0,0,0,0,0,0,0,0,2,20,8958,1,0,0,0,0,0,0,0,0,0,0,0,0,0
78+
32102069,8959,5,0,0,0,0,0,0,0,0,2,20,8959,1,0,0,0,0,0,0,0,0,0,0,0,0,0
79+
32102070,8960,5,0,0,0,0,0,0,0,0,2,20,8960,1,0,0,0,0,0,0,0,0,0,0,0,0,0
80+
32102071,8961,5,0,0,0,0,0,0,0,0,2,20,8961,1,0,0,0,0,0,0,0,0,0,0,0,0,0

0 commit comments

Comments
 (0)