From 8d3ea0cd76e3cce2e8a95db9acacf2d344126d1e Mon Sep 17 00:00:00 2001 From: mc_cameri Date: Sat, 6 Nov 2004 18:25:09 +0000 Subject: git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@27 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/chrif.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'src/map/chrif.c') diff --git a/src/map/chrif.c b/src/map/chrif.c index 0423d792b..66f496d71 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -414,6 +414,20 @@ int chrif_char_ask_name(int id, char * character_name, short operation_type, int return 0; } +/*========================================== + * 性別変化要求 + *------------------------------------------ + */ +int chrif_changesex(int id, int sex) { + WFIFOW(char_fd,0) = 0x2b0c; + WFIFOW(char_fd,2) = 9; + WFIFOL(char_fd,4) = id; + WFIFOB(char_fd,8) = sex; + printf("chrif : sended 0x2b0c\n"); + WFIFOSET(char_fd,9); + return 0; +} + /*========================================== * Answer after a request about a character name to do some operations (by Yor) * Used to answer of chrif_char_ask_name. @@ -885,9 +899,7 @@ int chrif_parse(int fd) // only char-server can have an access to here. // so, if it isn't the char-server, we disconnect the session (fd != char_fd). - if(fd != char_fd) - session[fd]->eof = 1; - if(session[fd]->eof) { + if (fd != char_fd || session[fd]->eof) { if (fd == char_fd) { printf("Map-server can't connect to char-server (connection #%d).\n", fd); char_fd = -1; @@ -907,7 +919,6 @@ int chrif_parse(int fd) if (r == 1) continue; // intifで処理した if (r == 2) return 0; // intifで処理したが、データが足りない - close(fd); // intifで処理できなかった session[fd]->eof = 1; return 0; } -- cgit v1.2.3-70-g09d2