diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-09-02 23:24:11 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-09-02 23:24:11 +0000 |
commit | 86ab87ef53da557383743c4ac74d8a5e30a5c8c6 (patch) | |
tree | 25f0eb03bd6d5630a76a49ae9f0c656c0e7da4a0 /src | |
parent | 30953733770f10449ce32662369546e5ebd34449 (diff) | |
download | hercules-86ab87ef53da557383743c4ac74d8a5e30a5c8c6.tar.gz hercules-86ab87ef53da557383743c4ac74d8a5e30a5c8c6.tar.bz2 hercules-86ab87ef53da557383743c4ac74d8a5e30a5c8c6.tar.xz hercules-86ab87ef53da557383743c4ac74d8a5e30a5c8c6.zip |
- SC_REGENERATION's val4 now holds the RGN flag of what is blocked rather than blocking all types of regen.
- LK_BERSERK will now only block natural regen on state-end.
- SC_EXTREMITYFIST/SC_DANCING/SC_EXPLOSIONSPIRITS will only block natural sp regen and not skill regen
- SC_REGENERATION blocking will be cancelled on logout now.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8600 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/status.c | 17 | ||||
-rw-r--r-- | src/map/unit.c | 2 |
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. |