diff options
author | mc_cameri <mc_cameri@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-13 12:35:57 +0000 |
---|---|---|
committer | mc_cameri <mc_cameri@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-13 12:35:57 +0000 |
commit | c905e2e19a9f913a4ea51b8a32dc97735a01b091 (patch) | |
tree | ee268e1dc482f4ae0a9ebd2cf5142a4873798bc4 /src/login | |
parent | 053eaa2d289853af24a28bc82e08ffcb74cbaf24 (diff) | |
download | hercules-c905e2e19a9f913a4ea51b8a32dc97735a01b091.tar.gz hercules-c905e2e19a9f913a4ea51b8a32dc97735a01b091.tar.bz2 hercules-c905e2e19a9f913a4ea51b8a32dc97735a01b091.tar.xz hercules-c905e2e19a9f913a4ea51b8a32dc97735a01b091.zip |
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@157 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/login.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/login/login.c b/src/login/login.c index 5ec6ac201..e51024d9b 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -1677,6 +1677,36 @@ int parse_fromchar(int fd) { RFIFOSKIP(fd,6);
}
return 0;
+ case 0x3000: //change sex for chrif_changesex()
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ {
+ int acc, sex, i = 0;
+ acc = RFIFOL(fd,4);
+ sex = RFIFOB(fd,8);
+ if (sex != 0 && sex != 1)
+ sex = 0;
+ for(i = 0; i < auth_num; i++) {
+ if (auth_dat[i].account_id == acc) {
+ unsigned char buf[16];
+ login_log("Char-server '%s': Sex change (account: %d, new sex %c, ip: %s)." RETCODE,
+ server[id].name, acc, (sex == 2) ? 'S' : (sex ? 'M' : 'F'), ip);
+ auth_fifo[i].login_id1++; // to avoid reconnection error when come back from map-server (char-server will ask again the authentification)
+ auth_dat[i].sex = sex;
+ WBUFW(buf,0) = 0x2723;
+ WBUFL(buf,2) = acc;
+ WBUFB(buf,6) = sex;
+ charif_sendallwos(-1, buf, 7);
+ break;
+ }
+ }
+ if (i == auth_num) {
+ login_log("Char-server '%s': Error of Sex change (account: %d not found, suggested sex %c, ip: %s)." RETCODE,
+ server[id].name, acc, (sex == 2) ? 'S' : (sex ? 'M' : 'F'), ip);
+ }
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ }
+ return 0;
default:
{
|