int merc_hom_change_name_ack(struct map_session_data *sd, char* name, int flag) { struct homun_data *hd = sd->hd; if (!merc_is_hom_active(hd)) return 0; if (!flag) { clif_displaymessage(sd->fd, msg_txt(280)); // You cannot use this name return 0; } strncpy(hd->homunculus.name,name,NAME_LENGTH); clif_charnameack (0,&hd->bl); hd->homunculus.rename_flag = 1; clif_hominfo(sd,hd,0); return 1; }
int pet_change_name_ack(struct map_session_data *sd, char* name, int flag) { struct pet_data *pd = sd->pd; if (!pd) return 0; if (!flag) { clif_displaymessage(sd->fd, msg_txt(280)); // You cannot use this name for your pet. clif_send_petstatus(sd); //Send status so client knows oet name change got rejected. return 0; } memcpy(pd->pet.name, name, NAME_LENGTH); clif_charnameack (NULL,&pd->bl); pd->pet.rename_flag = 1; clif_pet_equip_area(pd); clif_send_petstatus(sd); return 1; }
/** * Acknowledge change name request from inter-server * @param sd * @param name * @param flag */ void hom_change_name_ack(struct map_session_data *sd, char* name, int flag) { struct homun_data *hd = sd->hd; if (!hom_is_active(hd)) return; normalize_name(name," ");//bugreport:3032 if (!flag || name[0] == '\0') { clif_displaymessage(sd->fd, msg_txt(sd,280)); // You cannot use this name return; } safestrncpy(hd->homunculus.name,name,NAME_LENGTH); clif_charnameack (0,&hd->bl); hd->homunculus.rename_flag = 1; clif_hominfo(sd,hd,0); }