Skip to content

Commit

Permalink
Fixed #380, wrong HP & SP recovery bonus for Pure Soul effect (SC_MEI…
Browse files Browse the repository at this point in the history
…KYOUSISUI)

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
  • Loading branch information
cydh committed Apr 5, 2015
1 parent 1518d7b commit 4a1bd2a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/map/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -9547,12 +9547,19 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
break;
case SC_ELECTRICSHOCKER:
case SC_CRYSTALIZE:
case SC_MEIKYOUSISUI:
val4 = tick / 1000;
if( val4 < 1 )
val4 = 1;
tick_time = 1000; // [GodLesZ] tick time
break;
case SC_MEIKYOUSISUI:
val2 = val1 * 2; // % HP each sec
val3 = val1; // % SP each sec
val4 = tick / 1000;
if( val4 < 1 )
val4 = 1;
tick_time = 1000;
break;
case SC_CAMOUFLAGE:
val4 = tick/1000;
tick_time = 1000; // [GodLesZ] tick time
Expand Down Expand Up @@ -12293,7 +12300,7 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
return 0;
case SC_MEIKYOUSISUI:
if( --(sce->val4) >= 0 ) {
status_heal(bl, status->max_hp * (sce->val1+1) / 100, status->max_sp * sce->val1 / 100, 0);
status_heal(bl, status->max_hp * sce->val2 / 100, sce->val3 / 100, 0);
sc_timer_next(1000 + tick, status_change_timer, bl->id, data);
return 0;
}
Expand Down

1 comment on commit 4a1bd2a

@raynra
Copy link

@raynra raynra commented on 4a1bd2a Apr 13, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cydh, it should be:
status_heal(bl, status->max_hp * sce->val2 / 100, status->max_sp * sce->val3 / 100, 0);

You're missing status->map_sp for SP gain 👍

Please sign in to comment.