The max_account_id packetver detection mechanism will never cause any connection problems ever again. (bugreport:388)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12563 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
ultramage
2008-04-11 09:31:32 +00:00
parent f45a8f2c82
commit 00a5bccbd3
10 changed files with 5 additions and 84 deletions

View File

@@ -147,9 +147,6 @@ int online_display_option = 1; // display options: to know which columns must be
int online_refresh_html = 20; // refresh time (in sec) of the html file in the explorer
int online_gm_display_min_level = 20; // minimum GM level to display 'GM' when we want to display it
//These are used to aid the map server in identifying valid clients. [Skotlex]
static int max_account_id = DEFAULT_MAX_ACCOUNT_ID, max_char_id = DEFAULT_MAX_CHAR_ID;
int console = 0;
//-----------------------------------------------------
@@ -200,17 +197,6 @@ void set_char_online(int map_id, int char_id, int account_id)
{
struct online_char_data* character;
if ( char_id != 99 ) {
if (max_account_id < account_id || max_char_id < char_id)
{ //Notify map-server of the new max IDs [Skotlex]
if (account_id > max_account_id)
max_account_id = account_id;
if (char_id > max_char_id)
max_char_id = char_id;
mapif_send_maxid(max_account_id, max_char_id);
}
}
character = (struct online_char_data*)idb_ensure(online_char_db, account_id, create_online_char_data);
if (online_check && character->char_id != -1 && character->server > -1 && character->server != map_id && map_id != -3)
{
@@ -2668,9 +2654,6 @@ int parse_frommap(int fd)
char_log("Map-Server %d connected: %d maps, from IP %d.%d.%d.%d port %d. Map-server %d loading complete.\n",
id, j, CONVIP(server[id].ip), server[id].port, id);
if (max_account_id != DEFAULT_MAX_ACCOUNT_ID || max_char_id != DEFAULT_MAX_CHAR_ID)
mapif_send_maxid(max_account_id, max_char_id); //Send the current max ids to the server to keep in sync [Skotlex]
// send name for wisp to player
WFIFOHEAD(fd, 3 + NAME_LENGTH);
WFIFOW(fd,0) = 0x2afb;
@@ -3436,8 +3419,6 @@ int parse_char(int fd)
node->expiration_time = sd->expiration_time;
node->ip = ipl;
idb_put(auth_db, sd->account_id, node);
set_char_online(i, cd->char_id, cd->account_id);
}
break;

View File

@@ -294,17 +294,6 @@ int inter_mapif_init(int fd) {
//--------------------------------------------------------
// sended packets to map-server
//Sends the current max account/char id to map server [Skotlex]
void mapif_send_maxid(int account_id, int char_id)
{
unsigned char buf[12];
WBUFW(buf,0) = 0x2b07;
WBUFL(buf,2) = account_id;
WBUFL(buf,6) = char_id;
mapif_sendall(buf, 10);
}
// GMメッセージ送信
int mapif_GMmessage(unsigned char *mes, int len, unsigned long color, int sfd) {
unsigned char buf[2048];

View File

@@ -11,7 +11,6 @@ void inter_final(void);
int inter_save(void);
int inter_parse_frommap(int fd);
int inter_mapif_init(int fd);
void mapif_send_maxid(int, int);
int mapif_disconnectplayer(int fd, int account_id, int char_id, int reason);
int inter_check_length(int fd,int length);