Fixed ancient multi-map-server bug where gmlevel was lost during changing map-servers.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15444 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
6ccc6c6c83
commit
be12deb852
@ -2726,7 +2726,7 @@ int parse_frommap(int fd)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x2b05: // request "change map server"
|
case 0x2b05: // request "change map server"
|
||||||
if (RFIFOREST(fd) < 35)
|
if (RFIFOREST(fd) < 39)
|
||||||
return 0;
|
return 0;
|
||||||
{
|
{
|
||||||
int map_id, map_fd = -1;
|
int map_id, map_fd = -1;
|
||||||
@ -2764,8 +2764,9 @@ int parse_frommap(int fd)
|
|||||||
node->login_id1 = RFIFOL(fd,6);
|
node->login_id1 = RFIFOL(fd,6);
|
||||||
node->login_id2 = RFIFOL(fd,10);
|
node->login_id2 = RFIFOL(fd,10);
|
||||||
node->sex = RFIFOB(fd,30);
|
node->sex = RFIFOB(fd,30);
|
||||||
node->expiration_time = 0; // FIXME
|
node->expiration_time = 0; // FIXME (this thing isn't really supported we could as well purge it instead of fixing)
|
||||||
node->ip = ntohl(RFIFOL(fd,31));
|
node->ip = ntohl(RFIFOL(fd,31));
|
||||||
|
node->gmlevel = RFIFOL(fd,35);
|
||||||
idb_put(auth_db, RFIFOL(fd,2), node);
|
idb_put(auth_db, RFIFOL(fd,2), node);
|
||||||
|
|
||||||
data = (struct online_char_data*)idb_ensure(online_char_db, RFIFOL(fd,2), create_online_char_data);
|
data = (struct online_char_data*)idb_ensure(online_char_db, RFIFOL(fd,2), create_online_char_data);
|
||||||
|
@ -38,7 +38,7 @@ static DBMap* auth_db; // int id -> struct auth_node*
|
|||||||
|
|
||||||
static const int packet_len_table[0x3d] = { // U - used, F - free
|
static const int packet_len_table[0x3d] = { // U - used, F - free
|
||||||
60, 3,-1,27,10,-1, 6,-1, // 2af8-2aff: U->2af8, U->2af9, U->2afa, U->2afb, U->2afc, U->2afd, U->2afe, U->2aff
|
60, 3,-1,27,10,-1, 6,-1, // 2af8-2aff: U->2af8, U->2af9, U->2afa, U->2afb, U->2afc, U->2afd, U->2afe, U->2aff
|
||||||
6,-1,18, 7,-1,35,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, 0, 0,86, 7,44,34, // 2b08-2b0f: U->2b08, U->2b09, F->2b0a, F->2b0b, U->2b0c, U->2b0d, U->2b0e, U->2b0f
|
6,30, 0, 0,86, 7,44,34, // 2b08-2b0f: U->2b08, U->2b09, F->2b0a, F->2b0b, U->2b0c, U->2b0d, U->2b0e, U->2b0f
|
||||||
11,10,10, 0,11, 0,266,10, // 2b10-2b17: U->2b10, U->2b11, U->2b12, F->2b13, U->2b14, F->2b15, U->2b16, U->2b17
|
11,10,10, 0,11, 0,266,10, // 2b10-2b17: U->2b10, U->2b11, U->2b12, F->2b13, U->2b14, F->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
|
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
|
||||||
@ -417,7 +417,8 @@ int chrif_changemapserver(struct map_session_data* sd, uint32 ip, uint16 port)
|
|||||||
WFIFOW(char_fd,28) = htons(port);
|
WFIFOW(char_fd,28) = htons(port);
|
||||||
WFIFOB(char_fd,30) = sd->status.sex;
|
WFIFOB(char_fd,30) = sd->status.sex;
|
||||||
WFIFOL(char_fd,31) = htonl(session[sd->fd]->client_addr);
|
WFIFOL(char_fd,31) = htonl(session[sd->fd]->client_addr);
|
||||||
WFIFOSET(char_fd,35);
|
WFIFOL(char_fd,35) = sd->gmlevel;
|
||||||
|
WFIFOSET(char_fd,39);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user