diff options
author | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-08-03 14:18:28 +0000 |
---|---|---|
committer | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-08-03 14:18:28 +0000 |
commit | 84c9b1b61fbb7c5b7c2d9fa4ba7984cdf80c7612 (patch) | |
tree | 6140eec00deb38accb465318f5c70851c43d1ef0 | |
parent | 83102f22528446819943769781e1404887779ab3 (diff) | |
download | hercules-84c9b1b61fbb7c5b7c2d9fa4ba7984cdf80c7612.tar.gz hercules-84c9b1b61fbb7c5b7c2d9fa4ba7984cdf80c7612.tar.bz2 hercules-84c9b1b61fbb7c5b7c2d9fa4ba7984cdf80c7612.tar.xz hercules-84c9b1b61fbb7c5b7c2d9fa4ba7984cdf80c7612.zip |
Follow up r16560 Chemical Protection skills are now to its official behavior.(bugreport:6396)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16567 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | src/map/skill.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 06e68fb29..f42c2f9db 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -6177,7 +6177,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case AM_CP_HELM: { unsigned int equip[] = {EQP_WEAPON, EQP_SHIELD, EQP_ARMOR, EQP_HEAD_TOP}; - enum sc_type scid = (sc_type)(SC_STRIPWEAPON + (skillid - AM_CP_WEAPON)); if( sd && ( bl->type != BL_PC || ( dstsd && pc_checkequip(dstsd,equip[skillid - AM_CP_WEAPON]) < 0 ) ) ){ clif_skill_fail(sd,skillid,USESKILL_FAIL_LEVEL,0); @@ -6185,7 +6184,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in return 0; } - status_change_end(bl, scid, INVALID_TIMER); clif_skill_nodamage(src,bl,skillid,skilllv, sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv))); } @@ -6883,15 +6881,19 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in // Full Chemical Protection case CR_FULLPROTECTION: { - int i, skilltime; - skilltime = skill_get_time(skillid,skilllv); - if (!tsc) { - clif_skill_nodamage(src,bl,skillid,skilllv,0); - break; - } - for (i=0; i<4; i++) { - status_change_end(bl, (sc_type)(SC_STRIPWEAPON + i), INVALID_TIMER); + unsigned int equip[] = {EQP_WEAPON, EQP_SHIELD, EQP_ARMOR, EQP_HEAD_TOP}; + int i, s = 0, skilltime = skill_get_time(skillid,skilllv); + + for (i=0 ; i<4; i++) { + if( bl->type != BL_PC || ( dstsd && pc_checkequip(dstsd,equip[i]) < 0 ) ) + continue; sc_start(bl,(sc_type)(SC_CP_WEAPON + i),100,skilllv,skilltime); + s++; + } + if( sd && !s ){ + clif_skill_fail(sd,skillid,USESKILL_FAIL_LEVEL,0); + map_freeblock_unlock(); // Don't consume item requirements + return 0; } clif_skill_nodamage(src,bl,skillid,skilllv,1); } @@ -8794,7 +8796,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in status_change_end(bl, SC_MARIONETTE, INVALID_TIMER); status_change_end(bl, SC_HARMONIZE, INVALID_TIMER); } - if( skill_area_temp[2] > 0){ + if( skill_area_temp[2] == 1 ){ clif_skill_damage(src,src,tick, status_get_amotion(src), 0, -30000, 1, skillid, skilllv, 6); sc_start(src, SC_STOP, 100, skilllv, skill_get_time(skillid, skilllv)); } |