summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorStreusel <advance_me@hotmail.de>2013-02-21 16:49:52 -0800
committerStreusel <advance_me@hotmail.de>2013-02-21 16:49:52 -0800
commit6165590a1a68653ad1fa3dd14306a2e64dc9c5c9 (patch)
tree01c1d41bfbca9964046fb05135bd17105da7f34c /src/map/atcommand.c
parent803169a68c6b3dcf9d0db07b479d4bad65894603 (diff)
parent84926b94e869a19f08a7a25df15b4c677316cd32 (diff)
downloadhercules-6165590a1a68653ad1fa3dd14306a2e64dc9c5c9.tar.gz
hercules-6165590a1a68653ad1fa3dd14306a2e64dc9c5c9.tar.bz2
hercules-6165590a1a68653ad1fa3dd14306a2e64dc9c5c9.tar.xz
hercules-6165590a1a68653ad1fa3dd14306a2e64dc9c5c9.zip
Merge branch 'master' of github.com:HerculesWS/Hercules
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 0d56ce9bf..dbf66b6aa 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -6884,7 +6884,7 @@ ACMD_FUNC(showmobs)
ACMD_FUNC(homlevel)
{
TBL_HOM * hd;
- int level = 0, i = 0;
+ int level = 0;
nullpo_retr(-1, sd);
@@ -6900,10 +6900,13 @@ ACMD_FUNC(homlevel)
hd = sd->hd;
- for (i = 1; i <= level && hd->exp_next; i++){
+ if ( battle_config.hom_max_level == hd->homunculus.level ) // Already reach maximum level
+ return 0;
+
+ do{
hd->homunculus.exp += hd->exp_next;
- merc_hom_levelup(hd);
- }
+ }while( hd->homunculus.level < level && merc_hom_levelup(hd) );
+
status_calc_homunculus(hd,0);
status_percent_heal(&hd->bl, 100, 100);
clif_specialeffect(&hd->bl,568,AREA);