Jump to content

pedrodks

Members
  • Content Count

    12
  • Joined

  • Last visited

Posts posted by pedrodks


  1. Hello guys!

     

    I want that when the pet evolves immediately it saves the character's inventory and that it appears without delay in the phpmyadmin database. So not losing data. I used chrif -> (sd, 0), but I was unable to save even appearing on the console, it is missing the item that I tried to evolve. The function is clif_parse_pet_evolution. It only saves normally if I use a command like @save or relog. I also used clif->inventoryList.


  2. Hi, 

    I have a problem that I can't solve

    I use This Emulator, which is a fork of hercules: https://github.com/brAthena/brAthena20180924

     

     

    I am trying to update its source code, its source code is up to December 31, 2015 and I have already updated it by commit:

    https://github.com/HerculesWS/Hercules/commits/stable?before=75ae0182f850e213d50832c979312aa560152628+2555

     

     

     

    image.thumb.png.7a565f4fe3c2cf59174d8323c05ca708.png

     

    The problem is that I went to click on the gift box and other boxes that use the getrandgroupid function and gave the following error. I already looked at item_db and it is correct. In the old version it worked and it crashed, so far I have done all the right steps. Problem so far only this. Have commits already solved this problem? Can someone help me??


  3. In the Commit of implementation:

    Problem Lines Listed

    Change 01:

    - p->option_count = 0; (Line = Line of My Emulator)

    - for (j=0; j<5; j++) { (Line = Line of My Emulator)

    -    p->option_data[j].index = 0; (Line = Line of My Emulator)

    -    p->option_data[j].value = 0; (Line = Line of My Emulator)

    -    p->option_data[j].param = 0; (Line = Line of My Emulator)

    - } (Line = Line of My Emulator)

    +  p->option_count = clif->add_item_options(p->option_data, it); (Line Changed in the commit)

    p->option_count = clif->add_item_options(p->option_data, it); (Actual Hercules Emulator)

    Change 02:

    clif->add_random_options(WBUFP(buf, 19), &sd->status.inventory[index]);(Line = Line of My Emulator)

    clif->add_item_options(WBUFP(buf, 19), &sd->status.inventory[index]);(Line Changed in the commit)

    (Actual Hercules Emulator)

    #if PACKETVER >= 20150226
            clif->add_item_options(&p.option_data[0], &sd->status.inventory[index]);
    #endif
        }
        memcpy(WFIFOP(fd, 0), &p, sizeof(p));
        WFIFOSET(fd, sizeof(p));
    }

    Change 03:

    - clif->add_random_options(WBUFP(buf, 19), &sd->status.inventory[index]); (Line = Line of My Emulator)

    clif->add_item_options(WBUFP(buf, 19), &sd->status.inventory[index]);(Line Changed in the commit)

    (Actual Hercules Emulator)

    #if PACKETVER >= 20150226
            clif->add_item_options(&p.option_data[0], &sd->status.inventory[index]);
    #endif
        }
        memcpy(WFIFOP(fd, 0), &p, sizeof(p));
        WFIFOSET(fd, sizeof(p));
    }

    Change 04:

    clif->add_random_options(WFIFOP(fd,21+offset), i); (Line = Line of My Emulator)

    clif->add_item_options(WFIFOP(fd,21+offset), i); (Line Changed in the commit)

    (Actual Hercules Emulator)

    #if PACKETVER >= 20150226
            clif->add_item_options(&p.option_data[0], &sd->status.inventory[n]);
    #endif
    #if PACKETVER >= 20160921
            p.favorite = sd->status.inventory[n].favorite;
            p.look = sd->inventory_data[n]->view_sprite;
    #endif
        }
        p.result = (unsigned char)fail;

        clif->send(&p,sizeof(p),&sd->bl,SELF);
    }

    Change 05:

    clif->add_random_options(WBUFP(buf,21+offset), &sd->status.cart[n]); (Line = Line of My Emulator)

    clif->add_item_options(WBUFP(buf,21+offset), &sd->status.cart[n]); (Line Changed in the commit)

    (Actual Hercules Emulator)

    #if PACKETVER >= 20150226
        clif->add_item_options(&p.option_data[0], &sd->status.cart[n]);
    #endif
        memcpy(WFIFOP(fd, 0), &p, sizeof(p));
        WFIFOSET(fd, sizeof(p));
    }

    Change 06:

    - clif->add_random_options(WFIFOP(fd,offset+22+i*item_length), &vsd->status.cart[index]) (Line = Line of My Emulator);

    + clif->add_item_options(WFIFOP(fd,offset+22+i*item_length), &vsd->status.cart[index])(Line Changed in the commit);

    (Actual Hercules Emulator)

    #if PACKETVER >= 20150226
            clif->add_item_options(&p->items.option_data[0], &vsd->status.cart[index]);
    #endif
    // [4144] date 20160921 not confirmed. Can be bigger or smaller
    #if PACKETVER >= 20160921
            p->items.location = pc->item_equippoint(sd, data);
            p->items.viewSprite = data->view_sprite;
    #endif
        }
        WFIFOSET(fd, len);
    }

    Change 07:

    - clif->add_random_options(WFIFOP(fd,30+22+i*item_length), &sd->status.cart[index]);(Line = Line of My Emulator)

    + clif->add_item_options(WFIFOP(fd,30+22+i*item_length), &sd->status.cart[index]);(Line Changed in the commit)

    (Actual Hercules Emulator)

    #if PACKETVER >= 20150226
            clif->add_item_options(&p->items.option_data[0], &sd->status.cart[index]);
    #endif
        }
        WFIFOSET(fd, len);

        clif->openvendingAck(fd, 0);
    }

    In the emulator https://raw.githubusercontent.com/HerculesWS/Hercules/v2017.11.19/src/map/clif.c

    V2017.11.19 are the same as commit but what i realized that many functions are no longer void to be int.

     

     

    I'm a little lost. About what to do


  4. Hi, 

    https://github.com/HerculesWS/Hercules/commit/974222a8d3f189083205bf5d330de04a43226ad3 however at compile time clif.c states that the unsigned char * structure is of a different type than "ItemOptions" options * buf. I noticed that the old clif used void and then started using int. could teach me how to change the structure of void's clif.c to int in its functions.

    my emulator link: https://github.com/brAthena/brAthena20180924

     

    Thanks to support and bad english google translate

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.