-Follow up r17361
-- update client.conf, (description for version and flag). bugreport:7731 -- add packet_ver_flag2 battle_conf to expand version restriction. -Upd charserv to allow multiple clientversion at once. (2012 and 2013 PACKETVER was creating conflict of info sent ver30 shouldn't have 0x82 for exemple) --NB: clientvers rely on clientinfo version, paid attention you have set the good one for your client. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17363 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
e19b56aa39
commit
e197f8a551
@ -12,25 +12,43 @@
|
||||
// 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
|
||||
// 0x00001: Clients older than 2004-09-06aSakray (packet versions 5-9)
|
||||
// 0x00002: 2004-09-06aSakexe (version 10)
|
||||
// 0x00004: 2004-09-20aSakexe (version 11)
|
||||
// 0x00008: 2004-10-05aSakexe (version 12)
|
||||
// 0x00010: 2004-10-25aSakexe (version 13)
|
||||
// 0x00020: 2004-11-29aSakexe (version 14)
|
||||
// 0x00040: 2005-01-10bSakexe (version 15)
|
||||
// 0x00080: 2005-05-09aSakexe (version 16)
|
||||
// 0x00100: 2005-06-28aSakexe (version 17)
|
||||
// 0x00200: 2005-07-18aSakexe (version 18)
|
||||
// 0x00400: 2005-07-19bSakexe (version 19)
|
||||
// 0x00800: 2006-03-27aSakexe (version 20)
|
||||
// 0x01000: 2007-01-08aSakexe (version 21)
|
||||
// 0x02000: 2007-02-12aSakexe (version 22)
|
||||
// 0x04000: 2008-09-10aSakexe (version 23)
|
||||
// 0x08000: 2008-08-27aRagexeRE (version 24)
|
||||
// 0x10000: 2008-09-10aRagexeRE (version 25)
|
||||
// default value: 0xFFFFFFF (all clients)
|
||||
packet_ver_flag: 0xFFFFFFF
|
||||
// 0x00000001: Clients older than 2004-09-06aSakray (packet versions 5-9)
|
||||
// 0x00000002: 2004-09-06 aSakexe (version 10)
|
||||
// 0x00000004: 2004-09-20 aSakexe (version 11)
|
||||
// 0x00000008: 2004-10-05 aSakexe (version 12)
|
||||
// 0x00000010: 2004-10-25 aSakexe (version 13)
|
||||
// 0x00000020: 2004-11-29 aSakexe (version 14)
|
||||
// 0x00000040: 2005-01-10 bSakexe (version 15)
|
||||
// 0x00000080: 2005-05-09 aSakexe (version 16)
|
||||
// 0x00000100: 2005-06-28 aSakexe (version 17)
|
||||
// 0x00000200: 2005-07-18 aSakexe (version 18)
|
||||
// 0x00000400: 2005-07-19 bSakexe (version 19)
|
||||
// 0x00000800: 2006-03-27 aSakexe (version 20)
|
||||
// 0x00001000: 2007-01-08 aSakexe (version 21)
|
||||
// 0x00002000: 2007-02-12 aSakexe (version 22)
|
||||
// 0x00004000: 2008-09-10 aSakexe (version 23)
|
||||
// 0x00008000: 2008-08-27 aRagexeRE (version 24)
|
||||
// 0x00010000: 2008-09-10 aRagexeRE (version 25)
|
||||
// 0x00020000: 2010-11-24 aRagexeRE (version 26)
|
||||
// 0x00040000: 2011-10-05 aRagexeRE (version 27)
|
||||
// 0x00080000: 2011-11-02 aRagexe (version 28)
|
||||
// 0x00100000: 2012-03-07 fRagexeRE (version 29)
|
||||
// 0x00200000: 2012-04-10 aRagexeRE (version 30)
|
||||
// 0x00400000: 2012-04-18 aRagexeRE (version 31)
|
||||
// 0x00800000: 2012-06-18 unknow (version 32)
|
||||
// 0x01000000: 2012-07-02 aRagexeRE (version 33)
|
||||
// 0x02000000: 2013-03-20 Ragexe (version 34)
|
||||
// 0x04000000: 2013-05-15 aRagexe (version 35)
|
||||
// 0x08000000: 2013-05-22 Ragexe (version 36)
|
||||
// 0x10000000: 2013-05-29 Ragexe (version 37)
|
||||
// 0x20000000: 2013-06-05 Ragexe (version 38)
|
||||
// 0x40000000: 2013-06-12 Ragexe (version 39)
|
||||
// default value: 0x7FFFFFFF (all clients/versions [5;40])
|
||||
packet_ver_flag: 0x7FFFFFFF
|
||||
|
||||
// 0x00000001: 2013-06-19 Ragexe (version 40)
|
||||
// default value: 0x7FFFFFFF (all clients/versions [41;72])
|
||||
packet_ver_flag2: 0x7FFFFFFF
|
||||
|
||||
// Minimum delay between whisper/global/party/guild messages (in ms)
|
||||
// Messages that break this threshold are silently omitted.
|
||||
|
@ -1784,7 +1784,7 @@ packet_ver:31
|
||||
//2012-06-18
|
||||
packet_ver: 32
|
||||
0x0983,29
|
||||
0x0861,18,bookingregreq,2:4:6 //actually 05-03
|
||||
0x0861,18,bookingregreq,2:4:6 //actually 12-05-03
|
||||
|
||||
//2012-07-02aRagexeRE (unstable)
|
||||
packet_ver: 33
|
||||
|
@ -1960,20 +1960,19 @@ void char_parse_req_charlist(int fd, struct char_session_data* sd){
|
||||
//----------------------------------------
|
||||
int mmo_char_send006b(int fd, struct char_session_data* sd){
|
||||
int j, offset = 0;
|
||||
#if PACKETVER >= 20100413
|
||||
offset += 3;
|
||||
#endif
|
||||
if(sd->version > 25) //20100413
|
||||
offset += 3;
|
||||
if (save_log)
|
||||
ShowInfo("Loading Char Data ("CL_BOLD"%d"CL_RESET")\n",sd->account_id);
|
||||
|
||||
j = 24 + offset; // offset
|
||||
WFIFOHEAD(fd,j + MAX_CHARS*MAX_CHAR_BUF);
|
||||
WFIFOW(fd,0) = 0x6b;
|
||||
#if PACKETVER >= 20100413
|
||||
WFIFOB(fd,4) = MAX_CHARS; // Max slots.
|
||||
WFIFOB(fd,5) = sd->char_slots; // Available slots. (PremiumStartSlot)
|
||||
WFIFOB(fd,6) = MAX_CHARS; // Premium slots. (Any existent chars past sd->char_slots but within MAX_CHARS will show a 'Premium Service' in red)
|
||||
#endif
|
||||
if(sd->version > 25){ //20100413
|
||||
WFIFOB(fd,4) = MAX_CHARS; // Max slots.
|
||||
WFIFOB(fd,5) = sd->char_slots; // Available slots. (PremiumStartSlot)
|
||||
WFIFOB(fd,6) = MAX_CHARS; // Premium slots. (Any existent chars past sd->char_slots but within MAX_CHARS will show a 'Premium Service' in red)
|
||||
}
|
||||
memset(WFIFOP(fd,4 + offset), 0, 20); // unknown bytes
|
||||
j+=mmo_chars_fromsql(sd, WFIFOP(fd,j));
|
||||
WFIFOW(fd,2) = j; // packet len
|
||||
@ -2001,14 +2000,14 @@ void mmo_char_send082d(int fd, struct char_session_data* sd) {
|
||||
}
|
||||
|
||||
void mmo_char_send(int fd, struct char_session_data* sd){
|
||||
#if PACKETVER >= 20130000
|
||||
mmo_char_send082d(fd,sd);
|
||||
char_charlist_notify(fd,sd);
|
||||
char_block_character(fd,sd);
|
||||
#endif
|
||||
ShowInfo("sd->version = %d\n",sd->version);
|
||||
if(sd->version >= 34){ //20130000
|
||||
mmo_char_send082d(fd,sd);
|
||||
char_charlist_notify(fd,sd);
|
||||
char_block_character(fd,sd);
|
||||
}
|
||||
//@FIXME dump from kro doesn't show 6b transmission
|
||||
mmo_char_send006b(fd,sd);
|
||||
//#endif
|
||||
}
|
||||
|
||||
int char_married(int pl1, int pl2)
|
||||
|
@ -1486,7 +1486,7 @@ int parse_login(int fd)
|
||||
safestrncpy(sd->userid, username, NAME_LENGTH);
|
||||
if( israwpass )
|
||||
{
|
||||
ShowStatus("Request for connection of %s (ip: %s).\n", sd->userid, ip);
|
||||
ShowStatus("Request for connection of %s (ip: %s) version=%d\n", sd->userid, ip,sd->version);
|
||||
safestrncpy(sd->passwd, password, NAME_LENGTH);
|
||||
if( login_config.use_md5_passwds )
|
||||
MD5_String(sd->passwd, sd->passwd);
|
||||
@ -1494,7 +1494,7 @@ int parse_login(int fd)
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowStatus("Request for connection (passwdenc mode) of %s (ip: %s).\n", sd->userid, ip);
|
||||
ShowStatus("Request for connection (passwdenc mode) of %s (ip: %s) version=%d\n", sd->userid, ip,sd->version);
|
||||
bin2hex(sd->passwd, passhash, 16); // raw binary data here!
|
||||
sd->passwdenc = PASSWORDENC;
|
||||
}
|
||||
|
@ -5812,7 +5812,8 @@ static const struct _battle_data {
|
||||
{ "night_at_start", &battle_config.night_at_start, 0, 0, 1, },
|
||||
{ "show_mob_info", &battle_config.show_mob_info, 0, 0, 1|2|4, },
|
||||
{ "ban_hack_trade", &battle_config.ban_hack_trade, 0, 0, INT_MAX, },
|
||||
{ "packet_ver_flag", &battle_config.packet_ver_flag, 0xFFFFFF,0x0000,INT_MAX, },
|
||||
{ "packet_ver_flag", &battle_config.packet_ver_flag, 0x7FFFFFFF,0, INT_MAX, },
|
||||
{ "packet_ver_flag2", &battle_config.packet_ver_flag2, 0x7FFFFFFF,0, INT_MAX, },
|
||||
{ "min_hair_style", &battle_config.min_hair_style, 0, 0, INT_MAX, },
|
||||
{ "max_hair_style", &battle_config.max_hair_style, 23, 0, INT_MAX, },
|
||||
{ "min_hair_color", &battle_config.min_hair_color, 0, 0, INT_MAX, },
|
||||
|
@ -337,6 +337,7 @@ extern struct Battle_Config
|
||||
int night_duration; // added by [Yor]
|
||||
int ban_hack_trade; // added by [Yor]
|
||||
int packet_ver_flag; // added by [Yor]
|
||||
int packet_ver_flag2; // expend of packet_ver_flag
|
||||
|
||||
int min_hair_style; // added by [MouseJstr]
|
||||
int max_hair_style; // added by [MouseJstr]
|
||||
|
@ -721,7 +721,7 @@ void clif_charselectok(int id, uint8 ok)
|
||||
|
||||
/// Makes an item appear on the ground.
|
||||
/// 009e <id>.L <name id>.W <identified>.B <x>.W <y>.W <subX>.B <subY>.B <amount>.W (ZC_ITEM_FALL_ENTRY)
|
||||
/// 084b(2013) <id>.L <name id>.W <type>.W <identified>.B <x>.W <y>.W <subX>.B <subY>.B <amount>.W (ZC_ITEM_FALL_ENTRY4)
|
||||
/// 084b <id>.L <name id>.W <type>.W <identified>.B <x>.W <y>.W <subX>.B <subY>.B <amount>.W (ZC_ITEM_FALL_ENTRY4)
|
||||
void clif_dropflooritem(struct flooritem_data* fitem)
|
||||
{
|
||||
#if PACKETVER >= 20130000
|
||||
@ -3211,7 +3211,9 @@ void clif_arrowequip(struct map_session_data *sd,int val)
|
||||
nullpo_retv(sd);
|
||||
|
||||
pc_stop_attack(sd); // [Valaris]
|
||||
|
||||
#if PACKETVER >= 20121128
|
||||
clif_status_change(&sd->bl, SI_CLIENT_ONLY_EQUIP_ARROW, 1, INVALID_TIMER, 0, 0, 0);
|
||||
#endif
|
||||
fd=sd->fd;
|
||||
WFIFOHEAD(fd, packet_len(0x013c));
|
||||
WFIFOW(fd,0)=0x013c;
|
||||
@ -9061,8 +9063,9 @@ void clif_parse_WantToConnection(int fd, struct map_session_data* sd)
|
||||
sex = RFIFOB(fd, packet_db[packet_ver][cmd].pos[4]);
|
||||
|
||||
if( packet_ver < 5 || // reject really old client versions
|
||||
(packet_ver <= 9 && (battle_config.packet_ver_flag & 1) == 0) || // older than 6sept04
|
||||
(packet_ver > 9 && (battle_config.packet_ver_flag & 1<<(packet_ver-9)) == 0)) // version not allowed
|
||||
(packet_ver <= 9 && (battle_config.packet_ver_flag & 1) == 0) || // older than 6sept04
|
||||
(packet_ver > 9 && packet_ver <40 && (battle_config.packet_ver_flag & 1<<(packet_ver-9)) == 0) || // version not allowed
|
||||
(packet_ver >= 40 && packet_ver <=72 && (battle_config.packet_ver_flag2 & 1<<(packet_ver-40)) == 0) )
|
||||
{// packet version rejected
|
||||
ShowInfo("Rejected connection attempt, forbidden packet version (AID/CID: '"CL_WHITE"%d/%d"CL_RESET"', Packet Ver: '"CL_WHITE"%d"CL_RESET"', IP: '"CL_WHITE"%s"CL_RESET"').\n", account_id, char_id, packet_ver, ip2str(session[fd]->client_addr, NULL));
|
||||
WFIFOHEAD(fd,packet_len(0x6a));
|
||||
|
Loading…
x
Reference in New Issue
Block a user