From 42e1df9e61f8efb6340ed1c9238cd247d553d9b8 Mon Sep 17 00:00:00 2001 From: Haru Date: Thu, 23 Jan 2014 18:40:29 +0100 Subject: Replaced some of the hardcoded values with constants (char) - Replaced several hardcoded values with the appropriate enums. - Added documentation for some hardcoded values that haven't been replaced by enums (yet) - Minor code legibility improvements. Signed-off-by: Haru --- src/map/atcommand.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index a1666b44e..93321e047 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2730,7 +2730,7 @@ ACMD(char_block) return false; } - chrif->char_ask_name(sd->status.account_id, atcmd_player_name, 1, 0, 0, 0, 0, 0, 0); // type: 1 - block + chrif->char_ask_name(sd->status.account_id, atcmd_player_name, CHAR_ASK_NAME_BLOCK, 0, 0, 0, 0, 0, 0); clif->message(fd, msg_fd(fd,88)); // Character name sent to char-server to ask it. return true; @@ -2826,7 +2826,8 @@ ACMD(char_ban) return false; } - chrif->char_ask_name(sd->status.account_id, atcmd_player_name, !strcmpi(info->command,"charban") ? 6 : 2, year, month, day, hour, minute, second); // type: 2 - ban; 6 - charban + chrif->char_ask_name(sd->status.account_id, atcmd_player_name, + !strcmpi(info->command,"charban") ? CHAR_ASK_NAME_BAN : CHAR_ASK_NAME_BAN, year, month, day, hour, minute, second); clif->message(fd, msg_fd(fd,88)); // Character name sent to char-server to ask it. return true; @@ -2845,7 +2846,7 @@ ACMD(char_unblock) } // send answer to login server via char-server - chrif->char_ask_name(sd->status.account_id, atcmd_player_name, 3, 0, 0, 0, 0, 0, 0); // type: 3 - unblock + chrif->char_ask_name(sd->status.account_id, atcmd_player_name, CHAR_ASK_NAME_UNBLOCK, 0, 0, 0, 0, 0, 0); clif->message(fd, msg_fd(fd,88)); // Character name sent to char-server to ask it. return true; @@ -2864,7 +2865,8 @@ ACMD(char_unban) } // send answer to login server via char-server - chrif->char_ask_name(sd->status.account_id, atcmd_player_name, !strcmpi(info->command,"charunban") ? 7 : 4, 0, 0, 0, 0, 0, 0); // type: 4 - unban account; type 7 - unban character + chrif->char_ask_name(sd->status.account_id, atcmd_player_name, + !strcmpi(info->command,"charunban") ? CHAR_ASK_NAME_CHARUNBAN : CHAR_ASK_NAME_UNBAN, 0, 0, 0, 0, 0, 0); clif->message(fd, msg_fd(fd,88)); // Character name sent to char-server to ask it. return true; -- cgit v1.2.3-70-g09d2