summaryrefslogtreecommitdiff
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
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
-rw-r--r--Changelog-Trunk.txt4
-rw-r--r--src/map/atcommand.c9
2 files changed, 7 insertions, 6 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index e7cf3f88a..1f405142f 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -1,8 +1,10 @@
Date Added
+2011/01/08
+ * Fixed @homlevel usage message stating, that deleveling is possible, although it is not (bugreport:1485, since r10272). [Ai4rei]
+ - The command now fails, if it is given a zero or negative value.
2011/01/07
* Fixed @alootid using 'autolootitem' (internal name) in it's usage message (bugreport:1445, since r12203). [Ai4rei]
- - Reworded the turn off message of @alootid.
2011/01/06
* Fixed script command 'deletearray' deleting incorrect amount of array elements from arrays with empty elements (bugreport:4628). [Ai4rei]
2011/01/05
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);