Corrected Elemental Cure healing behavior (#2443)
* Fixes #2440. * The HP/SP heal should be based on the caster's current HP/SP, not the Elemental's max HP/SP. Thanks to @Barigas!
This commit is contained in:
parent
7de7472782
commit
ab014246cc
@ -10323,17 +10323,20 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
|
|||||||
case SO_EL_CURE:
|
case SO_EL_CURE:
|
||||||
if( sd ) {
|
if( sd ) {
|
||||||
struct elemental_data *ed = sd->ed;
|
struct elemental_data *ed = sd->ed;
|
||||||
int s_hp = sd->battle_status.hp * 10 / 100, s_sp = sd->battle_status.sp * 10 / 100;
|
int s_hp, s_sp;
|
||||||
int e_hp, e_sp;
|
|
||||||
|
if( !ed )
|
||||||
|
break;
|
||||||
|
|
||||||
|
s_hp = sd->battle_status.hp * 10 / 100;
|
||||||
|
s_sp = sd->battle_status.sp * 10 / 100;
|
||||||
|
|
||||||
if( !ed ) break;
|
|
||||||
if( !status_charge(&sd->bl,s_hp,s_sp) ) {
|
if( !status_charge(&sd->bl,s_hp,s_sp) ) {
|
||||||
clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
|
clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
e_hp = ed->battle_status.max_hp * 10 / 100;
|
|
||||||
e_sp = ed->battle_status.max_sp * 10 / 100;
|
status_heal(&ed->bl,s_hp,s_sp,3);
|
||||||
status_heal(&ed->bl,e_hp,e_sp,3);
|
|
||||||
clif_skill_nodamage(src,&ed->bl,skill_id,skill_lv,1);
|
clif_skill_nodamage(src,&ed->bl,skill_id,skill_lv,1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user