summaryrefslogtreecommitdiff
path: root/src/map/chrif.c
diff options
context:
space:
mode:
authormc_cameri <mc_cameri@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-06 18:25:09 +0000
committermc_cameri <mc_cameri@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-06 18:25:09 +0000
commit8d3ea0cd76e3cce2e8a95db9acacf2d344126d1e (patch)
tree8df34f69aceeaf77535d8bd1669e7caa328c9b67 /src/map/chrif.c
parent2bfb5e33a095ac718884f7319cc22ca366780abf (diff)
downloadhercules-8d3ea0cd76e3cce2e8a95db9acacf2d344126d1e.tar.gz
hercules-8d3ea0cd76e3cce2e8a95db9acacf2d344126d1e.tar.bz2
hercules-8d3ea0cd76e3cce2e8a95db9acacf2d344126d1e.tar.xz
hercules-8d3ea0cd76e3cce2e8a95db9acacf2d344126d1e.zip
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@27 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r--src/map/chrif.c19
1 files changed, 15 insertions, 4 deletions
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
@@ -415,6 +415,20 @@ int chrif_char_ask_name(int id, char * character_name, short operation_type, int
}
/*==========================================
+ * 性別変化要求
+ *------------------------------------------
+ */
+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.
* type of operation:
@@ -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;
}