summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/status.c17
-rw-r--r--src/map/unit.c2
2 files changed, 12 insertions, 7 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 895ef06ac..3c98b3b90 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2490,7 +2490,6 @@ void status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, str
|| sc->data[SC_BERSERK].timer != -1
|| sc->data[SC_TRICKDEAD].timer != -1
|| sc->data[SC_BLEEDING].timer != -1
- || (sc->data[SC_REGENERATION].timer != -1 && sc->data[SC_REGENERATION].val4)
) //No regen
regen->flag = 0;
@@ -2499,8 +2498,8 @@ void status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, str
|| sc->data[SC_DANCING].timer != -1
|| (sc->data[SC_EXPLOSIONSPIRITS].timer != -1
&& (sc->data[SC_SPIRIT].timer==-1 || sc->data[SC_SPIRIT].val2 != SL_MONK))
- ) //No SP regen
- regen->flag &=~(RGN_SP|RGN_SSP);
+ ) //No natural SP regen
+ regen->flag &=~RGN_SP;
if(
sc->data[SC_TENSIONRELAX].timer!=-1
@@ -2514,10 +2513,14 @@ void status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, str
regen->rate.hp += 1;
regen->rate.sp += 1;
}
- if (sc->data[SC_REGENERATION].timer != -1 && !sc->data[SC_REGENERATION].val4)
+ if (sc->data[SC_REGENERATION].timer != -1)
{
- regen->rate.hp += sc->data[SC_REGENERATION].val2;
- regen->rate.sp += sc->data[SC_REGENERATION].val3;
+ if (!sc->data[SC_REGENERATION].val4)
+ {
+ regen->rate.hp += sc->data[SC_REGENERATION].val2;
+ regen->rate.sp += sc->data[SC_REGENERATION].val3;
+ } else
+ regen->flag&=~sc->data[SC_REGENERATION].val4; //Remove regen as specified by val4
}
}
@@ -6122,7 +6125,7 @@ int status_change_end( struct block_list* bl , int type,int tid )
status_set_hp(bl, 100, 0);
if(sc->data[SC_ENDURE].timer != -1)
status_change_end(bl, SC_ENDURE, -1);
- sc_start4(bl, SC_REGENERATION, 100, 10,0,0,1,
+ sc_start4(bl, SC_REGENERATION, 100, 10,0,0,(RGN_HP|RGN_SP),
gettick()+skill_get_time(LK_BERSERK, sc->data[type].val1));
break;
case SC_GRAVITATION:
diff --git a/src/map/unit.c b/src/map/unit.c
index b81e5f066..c36c14971 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1655,6 +1655,8 @@ int unit_free(struct block_list *bl, int clrtype) {
status_change_end(bl,SC_EXTREMITYFIST,-1);
if(sd->sc.data[SC_EXPLOSIONSPIRITS].timer!=-1)
status_change_end(bl,SC_EXPLOSIONSPIRITS,-1);
+ if(sd->sc.data[SC_REGENERATION].timer!=-1 && sd->sc.data[SC_REGENERATION].val4)
+ status_change_end(bl,SC_REGENERATION,-1);
}
if (battle_config.debuff_on_logout&2)
{ //Food items are removed on logout.