Originally posted by [b]Lunar[/b]
How to reproduce:[list]
[*]Take a Bard/Danser/Gypsy/Clown/whatever
[*]Use a Song Bragi/Service/whatever
[*]Take the buff effect with another character like Sniper
[*]Use the command @duel with no target player name, juste type @duel nothing else [b]with the singer[/b]. The other character [b]must be[/b] in the area of effect of the song before you do that.
[*]Stop the song, with weapon switch or adaptation
[/list]
Effect:
Using the @duel, will [b]ignore[/b] the other character in the area of effect when you will break the song. (battle_check_target function return false)
Af if the other character [b]don't left [/b]the area (the server doesn't use [b]skill_unit_onleft[/b] function)
It causes the song will stay 3 minutes instead of 20 seconds.
Here is my (very bad) way to fix it, I think there is a better way:
[CODE]
static int skill_unit_effect (struct block_list* bl, va_list ap)
{
struct skill_unit* unit = va_arg(ap,struct skill_unit*);
struct skill_unit_group* group = unit->group;
unsigned int tick = va_arg(ap,unsigned int);
unsigned int flag = va_arg(ap,unsigned int);
int skill_id;
bool dissonance;
if( (!unit->alive && !(flag&4)) || bl->prev == NULL )
return 0;
nullpo_ret(group);
dissonance = skill_dance_switch(unit, 0);
//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) )
{
if( flag&4 && group->src_id == bl->id && group->state.song_dance&0x2 )
skill_unit_onleft(skill_id, bl, tick);//Ensemble check to terminate it.
else if ( flag&4 && skill_get_inf2(skillid)&INF2_SONG_DANCE) // Make a exception for song/dance skill
skill_unit_onleft(skill_id, bl, tick); //Bye bye glitch duel

}
else
{
if( flag&1 )
skill_unit_onplace(unit,bl,tick);
else
skill_unit_onout(unit,bl,tick);
if( flag&4 )
skill_unit_onleft(skill_id, bl, tick);
}
if( dissonance ) skill_dance_switch(unit, 1);
return 0;
}
[/CODE]
This post has been edited by
Lunar
on Aug 21, 2012 5:48