int mapif_load_pet (int fd, int account_id, int char_id, int pet_id) { memset (pet_pt, 0, sizeof (struct s_pet)); inter_pet_fromsql (pet_id, pet_pt); if (pet_pt != NULL) { if (pet_pt->incuvate == 1) { pet_pt->account_id = pet_pt->char_id = 0; mapif_pet_info (fd, account_id, pet_pt); } else if (account_id == pet_pt->account_id && char_id == pet_pt->char_id) mapif_pet_info (fd, account_id, pet_pt); else mapif_pet_noinfo (fd, account_id); } else mapif_pet_noinfo (fd, account_id); return 0; }
int mapif_load_pet(int fd,int account_id,int char_id,int pet_id) { struct s_pet *p; p = (struct s_pet*)idb_get(pet_db,pet_id); if(p!=NULL) { if(p->incuvate == 1) { p->account_id = p->char_id = 0; mapif_pet_info(fd,account_id,p); } else if(account_id == p->account_id && char_id == p->char_id) mapif_pet_info(fd,account_id,p); else mapif_pet_noinfo(fd,account_id); } else mapif_pet_noinfo(fd,account_id); return 0; }