Originally posted by [b]Globas[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=930
Hi,
Everyone who use @autotrade have problem with loging to his / her account. When you use @autotrade it works.. shop will stay there... but your not able to login again... when you want to stop selling
CODE
void clif_parse_WantToConnection(int fd, TBL_PC* sd)
{
int cmd, account_id, char_id, login_id1, sex;
unsigned int client_tick; //The client tick is a tick, therefore it needs be unsigned. [Skotlex]
int packet_ver; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
if (sd) {
ShowError("clif_parse_WantToConnection : invalid request (character already logged in)?\n");
return;
}
// Only valid packet version get here
packet_ver = clif_guess_PacketVer(fd, 1, NULL);
cmd = RFIFOW(fd,0);
account_id = RFIFOL(fd, packet_db[packet_ver][cmd].pos[0]);
char_id = RFIFOL(fd, packet_db[packet_ver][cmd].pos[1]);
login_id1 = RFIFOL(fd, packet_db[packet_ver][cmd].pos[2]);
client_tick = RFIFOL(fd, packet_db[packet_ver][cmd].pos[3]);
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 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));
WFIFOW(fd,0) = 0x6a;
WFIFOB(fd,2) = 5; // Your Game's EXE file is not the latest version
WFIFOSET(fd,packet_len(0x6a));
clif_setwaitclose(fd);
return;
} else if( map_knowsaccount(account_id) )
{// double login
ShowError("clif_parse_WantToConnection: double login attempt AID/CID: %d/%d, rejecting...\n", account_id, char_id);
WFIFOHEAD(fd,packet_len(0x6a));
WFIFOW(fd,0) = 0x6a;
WFIFOB(fd,2) = 3; // Rejected by server
WFIFOSET(fd,packet_len(0x6a));
clif_setwaitclose(fd);
return;
}
else
{// packet version accepted
struct block_list* bl;
if( (bl=map_id2bl(account_id)) != NULL && bl->type != BL_PC )
{// non-player object already has that id
ShowError("clif_parse_WantToConnection: a non-player object already has id %d, please increase the starting account number\n", account_id);
WFIFOHEAD(fd,packet_len(0x6a));
WFIFOW(fd,0) = 0x6a;
WFIFOB(fd,2) = 3; // Rejected by server
WFIFOSET(fd,packet_len(0x6a));
clif_setwaitclose(fd);
return;
}
}
CREATE(sd, TBL_PC, 1);
sd->fd = fd;
sd->packet_ver = packet_ver;
session[fd]->session_data = sd;
pc_setnewpc(sd, account_id, char_id, login_id1, client_tick, sex, fd);
#if PACKETVER < 8
WFIFOHEAD(fd,4);
WFIFOL(fd,0) = sd->bl.id;
WFIFOSET(fd,4);
#else
WFIFOHEAD(fd,packet_len(0x283));
WFIFOW(fd,0) = 0x283;
WFIFOL(fd,2) = sd->bl.id;
WFIFOSET(fd,packet_len(0x283));
#endif
chrif_authreq(sd);
I use packet version 7
CODE
#define PACKETVER 7
my exe is
QUOTE
2007-10-09a_Sakexe_v10
This post has been edited by Globas: Feb 4 2008, 05:27 PM