summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-02-09 22:25:23 +0100
committerGitHub <noreply@github.com>2020-02-09 22:25:23 +0100
commit38f33af5049120c741196349505042e1485d11b0 (patch)
treebcef3831f5ce19727dccfa4ede75df8357be9615 /src/map
parent14d7ef4651d7a399bec5e60f7c5e7c3550164063 (diff)
parentabc433ecf88c65a7f81fd070a1e343c105774eb6 (diff)
downloadhercules-38f33af5049120c741196349505042e1485d11b0.tar.gz
hercules-38f33af5049120c741196349505042e1485d11b0.tar.bz2
hercules-38f33af5049120c741196349505042e1485d11b0.tar.xz
hercules-38f33af5049120c741196349505042e1485d11b0.zip
Merge pull request #2618 from Kenpachi2k13/issue#2558
Updated PR_STRECOVERY to only cure status effects if defence element is not Undead.
Diffstat (limited to 'src/map')
-rw-r--r--src/map/skill.c43
1 files changed, 25 insertions, 18 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index a488e3eaf..ede3a4c52 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -7320,27 +7320,34 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list *
break;
case PR_STRECOVERY:
- if(status->isimmune(bl)) {
- clif->skill_nodamage(src,bl,skill_id,skill_lv,0);
+ if (status->isimmune(bl) != 0) {
+ clif->skill_nodamage(src, bl, skill_id, skill_lv, 0);
break;
}
- if (tsc && tsc->opt1) {
- status_change_end(bl, SC_FREEZE, INVALID_TIMER);
- status_change_end(bl, SC_STONE, INVALID_TIMER);
- status_change_end(bl, SC_SLEEP, INVALID_TIMER);
- status_change_end(bl, SC_STUN, INVALID_TIMER);
- status_change_end(bl, SC_WHITEIMPRISON, INVALID_TIMER);
- }
- status_change_end(bl, SC_NETHERWORLD, INVALID_TIMER);
- //Is this equation really right? It looks so... special.
- if( battle->check_undead(tstatus->race,tstatus->def_ele) ) {
- status->change_start(src, bl, SC_BLIND,
- 100*(100-(tstatus->int_/2+tstatus->vit/3+tstatus->luk/10)), 1,0,0,0,
- skill->get_time2(skill_id, skill_lv) * (100-(tstatus->int_+tstatus->vit)/2)/100,SCFLAG_NONE);
+
+ if (!battle->check_undead(tstatus->race, tstatus->def_ele)) {
+ if (tsc != NULL && tsc->opt1 != 0) {
+ status_change_end(bl, SC_FREEZE, INVALID_TIMER);
+ status_change_end(bl, SC_STONE, INVALID_TIMER);
+ status_change_end(bl, SC_SLEEP, INVALID_TIMER);
+ status_change_end(bl, SC_STUN, INVALID_TIMER);
+ status_change_end(bl, SC_WHITEIMPRISON, INVALID_TIMER);
+ }
+
+ status_change_end(bl, SC_NETHERWORLD, INVALID_TIMER);
+ } else {
+ int rate = 100 * (100 - (tstatus->int_ / 2 + tstatus->vit / 3 + tstatus->luk / 10));
+ int duration = skill->get_time2(skill_id, skill_lv);
+
+ duration *= (100 - (tstatus->int_ + tstatus->vit) / 2) / 100;
+ status->change_start(src, bl, SC_BLIND, rate, 1, 0, 0, 0, duration, SCFLAG_NONE);
}
- clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
- if(dstmd)
- mob->unlocktarget(dstmd,tick);
+
+ clif->skill_nodamage(src, bl, skill_id, skill_lv, 1);
+
+ if (dstmd != NULL)
+ mob->unlocktarget(dstmd, tick);
+
break;
// Mercenary Supportive Skills