int mapif_parse_CreateHomunculus(int fd) { RFIFOHEAD(fd); memcpy(homun_pt, RFIFOP(fd,8), sizeof(struct s_homunculus)); // Save in sql db if(mapif_save_homunculus(fd,RFIFOL(fd,4), homun_pt)) return mapif_homunculus_created(fd, RFIFOL(fd,4), homun_pt, 1); // send homun_id return mapif_homunculus_created(fd, RFIFOL(fd,4), homun_pt, 0); // fail }
static void mapif_parse_homunculus_create(int fd, int len, int account_id, struct s_homunculus* phd) { bool result = mapif_homunculus_save(phd); mapif_homunculus_created(fd, account_id, phd, result); }