diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-07-20 03:38:47 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-07-20 03:38:47 +0000 |
commit | 0a4feb1f7d662faeefd1072d39530c2f610a3a1a (patch) | |
tree | b2a82245d6672ca1261efc076caf052bc62f726c | |
parent | 0f4b1a36a2552e62227ee1350e8034a8f122c028 (diff) | |
download | hercules-0a4feb1f7d662faeefd1072d39530c2f610a3a1a.tar.gz hercules-0a4feb1f7d662faeefd1072d39530c2f610a3a1a.tar.bz2 hercules-0a4feb1f7d662faeefd1072d39530c2f610a3a1a.tar.xz hercules-0a4feb1f7d662faeefd1072d39530c2f610a3a1a.zip |
* Corrected packet_db.txt. See topic:158382 for details. As a side-effect, the latest packet version is now 22 instead of 21.
* Added a charserver config option for the character renaming flag, along with a detailed comment on what it's supposed to be. This eliminates all that "change PACKETVER to 8 and recompile" mess.
* Moved PACKETVER back to clif.h, cleaned the related code a bit.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10888 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 7 | ||||
-rw-r--r-- | conf-tmpl/Changelog.txt | 2 | ||||
-rw-r--r-- | conf-tmpl/battle/client.conf | 23 | ||||
-rw-r--r-- | conf-tmpl/char_athena.conf | 13 | ||||
-rw-r--r-- | db/packet_db.txt | 569 | ||||
-rw-r--r-- | src/char/char.c | 42 | ||||
-rw-r--r-- | src/char_sql/char.c | 19 | ||||
-rw-r--r-- | src/common/mmo.h | 5 | ||||
-rw-r--r-- | src/login/login.c | 2 | ||||
-rw-r--r-- | src/login_sql/login.c | 2 | ||||
-rw-r--r-- | src/map/clif.c | 18 | ||||
-rw-r--r-- | src/map/clif.h | 8 |
12 files changed, 425 insertions, 285 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 87f9b9698..88e3e0249 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -3,6 +3,13 @@ Date Added AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. +2007/07/20 + * Corrected packet_db.txt. See topic:158382 for details. + As a side-effect, the latest packet version is now 22 instead of 21. + * Added a charserver config option for the character renaming flag, + along with a detailed comment on what it's supposed to be. This + eliminates all that "change PACKETVER to 8 and recompile" mess. + * Moved PACKETVER back to clif.h, cleaned the related code a bit. 2007/07/18 * Added delay_dependon_agi since people actually use and need it... * Small update to the effects list (new exe's effects by Au{R}oN) diff --git a/conf-tmpl/Changelog.txt b/conf-tmpl/Changelog.txt index aa86be8b3..1f8870309 100644 --- a/conf-tmpl/Changelog.txt +++ b/conf-tmpl/Changelog.txt @@ -1,5 +1,7 @@ Date Added +2007/07/20 + * Adjusted client.conf's packetver table (latest now uses new value) 2007/07/18 * Added delay_dependon_agi, both options are available now [ultramage] 2007/06/10 diff --git a/conf-tmpl/battle/client.conf b/conf-tmpl/battle/client.conf index ca6ad6c95..3e6b72415 100644 --- a/conf-tmpl/battle/client.conf +++ b/conf-tmpl/battle/client.conf @@ -26,19 +26,20 @@ // Set here which client version do you accept. Add all values of clients: // Clients older than accepted versions, and versions not set to 'accepted' // here will be rejected when logging in -// 0x0001: Clients 2004-09-06aSakray and older (packet versions 4-9) +// 0x0001: Clients older than 2004-09-06aSakray (packet versions 5-9) // 0x0002: 2004-09-06aSakexe (version 10) -// 0x0004: 2004-09-21aSakray (version 11) -// 0x0008: 2004-10-11aSakexe (version 12) +// 0x0004: 2004-09-20aSakexe (version 11) +// 0x0008: 2004-10-05aSakexe (version 12) // 0x0010: 2004-10-25aSakexe (version 13) -// 0x0020: 2004-11-01aSakexe (version 14) -// 0x0040: 2004-12-06aSakexe (version 15) -// 0x0080: 2005-01-10aSakexe (version 16) -// 0x0100: 2005-05-09aSakexe (version 17) -// 0x0200: 2005-06-28aSakexe (version 18) -// 0x0400: 2006-04-03aSakexe (version 19) -// 0x0800: 2007-01-08aSakexe (version 20) -// 0x1000: 2007-02-12aSakexe (version 21) +// 0x0020: 2004-11-29aSakexe (version 14) +// 0x0040: 2005-01-10bSakexe (version 15) +// 0x0080: 2005-05-09aSakexe (version 16) +// 0x0100: 2005-06-28aSakexe (version 17) +// 0x0200: 2005-07-18aSakexe (version 18) +// 0x0400: 2005-07-19bSakexe (version 19) +// 0x0800: 2006-03-27aSakexe (version 20) +// 0x1000: 2007-01-08aSakexe (version 21) +// 0x2000: 2007-02-12aSakexe (version 22) // default value: 0xFFFF (all clients) packet_ver_flag: 0xFFFF diff --git a/conf-tmpl/char_athena.conf b/conf-tmpl/char_athena.conf index 522750b8c..3948a84fa 100644 --- a/conf-tmpl/char_athena.conf +++ b/conf-tmpl/char_athena.conf @@ -145,6 +145,9 @@ guild_exp_rate: 100 // Name used for unknown characters unknown_char_name: Unknown +// To log the character server? +log_char: 1 + // Log Filename char_log_filename: log/char.log @@ -163,14 +166,18 @@ char_name_option: 1 // Note: Don't add spaces unless you mean to add 'space' to the list. char_name_letters: abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 -// To log the character server? -log_char: 1 +// Character rename option. When set to yes, the server will send an extended +// char-info packet, informing whether the character can be renamed or not. +// NOTE: This functionality is not implemented. +// NOTE: This option is for compatibility with kRO sakray 2006-10-23 and above. +// !Do not use it for any other type of client since it will crash them! +char_rename: yes // How many Characters are allowed per Account ? (0 = disabled) [SQL Only!] chars_per_account: 0 // Restrict character deletion by BaseLevel -// 0: no restriction (players can delete characters of may levels) +// 0: no restriction (players can delete characters of any level) // -X: you can't delete chars with BaseLevel <= X // Y: you can't delete chars with BaseLevel >= Y // e.g. char_del_level: 80 (players can't delete characters with 80+ BaseLevel) diff --git a/db/packet_db.txt b/db/packet_db.txt index 6a276c825..b058da0b4 100644 --- a/db/packet_db.txt +++ b/db/packet_db.txt @@ -13,7 +13,7 @@ packet_db_ver: default packet_ver: 5 0x0064,55 0x0065,17 -0x0066,3 +0x0066,6 0x0067,37 0x0068,46 0x0069,-1 @@ -23,7 +23,7 @@ packet_ver: 5 0x006d,108 0x006e,3 0x006f,2 -0x0070,3 +0x0070,6 0x0071,28 0x0072,19,wanttoconnection,2:6:10:14:18 0x0073,11 @@ -54,7 +54,7 @@ packet_ver: 5 0x008c,-1,globalmessage,2:4 0x008d,-1 0x008e,-1 -0x008f,0 +//0x008f,0 0x0090,7,npcclicked,2 0x0091,22 0x0092,28 @@ -84,7 +84,7 @@ packet_ver: 5 0x00aa,7 0x00ab,4,unequipitem,2 0x00ac,7 -0x00ad,0 +//0x00ad,0 0x00ae,-1 0x00af,6 0x00b0,8 @@ -301,7 +301,7 @@ packet_ver: 5 0x0183,10,guilddelalliance,2:6 0x0184,10 0x0185,34 -0x0186,0 +//0x0186,0 0x0187,6 0x0188,8 0x0189,4 @@ -369,7 +369,7 @@ packet_ver: 5 0x01c7,2 0x01c8,13 0x01c9,97 -0x01ca,3 +//0x01ca,0 0x01cb,9 0x01cc,9 0x01cd,30 @@ -431,16 +431,14 @@ packet_ver: 5 0x0205,26 0x0206,11 0x0207,34 -0x0208,14,friendslistreply,2:6:10 +0x0208,11,friendslistreply,2:6:10 0x0209,36 0x020a,10 -0x020b,0 -0x020c,0 +//0x020b,0 +//0x020c,0 0x020d,-1 -0x020e,24 -0x020f,10 -//2004-07-06kRO +//2004-07-05aSakexe packet_ver: 6 0x0072,22,wanttoconnection,5:9:13:17:21 0x0085,8,walktoxy,5 @@ -448,8 +446,10 @@ packet_ver: 6 0x0113,15,useskilltoid,4:9:11 0x0116,15,useskilltopos,4:9:11:13 0x0190,95,useskilltoposinfo,4:9:11:13:15 +0x0208,14,friendslistreply,2:6:10 +0x020e,24 -//2004-07-13kRO +//2004-07-13aSakexe packet_ver: 7 0x0072,39,wanttoconnection,12:22:30:34:38 0x0085,9,walktoxy,6 @@ -460,7 +460,7 @@ packet_ver: 7 0x0116,19,useskilltopos,7:9:15:17 0x0190,99,useskilltoposinfo,7:9:15:17:19 -//2004-07-26kRO +//2004-07-26aSakexe packet_ver: 8 0x0072,14,dropitem,5:12 0x007e,33,wanttoconnection,12:18:24:28:32 @@ -480,10 +480,9 @@ packet_ver: 8 0x0190,26,movefromkafra,10:22 0x0193,9,actionrequest,3:8 -//2004-08-09kRO +//2004-08-09aSakexe packet_ver: 9 0x0072,17,dropitem,8:15 -//9, +12, +7, +4, +4 0x007e,37,wanttoconnection,9:21:28:32:36 0x0085,26,useskilltoid,11:18:22 0x0089,12,getcharnamerequest,8 @@ -500,9 +499,6 @@ packet_ver: 9 0x0193,18,actionrequest,7:17 //2004-08-16aSakexe -0x020f,0 -0x0210,0 -0x0211,0 0x0212,26 0x0213,26 0x0214,42 @@ -524,7 +520,6 @@ packet_ver: 10 0x00a2,14,solvecharname,10 0x00a7,25,useskilltopos,10:14:18:23 0x00f3,10,changedir,4:9 -//7, +7, +10, +4, +6 0x00f5,34,wanttoconnection,7:15:25:29:33 0x00f7,2,closekafra,0 0x0113,11,takeitem,7 @@ -532,7 +527,7 @@ packet_ver: 10 0x0190,22,useskilltoid,9:15:18 0x0193,17,movefromkafra,3:13 -//2004-09-21aSakexe by Sara +//2004-09-20aSakexe packet_ver: 11 0x0072,18,useitem,10:14 0x007e,25,movetokafra,6:21 @@ -540,17 +535,17 @@ packet_ver: 11 0x0089,14,walktoxy,11 0x008c,109,useskilltoposinfo,16:20:23:27:29 0x0094,19,dropitem,12:17 +0x009b,10,getcharnamerequest,6 0x00a2,10,solvecharname,6 0x00a7,29,useskilltopos,6:20:23:27 0x00f3,18,changedir,8:17 0x00f5,32,wanttoconnection,10:17:23:27:31 -0x009b,10,getcharnamerequest,6 0x0113,14,takeitem,10 0x0116,14,ticksend,10 0x0190,14,useskilltoid,4:7:10 0x0193,12,movefromkafra,4:8 -//2004-10-11aSakexe by Sara +//2004-10-05aSakexe packet_ver: 12 0x0072,17,useitem,6:13 0x007e,16,movetokafra,5:12 @@ -567,7 +562,7 @@ packet_ver: 12 0x0190,20,useskilltoid,7:12:16 0x0193,26,movefromkafra,10:22 -//2004-10-25aSakexe by Sara +//2004-10-25aSakexe packet_ver: 13 0x0072,13,useitem,5:9 0x007e,13,movetokafra,6:9 @@ -584,110 +579,144 @@ packet_ver: 13 0x0190,26,useskilltoid,4:10:22 0x0193,22,movefromkafra,12:18 -//2004-11-01aSakexe by Sara -//It has been reported that this npcamountinput line is WRONG. Therefore this -//new data is now part of packet version 13 -//packet_ver: 14 -//0x00f5,29,wanttoconnection,5:14:20:24:28 -//0x0143,23,npcamountinput,2:6 +//2004-11-01aSakexe +0x0084,-1 0x0215,6 -0x0216,6 -//2004-12-06aSakexe -packet_ver: 15 -0x0190,15,useitem,3:11 -0x0094,14,movetokafra,4:10 -0x009f,18,actionrequest,6:17 -0x00a7,7,walktoxy,4 -0x007e,30,useskilltopos,4:9:22:28 -0x0116,12,dropitem,4:10 -0x008c,13,getcharnamerequest,9 -0x0085,-1,globalmessage,2:4 -0x00f7,14,solvecharname,10 -0x0113,110,useskilltoposinfo,4:9:22:28:30 -0x00f3,8,changedir,3:7 -0x00f5,29,wanttoconnection,3:10:20:24:28 -0x00a2,7,takeitem,3 -0x0089,7,ticksend,3 -0x0072,22,useskilltoid,8:12:18 -0x0193,21,movefromkafra,4:17 -0x009b,2,closekafra,0 +//2004-11-08aSakexe +0x0084,2 +0x0216,6 0x0217,2,blacksmith,0 0x0218,2,alchemist,0 0x0219,282 0x021a,282 0x021b,10 0x021c,10 + +//2004-11-15aSakexe 0x021d,6 -0x021e,6 + +//2004-11-29aSakexe +packet_ver: 14 +0x0072,22,useskilltoid,8:12:18 +0x007e,30,useskilltopos,4:9:22:28 +0x0085,-1,globalmessage,2:4 +0x0089,7,ticksend,3 +0x008c,13,getcharnamerequest,9 +0x0094,14,movetokafra,4:10 +0x009b,2,closekafra,0 +0x009f,18,actionrequest,6:17 +0x00a2,7,takeitem,3 +0x00a7,7,walktoxy,4 +0x00f3,8,changedir,3:7 +0x00f5,29,wanttoconnection,3:10:20:24:28 +0x00f7,14,solvecharname,10 +0x0113,110,useskilltoposinfo,4:9:22:28:30 +0x0116,12,dropitem,4:10 +0x0190,15,useitem,3:11 +0x0193,21,movefromkafra,4:17 0x0221,-1 0x0222,6,weaponrefine,2 0x0223,8 -//2005-01-10bSakexe by Sara -packet_ver: 16 -0x009b,32,wanttoconnection,3:12:23:27:31 +//2004-12-13aSakexe +//skipped: many packets being set to -1 +0x0066,3 +0x0070,3 +0x01ca,3 +0x021e,6 +0x021f,66 +0x0220,10 + +//2005-01-10bSakexe +packet_ver: 15 +0x0072,26,useskilltoid,8:16:22 +0x007e,114,useskilltoposinfo,10:18:22:32:34 +0x0085,23,changedir,12:22 0x0089,9,ticksend,5 -0x00a7,13,walktoxy,10 -0x0190,20,actionrequest,9:19 -0x00f3,-1,globalmessage,2:4 0x008c,8,getcharnamerequest,4 -0x0085,23,changedir,12:22 0x0094,20,movetokafra,10:16 -0x0193,2,closekafra,0 -0x00f7,21,movefromkafra,11:17 +0x009b,32,wanttoconnection,3:12:23:27:31 0x009f,17,useitem,5:13 -0x0116,20,dropitem,15:18 -0x00f5,9,takeitem,5 -0x0113,34,useskilltopos,10:18:22:32 -0x0072,26,useskilltoid,8:16:22 -0x007e,114,useskilltoposinfo,10:18:22:32:34 0x00a2,11,solvecharname,7 -0x0143,10,npcamountinput,2:6 -0x021f,66 -0x0220,10 - -//2005-05-09aSakexe by Sara -packet_ver: 17 -0x009b,26,wanttoconnection,4:9:17:18:25 -0x0089,8,ticksend,4 -0x00a7,8,walktoxy,5 -0x0190,19,actionrequest,5:18 +0x00a7,13,walktoxy,10 0x00f3,-1,globalmessage,2:4 -0x008c,11,getcharnamerequest,7 -0x0085,11,changedir,7:10 -0x0094,14,movetokafra,7:10 +0x00f5,9,takeitem,5 +0x00f7,21,movefromkafra,11:17 +0x0113,34,useskilltopos,10:18:22:32 +0x0116,20,dropitem,15:18 +0x0190,20,actionrequest,9:19 0x0193,2,closekafra,0 -0x00f7,22,movefromkafra,14:18 -0x009f,14,useitem,4:10 -0x0116,10,dropitem,5:8 -0x00f5,8,takeitem,4 -0x0113,22,useskilltopos,5:9:12:20 -0x0072,25,useskilltoid,6:10:21 -0x007e,102,useskilltoposinfo,5:9:12:20:22 -0x00a2,15,solvecharname,11 -0x0143,10,npcamountinput,2:6 + +//2005-03-28aSakexe 0x0224,10 0x0225,2,taekwon,0 0x0226,282 + +//2005-04-04aSakexe 0x0227,18 0x0228,18 + +//2005-04-11aSakexe 0x0229,15 0x022a,58 0x022b,57 0x022c,64 + +//2005-04-25aSakexe 0x022d,5,hommenu,4 -0x022e,71 -0x022f,5 -0x0230,12 -0x0231,26,changehomunculusname,0 0x0232,9,hommoveto,6 0x0233,11,homattack,0 0x0234,6,hommovetomaster,0 -0x0235,115 -//2005-06-28aSakexe by Sara -packet_ver: 18 +//2005-05-09aSakexe +packet_ver: 16 +0x0072,25,useskilltoid,6:10:21 +0x007e,102,useskilltoposinfo,5:9:12:20:22 +0x0085,11,changedir,7:10 +0x0089,8,ticksend,4 +0x008c,11,getcharnamerequest,7 +0x0094,14,movetokafra,7:10 +0x009b,26,wanttoconnection,4:9:17:18:25 +0x009f,14,useitem,4:10 +0x00a2,15,solvecharname,11 +0x00a7,8,walktoxy,5 +0x00f5,8,takeitem,4 +0x00f7,22,movefromkafra,14:18 +0x0113,22,useskilltopos,5:9:12:20 +0x0116,10,dropitem,5:8 +0x0190,19,actionrequest,5:18 + +//2005-05-23aSakexe +0x022e,69 +0x0230,12 + +//2005-05-30aSakexe +0x022e,71 +0x0235,-1 +0x0236,10 +0x0237,2,rankingpk,0 +0x0238,282 + +//2005-05-31aSakexe +0x0216,2 +0x0217,0 +0x0239,11 + +//2005-06-08aSakexe +0x0216,6 +0x0217,2 +0x022f,5 +0x0231,26,changehomunculusname,0 +0x023a,4 +0x023b,24,storagepassword,0 +0x023c,6 + +//2005-06-22aSakexe +0x022e,71 + +//2005-06-28aSakexe +packet_ver: 17 0x0072,34,useskilltoid,6:17:30 0x007e,113,useskilltoposinfo,12:15:18:31:33 0x0085,17,changedir,8:16 @@ -698,133 +727,222 @@ packet_ver: 18 0x009f,19,useitem,9:15 0x00a2,9,solvecharname,5 0x00a7,11,walktoxy,8 -0x00f3,-1,globalmessage,2:4 0x00f5,13,takeitem,9 0x00f7,18,movefromkafra,11:14 0x0113,33,useskilltopos,12:15:18:31 0x0116,12,dropitem,3:10 -0x0143,10,npcamountinput,2:6 0x0190,24,actionrequest,11:23 -0x0193,2,closekafra,0 -0x20e,10 -0x237,2,rankingpk,0 -0x23a,4 -0x23b,3,storagepassword,0 // 3 is wrong, size to be determined -0x23d,-1 -0x23e,4 +0x0216,0 +0x023d,-1 +0x023e,4 + +//2005-07-18aSakexe +packet_ver: 18 +0x0072,19,useskilltoid,5:11:15 +0x007e,110,useskilltoposinfo,9:15:23:28:30 +0x0085,11,changedir,6:10 +0x0089,7,ticksend,3 +0x008c,11,getcharnamerequest,7 +0x0094,21,movetokafra,12:17 +0x009b,31,wanttoconnection,3:13:22:26:30 +0x009f,12,useitem,3:8 +0x00a2,18,solvecharname,14 +0x00a7,15,walktoxy,12 +0x00f5,7,takeitem,3 +0x00f7,13,movefromkafra,5:9 +0x0113,30,useskilltopos,9:15:23:28 +0x0116,12,dropitem,6:10 +0x0190,21,actionrequest,5:20 +0x0216,6 //Start mail system? -0x23f,2 -0x240,-1 -0x241,-1 -0x242,-1 -0x243,-1 -0x244,-1 -0x245,3 +0x023f,2 +0x0240,8 +0x0241,6 +0x0242,-1 +0x0243,6 +0x0244,6 +0x0245,7 //Start writing a mail? -0x246,4 +0x0246,4 //Send Item/Zeny -0x247,8 +0x0247,8 //Message -0x248,116 +0x0248,68 //Delivered? -0x249,3 -0x24a,70 -0x24b,4 -0x24c,8 -0x24d,12 -0x24e,4 -0x24f,10 -0x250,3 -0x251,32 -0x252,-1 -0x253,3 -0x254,3,feelsaveok,0 -0x255,5 -0x256,5 -0x257,8 -0x258,2 -0x259,3 -0x25a,-1 -0x25b,-1 -0x25c,4 -0x25d,-1 -0x25e,4 - -//2006-04-03aSakexe by blackhole89 +0x0249,3 +0x024a,70 +0x024b,4 +0x024c,8 +0x024d,14 +0x024e,6 +0x024f,10 +0x0250,3 +0x0251,2 +0x0252,-1 + +//2005-07-19bSakexe packet_ver: 19 -0x0072,26,useskilltoid,11:18:22 -0x007e,120,useskilltoposinfo,5:15:29:38:40 -0x0085,12,changedir,7:11 -0x008c,12,getcharnamerequest,8 -0x0094,23,movetokafra,5:19 -0x009b,37,wanttoconnection,9:21:28:32:36 -0x009f,24,useitem,9:20 -0x00a2,11,solvecharname,7 -0x00a7,15,walktoxy,12 +0x0072,34,useskilltoid,6:17:30 +0x007e,113,useskilltoposinfo,12:15:18:31:33 +0x0085,17,changedir,8:16 +0x0089,13,ticksend,9 +0x008c,8,getcharnamerequest,4 +0x0094,31,movetokafra,16:27 +0x009b,32,wanttoconnection,9:15:23:27:31 +0x009f,19,useitem,9:15 +0x00a2,9,solvecharname,5 +0x00a7,11,walktoxy,8 0x00f5,13,takeitem,9 -0x00f7,26,movefromkafra,11:22 -0x0113,40,useskilltopos,5:15:29:38 -0x0116,17,dropitem,8:15 -0x0190,18,actionrequest,7:17 +0x00f7,18,movefromkafra,11:14 +0x0113,33,useskilltopos,12:15:18:31 +0x0116,12,dropitem,3:10 +0x0190,24,actionrequest,11:23 + +//2005-08-01aSakexe +0x0245,3 +0x0251,4 + +//2005-08-08aSakexe +0x024d,12 +0x024e,4 + +//2005-08-17aSakexe +0x0253,3 +0x0254,3,feelsaveok,0 + +//2005-08-29aSakexe +0x0240,-1 +0x0248,-1 +0x0255,5 +0x0256,0 +0x0257,8 -//2006-06-07aSakexe -0x025F,6 +//2005-09-12bSakexe +0x0256,5 +0x0258,2 +0x0259,3 + +//2005-10-10aSakexe +0x020e,32 +0x025a,-1 +0x025b,-1 + +//2005-10-13aSakexe +0x007a,6 +0x0251,32 +0x025c,4 + +//2005-10-17aSakexe +0x007a,58 +0x025d,-1 +0x025e,4 + +//2005-10-24aSakexe +0x025f,6 0x0260,6 + +//2005-11-07aSakexe +0x024e,6 +0x0251,34 + +//2006-01-09aSakexe 0x0261,11 0x0262,11 0x0263,11 -0x0264,14 +0x0264,20 0x0265,20 0x0266,30 0x0267,4 0x0268,4 0x0269,4 -0x026A,4 -0x026B,4 -0x026C,4 -0x026D,4 -0x026F,2 +0x026a,4 +0x026b,4 +0x026c,4 +0x026d,4 +0x026f,2 0x0270,2 -0x0271,40 +0x0271,38 0x0272,44 -0x0273,30 + +//2006-01-26aSakexe +0x0271,40 + +//2006-03-06aSakexe +0x0273,6 0x0274,8 -0x0277,84 -0x0278,2 -0x0279,2 -0x027A,-1 -//2006-07-03aSakexe -0x027D,62 -0x027B,14 -0x027C,60 +//2006-03-13aSakexe +0x0273,30 -//2006-07-24aSakexe -//0x025B,-1 -0x027E,-1 +//2006-03-27aSakexe +packet_ver: 20 +0x0072,26,useskilltoid,11:18:22 +0x007e,120,useskilltoposinfo,5:15:29:38:40 +0x0085,12,changedir,7:11 +//0x0089,13,ticksend,9 +0x008c,12,getcharnamerequest,8 +0x0094,23,movetokafra,5:19 +0x009b,37,wanttoconnection,9:21:28:32:36 +0x009f,24,useitem,9:20 +0x00a2,11,solvecharname,7 +0x00a7,15,walktoxy,12 +0x00f5,13,takeitem,9 +0x00f7,26,movefromkafra,11:22 +0x0113,40,useskilltopos,5:15:29:38 +0x0116,17,dropitem,8:15 +0x0190,18,actionrequest,7:17 -//2006-08-07aSakexe -0x025B,6 -//0x027F,4 +//2006-10-23aSakexe +0x006d,110 -//2006-09-18aSakexe -0x0284,14 +//2007-01-02aSakexe (grouped changes between this and 2006-04-24aSakexe) +0x023e,8 +0x0277,84 +0x0278,2 +0x0279,2 +0x027a,-1 +0x027b,14 +0x027c,60 +0x027d,62 +0x027e,-1 +0x027f,8 +0x0280,12 0x0281,4 0x0282,284 -0x0280,12 +0x0283,6 +0x0284,14 0x0285,6 0x0286,4 -0x027F,8 -0x0283,6 - -//2006-10-17aSakexe -0x028A,18 - -//2006-10-23aSakexe -0x006d,110 +0x0287,-1 +0x0288,6 +0x0289,8 +0x028a,18 +0x028b,-1 +0x028c,46 +0x028d,34 +0x028e,4 +0x028f,6 +0x0290,4 +0x0291,4 +0x0292,2 +0x0293,70 +0x0294,10 +0x0295,-1 +0x0296,-1 +0x0297,-1 +0x0298,8 +0x0299,6 +0x029a,27 +0x029c,66 +0x029d,-1 +0x029e,11 +0x029f,3 +0x02a0,0 +0x02a1,0 +0x02a2,8 //2007-01-08aSakexe -packet_ver: 20 +packet_ver: 21 0x0072,30,useskilltoid,10:14:26 0x007e,120,useskilltoposinfo,10:19:23:38:40 0x0085,14,changedir,10:13 @@ -835,17 +953,29 @@ packet_ver: 20 0x009f,21,useitem,7:17 0x00a2,10,solvecharname,6 0x00a7,8,walktoxy,5 -0x00f3,-1,globalmessage,2:4 0x00f5,11,takeitem,7 0x00f7,15,movefromkafra,3:11 0x0113,40,useskilltopos,10:19:23:38 0x0116,19,dropitem,11:17 0x0190,10,actionrequest,4:9 -0x0193,2,closekafra,0 + +//2007-01-22aSakexe +0x02a3,18 +0x02a4,2 + +//2007-01-29aSakexe +0x029b,72 +0x02a3,0 +0x02a4,0 +0x02a5,8 + +// 2007-02-05aSakexe +0x02aa,4 +0x02ab,36 +0x02ac,6 //2007-02-12aSakexe -packet_ver: 21 -0x006d,110 +packet_ver: 22 0x0072,25,useskilltoid,6:10:21 0x007e,102,useskilltoposinfo,5:9:12:20:22 0x0085,11,changedir,7:10 @@ -855,40 +985,37 @@ packet_ver: 21 0x009b,26,wanttoconnection,4:9:17:18:25 0x009f,14,useitem,4:10 0x00a2,15,solvecharname,11 -0x00a7,8,walktoxy,5 -0x00f3,-1,globalmessage,2:4 +//0x00a7,8,walktoxy,5 0x00f5,8,takeitem,4 0x00f7,22,movefromkafra,14:18 0x0113,22,useskilltopos,5:9:12:20 0x0116,10,dropitem,5:8 0x0190,19,actionrequest,5:18 -0x0193,2,closekafra,0 -0x028b,-1 -0x028c,46 -0x028d,34 -0x028e,4 -0x028f,6 -0x0290,4 -0x0291,4 -0x0292,2 -0x0293,70 -0x0294,10 -0x0295,-1 -0x0296,-1 -0x0297,-1 -0x0298,8 -0x0299,6 -0x029a,27 -0x029b,72 -0x029c,66 -0x029d,-1 -0x029e,11 -0x029f,3 -0x02a2,8 -0x02a5,8 -0x02aa,4 -0x02ab,36 -0x02ac,6 -// Add new packets here -//packet_ver: 22 +//2007-05-07aSakexe +0x01fd,15,repairitem,2 + +//2007-07-11aSakexe (grouped changes between this and 2007-02-27aSakexe) +0x0288,10 +0x0289,12 +0x02a6,22 +0x02a7,22 +0x02a8,162 +0x02a9,58 +0x02ad,8 +0x02ae,10 +0x02af,2 +0x02b0,85 +0x02b3,7 +0x02b4,6 +0x02b5,12 +0x02b6,7 +0x02b7,10 +0x02b8,22 +0x02b9,191 +0x02ba,11 +0x02bb,8 +0x02bc,6 + +//Add new packets here +//packet_ver: 23 diff --git a/src/char/char.c b/src/char/char.c index 19b13e5a8..ab4572af4 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -97,6 +97,7 @@ int char_name_option = 0; // Option to know which letters/symbols are authorised //The following are characters that are trimmed regardless because they cause confusion and problems on the servers. [Skotlex] #define TRIM_CHARS "\032\t\x0A\x0D " char char_name_letters[1024] = ""; // list of letters/symbols authorised (or not) in a character name. by [Yor] +bool char_rename = true; int log_char = 1; // loggin char or not [devil] int log_inter = 1; // loggin inter or not [devil] @@ -1697,25 +1698,20 @@ int mmo_char_tobuf(uint8* buf, struct mmo_charstatus *p) WBUFW(buf,68) = p->head_mid; WBUFW(buf,70) = p->hair_color; WBUFW(buf,72) = p->clothes_color; - memcpy(WBUFP(buf,74), p->name, NAME_LENGTH); - WBUFB(buf,98) = min(p->str, UCHAR_MAX); WBUFB(buf,99) = min(p->agi, UCHAR_MAX); WBUFB(buf,100) = min(p->vit, UCHAR_MAX); WBUFB(buf,101) = min(p->int_, UCHAR_MAX); WBUFB(buf,102) = min(p->dex, UCHAR_MAX); WBUFB(buf,103) = min(p->luk, UCHAR_MAX); - //Updated packet structure with rename-button included. Credits to Sara-chan -#if PACKETVER > 7 WBUFW(buf,104) = p->char_num; - WBUFW(buf,106) = 1;// Rename bit (0=rename,1=no rename) - return 108; -#else - WBUFB(buf,104) = p->char_num; - return 106; -#endif - + if (char_rename) { + WBUFW(buf,106) = 1;// Rename bit (0=rename,1=no rename) + return 108; + } else { + return 106; + } } //---------------------------------------- @@ -1738,18 +1734,14 @@ int mmo_char_send006b(int fd, struct char_session_data *sd) for(i = found_num; i < MAX_CHARS; i++) sd->found_char[i] = -1; - j = 24;// offset - { - WFIFOHEAD(fd,j + found_num*108); - WFIFOW(fd,0) = 0x6b; - memset(WFIFOP(fd,4), 0, 20);// unknown bytes - - for(i = 0; i < found_num; i++) - j += mmo_char_tobuf(WFIFOP(fd,j), &char_dat[sd->found_char[i]].status); - WFIFOW(fd,2) = j;// packet len - WFIFOSET(fd,j); - } + WFIFOHEAD(fd,j + found_num*108); // or 106(!) + WFIFOW(fd,0) = 0x6b; + memset(WFIFOP(fd,4), 0, 20);// unknown bytes + for(i = 0; i < found_num; i++) + j += mmo_char_tobuf(WFIFOP(fd,j), &char_dat[sd->found_char[i]].status); + WFIFOW(fd,2) = j;// packet len + WFIFOSET(fd,j); return 0; } @@ -3390,7 +3382,7 @@ int parse_char(int fd) for(i = 0; i < AUTH_FIFO_SIZE && !( auth_fifo[i].account_id == sd->account_id && auth_fifo[i].login_id1 == sd->login_id1 && - auth_fifo[i].login_id2 == sd->login_id2 && // relate to the versions higher than 18 + auth_fifo[i].login_id2 == sd->login_id2 && auth_fifo[i].ip == session[fd]->client_addr && auth_fifo[i].delflag == 2) ; i++); @@ -3404,7 +3396,7 @@ int parse_char(int fd) WFIFOW(login_fd,0) = 0x2712; // ask login-server to authentify an account WFIFOL(login_fd,2) = sd->account_id; WFIFOL(login_fd,6) = sd->login_id1; - WFIFOL(login_fd,10) = sd->login_id2; // relate to the versions higher than 18 + WFIFOL(login_fd,10) = sd->login_id2; WFIFOB(login_fd,14) = sd->sex; WFIFOL(login_fd,15) = htonl(session[fd]->client_addr); WFIFOSET(login_fd,19); @@ -4158,6 +4150,8 @@ int char_config_read(const char *cfgName) char_name_option = atoi(w2); } else if (strcmpi(w1, "char_name_letters") == 0) { strcpy(char_name_letters, w2); + } else if (strcmpi(w1, "char_rename") == 0) { + char_rename = config_switch(w2); // online files options } else if (strcmpi(w1, "online_txt_filename") == 0) { strcpy(online_txt_filename, w2); diff --git a/src/char_sql/char.c b/src/char_sql/char.c index b9abe1038..34883ca83 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -103,6 +103,7 @@ char unknown_char_name[NAME_LENGTH] = "Unknown"; // Name to use when the request char char_name_letters[1024] = ""; // list of letters/symbols used to authorise or not a name of a character. by [Yor] //The following are characters that are trimmed regardless because they cause confusion and problems on the servers. [Skotlex] #define TRIM_CHARS "\032\t\x0A\x0D " +bool char_rename = true; int char_per_account = 0; //Maximum charas per account (default unlimited) [Sirius] int char_del_level = 0; //From which level u can delete character [Lupus] @@ -1605,15 +1606,13 @@ int mmo_char_tobuf(uint8* buf, struct mmo_charstatus* p) WBUFB(buf,101) = min(p->int_, UCHAR_MAX); WBUFB(buf,102) = min(p->dex, UCHAR_MAX); WBUFB(buf,103) = min(p->luk, UCHAR_MAX); - //Updated packet structure with rename-button included. Credits to Sara-chan -#if PACKETVER > 7 WBUFW(buf,104) = p->char_num; - WBUFW(buf,106) = 1;// Rename bit (0=rename,1=no rename) - return 108; -#else - WBUFB(buf,104) = p->char_num; - return 106; -#endif + if (char_rename) { + WBUFW(buf,106) = 1;// Rename bit (0=rename,1=no rename) + return 108; + } else { + return 106; + } } int mmo_char_send006b(int fd, struct char_session_data* sd) @@ -3083,7 +3082,7 @@ int parse_char(int fd) for(i = 0; i < AUTH_FIFO_SIZE && !( auth_fifo[i].account_id == sd->account_id && auth_fifo[i].login_id1 == sd->login_id1 && - auth_fifo[i].login_id2 == sd->login_id2 && // relate to the versions higher than 18 + auth_fifo[i].login_id2 == sd->login_id2 && auth_fifo[i].ip == session[fd]->client_addr && auth_fifo[i].delflag == 2) ; i++); @@ -3908,6 +3907,8 @@ int char_config_read(const char* cfgName) char_name_option = atoi(w2); } else if (strcmpi(w1, "char_name_letters") == 0) { strcpy(char_name_letters, w2); + } else if (strcmpi(w1, "char_rename") == 0) { + char_rename = config_switch(w2); } else if (strcmpi(w1, "chars_per_account") == 0) { //maxchars per account [Sirius] char_per_account = atoi(w2); } else if (strcmpi(w1, "char_del_level") == 0) { //disable/enable char deletion by its level condition [Lupus] diff --git a/src/common/mmo.h b/src/common/mmo.h index 6012ebbcb..2a42c017c 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -8,11 +8,6 @@ #include "cbasetypes.h" #include "utils.h" // _WIN32 -// server protocol version -#ifndef PACKETVER - #define PACKETVER 8 -#endif - #define FIFOSIZE_SERVERLINK 256*1024 //Remove/Comment this line to disable sc_data saving. [Skotlex] diff --git a/src/login/login.c b/src/login/login.c index 435ca9073..5940571b9 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -1418,7 +1418,7 @@ int parse_fromchar(int fd) { if (auth_fifo[i].account_id == RFIFOL(fd,2) && auth_fifo[i].login_id1 == RFIFOL(fd,6) && - auth_fifo[i].login_id2 == RFIFOL(fd,10) && // relate to the versions higher than 18 + auth_fifo[i].login_id2 == RFIFOL(fd,10) && auth_fifo[i].sex == RFIFOB(fd,14) && auth_fifo[i].ip == ntohl(RFIFOL(fd,15)) && !auth_fifo[i].delflag) diff --git a/src/login_sql/login.c b/src/login_sql/login.c index d593ce6ca..c8c9496ec 100644 --- a/src/login_sql/login.c +++ b/src/login_sql/login.c @@ -782,7 +782,7 @@ int parse_fromchar(int fd) for(i = 0; i < AUTH_FIFO_SIZE; i++) { if( auth_fifo[i].account_id == account_id && auth_fifo[i].login_id1 == RFIFOL(fd,6) && - auth_fifo[i].login_id2 == RFIFOL(fd,10) && // relate to the versions higher than 18 + auth_fifo[i].login_id2 == RFIFOL(fd,10) && auth_fifo[i].sex == RFIFOB(fd,14) && auth_fifo[i].ip == ntohl(RFIFOL(fd,15)) && !auth_fifo[i].delflag) diff --git a/src/map/clif.c b/src/map/clif.c index f9fc08a56..72295dc4c 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -776,7 +776,7 @@ static int clif_set0078(struct block_list* bl, unsigned char* buf) struct map_session_data* sd; BL_CAST(BL_PC, bl, sd); -#if PACKETVER > 6 +#if PACKETVER >= 7 memset(buf,0,packet_len(0x22a)); WBUFW(buf,0)=0x22a; @@ -943,7 +943,7 @@ static int clif_set007b(struct block_list *bl, struct view_data *vd, struct unit struct map_session_data* sd; BL_CAST(BL_PC, bl, sd); -#if PACKETVER > 6 +#if PACKETVER >= 7 memset(buf,0,packet_len(0x22c)); WBUFW(buf,0)=0x22c; @@ -1054,7 +1054,7 @@ static int clif_set007b(struct block_list *bl, struct view_data *vd, struct unit #endif } //Non-player sprites only require a few fields. -#if PACKETVER > 6 +#if PACKETVER >= 7 memset(buf,0,packet_len(0x22c)); WBUFW(buf,0)=0x22c; @@ -1132,7 +1132,7 @@ static void clif_setdisguise(struct map_session_data *sd, unsigned char *buf,int { if (flag) { WBUFL(buf,2)=sd->bl.id; -#if PACKETVER > 6 +#if PACKETVER >= 7 switch (WBUFW(buf,0)) { case 0x22c: case 0x22b: @@ -1144,7 +1144,7 @@ static void clif_setdisguise(struct map_session_data *sd, unsigned char *buf,int #endif WBUFW(buf,12)=OPTION_INVISIBLE; WBUFW(buf,14)=sd->status.class_; -#if PACKETVER > 6 +#if PACKETVER >= 7 break; } #endif @@ -1301,7 +1301,7 @@ int clif_spawn(struct block_list *bl) clif_setdisguise((TBL_PC*)bl, buf, packet_len(0x1d9), 0); break; #endif -#if PACKETVER > 6 +#if PACKETVER >= 7 case 0x22a: //Convert to 0x22b WBUFW(buf, 0) = 0x22b; WBUFW(buf,55) = WBUFW(buf,56); //Lv is placed on offset 56 @@ -3071,7 +3071,7 @@ int clif_changeoption(struct block_list* bl) sc = status_get_sc(bl); if (!sc) return 0; //How can an option change if there's no sc? -#if PACKETVER > 6 +#if PACKETVER >= 7 WBUFW(buf,0) = 0x229; WBUFL(buf,2) = bl->id; WBUFW(buf,6) = sc->opt1; @@ -3709,7 +3709,7 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl) ud = unit_bl2ud(bl); if (ud && ud->walktimer != -1) { -#if PACKETVER > 6 +#if PACKETVER >= 7 WFIFOHEAD(fd, packet_len(0x22c)); #elif PACKETVER > 3 WFIFOHEAD(fd, packet_len(0x1da)); @@ -3719,7 +3719,7 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl) len = clif_set007b(bl,vd,ud,WFIFOP(fd,0)); WFIFOSET(fd,len); } else { -#if PACKETVER > 6 +#if PACKETVER >= 7 WFIFOHEAD(fd,packet_len(0x22a)); #elif PACKETVER > 3 WFIFOHEAD(fd,packet_len(0x1d8)); diff --git a/src/map/clif.h b/src/map/clif.h index b91b8d9a7..159c1546a 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -6,9 +6,15 @@ #include "map.h" +// server->client protocol version +// v7 - 2005-04-11aSakexe+ - 0x229, 0x22a, 0x22b, 0x22c +#ifndef PACKETVER + #define PACKETVER 7 +#endif + // packet DB #define MAX_PACKET_DB 0x300 -#define MAX_PACKET_VER 21 +#define MAX_PACKET_VER 22 struct packet_db_t { short len; |