Issue information

Issue ID
#124
Status
Fixed
Severity
Low
Started
Hercules Elf Bot
Sep 26, 2007 6:18
Last Post
Hercules Elf Bot
Sep 26, 2007 6:18
Confirmation
N/A

Hercules Elf Bot - Sep 26, 2007 6:18

Originally posted by [b]Barron-Monster[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=124

Search:
CODE
BUILDIN_FUNC(getpetinfo);

After add:
CODE
BUILDIN_FUNC(gethominfo);


Search
CODE
    BUILDIN_DEF(getpetinfo,"i"),

After add
CODE
    BUILDIN_DEF(gethominfo,"i"),


Because from now you'll just found this:
CODE
/*==========================================
* Get your homunculus info: gethominfo(n)  
* n -> 0:hom_id 1:class 2:name
* 3:friendly 4:hungry, 5: rename flag.
* 6: level
*------------------------------------------*/
BUILDIN_FUNC(gethominfo)
{
    TBL_PC *sd=script_rid2sd(st);
    TBL_HOM *hd;
    int type=script_getnum(st,2);

    hd = sd?sd->hd:NULL;
    if(!merc_is_hom_active(hd))
    {
        if (type == 2)
            script_pushconststr(st,"null");
        else
            script_pushint(st,0);
        return 0;
    }

    switch(type){
        case 0: script_pushint(st,hd->homunculus.hom_id); break;
        case 1: script_pushint(st,hd->homunculus.class_); break;
        case 2: script_pushstr(st,aStrdup(hd->homunculus.name)); break;
        case 3: script_pushint(st,hd->homunculus.intimacy); break;
        case 4: script_pushint(st,hd->homunculus.hunger); break;
        case 5: script_pushint(st,hd->homunculus.rename_flag); break;
        case 6: script_pushint(st,hd->homunculus.level); break;
        default:
            script_pushint(st,0);
            break;
    }
    return 0;
}

for the gethominfo command and is a little short for get it working lol i think when skotlex duplicated getpetinfo with a little change for homun he have forget to add needed call.

This post has been edited by Barron-Monster: Sep 25 2007, 11:19 PM