Issue information

Issue ID
#8424
Status
Fixed
Severity
None
Started
Zer Wildblood
Nov 4, 2014 12:39
Last Post
Zer Wildblood
Nov 9, 2014 9:31
Confirmation
N/A

Zer Wildblood - Nov 4, 2014 12:39

[size=3][font=tahoma, geneva, sans-serif]I dont know how to reproduce it but its hapening on my server... and ive been searching on it.. and i found this[/font][/size]

[size=3][font=tahoma, geneva, sans-serif][url="http://rathena.org/board/tracker/issue-6281-taekwon-stance-skill-transfer-to-other-job/"]http://rathena.org/board/tracker/issue-6281-taekwon-stance-skill-transfer-to-other-job/[/url][/font][/size]
[size=3][font=tahoma, geneva, sans-serif][url="http://herc.ws/board/tracker/issue-3480-taekwon-skills-transferred-to-sniper/"]http://herc.ws/board/tracker/issue-3480-taekwon-skills-transferred-to-sniper/[/url][/font][/size]

[size=3][font=tahoma, geneva, sans-serif]We have so much commits this past few weeks and yeah... maybe some of those broke it again.[/font][/size]

Playtester - Nov 4, 2014 12:56

Hmmm the "fix" Ind applied back on SVN seems to be this:
unit.c[code=auto:0]if( skill_get_inf(skill_num)&INF_SELF_SKILL && skill_get_nk(skill_num)&NK_NO_DAMAGE )// exploit fix target_id = src->id;[/code]

Zer Wildblood - Nov 4, 2014 14:17

Those the new commits remove that fixs?

Playtester - Nov 4, 2014 14:25

No, it's still there.

I'm not sure if Ind's fix even did anything. It should not even reach that part of the code if the skill is not a combo skill. Maybe the bug is somewhere else in the first place. I looked a bit through the code but couldn't find it. Probably need to find a way to reproduce it.

By the way, wasn't there another thread were people said that it should actually be possible to switch targets during a combo? That would require the code to be rewritten anyway. Could be done together with this.

malufett - Nov 4, 2014 15:13

[quote name="Zer Wildblood" timestamp="1415110661"]
Those the new commits remove that fixs?[/quote]
it seems like..I already fixed this before way back in rA...

but still intact...[code=auto:0] if (sc->data[SC_COMBOATTACK]->val2) target_id = sc->data[SC_COMBOATTACK]->val2; else if( skill->get_inf(skill_id) != 1 ) // Only non-targetable skills should use auto target target_id = ud->target; if( skill->get_inf(skill_id)&INF_SELF_SKILL && skill->get_nk(skill_id)&NK_NO_DAMAGE )// exploit fix target_id = src->id; temp = 1; } else if ( target_id == src->id && [/code]


:meow:

This post has been edited by malufett on Nov 4, 2014 15:27

Zer Wildblood - Nov 4, 2014 17:25

Yeah, im using a uptodate Hercules, and now still getting this bug.

Zer Wildblood - Nov 4, 2014 17:31

[size=3][font=tahoma, geneva, sans-serif]I know now how to reproduce, I used dota buffs on my pvp room and so this is how it happen.[/font][/size]

[size=3][font=tahoma, geneva, sans-serif]There's a illusion buffs on pvp room and taekwon got...[/font][/size]

[img]http://i62.tinypic.com/dfwowo.jpg[/img]

[size=3][font=tahoma, geneva, sans-serif]Char 1: @job taekwon (activate the buffs or maybe it doesnt matter) and @slaveclone 4-5 is fine[/font][/size]
[size=3][font=tahoma, geneva, sans-serif]Char 2: @job 4013 (i only tested assassin)[/font][/size]

[size=3][font=tahoma, geneva, sans-serif]Turn on PVP, the assassin attacks the clones and clone attack the assassin. and poop[/font][/size]

This post has been edited by Zer Wildblood on Nov 4, 2014 17:42

Garr - Nov 4, 2014 19:52

Actually, it's not only combo stances, I think. With monster skills at work I've been gaining Shield Reflect, with clones I've been gaining monk's steel body when I was cloning champion. Note here, that I've been standing still doing nothing. Maybe it's related, but with monster set to heal itself it was healing player, not sure if it was healing itself. I've been out to get that, but didn't have enough time lately.

