Overhauled and dropped packet db (#2263)
Adds support for a lot of missing clients and features almost all clients from 2016 and 2017 clientinfo.xml's version value will be ignored from now on By setting PACKETVER the server will configure everything else on it's own from now on Dropped is_clientver script command And a lot more
This commit is contained in:
parent
0d103bf6a7
commit
f0ab8d2a52
@ -34,7 +34,6 @@ script:
|
||||
- ./configure $CONFIGURE_FLAGS
|
||||
- make clean
|
||||
- make server
|
||||
- 'echo packet_db_ver: $PACKETDBVER >> db/import/packet_db.txt'
|
||||
- ./map-server --run-once
|
||||
|
||||
env:
|
||||
@ -44,7 +43,6 @@ env:
|
||||
- DB_NAME="ragnarok"
|
||||
- DB_USER="ragnarok"
|
||||
- DB_PASS="ragnarok"
|
||||
- PACKETDBVER=45
|
||||
matrix:
|
||||
- CONFIGURE_FLAGS="--enable-prere=no --enable-vip=no --enable-buildbot=yes"
|
||||
- CONFIGURE_FLAGS="--enable-prere=yes --enable-vip=no --enable-buildbot=yes"
|
||||
|
@ -9,58 +9,6 @@
|
||||
// assume unit types (1: Pc, 2: Mob, 4: Pet, 8: Homun, 16: Mercenary)
|
||||
//--------------------------------------------------------------
|
||||
|
||||
// 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
|
||||
// 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;39])
|
||||
packet_ver_flag: 0x7FFFFFFF
|
||||
|
||||
// 0x00000001: 2013-06-18 Ragexe (version 40)
|
||||
// 0x00000002: 2013-06-26 Ragexe (version 41)
|
||||
// 0x00000004: 2013-07-03 Ragexe (version 42)
|
||||
// 0x00000008: 2013-07-10 Ragexe (version 43)
|
||||
// 0x00000010: 2013-07-17 Ragexe (version 44)
|
||||
// 0x00000020: 2013-08-07 Ragexe (version 45)
|
||||
// 0x00000040: 2013-12-23 Ragexe (version 46)
|
||||
// 0x00000080: ????
|
||||
// 0x00000100: ????
|
||||
// 0x00000200: ????
|
||||
// 0x00000400: 2014-10-16 Ragexe (version 50)
|
||||
// 0x00000800: 2014-10-22 Ragexe (version 51)
|
||||
// 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.
|
||||
min_chat_delay: 0
|
||||
|
@ -310,7 +310,6 @@ reloaditemdb: "Reload item database."
|
||||
reloadmobdb: "Reload monster database."
|
||||
reloadmotd: "Reload Message of the Day."
|
||||
reloadmsgconf: "Reload message configuration."
|
||||
reloadpacketdb: "Reload packet database."
|
||||
reloadpcdb: "Reload player settings."
|
||||
reloadquestdb: "Reload quest database."
|
||||
reloadscript: "Reload all scripts."
|
||||
|
@ -106,12 +106,6 @@ vip_char_increase: -1
|
||||
// 0 or more: new accounts automatically expire after the given value, in seconds
|
||||
start_limited_time: -1
|
||||
|
||||
// Check the clientversion field set in clientinfo.xml?
|
||||
check_client_version: no
|
||||
|
||||
// What version is allowed to connect? (if the option above is enabled)
|
||||
client_version_to_connect: 20
|
||||
|
||||
// Store passwords as MD5 hashes instead of plain text?
|
||||
// NOTE: Will not work with clients that use <passwordencrypt>
|
||||
use_MD5_passwords: no
|
||||
|
@ -1615,8 +1615,7 @@
|
||||
1475: ---- My Channels ----
|
||||
1476: You have not joined any channels.
|
||||
|
||||
// @reloadpacketdb
|
||||
1477: Packet database has been reloaded.
|
||||
//1477 free
|
||||
|
||||
// @partysharelvl
|
||||
1478: Party share level range has been changed successfully.
|
||||
|
@ -1469,8 +1469,7 @@
|
||||
1475: ---- 我的頻道 ----
|
||||
1476: 你沒有加入任何的頻道
|
||||
|
||||
// @reloadpacketdb
|
||||
1477: 完成重載封包數據庫.
|
||||
//1477 free
|
||||
|
||||
// @partysharelvl
|
||||
1478: 隊伍經驗均分的等級間距已成功變更。
|
||||
|
@ -1480,8 +1480,7 @@
|
||||
1475: ---- Canaux rejoins ----
|
||||
1476: Vous n'avez rejoins aucun canal.
|
||||
|
||||
// @reloadpacketdb
|
||||
1477: Base de donnée des 'Packets' rechargée.
|
||||
//1477 free
|
||||
|
||||
// @partysharelvl
|
||||
1478: Différence de niveau pour le partage en équipe changé.
|
||||
|
@ -1571,8 +1571,7 @@
|
||||
1475: ---- Channel yang diikuti ----
|
||||
1476: Kamu tidak bergabung ke channel manapun saat ini.
|
||||
|
||||
// @reloadpacketdb
|
||||
1477: Database paket telah dimuat ulang.
|
||||
//1477 free
|
||||
|
||||
// @partysharelvl
|
||||
1478: Jarak level dalam party share telah diubah dengan sukses.
|
||||
|
@ -1480,8 +1480,7 @@
|
||||
1475: ---- Мои каналы ----
|
||||
1476: Вы не присоединились ни к одному каналу.
|
||||
|
||||
// @reloadpacketdb
|
||||
1477: <20>אחא האםם<D79D>ץ ןאךועמג ב<>כא ןונוחאדנףזוםא.
|
||||
//1477 free
|
||||
|
||||
// @partysharelvl
|
||||
1478: Диапазон уровней разделения опыта между участниками группы успешно изменен.
|
||||
|
@ -1473,8 +1473,7 @@
|
||||
1475: ---- Channels ·<>ט©<D798>¹<EFBFBD><C2B9><EFBFBD>ט ----
|
||||
1476: ¤<>³ה<C2B3>טה´י<C2B4><D799><EFBFBD>טד¹ channels ד´א<C2B4><D790>.
|
||||
|
||||
// @reloadpacketdb
|
||||
1477: °Ò¹¢éÍÁÙÅ Packet ä´é¶Ù¡âËÅ´ãËÁèàÃÕºÃéÍÂ.
|
||||
//1477 free
|
||||
|
||||
// @partysharelvl
|
||||
1478: <20><>´<EFBFBD>÷ Level <20><><EFBFBD><EFBFBD><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>ב×<D791>ל ה´י¶<D799><C2B6>»<EFBFBD><C2BB>÷א»<D790><C2BB>ט<EFBFBD>¹א<C2B9><D790><EFBFBD>÷<EFBFBD>י<EFBFBD><D799>ב<EFBFBD>י<EFBFBD>.
|
||||
|
@ -1,35 +0,0 @@
|
||||
// Client<->Map Packet Database
|
||||
//
|
||||
// Structure of Database:
|
||||
// PacketType,PacketLength[,Name,FieldIndex1:FieldIndex2:FieldIndex3:...]
|
||||
//
|
||||
// 01. PacketType ID of the packet.
|
||||
// 02. PacketLength Length of the packet. If 0, packet is disabled in current packet version. If -1, packet has variable size.
|
||||
// 03. Name Name of the packet parser function (optional, for incoming packets only).
|
||||
// 04. FieldIndex Specifies the offset of a packet field in bytes from the begin of the packet (only specified when Name is given).
|
||||
// Can be 0, when the layout is not known.
|
||||
// ...
|
||||
//
|
||||
// NOTE: Up to MAX_PACKET_POS (typically 20) field indexes may be used.
|
||||
//
|
||||
// The packet database allows you to add support for new clients,
|
||||
// because packets change every release.
|
||||
//
|
||||
// Note: Every packet version needs a wanttoconnection specification, since
|
||||
// that is the packet used to identify a client's version.
|
||||
// If multiple versions have the same connection packet, the higher version
|
||||
// will be used (unless the lower one is specified as the default)
|
||||
//
|
||||
// Incoming packets have their parser function and layout specified, which enables
|
||||
// them for the current and all higher versions, unless explicitely disabled.
|
||||
//
|
||||
// Outgoing packets must be specified in order to enable them for the current
|
||||
// and all higher versions, unless explicitely disabled. Packets that are not
|
||||
// enabled for a packet version are silently discarded when sent as multicast.
|
||||
//
|
||||
// Every packet version inherits packet definitions from the previous (lower)
|
||||
// packet version.
|
||||
//
|
||||
// Main packet version of the DB to use (default = max available version)
|
||||
// Client detection is faster when all clients use this version.
|
||||
// Version 23 is the latest Sakexe (above versions are for Renewal clients)
|
2675
db/packet_db.txt
2675
db/packet_db.txt
File diff suppressed because it is too large
Load Diff
@ -1320,7 +1320,6 @@ This will also send a packet to clients causing them to close.
|
||||
@reloadmobdb
|
||||
@reloadmotd
|
||||
@reloadmsgconf
|
||||
@reloadpacketdb
|
||||
@reloadpcdb
|
||||
@reloadquestdb
|
||||
@reloadscript
|
||||
@ -1333,7 +1332,6 @@ Databases:
|
||||
-- instancedb: Instance Database
|
||||
-- itemdb: Item Database
|
||||
-- mobdb: Monster Database
|
||||
-- packetdb: Packet Database
|
||||
-- questdb: Quest Database
|
||||
-- script: NPC Scripts
|
||||
-- skilldb: Skill Database
|
||||
@ -1354,7 +1352,6 @@ Affected files:
|
||||
-- mobdb: mob_db.txt, mob_item_ratio.txt, mob_chat_db.txt, mob_avail.txt, mob_race2_db.txt, mob_branch.txt, mob_poring.txt, mob_boss.txt, mob_pouch.txt, mob_classchange.txt, pet_db.txt, homunculus_db.txt, homun_skill_tree.txt, exp_homun.txt, mercenary_db.txt, mercenary_skill_db.txt, elemental_db.txt, elemental_skill_db.txt
|
||||
-- motd: motd.txt
|
||||
-- msgconf: atcommand_athena.conf
|
||||
-- packetdb: packet_db.txt
|
||||
-- pcdb: statpoint.txt, job_exp.txt, skill_tree.txt, attr_fix.txt, job_db1.txt, job_db2.txt, job_basehpsp_db.txt, job_maxhpsp_db.txt, job_param_db.txt, level_penalty.txt
|
||||
-- questdb: quest_db.txt
|
||||
-- script: /npc/*.txt, /npc/*.conf
|
||||
|
@ -47,9 +47,9 @@ Currently the max packet size is 0xFFFF (see 'WFIFOSET()' in 'src/common/socket.
|
||||
|
||||
0x2713:
|
||||
Type: AH
|
||||
Structure: <cmd>.W <aid>.L <login_id1>.L <login_id2>.L <sex>.B <auth>.B <request_id>.L <version>.L <clienttype>.B
|
||||
index: 0,2,6,10,14,15,16,20,24
|
||||
len: 25
|
||||
Structure: <cmd>.W <aid>.L <login_id1>.L <login_id2>.L <sex>.B <auth>.B <request_id>.L <clienttype>.B
|
||||
index: 0,2,6,10,14,15,16,20
|
||||
len: 21
|
||||
parameter:
|
||||
- cmd : packet identification (0x2713)
|
||||
- aid : account identification
|
||||
@ -58,7 +58,6 @@ Currently the max packet size is 0xFFFF (see 'WFIFOSET()' in 'src/common/socket.
|
||||
- sex: the sex of the account
|
||||
- ok : 1=auth failed, 1=ok
|
||||
- request_id: unknown @FIXME
|
||||
- version: client version, (clientinfo version)
|
||||
- clienttype: unknown @FIXME
|
||||
desc:
|
||||
- Acknowledge the authentication request from char-serv
|
||||
@ -2769,16 +2768,15 @@ Currently the max packet size is 0xFFFF (see 'WFIFOSET()' in 'src/common/socket.
|
||||
|
||||
0x2b02
|
||||
Type: ZA
|
||||
Structure: <cmd>.W <id>.L <login_id1>.L <login_id2>.L <s_ip>.L <packet_ver>.B
|
||||
index: 0,2,6,10,14,18
|
||||
len: 19
|
||||
Structure: <cmd>.W <id>.L <login_id1>.L <login_id2>.L <s_ip>.L
|
||||
index: 0,2,6,10,14
|
||||
len: 18
|
||||
parameter:
|
||||
- cmd : packet identification (0x2b02)
|
||||
- id
|
||||
- login_id1
|
||||
- login_id2
|
||||
- s_ip
|
||||
- packet_ver
|
||||
desc:
|
||||
- chrif_charselectreq
|
||||
|
||||
|
@ -3723,18 +3723,6 @@ The renewal feature to check is determined by type.
|
||||
4 - RENEWAL_LVDMG (renewal level modifier on damage)
|
||||
5 - RENEWAL_ASPD (renewal ASPD)
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*is_clientver(<type>,<value>{,<char id>})
|
||||
|
||||
Checks a character's client version against a specified value. If no char id is
|
||||
given, the command will run for the invoking character. The function will return
|
||||
1 if the player's version is greater than or equal to the value, and 0 otherwise.
|
||||
|
||||
Available types are:
|
||||
0 - version number (packet_db_ver)
|
||||
1 - client date (YYYYMMDD)
|
||||
|
||||
---------------------------------------
|
||||
\\
|
||||
3,1.- Item-related commands
|
||||
|
@ -13,11 +13,12 @@
|
||||
//===== Additional Comments: =================================
|
||||
//= 1.0 First version.
|
||||
//= 1.1 Added 'is_clientver' command. [Euphy]
|
||||
//= 1.2 Dropped 'is_clientver' command. [Lemongrass]
|
||||
//============================================================
|
||||
|
||||
function script F_Navi {
|
||||
|
||||
if (!is_clientver(1,20111010))
|
||||
if ( PACKETVER < 20111010 )
|
||||
set .@disabled,1;
|
||||
|
||||
// This function takes 0 ~ 3 parameters.
|
||||
|
@ -21,6 +21,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Config", "Config", "{60D331
|
||||
src\config\const.h = src\config\const.h
|
||||
src\config\core.h = src\config\core.h
|
||||
src\config\classes\general.h = src\config\classes\general.h
|
||||
src\config\packets.h = src\config\packets.h
|
||||
src\config\renewal.h = src\config\renewal.h
|
||||
src\config\secure.h = src\config\secure.h
|
||||
EndProjectSection
|
||||
|
@ -222,7 +222,6 @@ struct char_session_data {
|
||||
uint8 char_slots; // total number of characters that can be created
|
||||
uint8 chars_vip;
|
||||
uint8 chars_billing;
|
||||
uint32 version;
|
||||
uint8 clienttype;
|
||||
char new_name[NAME_LENGTH];
|
||||
char birthdate[10+1]; // YYYY-MM-DD
|
||||
|
@ -303,8 +303,7 @@ int chclif_parse_pincode_setnew( int fd, struct char_session_data* sd ){
|
||||
//----------------------------------------
|
||||
void chclif_charlist_notify( int fd, struct char_session_data* sd ){
|
||||
// This is needed on RE clients from october 2015 onwards
|
||||
// If you want to use one replace false by true here
|
||||
#if false && PACKETVER >= 20151001
|
||||
#if defined(PACKETVER_RE) && PACKETVER >= 20151001
|
||||
WFIFOHEAD(fd, 10);
|
||||
WFIFOW(fd, 0) = 0x9a0;
|
||||
// pages to req / send them all in 1 until mmo_chars_fromsql can split them up
|
||||
@ -324,21 +323,25 @@ void chclif_charlist_notify( int fd, struct char_session_data* sd ){
|
||||
// Function to send characters to a player
|
||||
//----------------------------------------
|
||||
int chclif_mmo_send006b(int fd, struct char_session_data* sd){
|
||||
int j, offset = 0;
|
||||
bool newvers = (sd->version >= date2version(20100413) );
|
||||
if(newvers) //20100413
|
||||
offset += 3;
|
||||
int j, offset;
|
||||
|
||||
#if PACKETVER >= 20100413
|
||||
offset = 3;
|
||||
#else
|
||||
offset = 0;
|
||||
#endif
|
||||
|
||||
if (charserv_config.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(newvers){ //20100413
|
||||
#if PACKETVER >= 20100413
|
||||
WFIFOB(fd,4) = MAX_CHARS; // Max slots.
|
||||
WFIFOB(fd,5) = MIN_CHARS; // Available slots. (PremiumStartSlot)
|
||||
WFIFOB(fd,6) = MIN_CHARS+sd->chars_vip; // Premium slots. (Any existent chars past sd->char_slots but within MAX_CHARS will show a 'Premium Service' in red)
|
||||
}
|
||||
#endif
|
||||
memset(WFIFOP(fd,4 + offset), 0, 20); // unknown bytes
|
||||
j+=char_mmo_chars_fromsql(sd, WFIFOP(fd,j));
|
||||
WFIFOW(fd,2) = j; // packet len
|
||||
@ -377,16 +380,18 @@ void chclif_mmo_send099d(int fd, struct char_session_data *sd) {
|
||||
* Function to choose wich kind of charlist to send to client depending on his version
|
||||
*/
|
||||
void chclif_mmo_char_send(int fd, struct char_session_data* sd){
|
||||
ShowInfo("sd->version = %d\n",sd->version);
|
||||
if(sd->version >= date2version(20130000) ){
|
||||
chclif_mmo_send082d(fd,sd);
|
||||
chclif_mmo_send006b(fd,sd);
|
||||
chclif_charlist_notify(fd,sd);
|
||||
} else
|
||||
chclif_mmo_send006b(fd,sd);
|
||||
#if PACKETVER >= 20130000
|
||||
chclif_mmo_send082d(fd, sd);
|
||||
chclif_mmo_send006b(fd, sd);
|
||||
chclif_charlist_notify(fd, sd);
|
||||
#else
|
||||
chclif_mmo_send006b(fd,sd);
|
||||
//@FIXME dump from kro doesn't show 6b transmission
|
||||
if(sd->version >= date2version(20060819) )
|
||||
chclif_block_character(fd,sd);
|
||||
#endif
|
||||
|
||||
#if PACKETVER >= 20060819
|
||||
chclif_block_character(fd,sd);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@ -435,14 +440,11 @@ void chclif_char_delete2_ack(int fd, uint32 char_id, uint32 result, time_t delet
|
||||
/// Any (0x718): An unknown error has occurred.
|
||||
/// HC: <082a>.W <char id>.L <Msg:0-5>.L
|
||||
void chclif_char_delete2_accept_ack(int fd, uint32 char_id, uint32 result) {
|
||||
#if PACKETVER >= 20130000
|
||||
if(result == 1 ){
|
||||
struct char_session_data* sd;
|
||||
sd = (struct char_session_data*)session[fd]->session_data;
|
||||
|
||||
if( sd->version >= date2version(20130000) ){
|
||||
chclif_mmo_char_send(fd, sd);
|
||||
}
|
||||
chclif_mmo_char_send(fd, session[fd]->session_data);
|
||||
}
|
||||
#endif
|
||||
|
||||
WFIFOHEAD(fd,10);
|
||||
WFIFOW(fd,0) = 0x82a;
|
||||
@ -751,7 +753,6 @@ int chclif_parse_reqtoconnect(int fd, struct char_session_data* sd,uint32 ipl){
|
||||
node->login_id2 == login_id2 /*&&
|
||||
node->ip == ipl*/ )
|
||||
{// authentication found (coming from map server)
|
||||
sd->version = node->version;
|
||||
idb_remove(auth_db, account_id);
|
||||
char_auth_ok(fd, sd);
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ int chlogif_parse_ackconnect(int fd, struct char_session_data* sd){
|
||||
}
|
||||
|
||||
int chlogif_parse_ackaccreq(int fd, struct char_session_data* sd){
|
||||
if (RFIFOREST(fd) < 25)
|
||||
if (RFIFOREST(fd) < 21)
|
||||
return 0;
|
||||
{
|
||||
uint32 account_id = RFIFOL(fd,2);
|
||||
@ -304,19 +304,14 @@ int chlogif_parse_ackaccreq(int fd, struct char_session_data* sd){
|
||||
uint8 sex = RFIFOB(fd,14);
|
||||
uint8 result = RFIFOB(fd,15);
|
||||
int request_id = RFIFOL(fd,16);
|
||||
uint32 version = RFIFOL(fd,20);
|
||||
uint8 clienttype = RFIFOB(fd,24);
|
||||
RFIFOSKIP(fd,25);
|
||||
uint8 clienttype = RFIFOB(fd,20);
|
||||
RFIFOSKIP(fd,21);
|
||||
|
||||
if( session_isActive(request_id) && (sd=(struct char_session_data*)session[request_id]->session_data) &&
|
||||
!sd->auth && sd->account_id == account_id && sd->login_id1 == login_id1 && sd->login_id2 == login_id2 && sd->sex == sex )
|
||||
{
|
||||
int client_fd = request_id;
|
||||
sd->version = version;
|
||||
sd->clienttype = clienttype;
|
||||
if(sd->version != date2version(PACKETVER))
|
||||
ShowWarning("aid=%d has an incorect version=%d in clientinfo. Server compiled for %d\n",
|
||||
sd->account_id,sd->version,date2version(PACKETVER));
|
||||
|
||||
switch( result )
|
||||
{
|
||||
@ -372,8 +367,7 @@ int chlogif_parse_reqaccdata(int fd, struct char_session_data* sd){
|
||||
// send characters to player
|
||||
chclif_mmo_char_send(u_fd, sd);
|
||||
#if PACKETVER_SUPPORTS_PINCODE
|
||||
if(sd->version >= date2version(20110309))
|
||||
chlogif_pincode_start(u_fd,sd);
|
||||
chlogif_pincode_start(u_fd,sd);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -453,15 +453,14 @@ void chmapif_charselres(int fd, uint32 aid, uint8 res){
|
||||
* @return : 0 not enough data received, 1 success
|
||||
*/
|
||||
int chmapif_parse_authok(int fd){
|
||||
if( RFIFOREST(fd) < 19 )
|
||||
if( RFIFOREST(fd) < 18 )
|
||||
return 0;
|
||||
else{
|
||||
uint32 account_id = RFIFOL(fd,2);
|
||||
uint32 login_id1 = RFIFOL(fd,6);
|
||||
uint32 login_id2 = RFIFOL(fd,10);
|
||||
uint32 ip = RFIFOL(fd,14);
|
||||
int version = RFIFOB(fd,18);
|
||||
RFIFOSKIP(fd,19);
|
||||
RFIFOSKIP(fd,18);
|
||||
|
||||
if( runflag != CHARSERVER_ST_RUNNING ){
|
||||
chmapif_charselres(fd,account_id,0);
|
||||
@ -478,7 +477,6 @@ int chmapif_parse_authok(int fd){
|
||||
node->login_id2 = login_id2;
|
||||
//node->sex = 0;
|
||||
node->ip = ntohl(ip);
|
||||
node->version = version; //upd version for mapserv
|
||||
//node->expiration_time = 0; // unlimited/unknown time by default (not display in map-server)
|
||||
//node->gmlevel = 0;
|
||||
idb_put(auth_db, account_id, node);
|
||||
|
@ -9,31 +9,10 @@
|
||||
#include "db.h"
|
||||
#include <time.h>
|
||||
|
||||
// server->client protocol version
|
||||
// 0 - pre-?
|
||||
// 1 - ? - 0x196
|
||||
// 2 - ? - 0x78, 0x79
|
||||
// 3 - ? - 0x1c8, 0x1c9, 0x1de
|
||||
// 4 - ? - 0x1d7, 0x1d8, 0x1d9, 0x1da
|
||||
// 5 - 2003-12-18aSakexe+ - 0x1ee, 0x1ef, 0x1f0, ?0x1c4, 0x1c5?
|
||||
// 6 - 2004-03-02aSakexe+ - 0x1f4, 0x1f5
|
||||
// 7 - 2005-04-11aSakexe+ - 0x229, 0x22a, 0x22b, 0x22c
|
||||
// see conf/battle/client.conf for other version
|
||||
|
||||
#ifndef PACKETVER
|
||||
#define PACKETVER 20151104
|
||||
//#define PACKETVER 20120410
|
||||
#error Please define PACKETVER in src/config/packets.h
|
||||
#endif
|
||||
|
||||
// Check if the specified packetversion supports the pincode system
|
||||
#define PACKETVER_SUPPORTS_PINCODE PACKETVER>=20110309
|
||||
|
||||
/// Check if the client needs delete_date as remaining time and not the actual delete_date (actually it was tested for clients since 2013)
|
||||
#define PACKETVER_CHAR_DELETEDATE (PACKETVER > 20130000 && PACKETVER <= 20141022) || PACKETVER >= 20150513
|
||||
|
||||
// Check if the specified packetvresion supports the cashshop sale system
|
||||
#define PACKETVER_SUPPORTS_SALES PACKETVER>=20131223
|
||||
|
||||
///Remove/Comment this line to disable sc_data saving. [Skotlex]
|
||||
#define ENABLE_SC_SAVING
|
||||
/** Remove/Comment this line to disable server-side hot-key saving support [Skotlex]
|
||||
|
@ -358,59 +358,6 @@ float GetFloat(const unsigned char* buf)
|
||||
return *((float*)(void*)&val);
|
||||
}
|
||||
|
||||
uint32 date2version(int date) {
|
||||
if(date < 20040906) return 5;
|
||||
else if(date < 20040920) return 10;
|
||||
else if(date < 20041005) return 11;
|
||||
else if(date < 20041025) return 12;
|
||||
else if(date < 20041129) return 13;
|
||||
else if(date < 20050110) return 14;
|
||||
else if(date < 20050509) return 15;
|
||||
else if(date < 20050628) return 16;
|
||||
else if(date < 20050718) return 17;
|
||||
else if(date < 20050719) return 18;
|
||||
else if(date < 20060327) return 19;
|
||||
else if(date < 20070108) return 20;
|
||||
else if(date < 20070212) return 21;
|
||||
//wtf @FIXME
|
||||
//else if(date < 20080910) return 22;
|
||||
else if(date < 20080827) return 23;
|
||||
else if(date < 20080910) return 24;
|
||||
//unable to solve from date
|
||||
else if(date < 20101124) return 25;
|
||||
else if(date < 20111005) return 26;
|
||||
else if(date < 20111102) return 27;
|
||||
else if(date < 20120307) return 28;
|
||||
else if(date < 20120410) return 29;
|
||||
else if(date < 20120418) return 30;
|
||||
else if(date < 20120618) return 31;
|
||||
else if(date < 20120702) return 32;
|
||||
else if(date < 20130320) return 33;
|
||||
else if(date < 20130515) return 34;
|
||||
else if(date < 20130522) return 35;
|
||||
else if(date < 20130529) return 36;
|
||||
else if(date < 20130605) return 37;
|
||||
else if(date < 20130612) return 38;
|
||||
else if(date < 20130618) return 39;
|
||||
else if(date < 20130626) return 40;
|
||||
else if(date < 20130703) return 41;
|
||||
else if(date < 20130710) return 42;
|
||||
else if(date < 20130717) return 43;
|
||||
else if(date < 20130807) return 44;
|
||||
else if(date < 20131223) return 45;
|
||||
else if(date < 20140212) return 46;
|
||||
//else if(date < 20140613) return 47;
|
||||
//else if(date < 20141016) return 48;
|
||||
else if(date < 20141022) return 50;
|
||||
else if(date < 20150513) return 51;
|
||||
else if(date < 20150916) return 52;
|
||||
else if(date < 20151001) return 53;
|
||||
else if(date < 20151104) return 54;
|
||||
else if(date >= 20151104) return 55;
|
||||
|
||||
else return 30; //default
|
||||
}
|
||||
|
||||
/// calculates the value of A / B, in percent (rounded down)
|
||||
unsigned int get_percentage(const unsigned int A, const unsigned int B)
|
||||
{
|
||||
|
@ -50,8 +50,6 @@ extern uint32 GetULong(const unsigned char* buf);
|
||||
extern int32 GetLong(const unsigned char* buf);
|
||||
extern float GetFloat(const unsigned char* buf);
|
||||
|
||||
uint32 date2version(int date);
|
||||
|
||||
int levenshtein(const char *s1, const char *s2);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -8,6 +8,8 @@
|
||||
* For detailed guidance on these check http://rathena.org/wiki/SRC/config/
|
||||
**/
|
||||
|
||||
#include "../custom/defines_pre.h"
|
||||
|
||||
/// Max number of items on @autolootid list
|
||||
#define AUTOLOOTITEM_SIZE 10
|
||||
|
||||
@ -76,12 +78,6 @@
|
||||
#define MAX_CHAR_BILLING 0 // This must be less than MAX_CHARS
|
||||
#endif
|
||||
|
||||
/// Comment to disable the official packet obfuscation support.
|
||||
/// When enabled, make sure there is value for 'packet_keys' of used packet version or
|
||||
/// defined 'packet_keys_use' in db/[import/]packet_db.txt.
|
||||
/// This requires PACKETVER 2011-08-17 or newer.
|
||||
#define PACKET_OBFUSCATION
|
||||
|
||||
/// Comment to disable warnings for deprecated script commands
|
||||
#define SCRIPT_COMMAND_DEPRECATION
|
||||
|
||||
@ -91,6 +87,7 @@
|
||||
/**
|
||||
* No settings past this point
|
||||
**/
|
||||
#include "./packets.h"
|
||||
#include "./renewal.h"
|
||||
#include "./secure.h"
|
||||
#include "./classes/general.h"
|
||||
@ -100,4 +97,6 @@
|
||||
**/
|
||||
#include "./const.h"
|
||||
|
||||
#include "../custom/defines_post.h"
|
||||
|
||||
#endif // _CONFIG_CORE_H_
|
||||
|
63
src/config/packets.h
Normal file
63
src/config/packets.h
Normal file
@ -0,0 +1,63 @@
|
||||
// Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
|
||||
// For more information, see LICENCE in the main folder
|
||||
#ifndef _CONFIG_PACKETS_H_
|
||||
#define _CONFIG_PACKETS_H_
|
||||
|
||||
/**
|
||||
* rAthena configuration file (http://rathena.org)
|
||||
* For detailed guidance on these check http://rathena.org/wiki/SRC/config/
|
||||
**/
|
||||
|
||||
#ifndef PACKETVER
|
||||
#define PACKETVER 20151104
|
||||
#endif
|
||||
|
||||
#ifndef PACKETVER_RE
|
||||
/// From this point on only kRO RE clients are supported
|
||||
#if PACKETVER > 20151104
|
||||
#define PACKETVER_RE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if PACKETVER >= 20110817
|
||||
/// Comment to disable the official packet obfuscation support.
|
||||
/// This requires PACKETVER 2011-08-17 or newer.
|
||||
#ifndef PACKET_OBFUSCATION
|
||||
#define PACKET_OBFUSCATION
|
||||
|
||||
// Define these inside src/custom/defines_pre.h or src/custom/defines_post.h
|
||||
//#define PACKET_OBFUSCATION_KEY1 <key1>
|
||||
//#define PACKET_OBFUSCATION_KEY2 <key2>
|
||||
//#define PACKET_OBFUSCATION_KEY3 <key3>
|
||||
|
||||
/// Comment this to disable warnings for missing client side encryption
|
||||
#define PACKET_OBFUSCATION_WARN
|
||||
#endif
|
||||
#else
|
||||
#if defined(PACKET_OBFUSCATION)
|
||||
#error You enabled packet obfuscation for a version which is too old. Minimum supported client is 2011-08-17.
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef DUMP_UNKNOWN_PACKET
|
||||
//#define DUMP_UNKNOWN_PACKET
|
||||
#endif
|
||||
|
||||
#ifndef DUMP_INVALID_PACKET
|
||||
//#define DUMP_INVALID_PACKET
|
||||
#endif
|
||||
|
||||
/**
|
||||
* No settings past this point
|
||||
**/
|
||||
|
||||
/// Check if the specified packetversion supports the pincode system
|
||||
#define PACKETVER_SUPPORTS_PINCODE PACKETVER >= 20110309
|
||||
|
||||
/// Check if the client needs delete_date as remaining time and not the actual delete_date (actually it was tested for clients since 2013)
|
||||
#define PACKETVER_CHAR_DELETEDATE (PACKETVER > 20130000 && PACKETVER <= 20141022) || PACKETVER >= 20150513
|
||||
|
||||
/// Check if the specified packetvresion supports the cashshop sale system
|
||||
#define PACKETVER_SUPPORTS_SALES PACKETVER >= 20131223
|
||||
|
||||
#endif // _CONFIG_PACKETS_H_
|
13
src/custom/defines_post.h
Normal file
13
src/custom/defines_post.h
Normal file
@ -0,0 +1,13 @@
|
||||
// Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
|
||||
// For more information, see LICENCE in the main folder
|
||||
#ifndef _CONFIG_CUSTOM_DEFINES_POST_H_
|
||||
#define _CONFIG_CUSTOM_DEFINES_POST_H_
|
||||
|
||||
/**
|
||||
* rAthena configuration file (http://rathena.org)
|
||||
* For detailed guidance on these check http://rathena.org/wiki/SRC/config/
|
||||
**/
|
||||
|
||||
|
||||
|
||||
#endif // _CONFIG_CUSTOM_DEFINES_POST_H_
|
13
src/custom/defines_pre.h
Normal file
13
src/custom/defines_pre.h
Normal file
@ -0,0 +1,13 @@
|
||||
// Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
|
||||
// For more information, see LICENCE in the main folder
|
||||
#ifndef _CONFIG_CUSTOM_DEFINES_PRE_H_
|
||||
#define _CONFIG_CUSTOM_DEFINES_PRE_H_
|
||||
|
||||
/**
|
||||
* rAthena configuration file (http://rathena.org)
|
||||
* For detailed guidance on these check http://rathena.org/wiki/SRC/config/
|
||||
**/
|
||||
|
||||
|
||||
|
||||
#endif // _CONFIG_CUSTOM_DEFINES_PRE_H_
|
@ -303,13 +303,6 @@ int login_mmo_auth(struct login_session_data* sd, bool isServer) {
|
||||
|
||||
}
|
||||
|
||||
//Client Version check
|
||||
if( login_config.check_client_version && sd->version != login_config.client_version_to_connect ){
|
||||
ShowNotice("Invalid version (account: '%s', auth_vers: '%d', received version: '%d', ip: %s)\n",
|
||||
sd->userid, login_config.client_version_to_connect, sd->version, ip);
|
||||
return 5;
|
||||
}
|
||||
|
||||
len = strnlen(sd->userid, NAME_LENGTH);
|
||||
|
||||
// Account creation with _M/_F
|
||||
@ -591,10 +584,6 @@ bool login_config_read(const char* cfgName, bool normal) {
|
||||
login_config.new_acc_length_limit = (bool)config_switch(w2);
|
||||
else if(!strcmpi(w1, "start_limited_time"))
|
||||
login_config.start_limited_time = atoi(w2);
|
||||
else if(!strcmpi(w1, "check_client_version"))
|
||||
login_config.check_client_version = (bool)config_switch(w2);
|
||||
else if(!strcmpi(w1, "client_version_to_connect"))
|
||||
login_config.client_version_to_connect = strtoul(w2, NULL, 10);
|
||||
else if(!strcmpi(w1, "use_MD5_passwords"))
|
||||
login_config.use_md5_passwds = (bool)config_switch(w2);
|
||||
else if(!strcmpi(w1, "group_id_to_connect"))
|
||||
@ -701,9 +690,6 @@ void login_set_defaults() {
|
||||
login_config.use_md5_passwds = false;
|
||||
login_config.group_id_to_connect = -1;
|
||||
login_config.min_group_id_to_connect = -1;
|
||||
login_config.check_client_version = false;
|
||||
login_config.client_version_to_connect = date2version(PACKETVER); //20120410 => 30
|
||||
ShowInfo("loginconfig: client_version_to_connect = %d\n",login_config.client_version_to_connect);
|
||||
|
||||
login_config.ipban = true;
|
||||
login_config.dynamic_pass_failure_ban = true;
|
||||
|
@ -46,7 +46,6 @@ struct login_session_data {
|
||||
char lastlogin[24]; ///date when last logged, Y-M-D HH:MM:SS
|
||||
uint8 group_id; ///groupid of account
|
||||
uint8 clienttype; /// ???
|
||||
uint32 version; ///version contained in clientinfo
|
||||
|
||||
uint8 client_hash[16]; ///hash of client
|
||||
int has_client_hash; ///client ha sent an hash
|
||||
@ -86,8 +85,6 @@ struct Login_Config {
|
||||
bool use_md5_passwds; /// work with password hashes instead of plaintext passwords?
|
||||
int group_id_to_connect; /// required group id to connect
|
||||
int min_group_id_to_connect; /// minimum group id to connect
|
||||
bool check_client_version; /// check the clientversion set in the clientinfo ?
|
||||
uint32 client_version_to_connect; /// the client version needed to connect (if checking is enabled)
|
||||
|
||||
bool ipban; /// perform IP blocking (via contents of `ipbanlist`) ?
|
||||
bool dynamic_pass_failure_ban; /// automatic IP blocking due to failed login attempts ?
|
||||
@ -143,7 +140,6 @@ struct auth_node {
|
||||
uint32 login_id2;
|
||||
uint32 ip;
|
||||
char sex;
|
||||
uint32 version;
|
||||
uint8 clienttype;
|
||||
};
|
||||
extern DBMap* auth_db; // uint32 account_id -> struct auth_node*
|
||||
|
@ -96,7 +96,7 @@ int logchrif_parse_reqauth(int fd, int id,char* ip){
|
||||
//ShowStatus("Char-server '%s': authentication of the account %d accepted (ip: %s).\n", server[id].name, account_id, ip);
|
||||
|
||||
// send ack
|
||||
WFIFOHEAD(fd,25);
|
||||
WFIFOHEAD(fd,21);
|
||||
WFIFOW(fd,0) = 0x2713;
|
||||
WFIFOL(fd,2) = account_id;
|
||||
WFIFOL(fd,6) = login_id1;
|
||||
@ -104,15 +104,14 @@ int logchrif_parse_reqauth(int fd, int id,char* ip){
|
||||
WFIFOB(fd,14) = sex;
|
||||
WFIFOB(fd,15) = 0;// ok
|
||||
WFIFOL(fd,16) = request_id;
|
||||
WFIFOL(fd,20) = node->version;
|
||||
WFIFOB(fd,24) = node->clienttype;
|
||||
WFIFOSET(fd,25);
|
||||
WFIFOB(fd,20) = node->clienttype;
|
||||
WFIFOSET(fd,21);
|
||||
|
||||
// each auth entry can only be used once
|
||||
idb_remove(auth_db, account_id);
|
||||
}else{// authentication not found
|
||||
ShowStatus("Char-server '%s': authentication of the account %d REFUSED (ip: %s).\n", ch_server[id].name, account_id, ip);
|
||||
WFIFOHEAD(fd,25);
|
||||
WFIFOHEAD(fd,21);
|
||||
WFIFOW(fd,0) = 0x2713;
|
||||
WFIFOL(fd,2) = account_id;
|
||||
WFIFOL(fd,6) = login_id1;
|
||||
@ -120,9 +119,8 @@ int logchrif_parse_reqauth(int fd, int id,char* ip){
|
||||
WFIFOB(fd,14) = sex;
|
||||
WFIFOB(fd,15) = 1;// auth failed
|
||||
WFIFOL(fd,16) = request_id;
|
||||
WFIFOL(fd,20) = 0;
|
||||
WFIFOB(fd,24) = 0;
|
||||
WFIFOSET(fd,25);
|
||||
WFIFOB(fd,20) = 0;
|
||||
WFIFOSET(fd,21);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
@ -159,7 +159,6 @@ static void logclif_auth_ok(struct login_session_data* sd) {
|
||||
node->login_id2 = sd->login_id2;
|
||||
node->sex = sd->sex;
|
||||
node->ip = ip;
|
||||
node->version = sd->version;
|
||||
node->clienttype = sd->clienttype;
|
||||
idb_put(auth_db, sd->account_id, node);
|
||||
{
|
||||
@ -181,7 +180,7 @@ static void logclif_auth_ok(struct login_session_data* sd) {
|
||||
3 = Rejected from Server
|
||||
4 = You have been blocked by the GM Team
|
||||
5 = Your Game's EXE file is not the latest version
|
||||
6 = Your are Prohibited to log in until %s
|
||||
6 = You are prohibited to log in until %s
|
||||
7 = Server is jammed due to over populated
|
||||
8 = No more accounts may be connected from this company
|
||||
9 = MSI_REFUSE_BAN_BY_DBA
|
||||
@ -216,37 +215,33 @@ static void logclif_auth_failed(struct login_session_data* sd, int result) {
|
||||
if( (result == 0 || result == 1) && login_config.dynamic_pass_failure_ban )
|
||||
ipban_log(ip); // log failed password attempt
|
||||
|
||||
//#if PACKETVER >= 20120000 /* not sure when this started */
|
||||
if( sd->version >= date2version(20120000) ){ /* not sure when this started */
|
||||
WFIFOHEAD(fd,26);
|
||||
WFIFOW(fd,0) = 0x83e;
|
||||
WFIFOL(fd,2) = result;
|
||||
if( result != 6 )
|
||||
memset(WFIFOP(fd,6), '\0', 20);
|
||||
else { // 6 = Your are Prohibited to log in until %s
|
||||
struct mmo_account acc;
|
||||
AccountDB* accounts = login_get_accounts_db();
|
||||
time_t unban_time = ( accounts->load_str(accounts, &acc, sd->userid) ) ? acc.unban_time : 0;
|
||||
timestamp2string(WFIFOCP(fd,6), 20, unban_time, login_config.date_format);
|
||||
}
|
||||
WFIFOSET(fd,26);
|
||||
#if PACKETVER >= 20120000 /* not sure when this started */
|
||||
WFIFOHEAD(fd,26);
|
||||
WFIFOW(fd,0) = 0x83e;
|
||||
WFIFOL(fd,2) = result;
|
||||
if( result != 6 )
|
||||
memset(WFIFOP(fd,6), '\0', 20);
|
||||
else { // 6 = You are prohibited to log in until %s
|
||||
struct mmo_account acc;
|
||||
AccountDB* accounts = login_get_accounts_db();
|
||||
time_t unban_time = ( accounts->load_str(accounts, &acc, sd->userid) ) ? acc.unban_time : 0;
|
||||
timestamp2string(WFIFOCP(fd,6), 20, unban_time, login_config.date_format);
|
||||
}
|
||||
//#else
|
||||
else {
|
||||
WFIFOHEAD(fd,23);
|
||||
WFIFOW(fd,0) = 0x6a;
|
||||
WFIFOB(fd,2) = (uint8)result;
|
||||
if( result != 6 )
|
||||
memset(WFIFOP(fd,3), '\0', 20);
|
||||
else { // 6 = Your are Prohibited to log in until %s
|
||||
struct mmo_account acc;
|
||||
AccountDB* accounts = login_get_accounts_db();
|
||||
time_t unban_time = ( accounts->load_str(accounts, &acc, sd->userid) ) ? acc.unban_time : 0;
|
||||
timestamp2string(WFIFOCP(fd,3), 20, unban_time, login_config.date_format);
|
||||
}
|
||||
WFIFOSET(fd,23);
|
||||
WFIFOSET(fd,26);
|
||||
#else
|
||||
WFIFOHEAD(fd,23);
|
||||
WFIFOW(fd,0) = 0x6a;
|
||||
WFIFOB(fd,2) = (uint8)result;
|
||||
if( result != 6 )
|
||||
memset(WFIFOP(fd,3), '\0', 20);
|
||||
else { // 6 = You are prohibited to log in until %s
|
||||
struct mmo_account acc;
|
||||
AccountDB* accounts = login_get_accounts_db();
|
||||
time_t unban_time = ( accounts->load_str(accounts, &acc, sd->userid) ) ? acc.unban_time : 0;
|
||||
timestamp2string(WFIFOCP(fd,3), 20, unban_time, login_config.date_format);
|
||||
}
|
||||
//#endif
|
||||
WFIFOSET(fd,23);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@ -306,7 +301,6 @@ static int logclif_parse_reqauth(int fd, struct login_session_data *sd, int comm
|
||||
return 0;
|
||||
else {
|
||||
int result;
|
||||
uint32 version;
|
||||
char username[NAME_LENGTH];
|
||||
char password[PASSWD_LENGTH];
|
||||
unsigned char passhash[16];
|
||||
@ -320,8 +314,6 @@ static int logclif_parse_reqauth(int fd, struct login_session_data *sd, int comm
|
||||
size_t uAccLen = strlen(accname);
|
||||
size_t uTokenLen = RFIFOREST(fd) - 0x5C;
|
||||
|
||||
version = RFIFOL(fd,4);
|
||||
|
||||
if(uAccLen > NAME_LENGTH - 1 || uAccLen == 0 || uTokenLen > NAME_LENGTH - 1 || uTokenLen == 0)
|
||||
{
|
||||
logclif_auth_failed(sd, 3);
|
||||
@ -334,7 +326,6 @@ static int logclif_parse_reqauth(int fd, struct login_session_data *sd, int comm
|
||||
}
|
||||
else
|
||||
{
|
||||
version = RFIFOL(fd,2);
|
||||
safestrncpy(username, RFIFOCP(fd,6), NAME_LENGTH);
|
||||
if( israwpass )
|
||||
{
|
||||
@ -350,11 +341,10 @@ static int logclif_parse_reqauth(int fd, struct login_session_data *sd, int comm
|
||||
RFIFOSKIP(fd,RFIFOREST(fd)); // assume no other packet was sent
|
||||
|
||||
sd->clienttype = clienttype;
|
||||
sd->version = version;
|
||||
safestrncpy(sd->userid, username, NAME_LENGTH);
|
||||
if( israwpass )
|
||||
{
|
||||
ShowStatus("Request for connection of %s (ip: %s) version=%d\n", sd->userid, ip,sd->version);
|
||||
ShowStatus("Request for connection of %s (ip: %s)\n", sd->userid, ip);
|
||||
safestrncpy(sd->passwd, password, NAME_LENGTH);
|
||||
if( login_config.use_md5_passwds )
|
||||
MD5_String(sd->passwd, sd->passwd);
|
||||
@ -362,7 +352,7 @@ static int logclif_parse_reqauth(int fd, struct login_session_data *sd, int comm
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowStatus("Request for connection (passwdenc mode) of %s (ip: %s) version=%d\n", sd->userid, ip,sd->version);
|
||||
ShowStatus("Request for connection (passwdenc mode) of %s (ip: %s)\n", sd->userid, ip);
|
||||
bin2hex(sd->passwd, passhash, 16); // raw binary data here!
|
||||
sd->passwdenc = PASSWORDENC;
|
||||
}
|
||||
@ -430,7 +420,6 @@ static int logclif_parse_reqcharconnec(int fd, struct login_session_data *sd, ch
|
||||
if( login_config.use_md5_passwds )
|
||||
MD5_String(sd->passwd, sd->passwd);
|
||||
sd->passwdenc = 0;
|
||||
sd->version = login_config.client_version_to_connect; // hack to skip version check
|
||||
server_ip = ntohl(RFIFOL(fd,54));
|
||||
server_port = ntohs(RFIFOW(fd,58));
|
||||
safestrncpy(server_name, RFIFOCP(fd,60), 20);
|
||||
|
@ -185,12 +185,12 @@ ACMD_FUNC(send)
|
||||
long num;
|
||||
if(len)
|
||||
{// show packet length
|
||||
sprintf(atcmd_output, msg_txt(sd,904), type, packet_db[sd->packet_ver][type].len); // Packet 0x%x length: %d
|
||||
sprintf(atcmd_output, msg_txt(sd,904), type, packet_db[type].len); // Packet 0x%x length: %d
|
||||
clif_displaymessage(fd, atcmd_output);
|
||||
return 0;
|
||||
}
|
||||
|
||||
len=packet_db[sd->packet_ver][type].len;
|
||||
len=packet_db[type].len;
|
||||
off=2;
|
||||
if(len == 0)
|
||||
{// unknown packet - ERROR
|
||||
@ -341,7 +341,7 @@ ACMD_FUNC(send)
|
||||
SKIP_VALUE(message);
|
||||
}
|
||||
|
||||
if(packet_db[sd->packet_ver][type].len == -1)
|
||||
if(packet_db[type].len == -1)
|
||||
{// send dynamic packet
|
||||
WFIFOW(fd,2)=TOW(off);
|
||||
WFIFOSET(fd,off);
|
||||
@ -3927,9 +3927,6 @@ ACMD_FUNC(reload) {
|
||||
} else if (strstr(command, "questdb") || strncmp(message, "questdb", 3) == 0) {
|
||||
do_reload_quest();
|
||||
clif_displaymessage(fd, msg_txt(sd,1377)); // Quest database has been reloaded.
|
||||
} else if (strstr(command, "packetdb") || strncmp(message, "packetdb", 4) == 0) {
|
||||
packetdb_readdb(true);
|
||||
clif_displaymessage(fd, msg_txt(sd,1477)); // Packet database has been reloaded.
|
||||
} else if (strstr(command, "instancedb") || strncmp(message, "instancedb", 4) == 0) {
|
||||
instance_reload();
|
||||
clif_displaymessage(fd, msg_txt(sd,516)); // Instance database has been reloaded.
|
||||
@ -10085,7 +10082,6 @@ void atcommand_basecommands(void) {
|
||||
ACMD_DEF2("reloadmotd", reload),
|
||||
ACMD_DEF2("reloadquestdb", reload),
|
||||
ACMD_DEF2("reloadmsgconf", reload),
|
||||
ACMD_DEF2("reloadpacketdb", reload),
|
||||
ACMD_DEF2("reloadinstancedb", reload),
|
||||
ACMD_DEF(partysharelvl),
|
||||
ACMD_DEF(mapinfo),
|
||||
|
@ -8194,8 +8194,6 @@ 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, 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, },
|
||||
|
@ -373,8 +373,6 @@ extern struct Battle_Config
|
||||
int day_duration; // added by [Yor]
|
||||
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]
|
||||
|
@ -36,7 +36,7 @@ static bool char_init_done = false; //server already initialized? Used for Inter
|
||||
|
||||
static const int packet_len_table[0x3d] = { // U - used, F - free
|
||||
60, 3,-1,-1,10,-1, 6,-1, // 2af8-2aff: U->2af8, U->2af9, U->2afa, U->2afb, U->2afc, U->2afd, U->2afe, U->2aff
|
||||
6,-1,19, 7,-1,39,30, 10, // 2b00-2b07: U->2b00, U->2b01, U->2b02, U->2b03, U->2b04, U->2b05, U->2b06, U->2b07
|
||||
6,-1,18, 7,-1,39,30, 10, // 2b00-2b07: U->2b00, U->2b01, U->2b02, U->2b03, U->2b04, U->2b05, U->2b06, U->2b07
|
||||
6,30, 10, -1,86, 7,44,34, // 2b08-2b0f: U->2b08, U->2b09, U->2b0a, U->2b0b, U->2b0c, U->2b0d, U->2b0e, U->2b0f
|
||||
11,10,10, 0,11, -1,266,10, // 2b10-2b17: U->2b10, U->2b11, U->2b12, F->2b13, U->2b14, U->2b15, U->2b16, U->2b17
|
||||
2,10, 2,-1,-1,-1, 2, 7, // 2b18-2b1f: U->2b18, U->2b19, U->2b1a, U->2b1b, U->2b1c, U->2b1d, U->2b1e, U->2b1f
|
||||
@ -809,14 +809,13 @@ int chrif_charselectreq(struct map_session_data* sd, uint32 s_ip) {
|
||||
|
||||
chrif_check(-1);
|
||||
|
||||
WFIFOHEAD(char_fd,19);
|
||||
WFIFOHEAD(char_fd,18);
|
||||
WFIFOW(char_fd, 0) = 0x2b02;
|
||||
WFIFOL(char_fd, 2) = sd->bl.id;
|
||||
WFIFOL(char_fd, 6) = sd->login_id1;
|
||||
WFIFOL(char_fd,10) = sd->login_id2;
|
||||
WFIFOL(char_fd,14) = htonl(s_ip);
|
||||
WFIFOB(char_fd,18) = sd->packet_ver;
|
||||
WFIFOSET(char_fd,19);
|
||||
WFIFOSET(char_fd,18);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
1560
src/map/clif.c
1560
src/map/clif.c
File diff suppressed because it is too large
Load Diff
@ -44,12 +44,12 @@ enum mail_attachment_type;
|
||||
enum { // packet DB
|
||||
MIN_PACKET_DB = 0x064,
|
||||
MAX_PACKET_DB = 0xAFF,
|
||||
MAX_PACKET_VER = 55,
|
||||
MAX_PACKET_POS = 20,
|
||||
};
|
||||
|
||||
enum e_packet_ack {
|
||||
ZC_ACK_OPEN_BANKING = 0,
|
||||
ZC_ACK_CLOSE_BANKING,
|
||||
ZC_ACK_BANKING_DEPOSIT,
|
||||
ZC_ACK_BANKING_WITHDRAW,
|
||||
ZC_BANKING_CHECK,
|
||||
@ -171,11 +171,9 @@ enum e_party_invite_reply {
|
||||
PARTY_REPLY_INVALID_MAPPROPERTY_ME, ///< return=9 : !TODO "Cannot join a party in this map" -> MsgStringTable[1871] (since 20110205)
|
||||
};
|
||||
|
||||
// packet_db[SERVER] is reserved for server use
|
||||
#define SERVER 0
|
||||
#define packet_len(cmd) packet_db[SERVER][cmd].len
|
||||
extern struct s_packet_db packet_db[MAX_PACKET_VER+1][MAX_PACKET_DB+1];
|
||||
extern int packet_db_ack[MAX_PACKET_VER + 1][MAX_ACK_FUNC + 1];
|
||||
#define packet_len(cmd) packet_db[cmd].len
|
||||
extern struct s_packet_db packet_db[MAX_PACKET_DB+1];
|
||||
extern int packet_db_ack[MAX_ACK_FUNC + 1];
|
||||
|
||||
// local define
|
||||
typedef enum send_target {
|
||||
@ -534,7 +532,6 @@ void clif_setport(uint16 port);
|
||||
uint32 clif_getip(void);
|
||||
uint32 clif_refresh_ip(void);
|
||||
uint16 clif_getport(void);
|
||||
void packetdb_readdb(bool reload);
|
||||
|
||||
void clif_authok(struct map_session_data *sd);
|
||||
void clif_authrefuse(int fd, uint8 error_code);
|
||||
|
347
src/map/clif_obfuscation.h
Normal file
347
src/map/clif_obfuscation.h
Normal file
@ -0,0 +1,347 @@
|
||||
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
|
||||
// For more information, see LICENCE in the main folder
|
||||
|
||||
#ifndef _CLIF_OBFUSCATION_H_
|
||||
#define _CLIF_OBFUSCATION_H_
|
||||
|
||||
#define packet_keys(a,b,c) static unsigned int clif_cryptKey[] = { a, b, c };
|
||||
|
||||
#if defined(PACKET_OBFUSCATION_KEY1) || defined(PACKET_OBFUSCATION_KEY2) || defined(PACKET_OBFUSCATION_KEY3)
|
||||
#ifndef PACKET_OBFUSCATION_KEY1
|
||||
#error You enabled custom packet obfuscation keys, but did not specify key number 1.
|
||||
#endif
|
||||
#ifndef PACKET_OBFUSCATION_KEY2
|
||||
#error You enabled custom packet obfuscation keys, but did not specify key number 2.
|
||||
#endif
|
||||
#ifndef PACKET_OBFUSCATION_KEY3
|
||||
#error You enabled custom packet obfuscation keys, but did not specify key number 3.
|
||||
#endif
|
||||
|
||||
packet_keys(PACKET_OBFUSCATION_KEY1,PACKET_OBFUSCATION_KEY2,PACKET_OBFUSCATION_KEY3);
|
||||
#elif PACKETVER == 20110817
|
||||
packet_keys(0x053D5CED,0x3DED6DED,0x6DED6DED);
|
||||
#elif PACKETVER == 20110824
|
||||
packet_keys(0x35C91401,0x262A5556,0x28FA03AA);
|
||||
#elif PACKETVER == 20110831
|
||||
packet_keys(0x3AD67ED0,0x44703C69,0x6F876809);
|
||||
#elif PACKETVER == 20110906
|
||||
packet_keys(0x3AD67ED0,0x44703C69,0x6F876809); // unchanged from 2011-08-31
|
||||
#elif PACKETVER == 20111005 // 2011-10-05aRagexeRE
|
||||
packet_keys(0x291E6762,0x77CD391A,0x60AC2F16);
|
||||
#elif PACKETVER == 20111012
|
||||
packet_keys(0x7F3C2D29,0x59B01DE6,0x1DBB44CA);
|
||||
#elif PACKETVER == 20111021
|
||||
packet_keys(0x357D55DC,0x5A8D759F,0x245C30F5);
|
||||
#elif PACKETVER == 20111025
|
||||
packet_keys(0x50AE1A63,0x3CE579B5,0x29C10406);
|
||||
#elif PACKETVER == 20111102 // 2011-11-02aRagexe
|
||||
packet_keys(0x5324329D,0x5D545D52,0x06137269);
|
||||
#elif PACKETVER == 20111109
|
||||
packet_keys(0x0B642BDA,0x6ECB1D1C,0x61C7454B);
|
||||
#elif PACKETVER == 20111122
|
||||
packet_keys(0x3B550F07,0x1F666C7C,0x60304EF5);
|
||||
#elif PACKETVER == 20111207
|
||||
packet_keys(0x2A610886,0x3E09165E,0x57C11888);
|
||||
#elif PACKETVER == 20111214
|
||||
packet_keys(0x5151306B,0x7AE32886,0x53060628);
|
||||
#elif PACKETVER == 20111220
|
||||
packet_keys(0x05D53871,0x7D0027B4,0x29975333);
|
||||
#elif PACKETVER == 20111228
|
||||
packet_keys(0x0FF87E93,0x6CFF7860,0x3A3D1DEC);
|
||||
#elif PACKETVER == 20120104
|
||||
packet_keys(0x262034A1,0x674542A5,0x73A50BA5);
|
||||
#elif PACKETVER == 20120111
|
||||
packet_keys(0x2B412AFC,0x4FF94487,0x6705339D);
|
||||
#elif PACKETVER == 20120120
|
||||
packet_keys(0x504345D0,0x3D427B1B,0x794C2DCC);
|
||||
#elif PACKETVER == 20120202
|
||||
packet_keys(0x2CFC0A71,0x2BA91D8D,0x087E39E0);
|
||||
#elif PACKETVER == 20120207
|
||||
packet_keys(0x1D373F5D,0x5ACD604D,0x1C4D7C4D);
|
||||
#elif PACKETVER == 20120214
|
||||
packet_keys(0x7A255EFA,0x30977276,0x2D4A0448);
|
||||
#elif PACKETVER == 20120229
|
||||
packet_keys(0x520B4C64,0x2800407D,0x47651458);
|
||||
#elif PACKETVER == 20120307 // 2012-03-07fRagexeRE
|
||||
packet_keys(0x382A6DEF,0x5CBE7202,0x61F46637);
|
||||
#elif PACKETVER == 20120314
|
||||
packet_keys(0x689C1729,0x11812639,0x60F82967);
|
||||
#elif PACKETVER == 20120321
|
||||
packet_keys(0x21F9683F,0x710C5CA5,0x1FD910E9);
|
||||
#elif PACKETVER == 20120328
|
||||
packet_keys(0x75B8553B,0x37F20B12,0x385C2B40);
|
||||
#elif PACKETVER == 20120404
|
||||
packet_keys(0x0036310C,0x2DCD0BED,0x1EE62A78);
|
||||
#elif PACKETVER == 20120410 // 2012-04-10aRagexeRE
|
||||
packet_keys(0x01581359,0x452D6FFA,0x6AFB6E2E);
|
||||
#elif PACKETVER == 20120418 // 2012-04-18aRagexeRE
|
||||
packet_keys(0x01540E48,0x13041224,0x31247924);
|
||||
#elif PACKETVER == 20120424
|
||||
packet_keys(0x411D1DBB,0x4CBA4848,0x1A432FC4);
|
||||
#elif PACKETVER == 20120509
|
||||
packet_keys(0x16CF3301,0x1F472B9B,0x0B4A3CD2);
|
||||
#elif PACKETVER == 20120515
|
||||
packet_keys(0x4A715EF9,0x79103E4F,0x405C1238);
|
||||
#elif PACKETVER == 20120525
|
||||
packet_keys(0x70EB4CCB,0x0487713C,0x398D4B08);
|
||||
#elif PACKETVER == 20120605
|
||||
packet_keys(0x68CA3080,0x31B74BDD,0x505208F1);
|
||||
#elif PACKETVER == 20120612
|
||||
packet_keys(0x32E45D64,0x35643564,0x35643564);
|
||||
#elif PACKETVER == 20120618 // 2012-06-18
|
||||
packet_keys(0x261F261F,0x261F261F,0x261F261F);
|
||||
#elif PACKETVER == 20120702 // 2012-07-02aRagexeRE
|
||||
packet_keys(0x25733B31,0x53486CFD,0x398649BD);
|
||||
#elif PACKETVER == 20120716
|
||||
packet_keys(0x76052205,0x22052205,0x22052205);
|
||||
#elif PACKETVER == 20130320 // 2013-03-20Ragexe
|
||||
packet_keys(0x3F094C49,0x55F86C1E,0x58AA359A);
|
||||
#elif PACKETVER == 20130515 // 2013-05-15aRagexe
|
||||
packet_keys(0x75794A38,0x58A96BC1,0x296E6FB8);
|
||||
#elif PACKETVER == 20130522 // 2013-05-22Ragexe
|
||||
packet_keys(0x6948050B,0x06511D9D,0x725D4DF1);
|
||||
#elif PACKETVER == 20130529 // 2013-05-29Ragexe
|
||||
packet_keys(0x023A6C87,0x14BF1F1E,0x5CC70CC9);
|
||||
#elif PACKETVER == 20130605 // 2013-06-05Ragexe
|
||||
packet_keys(0x646E08D9,0x5F153AB5,0x61B509B5);
|
||||
#elif PACKETVER == 20130612 // 2013-06-12Ragexe
|
||||
packet_keys(0x6D166F66,0x3C000FCF,0x295B0FCB);
|
||||
#elif PACKETVER == 20130618 // 2013-06-18Ragexe
|
||||
packet_keys(0x434115DE,0x34A10FE9,0x6791428E);
|
||||
#elif PACKETVER == 20130626 // 2013-06-26Ragexe
|
||||
packet_keys(0x38F453EF,0x6A040FD8,0X65BD6668);
|
||||
#elif PACKETVER == 20130703 // 2013-07-03Ragexe
|
||||
packet_keys(0x4FF90E23,0x0F1432F2,0x4CFA1EDA);
|
||||
#elif PACKETVER == 20130710 // 2013-07-10Ragexe
|
||||
packet_keys(0x458F758F,0x4CCF3F8F,0x4A9C4237);
|
||||
#elif PACKETVER == 20130717 // 2013-07-17Ragexe
|
||||
packet_keys(0x2BED4F91,0x5F9E00CF,0x5EE5520C);
|
||||
#elif PACKETVER == 20130807 // 2013-08-07Ragexe
|
||||
packet_keys(0x7E241DE0,0x5E805580,0x3D807D80);
|
||||
#elif PACKETVER == 20130814
|
||||
packet_keys(0x23A23148,0x0C41420E,0x53785AD7);
|
||||
#elif PACKETVER == 20131218
|
||||
packet_keys(0x6A596301,0x76866D0E,0x32294A45);
|
||||
#elif PACKETVER == 20131223 // 2013-12-23Ragexe
|
||||
packet_keys(0x631C511C,0x111C111C,0x111C111C);
|
||||
#elif PACKETVER == 20131230
|
||||
packet_keys(0x611B7097,0x01F957A1,0x768A0FCB);
|
||||
#elif PACKETVER == 20140115
|
||||
packet_keys(0x63224335,0x0F3A1F27,0x6D217B24);
|
||||
#elif PACKETVER == 20140205
|
||||
packet_keys(0x63DC7BDC,0x7BDC7BDC,0x7BDC7BDC);
|
||||
#elif PACKETVER == 20140305
|
||||
packet_keys(0x116763F2,0x41117DAC,0x7FD13C45);
|
||||
#elif PACKETVER == 20140402
|
||||
packet_keys(0x15D3271C,0x004D725B,0x111A3A37);
|
||||
#elif PACKETVER == 20140416
|
||||
packet_keys(0x04810281,0x42814281,0x42814281);
|
||||
#elif PACKETVER == 20141016 // 2014-10-16Ragexe
|
||||
packet_keys(0x2DFF467C,0x444B37EE,0x2C1B634F);
|
||||
#elif PACKETVER == 20141022 // 2014-10-22bRagexe
|
||||
packet_keys(0x290551EA,0x2B952C75,0x2D67669B);
|
||||
#elif PACKETVER == 20150107 // 2015-01-07aRagexeRE
|
||||
packet_keys(0x6C494A14, 0x4DDB6427, 0x3E6D7B65);
|
||||
#elif PACKETVER == 20150114 // 2015-01-14aRagexe
|
||||
packet_keys(0x21C96102, 0x13142934, 0x1ABF4EA3);
|
||||
#elif PACKETVER == 20150128 // 2015-01-28aRagexe
|
||||
packet_keys(0x77CA2D55,0x28B608F0,0x75B47957);
|
||||
#elif PACKETVER == 20150204 // 2015-02-04aRagexe
|
||||
packet_keys(0x134529DB,0x5B4F6CEF,0x29EF11EF);
|
||||
#elif PACKETVER == 20150225 || PACKETVER == 20150226 // 2015-02-25aRagexeRE or 2015-02-26aRagexeRE
|
||||
packet_keys(0x57FD4B7B,0x19CC16FB,0x0D255D72);
|
||||
#elif PACKETVER == 20150311 // 2015-03-11aRagexeRE
|
||||
packet_keys(0x48C45D97,0x06CE09B0,0x5836642F);
|
||||
#elif PACKETVER == 20150325 // 2015-03-25aRagexe
|
||||
packet_keys(0x68F62B8C, 0x337C3468, 0x38FC0AC7);
|
||||
#elif PACKETVER == 20150401 // 2015-04-01aRagexe
|
||||
packet_keys(0x207F3A08,0x57E6160C,0x02A60382);
|
||||
#elif PACKETVER == 20150422 // 2015-04-22aRagexeRE
|
||||
packet_keys(0x10D22CE2,0x69E279E2,0x79E279E2);
|
||||
#elif PACKETVER == 20150429 // 2015-04-29aRagexe
|
||||
packet_keys(0x2BF61A71,0x565D5DDF,0x0FB90019);
|
||||
#elif PACKETVER == 20150507 // 2015-05-07bRagexe
|
||||
packet_keys(0x55B54373,0x58967821,0x67F41832);
|
||||
#elif PACKETVER == 20150513 // 2015-05-13aRagexe
|
||||
packet_keys(0x62C86D09,0x75944F17,0x112C133D);
|
||||
#elif PACKETVER == 20150527 // 2015-05-27aRagexe
|
||||
packet_keys(0x35AE7BAE,0x3BAE3BAE,0x3BAE3BAE);
|
||||
#elif PACKETVER == 20150617 || PACKETVER == 20150618 // 2015-06-17aRagexeRE or 2015-06-18aRagexeRE
|
||||
packet_keys(0x250F7E09,0x25416076,0x029A780E);
|
||||
#elif PACKETVER == 20150819 // 2015-08-19aRagexeRE
|
||||
packet_keys(0x1A2400E0,0x736E5686,0x10F315D5);
|
||||
#elif PACKETVER == 20150826 // 2015-08-26aRagexeRE
|
||||
packet_keys(0x77883C56,0x1829359F,0x0DE635B6);
|
||||
#elif PACKETVER == 20150916 // 2015-09-16Ragexe
|
||||
packet_keys(0x17F83A19,0x116944F4,0x1CC541E9);
|
||||
#elif PACKETVER == 20151001 // 2015-10-01bRagexeRE
|
||||
packet_keys(0x45B945B9,0x45B945B9,0x45B945B9);
|
||||
#elif PACKETVER == 20151007 // 2015-10-07aRagexeRE
|
||||
packet_keys(0x3C6447A8,0x032170D7,0x6490476C);
|
||||
#elif PACKETVER == 20151014 // 2015-10-14bRagexeRE
|
||||
packet_keys(0x402728A8,0x5D0E309F,0x240018FD);
|
||||
#elif PACKETVER == 20151028 // 2015-10-28cRagexeRE
|
||||
packet_keys(0x45B945B9,0x45B945B9,0x45B945B9);
|
||||
#elif PACKETVER == 20151029 // 2015-10-29aRagexe
|
||||
packet_keys(0x45B945B9,0x45B945B9,0x45B945B9);
|
||||
#elif PACKETVER == 20151104 // 2015-11-04aRagexe
|
||||
packet_keys(0x4C17382A,0x7ED174C9,0x29961E4F);
|
||||
#elif PACKETVER == 20151118 // 2015-11-18aRagexeRE
|
||||
packet_keys(0x734C3241,0x6E846F34,0x731C06D6);
|
||||
#elif PACKETVER == 20151202 // 2015-12-02bRagexeRE
|
||||
packet_keys(0x4EDE52DE,0x52DE52DE,0x52DE52DE);
|
||||
#elif PACKETVER == 20151216 // 2015-12-16aRagexe
|
||||
packet_keys(0x25DD643D,0x61AC39DE,0x77A8206D);
|
||||
#elif PACKETVER == 20151223 // 2015-12-23bRagexeRE
|
||||
packet_keys(0x347D68D0,0x2C705320,0x7B4A199D);
|
||||
#elif PACKETVER == 20160106 // 2016-01-06aRagexeRE
|
||||
packet_keys(0x40520265,0x33FE26FC,0x7136294F);
|
||||
#elif PACKETVER == 20160113 // 2016-01-13cRagexeRE
|
||||
packet_keys(0x18005C4B,0x19A94A72,0x73F678EC);
|
||||
#elif PACKETVER == 20160120 // 2016-01-20aRagexeRE
|
||||
packet_keys(0x51495149,0x51495149,0x51495149);
|
||||
#elif PACKETVER == 20160127 // 2016-01-27bRagexeRE
|
||||
packet_keys(0x6B1E7146,0x612C47E6,0x274E56EE);
|
||||
#elif PACKETVER == 20160203 // 2016-02-03aRagexeRE
|
||||
packet_keys(0x3E1411AF,0x6C744497,0x7CFA1BDE);
|
||||
#elif PACKETVER == 20160211 // 2016-02-11aRagexeRE
|
||||
packet_keys(0x613813EA,0x05251DAB,0x1FD35E33);
|
||||
#elif PACKETVER == 20160217 // 2016-02-17cRagexeRE
|
||||
packet_keys(0x25895A8E,0x09421C19,0x763A2D7A);
|
||||
#elif PACKETVER == 20160224 // 2016-02-24bRagexeRE
|
||||
packet_keys(0x7088019A,0x13471F02,0x42356A7D);
|
||||
#elif PACKETVER == 20160302 // 2016-03-02bRagexeRE
|
||||
packet_keys(0x7B4441B9,0x5BBC63AF,0x45DA0E71);
|
||||
#elif PACKETVER == 20160309 // 2016-03-09aRagexeRE
|
||||
packet_keys(0x21587520,0x353A7706,0x1B722B25);
|
||||
#elif PACKETVER == 20160316 // 2016-03-16aRagexeRE
|
||||
packet_keys(0x62363E36,0x3E363E36,0x3E363E36);
|
||||
#elif PACKETVER == 20160323 // 2016-03-23aRagexeRE
|
||||
packet_keys(0x73E35A83,0x62142FA8,0x12BA36BD);
|
||||
#elif PACKETVER == 20160330 // 2016-03-30aRagexeRE
|
||||
packet_keys(0x02050940,0x545336FF,0x7E7D4902);
|
||||
#elif PACKETVER == 20160406 // 2016-04-06aRagexeRE
|
||||
packet_keys(0x568611EA,0x32457D8D,0x2B020477);
|
||||
#elif PACKETVER == 20160414 // 2016-04-14bRagexeRE
|
||||
packet_keys(0x31BD479A,0x40C61398,0x397C1A80);
|
||||
#elif PACKETVER == 20160420 // 2016-04-20aRagexeRE
|
||||
packet_keys(0x67D2163A,0x3068215B,0x4835474D);
|
||||
#elif PACKETVER == 20160427 // 2016-04-27aRagexeRE
|
||||
packet_keys(0x12DC378E,0x4E3E7EBE,0x0ABE2ABE);
|
||||
#elif PACKETVER == 20160504 // 2016-05-04aRagexeRE
|
||||
packet_keys(0x09E0544C,0x0231251D,0x2F4E195F);
|
||||
#elif PACKETVER == 20160511 // 2016-05-11aRagexeRE
|
||||
packet_keys(0x3C666FE2,0x27E84E3E,0x53E11BA5);
|
||||
#elif PACKETVER == 20160518 // 2016-05-18aRagexeRE
|
||||
packet_keys(0x57DB7CA1,0x1FEA1629,0x26DD244D);
|
||||
#elif PACKETVER == 20160525 // 2016-05-25aRagexeRE
|
||||
packet_keys(0x485C45B6,0x47DC6192,0x76B34A36);
|
||||
#elif PACKETVER == 20160601 // 2016-06-01aRagexeRE
|
||||
packet_keys(0x3DAD32C4,0x59F001BE,0x73F65E56);
|
||||
#elif PACKETVER == 20160608 // 2016-06-08aRagexeRE
|
||||
packet_keys(0x11D74609,0x77C43E8A,0x44290F53);
|
||||
#elif PACKETVER == 20160615 // 2016-06-15aRagexeRE
|
||||
packet_keys(0x062C5C26,0x6CF47E82,0x4DD53480);
|
||||
#elif PACKETVER == 20160622 // 2016-06-22aRagexeRE
|
||||
packet_keys(0x426548AB,0x5C0F5DD4,0x03022710);
|
||||
#elif PACKETVER == 20160630 // 2016-06-30aRagexeRE
|
||||
packet_keys(0x0DF31CCC,0x54281606,0x5C4C6855);
|
||||
#elif PACKETVER == 20160706 // 2016-07-06cRagexeRE
|
||||
packet_keys(0x33A766D0,0x743F04F8,0x0FA0276C);
|
||||
#elif PACKETVER == 20160713 // 2016-07-13bRagexeRE
|
||||
packet_keys(0x714F2495,0x7DDC6F32,0x3FD8533D);
|
||||
#elif PACKETVER == 20160720 // 2016-07-20aRagexeRE
|
||||
packet_keys(0x4F8A19C0,0x2D8E085C,0x37BB67D6);
|
||||
#elif PACKETVER == 20160727 // 2016-07-27bRagexeRE
|
||||
packet_keys(0x3C6952AB,0x26E4077F,0x37E25DF7);
|
||||
#elif PACKETVER == 20160803 // 2016-08-03bRagexeRE
|
||||
packet_keys(0x67F438C2,0x512A4EB7,0x2D353182);
|
||||
#elif PACKETVER == 20160810 // 2016-08-10aRagexeRE
|
||||
packet_keys(0x2F252886,0x242234A2,0x48BC5032);
|
||||
#elif PACKETVER == 20160831 // 2016-08-31bRagexeRE
|
||||
packet_keys(0x564E13B0,0x7F680549,0x382D273B);
|
||||
#elif PACKETVER == 20160907 // 2016-09-07aRagexeRE
|
||||
packet_keys(0x32E5237D,0x57BD4DBD,0x5DBD5DBD);
|
||||
#elif PACKETVER == 20160913 // 2016-09-13aRagexeRE
|
||||
packet_keys(0x7C79748F,0x1AA03B1D,0x6EAC4747);
|
||||
#elif PACKETVER == 20160921 // 2016-09-21bRagexeRE
|
||||
packet_keys(0x11CD15CD,0x15CD15CD,0x15CD15CD);
|
||||
#elif PACKETVER == 20160928 // 2016-09-28dRagexeRE
|
||||
packet_keys(0x2F8C67F5,0x22D42C38,0x57513774);
|
||||
#elif PACKETVER == 20161005 // 2016-10-05aRagexeRE
|
||||
packet_keys(0x5BAE21F8,0x021E2FFC,0x3BEB7C31);
|
||||
#elif PACKETVER == 20161012 // 2016-10-12aRagexeRE
|
||||
packet_keys(0x5E2311F2,0x14FD012C,0x76EB64F6);
|
||||
#elif PACKETVER == 20161019 // 2016-10-19aRagexeRE
|
||||
packet_keys(0x34882F11,0x7C870E70,0x7E61350D);
|
||||
#elif PACKETVER == 20161026 // 2016-10-26bRagexeRE
|
||||
packet_keys(0x2CB86AE6,0x7D12660E,0x1B004DEB);
|
||||
#elif PACKETVER == 20161103 // 2016-11-03aRagexeRE
|
||||
packet_keys(0x76725C17,0x72FE4EC1,0x07A91BFD);
|
||||
#elif PACKETVER == 20161109 // 2016-11-09bRagexeRE
|
||||
packet_keys(0x0A5277C0,0x2DB17506,0x0E8F26DA);
|
||||
#elif PACKETVER == 20161116 // 2016-11-16cRagexeRE
|
||||
packet_keys(0x780C5C3F,0x15E92272,0x2BA770C5);
|
||||
#elif PACKETVER == 20161123 // 2016-11-23aRagexeRE
|
||||
packet_keys(0x66FF559F,0x00D3535B,0x236246F7);
|
||||
#elif PACKETVER == 20161130 // 2016-11-30bRagexeRE
|
||||
packet_keys(0x2ED80296,0x0D837373,0x20266F9A);
|
||||
#elif PACKETVER == 20161207 // 2016-12-07eRagexeRE
|
||||
packet_keys(0x52D267AA,0x4FE42156,0x1292153E);
|
||||
#elif PACKETVER == 20161214 // 2016-12-14bRagexeRE
|
||||
packet_keys(0x4DDE217B,0x07863AE0,0x5B591656);
|
||||
#elif PACKETVER == 20161221 // 2016-12-21aRagexeRE
|
||||
packet_keys(0x69CB4F56,0x793C165E,0x673A2354);
|
||||
#elif PACKETVER == 20161228 // 2016-12-28aRagexeRE
|
||||
packet_keys(0x09366971,0x005672F1,0x6F3712AE);
|
||||
#elif PACKETVER == 20170104 // 2017-01-04bRagexeRE
|
||||
packet_keys(0x44416BC3,0x6C8D1817,0x072D75D5);
|
||||
#elif PACKETVER == 20170111 // 2017-01-11aRagexeRE
|
||||
packet_keys(0x19B637F9,0x0E9C378A,0x41673186);
|
||||
#elif PACKETVER == 20170118 // 2017-01-18aRagexeRE
|
||||
packet_keys(0x456B36EB,0x15EB34B0,0x18C42E43);
|
||||
#elif PACKETVER == 20170125 // 2017-01-25aRagexeRE
|
||||
packet_keys(0x066E04FE,0x3004224A,0x04FF0458);
|
||||
#elif PACKETVER == 20170201 // 2017-02-01aRagexeRE
|
||||
packet_keys(0x2011228E,0x00453005,0x628E7F0A);
|
||||
#elif PACKETVER == 20170208 // 2017-02-08aRagexeRE
|
||||
packet_keys(0x6A764E5F,0x0609570D,0x28AE07FA);
|
||||
#elif PACKETVER == 20170215 // 2017-02-15aRagexeRE
|
||||
packet_keys(0x50C01315,0x51012A42,0x679E16C3);
|
||||
#elif PACKETVER == 20170222 // 2017-02-22aRagexeRE
|
||||
packet_keys(0x5A242F2F,0x6C556187,0x73C022CB);
|
||||
#elif PACKETVER == 20170228 // 2017-02-28aRagexeRE
|
||||
packet_keys(0x771D4F2B,0x20EF1F4C,0x0D5135C8);
|
||||
#elif PACKETVER == 20170308 // 2017-03-08bRagexeRE
|
||||
packet_keys(0x653470A9,0x6B316A71,0x5C712C71);
|
||||
#elif PACKETVER == 20170315 // 2017-03-15cRagexeRE
|
||||
packet_keys(0x399A0856,0x56642A94,0x7F77157D);
|
||||
#elif PACKETVER == 20170322 // 2017-03-22aRagexeRE
|
||||
packet_keys(0x2050167B,0x01731233,0x40337033);
|
||||
#elif PACKETVER == 20170329 // 2017-03-29dRagexeRE
|
||||
packet_keys(0x18B31A80,0x1B0B1D56,0x16857D6A);
|
||||
#elif PACKETVER == 20170405 // 2017-04-05bRagexeRE
|
||||
packet_keys(0x1FDE7DAC,0x2F9F5B63,0x3F2062AF);
|
||||
#elif PACKETVER == 20170412 // 2017-04-12aRagexeRE
|
||||
packet_keys(0x39223393,0x5C847779,0x10217985);
|
||||
#elif PACKETVER == 20170419 // 2017-04-19bRagexeRE
|
||||
packet_keys(0x1F8F4B3F,0x2E481F03,0x39ED4178);
|
||||
#elif PACKETVER == 20170426 // 2017-04-26dRagexeRE
|
||||
packet_keys(0x167642A7,0x1DEC3D26,0x6D046D4C);
|
||||
#elif PACKETVER == 20170502 // 2017-05-02dRagexeRE
|
||||
packet_keys(0x05224194,0x466D4204,0x31F02EE0);
|
||||
#elif PACKETVER == 20170517 // 2017-05-17aRagexeRE
|
||||
packet_keys(0x2CC4749A,0x1FA954DC,0x72276857);
|
||||
#elif PACKETVER == 20170524 // 2017-05-24aRagexeRE
|
||||
packet_keys(0x0B4E03A6,0x2B93427C,0x583D4477);
|
||||
#elif PACKETVER == 20170531 // 2017-05-31aRagexeRE
|
||||
packet_keys(0x03FA5A97,0x20B802D5,0x339F1977);
|
||||
#elif PACKETVER == 20170607 // 2017-06-07cRagexeRE
|
||||
packet_keys(0x50564ACD,0x79CA4E15,0x405F4894);
|
||||
#elif PACKETVER > 20110817
|
||||
#error Unsupported packet version.
|
||||
#endif
|
||||
|
||||
#undef packet_keys
|
||||
|
||||
#endif /* _CLIF_OBFUSCATION_H_ */
|
2308
src/map/clif_packetdb.h
Normal file
2308
src/map/clif_packetdb.h
Normal file
File diff suppressed because it is too large
Load Diff
3511
src/map/clif_shuffle.h
Normal file
3511
src/map/clif_shuffle.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -131,6 +131,15 @@
|
||||
<ClInclude Include="clan.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="clif_obfuscation.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="clif_packetdb.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="clif_shuffle.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="atcommand.c">
|
||||
|
@ -1228,10 +1228,10 @@ bool pc_authok(struct map_session_data *sd, uint32 login_id2, time_t expiration_
|
||||
//display login notice
|
||||
ShowInfo("'"CL_WHITE"%s"CL_RESET"' logged in."
|
||||
" (AID/CID: '"CL_WHITE"%d/%d"CL_RESET"',"
|
||||
" Packet Ver: '"CL_WHITE"%d"CL_RESET"', IP: '"CL_WHITE"%d.%d.%d.%d"CL_RESET"',"
|
||||
" IP: '"CL_WHITE"%d.%d.%d.%d"CL_RESET"',"
|
||||
" Group '"CL_WHITE"%d"CL_RESET"').\n",
|
||||
sd->status.name, sd->status.account_id, sd->status.char_id,
|
||||
sd->packet_ver, CONVIP(ip), sd->group_id);
|
||||
CONVIP(ip), sd->group_id);
|
||||
// Send friends list
|
||||
clif_friendslist_send(sd);
|
||||
|
||||
|
@ -289,7 +289,6 @@ struct map_session_data {
|
||||
int count_rewarp; //count how many time we being rewarped
|
||||
|
||||
int langtype;
|
||||
uint32 packet_ver; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 ... 18
|
||||
struct mmo_charstatus status;
|
||||
|
||||
// Item Storages
|
||||
|
@ -21284,36 +21284,6 @@ BUILDIN_FUNC(party_destroy)
|
||||
return SCRIPT_CMD_SUCCESS;
|
||||
}
|
||||
|
||||
/** Checks if a player's client version meets a required version or date.
|
||||
* @param type: 0 - check by version number; 1 - check by date
|
||||
* @param data: Input
|
||||
*/
|
||||
BUILDIN_FUNC(is_clientver) {
|
||||
TBL_PC *sd = NULL;
|
||||
int type;
|
||||
int data;
|
||||
int ret = 0;
|
||||
|
||||
if ( !script_charid2sd(4,sd) ) {
|
||||
script_pushint(st,0);
|
||||
return SCRIPT_CMD_FAILURE;
|
||||
}
|
||||
|
||||
type = script_getnum(st,2);
|
||||
data = script_getnum(st,3);
|
||||
|
||||
switch(type){
|
||||
case 0:
|
||||
ret = (sd->packet_ver >= data)?1:0;
|
||||
break;
|
||||
case 1:
|
||||
ret = (sd->packet_ver >= date2version(data))?1:0;
|
||||
break;
|
||||
}
|
||||
script_pushint(st,ret);
|
||||
return SCRIPT_CMD_SUCCESS;
|
||||
}
|
||||
|
||||
/** Returns various information about a player's VIP status. Need to enable VIP system
|
||||
* vip_status <type>,{"<character name>"};
|
||||
* @param type: Info type, see enum vip_status_type
|
||||
@ -23758,7 +23728,6 @@ struct script_function buildin_func[] = {
|
||||
BUILDIN_DEF(clan_join,"i?"),
|
||||
BUILDIN_DEF(clan_leave,"?"),
|
||||
|
||||
BUILDIN_DEF(is_clientver,"ii?"),
|
||||
BUILDIN_DEF2(montransform, "transform", "vi?????"), // Monster Transform [malufett/Hercules]
|
||||
BUILDIN_DEF2(montransform, "active_transform", "vi?????"),
|
||||
BUILDIN_DEF(vip_status,"i?"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user