summaryrefslogtreecommitdiff
path: root/src/map/charcommand.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-18 08:04:53 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-18 08:04:53 +0000
commite8d7a95f9416c67242db5e06fd1743c8f28b3b08 (patch)
treea31a379d1f2e3af7eede623407b4cc0a25b43383 /src/map/charcommand.c
parent5f6a6a2557a90573a504b541a3234f0dc566bf6a (diff)
downloadhercules-e8d7a95f9416c67242db5e06fd1743c8f28b3b08.tar.gz
hercules-e8d7a95f9416c67242db5e06fd1743c8f28b3b08.tar.bz2
hercules-e8d7a95f9416c67242db5e06fd1743c8f28b3b08.tar.xz
hercules-e8d7a95f9416c67242db5e06fd1743c8f28b3b08.zip
Some code cleaning...
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11505 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/charcommand.c')
-rw-r--r--src/map/charcommand.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/charcommand.c b/src/map/charcommand.c
index 88c32b307..dc16f399b 100644
--- a/src/map/charcommand.c
+++ b/src/map/charcommand.c
@@ -2578,11 +2578,11 @@ int charcommand_param(const int fd, struct map_session_data* sd, const char* com
status[5] = &pl_sd->status.luk;
index = -1;
- for (index = 0; index < sizeof(param)/sizeof(param[0]); index++) {
+ for (index = 0; index < ARRAYLENGTH(param); index++) {
if (strcmpi(command, param[index]) == 0)
break;
}
- if (index == sizeof(param)/sizeof(param[0]) || index > MAX_STATUS_TYPE) {
+ if (index == ARRAYLENGTH(param) || index > MAX_STATUS_TYPE) {
// normaly impossible...
sprintf(output, "Please, enter a valid value (usage: #str,#agi,#vit,#int,#dex,#luk <+/-adjustment> <player>).");
clif_displaymessage(fd, output);
@@ -2964,7 +2964,7 @@ int charcommand_allstats(const int fd, struct map_session_data* sd, const char*
count = 0;
max = pc_maxparameter(pl_sd);
- for (index = 0; index < (int)(sizeof(status) / sizeof(status[0])); index++) {
+ for (index = 0; index < ARRAYLENGTH(status); index++) {
if (value > 0 && *status[index] > max - value)
new_value = max;