Issue information

Issue ID
#6523
Status
Fixed
Severity
High
Started
Hercules Elf Bot
Aug 21, 2012 5:24
Last Post
Hercules Elf Bot
Nov 9, 2012 0:27
Confirmation
Yes (5)
No (0)

Hercules Elf Bot - Aug 21, 2012 5:24

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

Hercules Elf Bot - Aug 21, 2012 23:11

Originally posted by [b]mkbu95[/b]
I'd rather do this (tested and works :P):[code] 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.
}[/code]
since: [code]unsigned song_dance : 2; //0x1 Song/Dance, 0x2 Ensemble[/code]

Anyway, both fix this bug, I never noticed it, nice eye xP

Hercules Elf Bot - Sep 6, 2012 15:35

Originally posted by [b]Lunar[/b]
Need more info ?

Hercules Elf Bot - Sep 6, 2012 20:57

Originally posted by [b]Ind[/b]
Fixed in [rev=16753]. Thanks to you and mkbu95!

Hercules Elf Bot - Sep 13, 2012 14:58

Originally posted by [b]malufett[/b]
sir Ind how did you reproduce this..I reverted back the fixed for this but I can't reproduce..anyway the fixed created another bug..:)
[url="http://rathena.org/board/tracker/issue-6673-high-wizard-gravitational-field-character-gets-stuck-and-is-forced-to-relog/page__gopid__14348#entry14348"]http://rathena.org/board/tracker/issue-6673-high-wizard-gravitational-field-character-gets-stuck-and-is-forced-to-relog/page__gopid__14348#entry14348[/url]

:meow:

Hercules Elf Bot - Sep 13, 2012 17:30

Originally posted by [b]mkbu95[/b]
Blame me =/ /sry
Can you try with Lunar fix?

This post has been edited by mkbu95 on Sep 13, 2012 17:41

Hercules Elf Bot - Sep 14, 2012 3:16

Originally posted by [b]malufett[/b]
@mkbu
not yet since I can't reproduce it..anyway if you can tell me how to produce it properly..hmm..I follow the procedure but I can't duplicate..:)

:meow:

Hercules Elf Bot - Sep 14, 2012 15:33

Originally posted by [b]mkbu95[/b]
To reproduce this bug or from [url="http://rathena.org/board/tracker/issue-6673-high-wizard-gravitational-field-character-gets-stuck-and-is-forced-to-relog/page__gopid__14348#entry14348"]issue:6673[/url] ?
Lunar explains how to reproduce this bug /ok
tl;dr: take a bard, use apple of idun, take another char, go into the effect area, type @duel with the bard, stop the song, and wait 'til the hp goes back to normal on the other char. You'll notice that the duration is wrong.

Hercules Elf Bot - Sep 16, 2012 12:33

Originally posted by [b]Lunar[/b]
Don't have the gravitation field bug with my fix,
but also there is a link with [url="http://rathena.org/board/tracker/issue-6606-bard-skill-issue/"]this issue[/url].

Hercules Elf Bot - Sep 23, 2012 12:48

Originally posted by [b]Jelly[/b]
Bump.
Any link to stable fix this?

Hercules Elf Bot - Nov 6, 2012 13:04

Originally posted by [b]mkbu95[/b]
I think my poor fix should be reverted and Lunar's implemented. It [url="http://rathena.org/board/tracker/issue-6673-high-wizard-gravitational-field-character-gets-stuck-and-is-forced-to-relog/page__gopid__14348#entry14348"]broke Gravitational Field[/url].

Hercules Elf Bot - Nov 9, 2012 0:27

Originally posted by [b]mkbu95[/b]
Fixed in [rev=16881].