Cleaned up atcommand accinfo leftovers (#2926)
* Follow up to 2746e0d * Cleaned up some variable assignments when parsing the packet. * Updated packet documentation. * Freed message 220. Thanks to @RadianFord and @Lemongrass3110!
This commit is contained in:
parent
5e354494b2
commit
d4c1a57fb5
@ -150,7 +150,7 @@
|
||||
217: -- Account %d --
|
||||
218: User: %s | GM Group: %d | State: %d
|
||||
//219: FREE
|
||||
220: ****
|
||||
//220: FREE
|
||||
221: Account e-mail: %s | Birthdate: %s
|
||||
222: Last IP: %s (%s)
|
||||
223: This user has logged in %d times, the last time was at %s
|
||||
|
@ -130,24 +130,23 @@ Currently the max packet size is 0xFFFF (see 'WFIFOSET()' in 'src/common/socket.
|
||||
|
||||
0x2720:
|
||||
Type: HA
|
||||
Structure: <cmd>.W <map_fd>.L <u_fd>.L <u_aid>.L <u_group>.L <account_id>.L
|
||||
index: 0,2,6,10,14,18
|
||||
len: 22
|
||||
Structure: <cmd>.W <map_fd>.L <u_fd>.L <u_aid>.L <account_id>.L
|
||||
index: 0,2,6,10,14
|
||||
len: 18
|
||||
parameter:
|
||||
- cmd : packet identification (0x2720)
|
||||
- map_fd :
|
||||
- u_fd :
|
||||
- u_aid :
|
||||
- u_group :
|
||||
- account_id :
|
||||
desc:
|
||||
-
|
||||
|
||||
0x2721:
|
||||
Type: AH
|
||||
Structure: <cmd>.W <map_fd>.L <u_fd>.L <u_aid>.L <account_id>.L <status>.B <password>.33B <email>.40B <last_ip>.16B <last_login>.24B <group_id>.L <logincount>.L <state>.L <password>.33B <birthdate>.11B <pincode>.?B <userid>.?B
|
||||
index: 0,2,6,10,18,19,52,92,108,132,136,140,144,155,155+PINCODE_LENGTH
|
||||
len: 155 + PINCODE_LENGTH + NAME_LENGTH
|
||||
Structure: <cmd>.W <map_fd>.L <u_fd>.L <u_aid>.L <account_id>.L <status>.B <password>.33B <email>.40B <last_ip>.16B <last_login>.24B <group_id>.L <logincount>.L <state>.L <birthdate>.11B <userid>.?B
|
||||
index: 0,2,6,10,18,19,52,92,108,132,136,140,144,122+NAME_LENGTH
|
||||
len: 122 + NAME_LENGTH
|
||||
parameter:
|
||||
- cmd : packet identification (0x2721)
|
||||
- map_fd
|
||||
@ -162,9 +161,7 @@ Currently the max packet size is 0xFFFF (see 'WFIFOSET()' in 'src/common/socket.
|
||||
- group_id
|
||||
- logincount
|
||||
- state
|
||||
- password
|
||||
- birthdate
|
||||
- pincode
|
||||
- userid
|
||||
desc:
|
||||
-
|
||||
|
@ -662,18 +662,17 @@ int chlogif_reqvipdata(uint32 aid, uint8 flag, int32 timediff, int mapfd) {
|
||||
* HA 0x2720
|
||||
* Request account info to login-server
|
||||
*/
|
||||
int chlogif_req_accinfo(int fd, int u_fd, int u_aid, int u_group, int account_id, int8 type) {
|
||||
int chlogif_req_accinfo(int fd, int u_fd, int u_aid, int account_id, int8 type) {
|
||||
loginif_check(-1);
|
||||
//ShowInfo("%d request account info for %d (type %d)\n", u_aid, account_id, type);
|
||||
WFIFOHEAD(login_fd,23);
|
||||
WFIFOHEAD(login_fd,19);
|
||||
WFIFOW(login_fd,0) = 0x2720;
|
||||
WFIFOL(login_fd,2) = fd;
|
||||
WFIFOL(login_fd,6) = u_fd;
|
||||
WFIFOL(login_fd,10) = u_aid;
|
||||
WFIFOL(login_fd,14) = u_group;
|
||||
WFIFOL(login_fd,18) = account_id;
|
||||
WFIFOB(login_fd,22) = type;
|
||||
WFIFOSET(login_fd,23);
|
||||
WFIFOL(login_fd,14) = account_id;
|
||||
WFIFOB(login_fd,18) = type;
|
||||
WFIFOSET(login_fd,19);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ int chlogif_parse_updip(int fd, struct char_session_data* sd);
|
||||
|
||||
int chlogif_parse_vipack(int fd);
|
||||
int chlogif_reqvipdata(uint32 aid, uint8 flag, int32 timediff, int mapfd);
|
||||
int chlogif_req_accinfo(int fd, int u_fd, int u_aid, int u_group, int account_id, int8 type);
|
||||
int chlogif_req_accinfo(int fd, int u_fd, int u_aid, int account_id, int8 type);
|
||||
|
||||
int chlogif_parse(int fd);
|
||||
|
||||
|
@ -478,7 +478,7 @@ void mapif_parse_accinfo(int fd) {
|
||||
}
|
||||
|
||||
/* it will only get here if we have a single match then ask login-server to fetch the `login` record */
|
||||
if (!account_id || chlogif_req_accinfo(fd, u_fd, u_aid, u_group, account_id, type) != 1) {
|
||||
if (!account_id || chlogif_req_accinfo(fd, u_fd, u_aid, account_id, type) != 1) {
|
||||
inter_to_fd(fd, u_fd, u_aid, (char *)msg_txt(213));
|
||||
}
|
||||
return;
|
||||
|
@ -717,11 +717,11 @@ int logchrif_parse_accinfo(int fd) {
|
||||
if( RFIFOREST(fd) < 23 )
|
||||
return 0;
|
||||
else {
|
||||
int map_fd = RFIFOL(fd, 2), u_fd = RFIFOL(fd, 6), u_aid = RFIFOL(fd, 10), u_group = RFIFOL(fd, 14), account_id = RFIFOL(fd, 18);
|
||||
int8 type = RFIFOB(fd, 22);
|
||||
int map_fd = RFIFOL(fd, 2), u_fd = RFIFOL(fd, 6), u_aid = RFIFOL(fd, 10), account_id = RFIFOL(fd, 14);
|
||||
int8 type = RFIFOB(fd, 18);
|
||||
AccountDB* accounts = login_get_accounts_db();
|
||||
struct mmo_account acc;
|
||||
RFIFOSKIP(fd,23);
|
||||
RFIFOSKIP(fd,19);
|
||||
|
||||
// Send back the result to char-server
|
||||
if (accounts->load_num(accounts, &acc, account_id)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user