diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-03-12 12:39:54 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-03-12 12:39:54 +0000 |
commit | d19be6ed8fda63a226eed6b4adf993abe90bbbfe (patch) | |
tree | 2d1475baa3f6ee282defc4d2cf6655d1682067e2 /src/map/skill.c | |
parent | 2658339a3679ff5e495adf83d59136d20ed82d66 (diff) | |
download | hercules-d19be6ed8fda63a226eed6b4adf993abe90bbbfe.tar.gz hercules-d19be6ed8fda63a226eed6b4adf993abe90bbbfe.tar.bz2 hercules-d19be6ed8fda63a226eed6b4adf993abe90bbbfe.tar.xz hercules-d19be6ed8fda63a226eed6b4adf993abe90bbbfe.zip |
* Fixed Status Recovery dealing too short blind time on undead mobs
* Fixed mobs not affected by Blind status
* Added an invalid id check check in map_id2sd
* Added sd check in clif_send
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1226 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 02c2667a4..9f7a56551 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -3633,7 +3633,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int case AL_CURE: /* キュア? */ clif_skill_nodamage(src,bl,skillid,skilllv,1); - if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage ) + if(dstsd && dstsd->special_state.no_magic_damage ) break; status_change_end(bl, SC_SILENCE , -1 ); status_change_end(bl, SC_BLIND , -1 ); @@ -3652,18 +3652,17 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int case PR_STRECOVERY: /* リカバリ? */ { clif_skill_nodamage(src,bl,skillid,skilllv,1); - if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage ) + if(dstsd && dstsd->special_state.no_magic_damage) break; status_change_end(bl, SC_FREEZE , -1 ); status_change_end(bl, SC_STONE , -1 ); status_change_end(bl, SC_SLEEP , -1 ); - status_change_end(bl, SC_STAN , -1 ); + status_change_end(bl, SC_STAN , -1 ); if( battle_check_undead(status_get_race(bl),status_get_elem_type(bl)) ){//アンデッドなら暗闇?果 - int blind_time; - //blind_time=30-status_get_vit(bl)/10-status_get_int/15; - blind_time=30*(100-(status_get_int(bl)+status_get_vit(bl))/2)/100; - if(rand()%100 < (100-(status_get_int(bl)/2+status_get_vit(bl)/3+status_get_luk(bl)/10))) - status_change_start(bl, SC_BLIND,1,0,0,0,blind_time,0); + if(rand()%100 < (100-(status_get_int(bl)/2+status_get_vit(bl)/3+status_get_luk(bl)/10))) { + status_change_start(bl, SC_BLIND,1,0,0,0, + 1000 * 30 * (100-(status_get_int(bl)+status_get_vit(bl))/2)/100,0); + } } if(dstmd){ dstmd->attacked_id=0; |