summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorJedzkie <jedzkie13@rocketmail.com>2016-01-09 12:07:07 +0800
committerJedzkie <jedzkie13@rocketmail.com>2016-03-08 12:55:11 +0800
commite30c443d605312e9c87c7e16ce24fc4f8e250e15 (patch)
tree5408a69f15cd89e7c7368e9a9b59bbc36d1b8623 /src/map/status.c
parent2af2132c3fd39af714eb9819bbdd8d857e651915 (diff)
downloadhercules-e30c443d605312e9c87c7e16ce24fc4f8e250e15.tar.gz
hercules-e30c443d605312e9c87c7e16ce24fc4f8e250e15.tar.bz2
hercules-e30c443d605312e9c87c7e16ce24fc4f8e250e15.tar.xz
hercules-e30c443d605312e9c87c7e16ce24fc4f8e250e15.zip
Fixes #1014
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/map/status.c b/src/map/status.c
index c755d8eb0..538ebc5e3 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3518,11 +3518,20 @@ void status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, str
regen->flag &=~RGN_SP; //No natural SP regen
}
+
+ // Tension relax allows the user to recover HP while overweight
+ // at 1x speed. Other SC ignored? [csnv]
if (sc->data[SC_TENSIONRELAX]) {
- regen->rate.hp += 2;
- if (regen->sregen)
- regen->sregen->rate.hp += 3;
+ if (sc->data[SC_WEIGHTOVER50] || sc->data[SC_WEIGHTOVER90]) {
+ regen->flag &= ~RGN_SP;
+ regen->rate.hp = 1;
+ } else {
+ regen->rate.hp += 2;
+ if (regen->sregen)
+ regen->sregen->rate.hp += 3;
+ }
}
+
if (sc->data[SC_MAGNIFICAT]) {
regen->rate.hp += 1;
regen->rate.sp += 1;
@@ -12409,8 +12418,10 @@ int status_natural_heal(struct block_list* bl, va_list args) {
}
}
- if (flag && regen->state.overweight)
- flag=0;
+ // SC_TENSIONRELAX allows HP to be recovered even when overweight. [csnv]
+ if (flag && regen->state.overweight && (sc == NULL || sc->data[SC_TENSIONRELAX] == NULL)) {
+ flag = 0;
+ }
ud = unit->bl2ud(bl);