Issue information

Issue ID
#3428
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Jul 26, 2009 23:53
Last Post
Hercules Elf Bot
Jul 26, 2009 23:53
Confirmation
N/A

Hercules Elf Bot - Jul 26, 2009 23:53

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

There is a bug in the function: areapercentheal

The order of the parameters are wrong, this is the actual code:

CODE
BUILDIN_FUNC(areapercentheal)
{
    int hp,sp,m;
    const char *mapname;
    int x0,y0,x1,y1;

    mapname=script_getstr(st,2);
    x0=script_getnum(st,3);
    y0=script_getnum(st,4);
    x1=script_getnum(st,5);
    y1=script_getnum(st,6);
    hp=script_getnum(st,8); <<<--- Here its the mistake, should be 7
    sp=script_getnum(st,9); <<---- Here too, shoudl be 8

    if( (m=map_mapname2mapid(mapname))< 0)
        return 0;

    map_foreachinarea(buildin_areapercentheal_sub,m,x0,y0,x1,y1,BL_PC,hp,sp);
    return 0;
}


I hope this helps. Here can be the diff change:
http://trac.assembla.com/sAthena/changeset...rc/map/script.c

Regards.