diff options
author | shennetsind <ind@henn.et> | 2013-05-07 22:15:05 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-05-07 22:15:05 -0300 |
commit | 43d82332dbfde84bf0348ef6c2921aaaef24634e (patch) | |
tree | bb8899e4a4bb598ba9df62b0ba2f37323ab5b33e /src/map/status.c | |
parent | 36383ebd1423d2c8f6e0495046de27708160109c (diff) | |
download | hercules-43d82332dbfde84bf0348ef6c2921aaaef24634e.tar.gz hercules-43d82332dbfde84bf0348ef6c2921aaaef24634e.tar.bz2 hercules-43d82332dbfde84bf0348ef6c2921aaaef24634e.tar.xz hercules-43d82332dbfde84bf0348ef6c2921aaaef24634e.zip |
Fixed Bug #7223
http://hercules.ws/board/tracker/issue-7223-homunculus-s-max-level-overshooting/
src/map/homunculus.c Hercules Renewal Phase One complete.
http://hercules.ws/board/topic/237-hercules-renewal/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/src/map/status.c b/src/map/status.c index aab2d3b18..f13c1ce3a 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1201,7 +1201,7 @@ int status_damage(struct block_list *src,struct block_list *target,int hp, int s switch (target->type) { case BL_PC: pc_damage((TBL_PC*)target,src,hp,sp); break; case BL_MOB: mob_damage((TBL_MOB*)target, src, hp); break; - case BL_HOM: merc_damage((TBL_HOM*)target); break; + case BL_HOM: homun->damaged((TBL_HOM*)target); break; case BL_MER: mercenary_heal((TBL_MER*)target,hp,sp); break; case BL_ELEM: elemental_heal((TBL_ELEM*)target,hp,sp); break; } @@ -1226,7 +1226,7 @@ int status_damage(struct block_list *src,struct block_list *target,int hp, int s switch (target->type) { case BL_PC: flag = pc_dead((TBL_PC*)target,src); break; case BL_MOB: flag = mob_dead((TBL_MOB*)target, src, flag&4?3:0); break; - case BL_HOM: flag = merc_hom_dead((TBL_HOM*)target); break; + case BL_HOM: flag = homun->dead((TBL_HOM*)target); break; case BL_MER: flag = mercenary_dead((TBL_MER*)target); break; case BL_ELEM: flag = elemental_dead((TBL_ELEM*)target); break; default: //Unhandled case, do nothing to object. @@ -1370,11 +1370,11 @@ int status_heal(struct block_list *bl,int hp,int sp, int flag) // send hp update to client switch(bl->type) { - case BL_PC: pc_heal((TBL_PC*)bl,hp,sp,flag&2?1:0); break; - case BL_MOB: mob_heal((TBL_MOB*)bl,hp); break; - case BL_HOM: merc_hom_heal((TBL_HOM*)bl); break; - case BL_MER: mercenary_heal((TBL_MER*)bl,hp,sp); break; - case BL_ELEM: elemental_heal((TBL_ELEM*)bl,hp,sp); break; + case BL_PC: pc_heal((TBL_PC*)bl,hp,sp,flag&2?1:0); break; + case BL_MOB: mob_heal((TBL_MOB*)bl,hp); break; + case BL_HOM: homun->healed((TBL_HOM*)bl); break; + case BL_MER: mercenary_heal((TBL_MER*)bl,hp,sp); break; + case BL_ELEM: elemental_heal((TBL_ELEM*)bl,hp,sp); break; } return hp+sp; @@ -1476,7 +1476,7 @@ int status_revive(struct block_list *bl, unsigned char per_hp, unsigned char per switch (bl->type) { case BL_PC: pc_revive((TBL_PC*)bl, hp, sp); break; case BL_MOB: mob_revive((TBL_MOB*)bl, hp); break; - case BL_HOM: merc_hom_revive((TBL_HOM*)bl, hp, sp); break; + case BL_HOM: homun->revive((TBL_HOM*)bl, hp, sp); break; } return 1; } @@ -3147,21 +3147,20 @@ int status_calc_homunculus_(struct homun_data *hd, bool first) status->max_hp = hom->max_hp ; status->max_sp = hom->max_sp ; - merc_hom_calc_skilltree(hd, 0); + homun->calc_skilltree(hd, 0); - if((skill=merc_hom_checkskill(hd,HAMI_SKIN)) > 0) + if((skill=homun->checkskill(hd,HAMI_SKIN)) > 0) status->def += skill * 4; - if((skill = merc_hom_checkskill(hd,HVAN_INSTRUCT)) > 0) - { + if((skill = homun->checkskill(hd,HVAN_INSTRUCT)) > 0) { status->int_ += 1 +skill/2 +skill/4 +skill/5; status->str += 1 +skill/3 +skill/3 +skill/4; } - if((skill=merc_hom_checkskill(hd,HAMI_SKIN)) > 0) + if((skill=homun->checkskill(hd,HAMI_SKIN)) > 0) status->max_hp += skill * 2 * status->max_hp / 100; - if((skill = merc_hom_checkskill(hd,HLIF_BRAIN)) > 0) + if((skill = homun->checkskill(hd,HLIF_BRAIN)) > 0) status->max_sp += (1 +skill/2 -skill/4 +skill/5) * status->max_sp / 100 ; if (first) { @@ -3373,11 +3372,11 @@ void status_calc_regen(struct block_list *bl, struct status_data *status, struct if( bl->type == BL_HOM ) { struct homun_data *hd = (TBL_HOM*)bl; - if( (skill = merc_hom_checkskill(hd,HAMI_SKIN)) > 0 ) { + if( (skill = homun->checkskill(hd,HAMI_SKIN)) > 0 ) { val = regen->hp*(100+5*skill)/100; regen->hp = cap_value(val, 1, SHRT_MAX); } - if( (skill = merc_hom_checkskill(hd,HLIF_BRAIN)) > 0 ) { + if( (skill = homun->checkskill(hd,HLIF_BRAIN)) > 0 ) { val = regen->sp*(100+3*skill)/100; regen->sp = cap_value(val, 1, SHRT_MAX); } @@ -5951,7 +5950,7 @@ void status_set_viewdata(struct block_list *bl, int class_) else if (npcdb_checkid(class_) || (bl->type == BL_NPC && class_ == WARP_CLASS)) vd = npc_get_viewdata(class_); else if (homdb_checkid(class_)) - vd = merc_get_hom_viewdata(class_); + vd = homun->get_viewdata(class_); else if (merc_class(class_)) vd = merc_get_viewdata(class_); else if (elemental_class(class_)) @@ -8187,15 +8186,14 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val val2 = 20 + 10 * val1; //ASPD. Need to confirm if Movement Speed reduction is the same. [Jobbie] val3 = 20 * val1; //HIT val_flag |= 1|2|4; - if( sd ) - { // Removes Animals + if( sd ) { // Removes Animals if( pc_isriding(sd) ) pc_setriding(sd, 0); if( pc_isridingdragon(sd) ) pc_setoption(sd, sd->sc.option&~OPTION_DRAGON); if( pc_iswug(sd) ) pc_setoption(sd, sd->sc.option&~OPTION_WUG); if( pc_isridingwug(sd) ) pc_setoption(sd, sd->sc.option&~OPTION_WUGRIDER); if( pc_isfalcon(sd) ) pc_setoption(sd, sd->sc.option&~OPTION_FALCON); if( sd->status.pet_id > 0 ) pet_menu(sd, 3); - if( merc_is_hom_active(sd->hd) ) merc_hom_vaporize(sd,1); + if( homun_alive(sd->hd) ) homun->vaporize(sd,1); if( sd->md ) merc_delete(sd->md,3); } break; |