Issue information

Issue ID
#3631
Status
Duplicate
Severity
None
Started
Hercules Elf Bot
Oct 4, 2009 13:12
Last Post
Hercules Elf Bot
Oct 4, 2009 13:12
Confirmation
N/A

Hercules Elf Bot - Oct 4, 2009 13:12

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

@refine takes an 'equip position' parameter, 0-10.
According to pc.h, 0 is left accessory, 1 is right accessory, and so on.
CODE
    enum equip_index {
        EQI_ACC_L = 0,
        EQI_ACC_R,

The instructions in @refine confirm this.
CODE
    clif_displaymessage(fd, "Please, enter a position and a amount (usage: @refine <equip position> <+/- amount>).");
    sprintf(atcmd_output, "%d: Left Accessory", EQI_ACC_L);
    sprintf(atcmd_output, "%d: Right Accessory", EQI_ACC_R);

However, internally, the 'position' value is actually a bitfield. It is used to refine multiple positions at once.
This is totally inconsistent with the printed instructions, since the EQI_ constants are NOT bitmasks.
CODE
        if(position && !(sd->status.inventory[i].equip & position))
            continue;

Also, in the above code, the special position value '0' actually lets the code apply refining to all items, even though its help text says 0 is supposed to be the left accessory.

This post has been edited by theultramage: Oct 4 2009, 06:17 AM