summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 715fa84ab..347f92d3e 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -9523,16 +9523,12 @@ int atcommand_homlevel(
return 1 ;
level = atoi(message);
- if ( ( level + sd->homunculus.level ) > MAX_LEVEL )
- level = MAX_LEVEL - sd->homunculus.level ;
- if (level >= 1) {
- for (i = 1; i <= level ; i++){
- sd->homunculus.exp += sd->hd->exp_next;
- merc_hom_levelup(sd->hd) ;
- }
- clif_misceffect2(&sd->hd->bl,568) ;
- }
+ for (i = 1; i <= level && sd->hd->exp_next; i++){
+ sd->homunculus.exp += sd->hd->exp_next;
+ merc_hom_levelup(sd->hd);
+ }
+ clif_misceffect2(&sd->hd->bl,568);
return 0;
}