// パーティ作成要求 void intif_create_party(dumb_ptr<map_session_data> sd, PartyName name) { nullpo_retv(sd); WFIFOW(char_fd, 0) = 0x3020; WFIFOL(char_fd, 2) = sd->status.account_id; WFIFO_STRING(char_fd, 6, name, 24); WFIFO_STRING(char_fd, 30, sd->status.name.to__actual(), 24); WFIFO_STRING(char_fd, 54, sd->bl_m->name_, 16); WFIFOW(char_fd, 70) = sd->status.base_level; WFIFOSET(char_fd, 72); }
// The transmission of GM only Wisp/Page from server to inter-server void intif_wis_message_to_gm(CharName Wisp_name, int min_gm_level, ZString mes) { size_t mes_len = mes.size() + 1; WFIFOW(char_fd, 0) = 0x3003; WFIFOW(char_fd, 2) = mes_len + 30; WFIFO_STRING(char_fd, 4, Wisp_name.to__actual(), 24); WFIFOW(char_fd, 28) = min_gm_level; WFIFO_STRING(char_fd, 30, mes, mes_len); WFIFOSET(char_fd, WFIFOW(char_fd, 2)); if (battle_config.etc_log) PRINTF("intif_wis_message_to_gm: from: '%s', min level: %d, message: '%s'.\n", Wisp_name, min_gm_level, mes); }
// パーティ追加要求 void intif_party_addmember(int party_id, int account_id) { dumb_ptr<map_session_data> sd; sd = map_id2sd(account_id); if (sd != NULL) { WFIFOW(char_fd, 0) = 0x3022; WFIFOL(char_fd, 2) = party_id; WFIFOL(char_fd, 6) = account_id; WFIFO_STRING(char_fd, 10, sd->status.name.to__actual(), 24); WFIFO_STRING(char_fd, 34, sd->bl_m->name_, 16); WFIFOW(char_fd, 50) = sd->status.base_level; WFIFOSET(char_fd, 52); } }
// The transmission of Wisp/Page to inter-server (player not found on this server) void intif_wis_message(dumb_ptr<map_session_data> sd, CharName nick, ZString mes) { nullpo_retv(sd); size_t mes_len = mes.size() + 1; WFIFOW(char_fd, 0) = 0x3001; WFIFOW(char_fd, 2) = mes_len + 52; WFIFO_STRING(char_fd, 4, sd->status.name.to__actual(), 24); WFIFO_STRING(char_fd, 28, nick.to__actual(), 24); WFIFO_STRING(char_fd, 52, mes, mes_len); WFIFOSET(char_fd, WFIFOW(char_fd, 2)); if (battle_config.etc_log) PRINTF("intif_wis_message from %s to %s (message: '%s')\n", sd->status.name, nick, mes); }
// Message for all GMs on all map servers void intif_GMmessage(XString mes) { WFIFOW(char_fd, 0) = 0x3000; size_t len = mes.size() + 1; WFIFOW(char_fd, 2) = 4 + len; WFIFO_STRING(char_fd, 4, mes, len); WFIFOSET(char_fd, WFIFOW(char_fd, 2)); }
// パーティ競合チェック要求 void intif_party_checkconflict(int party_id, int account_id, CharName nick) { WFIFOW(char_fd, 0) = 0x3028; WFIFOL(char_fd, 2) = party_id; WFIFOL(char_fd, 6) = account_id; WFIFO_STRING(char_fd, 10, nick.to__actual(), 24); WFIFOSET(char_fd, 34); }
// パーティ会話送信 void intif_party_message(int party_id, int account_id, XString mes) { size_t len = mes.size() + 1; WFIFOW(char_fd, 0) = 0x3027; WFIFOW(char_fd, 2) = len + 12; WFIFOL(char_fd, 4) = party_id; WFIFOL(char_fd, 8) = account_id; WFIFO_STRING(char_fd, 12, mes, len); WFIFOSET(char_fd, len + 12); }
// パーティ作成可否 static void mapif_party_created(int fd, int account_id, struct party *p) { WFIFOW(fd, 0) = 0x3820; WFIFOL(fd, 2) = account_id; if (p != NULL) { WFIFOB(fd, 6) = 0; WFIFOL(fd, 7) = p->party_id; WFIFO_STRING(fd, 11, p->name, 24); PRINTF("int_party: created! %d %s\n", p->party_id, p->name); } else { WFIFOB(fd, 6) = 1; WFIFOL(fd, 7) = 0; WFIFO_STRING(fd, 11, "error", 24); } WFIFOSET(fd, 35); }
// パーティ移動要求 void intif_party_changemap(dumb_ptr<map_session_data> sd, int online) { if (sd != NULL) { WFIFOW(char_fd, 0) = 0x3025; WFIFOL(char_fd, 2) = sd->status.party_id; WFIFOL(char_fd, 6) = sd->status.account_id; WFIFO_STRING(char_fd, 10, sd->bl_m->name_, 16); WFIFOB(char_fd, 26) = online; WFIFOW(char_fd, 27) = sd->status.base_level; WFIFOSET(char_fd, 29); } }
// アカウント変数送信 void intif_saveaccountreg(dumb_ptr<map_session_data> sd) { int j, p; nullpo_retv(sd); WFIFOW(char_fd, 0) = 0x3004; WFIFOL(char_fd, 4) = sd->bl_id; for (j = 0, p = 8; j < sd->status.account_reg_num; j++, p += 36) { WFIFO_STRING(char_fd, p, sd->status.account_reg[j].str, 32); WFIFOL(char_fd, p + 32) = sd->status.account_reg[j].value; } WFIFOW(char_fd, 2) = p; WFIFOSET(char_fd, p); }
// アカウント変数要求返信 static void mapif_account_reg_reply(int fd, int account_id) { struct accreg *reg = accreg_db.search(account_id); WFIFOW(fd, 0) = 0x3804; WFIFOL(fd, 4) = account_id; if (reg == NULL) { WFIFOW(fd, 2) = 8; } else { int j, p; for (j = 0, p = 8; j < reg->reg_num; j++, p += 36) { WFIFO_STRING(fd, p, reg->reg[j].str, 32); WFIFOL(fd, p + 32) = reg->reg[j].value; } WFIFOW(fd, 2) = p; } WFIFOSET(fd, WFIFOW(fd, 2)); }