diff options
author | shennetsind <ind@henn.et> | 2015-01-18 18:23:39 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2015-01-18 18:23:39 -0200 |
commit | 0285ddf7cee2f6569a513fe6118c43f99fd71279 (patch) | |
tree | 2deaa0d85aabbe9dc7e28fbb71d9f8e84e347bbf /src/map/battle.c | |
parent | db870bbd480e3383d8cf0279a33eadfa7da60f0b (diff) | |
download | hercules-0285ddf7cee2f6569a513fe6118c43f99fd71279.tar.gz hercules-0285ddf7cee2f6569a513fe6118c43f99fd71279.tar.bz2 hercules-0285ddf7cee2f6569a513fe6118c43f99fd71279.tar.xz hercules-0285ddf7cee2f6569a513fe6118c43f99fd71279.zip |
For bugreport 8397 (incomplete solution)
Certain skills bypass invincibility
http://hercules.ws/board/tracker/issue-8397-5-secs-invulnerability-on-positivesupportive-aoe-buff/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 331de1162..ddfa8df0b 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -6179,7 +6179,18 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f switch( target->type ) { // Checks on actual target case BL_PC: { struct status_change* sc = status->get_sc(src); - if (((TBL_PC*)target)->invincible_timer != INVALID_TIMER || pc_isinvisible((TBL_PC*)target)) + + if( ((TBL_PC*)target)->invincible_timer != INVALID_TIMER ) { + switch( battle->get_current_skill(src) ) { + /* TODO a proper distinction should be established bugreport:8397 */ + case PR_SANCTUARY: + case PR_MAGNIFICAT: + break; + default: + return -1; + } + } + if ( pc_isinvisible((TBL_PC*)target) ) return -1; //Cannot be targeted yet. if( sc && sc->count ) { if( sc->data[SC_SIREN] && sc->data[SC_SIREN]->val2 == target->id ) |