From c676a26d2974890ef7541e5a347c075976deeefe Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 11 Apr 2012 06:25:30 +0000 Subject: Fixed bugreport:5533 Voice of Siren status now works properly. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15852 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/battle.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/map/battle.c b/src/map/battle.c index e1cb5859c..53d5e6ac8 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -4352,11 +4352,16 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if( (s_bl = battle_get_master(src)) == NULL ) s_bl = src; - switch( target->type ) - { // Checks on actual target - case BL_PC: - if (((TBL_PC*)target)->invincible_timer != INVALID_TIMER || pc_isinvisible((TBL_PC*)target)) - return -1; //Cannot be targeted yet. + 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)) + return -1; //Cannot be targeted yet. + if( sc && sc->count ) { + if( sc->data[SC_VOICEOFSIREN] && sc->data[SC_VOICEOFSIREN]->val2 == target->id ) + return -1; + } + } break; case BL_MOB: if((((TBL_MOB*)target)->special_state.ai == 2 || //Marine Spheres -- cgit v1.2.3-70-g09d2