Issue information

Issue ID
#4160
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Mar 31, 2010 6:59
Last Post
Hercules Elf Bot
Jul 5, 2012 10:44
Confirmation
Yes (2)
No (0)

Hercules Elf Bot - Mar 31, 2010 6:59

Originally posted by [b]Chilly[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4160

the bug is when using skills with a cast time, it should check for obstacles(objects, walls, etc.) both before it starts casting and after the cast bar ends. it applies to both single target and aoe skills(but not all aoe skills), ill use firebolt in this example:

on kro:
target a monster with firebolt
a check is done to see if there are obstacles between the caster and the target:
- if there are obstacles --> skill fails
- if not --> skill begins casting
when cast time ends the check is done again:
- if there are obstacles --> sp is used, after-cast delay is applied to caster, but skill does not cast on the target.
- if not --> skill hits target
(IMG:http://img191.imageshack.us/img191/1541/screen155.th.jpg)

on eathena:
target a monster with firebolt
a check is done to see if there are obstacles between the caster and the target:
- if there are obstacles --> skill fails
- if not --> skill begins casting
when cast time ends no check is done:
skill hits target, even with obstacles in the way
(IMG:http://img191.imageshack.us/img191/1899/screenchillyro000.th.jpg)

ill make videos if needed~

Hercules Elf Bot - Jul 3, 2012 0:28

Originally posted by [b]Daegaladh[/b]
I confirm this, I tested it on kRO and iRO, and here's a fix for it:


[CODE]
Index: skill.c
===================================================================
--- skill.c (revision 16366)
+++ skill.c (working copy)
@@ -8805,8 +8805,9 @@
clif_emotion(src, md->db->skill[md->skillidx].emotion);
}

- if(src != target && battle_config.skill_add_range &&
+ if(src != target && ((battle_config.skill_add_range &&
!check_distance_bl(src, target, skill_get_range2(src,ud->skillid,ud->skilllv)+battle_config.skill_add_range))
+ || !path_search_long(NULL,src->m,src->x,src->y,target->x,target->y,CELL_CHKWALL)))
{
if (sd) {
clif_skill_fail(sd,ud->skillid,USESKILL_FAIL_LEVEL,0);
[/CODE]

Hercules Elf Bot - Jul 3, 2012 5:54

Originally posted by [b]malufett[/b]
@Daegaladh
I check kRo but there is no skill fail message but it consume SP...

but I'll commit the fix later...

Hercules Elf Bot - Jul 3, 2012 7:42

Originally posted by [b]malufett[/b]
Fixed @ [rev='16370']

Hercules Elf Bot - Jul 3, 2012 18:08

Originally posted by [b]Daegaladh[/b]
Ok, but when the cast ends and an obstacle is in the path a fail error should appear

Hercules Elf Bot - Jul 3, 2012 22:10

Originally posted by [b]Baneado[/b]
Not actually, i checked this lots of times using my sage, while casting a kind of bolt, the mob sometimes hide behind a obstacle and no fail message appear. (In KRO)

Hercules Elf Bot - Jul 4, 2012 15:23

Originally posted by [b]Daegaladh[/b]
You're right, I've just tested it on iRO.
I swear I saw a fail error some time ago, but seems I was wrong XD

Hercules Elf Bot - Jul 5, 2012 10:44

Originally posted by [b]Angezerus[/b]
So this fixed the double kill issue as well?

(When casting for eg. a lvl 10 bolt on a monster, and someone kills the monster before the cast is finished, the monster respawns on the other side of the map, and it is killed again by the bolt, that is just finished casting. This can happen with double casting as well.)

This post has been edited by Angezerus on Jul 5, 2012 10:45