Xgear - Nov 4, 2014 20:12

If this is related to clones, the issue lies within MD_RANDOMTARGET implementation, making clones cast skills on any target
The fix should be simple, unless there are plans to redo this

status.c @ status_calc_pc

Find: bstatus->mode = MD_MASK&~(MD_BOSS|MD_PLANT|MD_DETECTOR|MD_ANGRY|MD_TARGETWEAK);

Replace with: bstatus->mode = MD_MASK&~(MD_BOSS|MD_PLANT|MD_DETECTOR|MD_ANGRY|MD_TARGETWEAK|MD_RANDOMTARGET);

This only works if the issue at hand is related to clones giving their target's buffs they shouldnt give.

The two last post seem to make reference the clone issues, but the initial report doesnt really (Unless I didn't get it)

This post has been edited by Xgear on Nov 4, 2014 20:13

malufett - Nov 4, 2014 20:22

@Xgear
it seems like..cause I'm trying reproducing this a while ago with the same scenario I used before in confirming this bug..and still no luck..

:meow:

Playtester - Nov 4, 2014 22:05

If it's related to MD_RANDOMTARGET, I guess the implementation isn't good either. Randomtarget should mean that offensive skills go to random enemy, not to random "any unit".

Xgear - Nov 4, 2014 23:27

That part is still unclear, we're still trying to gather information on that one from the person who implemented it (Although common sense says it should be random offensive :P).

But I still would love to know if the report is related to this or not (As in TK using clones at some point(?))

Zer Wildblood - Nov 5, 2014 16:51

[size=3][font=tahoma, geneva, sans-serif]@malufet, my friends confirm this too on his hercules. did you try attacking the clones too ?[/font][/size]

malufett - Nov 6, 2014 5:52

[quote name="Zer Wildblood" timestamp="1415206288"]
[size=3][font=tahoma, geneva, sans-serif]@malufet, my friends confirm this too on his hercules. did you try attacking the clones too ?[/font][/size][/quote]
[size=3][font=tahoma, geneva, sans-serif]I confirm it too..what I'm saying is the bug before where player to player status transfer..but unlike this one its mob to player..[/font][/size]

[size=3][font=tahoma, geneva, sans-serif]:meow:[/font][/size]

Playtester - Nov 6, 2014 6:51

Do clones use mob.c for AI?

Playtester - Nov 6, 2014 6:56

[code=auto:0]if( !(mode&MD_RANDOMTARGET) ) unit->attack(&md->bl,tbl->id,1); else { // Attack once and find a new random target int search_size = (view_range < md->status.rhw.range) ? view_range : md->status.rhw.range; unit->attack(&md->bl,tbl->id, 0); if ((tbl = battle->get_enemy(&md->bl, DEFAULT_ENEMY_TYPE(md), search_size))) { md->target_id = tbl->id; md->min_chase = md->db->range3; } }[/code]The implementation is bad I guess. It always looks for "random enemy" no matter what the skill is.

Why not just do:[code=auto:0]unit->attack(&md->bl,tbl->id,1); if(mode&MD_RANDOMTARGET) mob_unlocktarget(md,tick); [/code]?

Oh wait, the main problem is:[code=auto:0]//Execute skill skill_target = (md->db->status.mode&MD_RANDOMTARGET)? MST_RANDOM : ms[i].target;[/code]MST_RANDOM will always be an enemy.

I think this whole thing should be removed and changed so that active search returns random enemy instead of closest enemy and then let the mob drop target after each attack. But probably better to test this mode on officials first. There are only a few quest monsters that have this mode anyway.


Anyway, for now, Xgear's solution should work.

This post has been edited by Playtester on Nov 6, 2014 7:02

Michi - Nov 6, 2014 8:40

Fixed: [url="https://github.com/HerculesWS/Hercules/commit/cf18e5578f85bc6c368a2ad4d7c746af8687c7f0"]https://github.com/HerculesWS/Hercules/commit/cf18e5578f85bc6c368a2ad4d7c746af8687c7f0[/url]
MD_RANDOMTARGET is not used so we don't need it. I remove it for now

Zer Wildblood - Nov 7, 2014 8:53

Perfect, thank you.

Zer Wildblood - Nov 9, 2014 9:31

nvm

This post has been edited by Zer Wildblood on Nov 9, 2014 12:37