summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt6
-rw-r--r--src/map/status.c17
-rw-r--r--src/map/unit.c2
3 files changed, 18 insertions, 7 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 0187eac2b..b8fe62b80 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,12 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/09/02
+ * SC_REGENERATION's val4 now holds the RGN flag of what is blocked rather
+ than blocking all types of regen. [Skotlex]
+ * LK_BERSERK will now only block natural regen on state-end. [Skotlex]
+ * SC_EXTREMITYFIST/SC_DANCING/SC_EXPLOSIONSPIRITS will only block natural
+ sp regen and not skill regen [Skotlex]
+ * SC_REGENERATION blocking will be cancelled on logout now. [Skotlex]
* Corrected SCB_LUK not updating SCB_BATK as well. [Skotlex]
2006/09/01
* Corrected script_commands description of getequipid, it returns -1, not 0
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.