summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-01-23 18:40:29 +0100
committerHaru <haru@dotalux.com>2015-06-01 10:11:39 +0200
commit42e1df9e61f8efb6340ed1c9238cd247d553d9b8 (patch)
tree2a465b7468b438b200f011fb7994023f4113c33b /src/map/atcommand.c
parent0a54d25ccfd891814cbdada8589b48c6b9da23fd (diff)
downloadhercules-42e1df9e61f8efb6340ed1c9238cd247d553d9b8.tar.gz
hercules-42e1df9e61f8efb6340ed1c9238cd247d553d9b8.tar.bz2
hercules-42e1df9e61f8efb6340ed1c9238cd247d553d9b8.tar.xz
hercules-42e1df9e61f8efb6340ed1c9238cd247d553d9b8.zip
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 <haru@dotalux.com>
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c10
1 files changed, 6 insertions, 4 deletions
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;