From 0285ddf7cee2f6569a513fe6118c43f99fd71279 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 18 Jan 2015 18:23:39 -0200 Subject: 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 --- src/map/battle.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') 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 ) -- cgit v1.2.3-60-g2f50