Issue information

Issue ID
#4072
Status
Confirmed
Severity
None
Started
Hercules Elf Bot
Feb 26, 2010 0:00
Last Post
Hercules Elf Bot
Feb 26, 2010 0:00
Confirmation
N/A

Hercules Elf Bot - Feb 26, 2010 0:00

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

There are land skills that only take effect on certain targets - in this particular issue, it's the distinction between friendlies and enemies. We'll be using Magic Strings (BA_POEMBRAGI) for a friend-only effect, and Slow Grace (DC_DONTFORGETME) for a enemy-only effect. Actually, Bragi works on everyone, but we'll be combining that with @duel to make the processing bug out.

There is a type of land skills that activates on a frequent, repeating timer, on everyone in the area. And then there are land skills that only process their stuff when walking into them and leaving them. This lets the server skip a lot of processing while achieving the same effect. There are some quirks though...

Let's look at what goes on with Bragi: when you step in, you get the bragi effect, with a 3-minute status end timer. This aligns with the total song playtime of the bard. If you exit the area, this timer ends and is replaced with a new 20 second timer. Same thing happens when the song ends.
In theory, this is perfectly fine. Actually, even the 3-minute timer could be discarded, since you will exit the area eventually. I guess it's some sort of safeguard.

And this safeguard is what's preventing people from running around with infinite bragi. Here's how it happens:
  1. bard starts song
  2. player walks into area
  3. bard sends @duel
  4. player walks out of area

There is a bug in the @duel code in battle_check_target(). It will return 0, which is not > 0 and it will cause skill_unit_move_sub() to go into the branch for not applicable effects. Thus when you walk out of the skill, the on-left processing will not occur and you'll be left with the 3-minute timer instead of getting the 20-second one.

A similar issue can be observed with Slow Grace. Here we don't even need @duel, @pvpon+@pvpoff do the trick. You first walk into the AoE as an enemy, then stop being an enemy, and walk out. You'll see that the slowdown status will stay on you for 3-minutes instead of just 20 seconds.