summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-01-08 12:05:13 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-01-08 12:05:13 +0000
commit421db4f7e06284e3563f1fe9e22a8f054ab83b52 (patch)
treeff97e3fe937b0bca56f2f6ff484887bbf689ad4c /src
parent88f8dc1fac5a5acfff9942a2626ac1174f31c289 (diff)
downloadhercules-421db4f7e06284e3563f1fe9e22a8f054ab83b52.tar.gz
hercules-421db4f7e06284e3563f1fe9e22a8f054ab83b52.tar.bz2
hercules-421db4f7e06284e3563f1fe9e22a8f054ab83b52.tar.xz
hercules-421db4f7e06284e3563f1fe9e22a8f054ab83b52.zip
* Fixed @homlevel usage message stating, that deleveling is possible, although it is not (bugreport:1485, since r10272).
- The command now fails, if it is given a zero or negative value. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14656 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/atcommand.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 0979a14f8..66a8fedb4 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -7115,19 +7115,18 @@ ACMD_FUNC(homlevel)
nullpo_retr(-1, sd);
- if (!message || !*message) {
- clif_displaymessage(fd, "Please, enter a level adjustment: (usage: @homlevel <+/- # of levels>.");
+ if ( !message || !*message || ( level = atoi(message) ) < 1 ) {
+ clif_displaymessage(fd, "Please, enter a level adjustment: (usage: @homlevel <# of levels to level up>.");
return -1;
}
-
+
if ( !merc_is_hom_active(sd->hd) ) {
clif_displaymessage(fd, "You do not have a homunculus.");
return -1;
}
- level = atoi(message);
hd = sd->hd;
-
+
for (i = 1; i <= level && hd->exp_next; i++){
hd->homunculus.exp += hd->exp_next;
merc_hom_levelup(hd);