Issue information

Issue ID
#219
Status
Fixed
Severity
Critical
Started
Hercules Elf Bot
Oct 14, 2007 0:51
Last Post
Hercules Elf Bot
Oct 14, 2007 0:51
Confirmation
N/A

Hercules Elf Bot - Oct 14, 2007 0:51

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

One person PMed me out of the blue, reporting that there's a bug in eathena that lets you cast Stone Curse without needing red gemstones.
After a quick test, I can confirm that if you have no gemstones in your inventory, the skill will succcesfully cast and apply its effect.

Aegis says that such an attempt will fail on cast-end (displaying "Red gemstone needed." skill fail message).
Initial blame goes to flaviojs' r11384
QUOTE
* Delayed the check for required items when a skill is cast to when they are consumed. Now skills only fail due to lack of items after being cast.


EDIT: That revision is the cause; I think it's due to misninterpretation of that obfuscated condition code.
The precise point of failure is
CODE
    case AM_BERSERKPITCHER:
    case AM_POTIONPITCHER:
    case CR_SLIMPITCHER:
    case MG_STONECURSE:
    case CR_CULTIVATION:
    case SA_FLAMELAUNCHER:
    case SA_FROSTWEAPON:
    case SA_LIGHTNINGLOADER:
    case SA_SEISMICWEAPON:
->        delitem_flag = 0;
        break;
Here you can see that it's setting a "delitem" flag to 0, even though these items should be consumed (usually...).

The '0' came from r1510. Inspect if if you have the time....

This post has been edited by theultramage: Oct 13 2007, 06:15 PM