summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-13 18:58:14 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-13 18:58:14 +0000
commit44ade8dfd6c775c9c2c0e47f049e2b99807ed3c1 (patch)
tree8e45d475ad540ecfa2fc4591213c477e9bacbf68 /src/map/atcommand.c
parent7751fc21990d18f215dff82669a470b7c3660b11 (diff)
downloadhercules-44ade8dfd6c775c9c2c0e47f049e2b99807ed3c1.tar.gz
hercules-44ade8dfd6c775c9c2c0e47f049e2b99807ed3c1.tar.bz2
hercules-44ade8dfd6c775c9c2c0e47f049e2b99807ed3c1.tar.xz
hercules-44ade8dfd6c775c9c2c0e47f049e2b99807ed3c1.zip
- Made Land Protector Block Hammerfall.
- More signed/unsigned comparison fixes. - Added dummy_item variable to itemdb. It will be used on all itemdb_searches that do not yield a valid item from the db. - Added itemdb_load, which is the one used for item_db loading (if the item does not exists, it'll be created) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5270 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 4527ae42e..911cada4a 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -2680,7 +2680,7 @@ int atcommand_baselevelup(
clif_displaymessage(fd, msg_table[47]); /* Base level can't go any higher. */
return -1;
} /* End Addition */
- if (level > pc_maxbaselv(sd) || level > pc_maxbaselv(sd) - sd->status.base_level) // fix positiv overflow
+ if ((unsigned int)level > pc_maxbaselv(sd) || (unsigned int)level > pc_maxbaselv(sd) - sd->status.base_level) // fix positiv overflow
level = pc_maxbaselv(sd) - sd->status.base_level;
for (i = 1; i <= level; i++)
sd->status.status_point += (sd->status.base_level + i + 14) / 5;
@@ -2698,7 +2698,7 @@ int atcommand_baselevelup(
return -1;
}
level*=-1;
- if (level >= sd->status.base_level)
+ if ((unsigned int)level >= sd->status.base_level)
level = sd->status.base_level-1;
if (sd->status.status_point > 0) {
for (i = 0; i > -level; i--)
@@ -2739,7 +2739,7 @@ int atcommand_joblevelup(
clif_displaymessage(fd, msg_table[23]); // Job level can't go any higher.
return -1;
}
- if (level > pc_maxjoblv(sd) || level > pc_maxjoblv(sd) - sd->status.job_level) // fix positiv overflow
+ if ((unsigned int)level > pc_maxjoblv(sd) || (unsigned int)level > pc_maxjoblv(sd) - sd->status.job_level) // fix positiv overflow
level = pc_maxjoblv(sd) - sd->status.job_level;
sd->status.job_level += level;
clif_updatestatus(sd, SP_JOBLEVEL);
@@ -2755,7 +2755,7 @@ int atcommand_joblevelup(
return -1;
}
level *=-1;
- if (level >= sd->status.job_level) // fix negativ overflow
+ if ((unsigned int)level >= sd->status.job_level) // fix negativ overflow
level = sd->status.job_level-1;
sd->status.job_level -= level;
clif_updatestatus(sd, SP_JOBLEVEL);