Browse Source

Fixed bugreport:5533 Voice of Siren status now works properly.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15852 54d463be-8e91-2dee-dedb-b68131a5f0ec
shennetsind 13 years ago
parent
commit
ea04a6aaf6
1 changed files with 10 additions and 5 deletions
  1. 10 5
      src/map/battle.c

+ 10 - 5
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 )
 	if( (s_bl = battle_get_master(src)) == NULL )
 		s_bl = src;
 		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;
 			break;
 		case BL_MOB:
 		case BL_MOB:
 			if((((TBL_MOB*)target)->special_state.ai == 2 || //Marine Spheres
 			if((((TBL_MOB*)target)->special_state.ai == 2 || //Marine Spheres