Originally posted by [b]Rikter[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4826
I'm not completely sure this is a bug, but as far as I saw from current eAthena code, it should.
Easier way to reproduce this but is using something like claymore trap, making it able to be placed under targets.
When more than one mob enter the trap range and trigger its map_foreachinrange splash effect, it triggers multiple times depending on how many mobs there are in activation range.
Faulty code in skill_unit_onplace_timer:
CODE
map_foreachinrange(skill_trap_splash,&src->bl, skill_get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl,tick);
if (sg->unit_id != UNT_FIREPILLAR_ACTIVE)
clif_changetraplook(&src->bl, sg->unit_id==UNT_LANDMINE?UNT_FIREPILLAR_ACTIVE:UNT_USED_TRAPS);
src->range = -1; //Disable range so it does not invoke a for each in area again.
sg->limit=DIFF_TICK(tick,sg->tick)+1500;
break;
Suggested fix:
CODE
map_foreachinrange(skill_trap_splash,&src->bl, skill_get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl,tick);
if (sg->unit_id != UNT_FIREPILLAR_ACTIVE)
clif_changetraplook(&src->bl, sg->unit_id==UNT_LANDMINE?UNT_FIREPILLAR_ACTIVE:UNT_USED_TRAPS);
sg->unit_id = UNT_USED_TRAPS;
src->range = -1; //Disable range so it does not invoke a for each in area again.
sg->limit=DIFF_TICK(tick,sg->tick)+1500;
break;
Applying
sg->unit_id = UNT_USED_TRAPS; should fix the problem~
This post has been edited by Rikter: Mar 19 2011, 12:04 PM