summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-04-11 06:25:30 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-04-11 06:25:30 +0000
commitc676a26d2974890ef7541e5a347c075976deeefe (patch)
tree0baf9fb7cf8cc84bb48d6b590ff8cb3e916570bb /src/map/battle.c
parente916abd7b1e3bc8ddd27c827e132400816513029 (diff)
downloadhercules-c676a26d2974890ef7541e5a347c075976deeefe.tar.gz
hercules-c676a26d2974890ef7541e5a347c075976deeefe.tar.bz2
hercules-c676a26d2974890ef7541e5a347c075976deeefe.tar.xz
hercules-c676a26d2974890ef7541e5a347c075976deeefe.zip
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
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c15
1 files 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