summaryrefslogtreecommitdiff
path: root/src/map/charcommand.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-12-07 08:44:52 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-12-07 08:44:52 +0000
commitabd0c3a98bbbe6bcd0425351207120a00babe329 (patch)
treec932d76f0d07c3b9e0fa4c54dea05a2be296b47a /src/map/charcommand.c
parent182cedd95fe67ac29cbc08123cc999cf8cf9bfaf (diff)
downloadhercules-abd0c3a98bbbe6bcd0425351207120a00babe329.tar.gz
hercules-abd0c3a98bbbe6bcd0425351207120a00babe329.tar.bz2
hercules-abd0c3a98bbbe6bcd0425351207120a00babe329.tar.xz
hercules-abd0c3a98bbbe6bcd0425351207120a00babe329.zip
- removed the timer heap correction code when the timers overflow since Flavio points out that it is not needed.
- Modified a bit the changesex code so you get saved and quit before changing your sex rather than afterwards. - Cleaned up #changesex - Signum Crucis now works on bosses. - party_recv_data will not set the sd pointer for not-yet-authed characters. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11867 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/charcommand.c')
-rw-r--r--src/map/charcommand.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/map/charcommand.c b/src/map/charcommand.c
index e44954a4c..5f6fb839e 100644
--- a/src/map/charcommand.c
+++ b/src/map/charcommand.c
@@ -1411,6 +1411,7 @@ int charcommand_stpoint(const int fd, struct map_session_data* sd, const char* c
*------------------------------------------*/
int charcommand_changesex(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
+ struct map_session_data *pl_sd;
char player[NAME_LENGTH];
nullpo_retr(-1, sd);
@@ -1419,18 +1420,17 @@ int charcommand_changesex(const int fd, struct map_session_data* sd, const char*
return -1;
}
- // check player name
- if (strlen(player) < 4) {
- clif_displaymessage(fd, msg_table[86]); // Sorry, but a player name have at least 4 characters.
+ if ((pl_sd = map_nick2sd(player)) == NULL)
+ {
+ clif_displaymessage(fd, msg_txt(3)); // Character not found.
return -1;
- } else if (strlen(player) > 23) {
- clif_displaymessage(fd, msg_table[87]); // Sorry, but a player name have 23 characters maximum.
+ }
+ if (pc_isGM(sd) < pc_isGM(pl_sd)) {
+ clif_displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
return -1;
- } else {
- chrif_char_ask_name(sd->status.account_id, player, 5, 0, 0, 0, 0, 0, 0); // type: 5 - changesex
- clif_displaymessage(fd, msg_table[88]); // Character name sent to char-server to ask it.
}
-
+ clif_displaymessage(fd, msg_table[88]); // Character name sent to char-server to ask it.
+ chrif_changesex(pl_sd);
return 0;
}