summaryrefslogtreecommitdiff
path: root/src/map/homunculus.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/homunculus.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/homunculus.c')
-rw-r--r--src/map/homunculus.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index 9a0a1c898..4dc30934d 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -503,11 +503,7 @@ int merc_hom_gainexp(struct homun_data *hd,int exp)
}
//levelup
- do
- {
- merc_hom_levelup(hd) ;
- }
- while(hd->homunculus.exp > hd->exp_next && hd->exp_next != 0 );
+ while( hd->homunculus.exp > hd->exp_next && merc_hom_levelup(hd) );
if( hd->exp_next == 0 )
hd->homunculus.exp = 0 ;
@@ -983,7 +979,7 @@ void merc_reset_stats(struct homun_data *hd)
int merc_hom_shuffle(struct homun_data *hd)
{
struct map_session_data *sd;
- int lv, i, skillpts;
+ int lv, skillpts;
unsigned int exp;
struct s_skill b_skill[MAX_HOMUNSKILL];
@@ -998,10 +994,9 @@ int merc_hom_shuffle(struct homun_data *hd)
//Reset values to level 1.
merc_reset_stats(hd);
//Level it back up
- for (i = 1; i < lv && hd->exp_next; i++){
+ do{
hd->homunculus.exp += hd->exp_next;
- merc_hom_levelup(hd);
- }
+ }while( hd->homunculus.level < lv && merc_hom_levelup(hd) );
if(hd->homunculus.class_ == hd->homunculusDB->evo_class) {
//Evolved bonuses