Fixed place skills to target the caster when it should not.

Related mainly to dance skills and quagmire. Thanks again to playtester for showing me how to reproduce it and test the fix afterwards.

Related bugreports:
bugreport:7221
bugreport:6686

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17223 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
lemongrass3110 2013-03-30 12:53:54 +00:00
parent aace543611
commit 9b076614e1
2 changed files with 8 additions and 6 deletions

View File

@ -112,7 +112,7 @@ skill_reiteration: 0
skill_nofootset: 1
// Should traps (hunter traps + quagmire) change their target to "all" inside gvg/pvp grounds? (Note 3)
// Default on official servers: yes for player-traps
// Default on official servers: 1 (for players)
gvg_traps_target_all: 1
// Some traps settings (add as necessary):

View File

@ -12350,6 +12350,7 @@ static int skill_unit_effect (struct block_list* bl, va_list ap)
unsigned int flag = va_arg(ap,unsigned int);
uint16 skill_id;
bool dissonance;
bool isTarget = false;
if( (!unit->alive && !(flag&4)) || bl->prev == NULL )
return 0;
@ -12361,10 +12362,8 @@ static int skill_unit_effect (struct block_list* bl, va_list ap)
//Necessary in case the group is deleted after calling on_place/on_out [Skotlex]
skill_id = group->skill_id;
//Target-type check.
if( !(group->bl_flag&bl->type && battle_check_target(&unit->bl,bl,group->target_flag)>0) && (flag&4) ) {
if( group->state.song_dance&0x1 || (group->src_id == bl->id && group->state.song_dance&0x2) )
skill_unit_onleft(skill_id, bl, tick);//Ensemble check to terminate it.
} else {
isTarget = group->bl_flag & bl->type && battle_check_target( &unit->bl, bl, group->target_flag ) > 0;
if( isTarget ){
if( flag&1 )
skill_unit_onplace(unit,bl,tick);
else
@ -12372,9 +12371,12 @@ static int skill_unit_effect (struct block_list* bl, va_list ap)
if( flag&4 )
skill_unit_onleft(skill_id, bl, tick);
}else if( !isTarget && flag&4 && ( group->state.song_dance&0x1 || ( group->src_id == bl->id && group->state.song_dance&0x2 ) ) ){
skill_unit_onleft(skill_id, bl, tick);//Ensemble check to terminate it.
}
if( dissonance ) skill_dance_switch(unit, 1);
if( dissonance )
skill_dance_switch(unit, 1);
return 0;
}