diff options
author | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-01-25 06:04:13 +0100 |
---|---|---|
committer | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-02-02 02:30:01 +0100 |
commit | abc433ecf88c65a7f81fd070a1e343c105774eb6 (patch) | |
tree | 3e91b1d7726c843f537aa4ee250c8ed5847d1574 | |
parent | 07f30b83a3cadb1cfac99a34accbdf86f6594cd6 (diff) | |
download | hercules-abc433ecf88c65a7f81fd070a1e343c105774eb6.tar.gz hercules-abc433ecf88c65a7f81fd070a1e343c105774eb6.tar.bz2 hercules-abc433ecf88c65a7f81fd070a1e343c105774eb6.tar.xz hercules-abc433ecf88c65a7f81fd070a1e343c105774eb6.zip |
Applied code style to PR_STRECOVERY.
-rw-r--r-- | src/map/skill.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 783dbc268..6106f84ad 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7306,8 +7306,8 @@ 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; } @@ -7321,16 +7321,19 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * } 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); } - //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); - } - 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 |