diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/char/char.c | 2 | ||||
-rw-r--r-- | src/char_sql/char.c | 2 | ||||
-rw-r--r-- | src/map/chrif.c | 6 | ||||
-rw-r--r-- | src/map/script.c | 12 |
4 files changed, 8 insertions, 14 deletions
diff --git a/src/char/char.c b/src/char/char.c index 76312ac0d..5d3975816 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -3000,7 +3000,7 @@ int parse_frommap(int fd) } // send answer if a player ask, not if the server ask - if( acc != -1 ) { + if( acc != -1 && type != 5) { // Don't send answer for changesex WFIFOHEAD(fd,34); WFIFOW(fd, 0) = 0x2b0f; WFIFOL(fd, 2) = acc; diff --git a/src/char_sql/char.c b/src/char_sql/char.c index e07bd8574..8066dc629 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -2599,7 +2599,7 @@ int parse_frommap(int fd) Sql_FreeResult(sql_handle); // send answer if a player ask, not if the server ask - if( acc != -1 ) { + if( acc != -1 && type != 5) { // Don't send answer for changesex WFIFOHEAD(fd,34); WFIFOW(fd, 0) = 0x2b0f; WFIFOL(fd, 2) = acc; diff --git a/src/map/chrif.c b/src/map/chrif.c index a2604dcf3..7ca140159 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -786,7 +786,11 @@ int chrif_changesex(struct map_session_data *sd) WFIFOSET(char_fd,44); clif_displaymessage(sd->fd, "Need disconnection to perform change-sex request..."); - map_quit(sd); + + if (sd->fd) + clif_authfail_fd(sd->fd, 15); + else + map_quit(sd); return 0; } diff --git a/src/map/script.c b/src/map/script.c index 44cf4e37b..364dbc8b9 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -8506,17 +8506,7 @@ BUILDIN_FUNC(changesex) TBL_PC *sd = NULL; sd = script_rid2sd(st); - if (sd->status.sex == 0) { - sd->status.sex = 1; - if ((sd->class_&MAPID_UPPERMASK) == MAPID_BARDDANCER) - sd->status.class_ -= 1; - } else if (sd->status.sex == 1) { - sd->status.sex = 0; - if ((sd->class_&MAPID_UPPERMASK) == MAPID_BARDDANCER) - sd->status.class_ += 1; - } - chrif_char_ask_name(-1, sd->status.name, 5, 0, 0, 0, 0, 0, 0); // type: 5 - changesex - chrif_save(sd,0); + chrif_changesex(sd); return 0; } |