diff options
Diffstat (limited to 'src/char')
-rw-r--r-- | src/char/int_guild.c | 200 | ||||
-rw-r--r-- | src/char/int_party.c | 82 | ||||
-rw-r--r-- | src/char/int_storage.c | 42 | ||||
-rw-r--r-- | src/char/inter.c | 58 |
4 files changed, 191 insertions, 191 deletions
diff --git a/src/char/int_guild.c b/src/char/int_guild.c index 49bb238..5b4fe30 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -32,17 +32,17 @@ int mapif_guild_basicinfochanged (int guild_id, int type, const void *data, int mapif_guild_info (int fd, struct guild *g); int guild_break_sub (void *key, void *data, va_list ap); -// ƒMƒ‹ƒhƒf[ƒ^‚Ì•¶Žš—ñ‚Ö‚Ì•ÏŠ· +// ギルドデータã®æ–‡å—列ã¸ã®å¤‰æ› int inter_guild_tostr (char *str, struct guild *g) { int i, c, len; - // Šî–{ƒf[ƒ^ + // 基本データ len = sprintf (str, "%d\t%s\t%s\t%d,%d,%d,%d,%d\t%s#\t%s#\t", g->guild_id, g->name, g->master, g->guild_lv, g->max_member, g->exp, g->skill_point, g->castle_id, g->mes1, g->mes2); - // ƒƒ“ƒo[ + // メンãƒãƒ¼ for (i = 0; i < g->max_member; i++) { struct guild_member *m = &g->member[i]; @@ -52,7 +52,7 @@ int inter_guild_tostr (char *str, struct guild *g) m->class, m->lv, m->exp, m->exp_payper, m->position, ((m->account_id > 0) ? m->name : "-")); } - // –ðE + // å½¹è· for (i = 0; i < MAX_GUILDPOSITION; i++) { struct guild_position *p = &g->position[i]; @@ -60,7 +60,7 @@ int inter_guild_tostr (char *str, struct guild *g) sprintf (str + len, "%d,%d\t%s#\t", p->mode, p->exp_mode, p->name); } - // ƒGƒ“ƒuƒŒƒ€ + // エンブレムlen += sprintf (str + len, "%d,%d,", g->emblem_len, g->emblem_id); for (i = 0; i < g->emblem_len; i++) { @@ -68,7 +68,7 @@ int inter_guild_tostr (char *str, struct guild *g) sprintf (str + len, "%02x", (unsigned char) (g->emblem_data[i])); } len += sprintf (str + len, "$\t"); - // “¯–¿ƒŠƒXƒg + // åŒç›Ÿãƒªã‚¹ãƒˆ c = 0; for (i = 0; i < MAX_GUILDALLIANCE; i++) if (g->alliance[i].guild_id > 0) @@ -82,7 +82,7 @@ int inter_guild_tostr (char *str, struct guild *g) sprintf (str + len, "%d,%d\t%s\t", a->guild_id, a->opposition, a->name); } - // ’Ç•úƒŠƒXƒg + // 追放リスト c = 0; for (i = 0; i < MAX_GUILDEXPLUSION; i++) if (g->explusion[i].account_id > 0) @@ -96,7 +96,7 @@ int inter_guild_tostr (char *str, struct guild *g) e->account_id, e->rsv1, e->rsv2, e->rsv3, e->name, e->acc, e->mes); } - // ƒMƒ‹ƒhƒXƒLƒ‹ + // ギルドスã‚ル for (i = 0; i < MAX_GUILDSKILL; i++) { len += sprintf (str + len, "%d,%d ", g->skill[i].id, g->skill[i].lv); @@ -106,7 +106,7 @@ int inter_guild_tostr (char *str, struct guild *g) return 0; } -// ƒMƒ‹ƒhƒf[ƒ^‚Ì•¶Žš—ñ‚©‚ç‚Ì•ÏŠ· +// ギルドデータã®æ–‡å—列ã‹ã‚‰ã®å¤‰æ› int inter_guild_fromstr (char *str, struct guild *g) { int i, j, c; @@ -115,7 +115,7 @@ int inter_guild_fromstr (char *str, struct guild *g) char tmp_str2[4096]; char *pstr; - // Šî–{ƒf[ƒ^ + // 基本データ memset (g, 0, sizeof (struct guild)); if (sscanf (str, "%d\t%[^\t]\t%[^\t]\t%d,%d,%d,%d,%d\t%[^\t]\t%[^\t]\t", @@ -136,11 +136,11 @@ int inter_guild_fromstr (char *str, struct guild *g) g->mes1[strlen (g->mes1) - 1] = 0; g->mes2[strlen (g->mes2) - 1] = 0; - for (j = 0; j < 6 && str != NULL; j++) // ˆÊ’uƒXƒLƒbƒv + for (j = 0; j < 6 && str != NULL; j++) // ä½ç½®ã‚¹ã‚ップ str = strchr (str + 1, '\t'); // printf("GuildBaseInfo OK\n"); - // ƒƒ“ƒo[ + // メンãƒãƒ¼ for (i = 0; i < g->max_member; i++) { struct guild_member *m = &g->member[i]; @@ -161,11 +161,11 @@ int inter_guild_fromstr (char *str, struct guild *g) m->position = tmp_int[9]; memcpy (m->name, tmp_str[0], 24); - for (j = 0; j < 2 && str != NULL; j++) // ˆÊ’uƒXƒLƒbƒv + for (j = 0; j < 2 && str != NULL; j++) // ä½ç½®ã‚¹ã‚ップ str = strchr (str + 1, '\t'); } // printf("GuildMemberInfo OK\n"); - // –ðE + // å½¹è· i = 0; while (sscanf (str + 1, "%d,%d%n", &tmp_int[0], &tmp_int[1], &j) == 2 && str[1 + j] == '\t') @@ -180,12 +180,12 @@ int inter_guild_fromstr (char *str, struct guild *g) tmp_str[0][strlen (tmp_str[0]) - 1] = 0; memcpy (p->name, tmp_str[0], 24); - for (j = 0; j < 2 && str != NULL; j++) // ˆÊ’uƒXƒLƒbƒv + for (j = 0; j < 2 && str != NULL; j++) // ä½ç½®ã‚¹ã‚ップ str = strchr (str + 1, '\t'); i++; } // printf("GuildPositionInfo OK\n"); - // ƒGƒ“ƒuƒŒƒ€ + // エンブレムtmp_int[1] = 0; if (sscanf (str + 1, "%d,%d,%[^\t]\t", &tmp_int[0], &tmp_int[1], tmp_str2) < 3 && sscanf (str + 1, "%d,%[^\t]\t", &tmp_int[0], tmp_str2) < 2) @@ -210,12 +210,12 @@ int inter_guild_fromstr (char *str, struct guild *g) g->emblem_data[i] = (x1 << 4) | x2; } // printf("GuildEmblemInfo OK\n"); - str = strchr (str + 1, '\t'); // ˆÊ’uƒXƒLƒbƒv + str = strchr (str + 1, '\t'); // ä½ç½®ã‚¹ã‚ップ - // “¯–¿ƒŠƒXƒg + // åŒç›Ÿãƒªã‚¹ãƒˆ if (sscanf (str + 1, "%d\t", &c) < 1) return 1; - str = strchr (str + 1, '\t'); // ˆÊ’uƒXƒLƒbƒv + str = strchr (str + 1, '\t'); // ä½ç½®ã‚¹ã‚ップ for (i = 0; i < c; i++) { struct guild_alliance *a = &g->alliance[i]; @@ -227,14 +227,14 @@ int inter_guild_fromstr (char *str, struct guild *g) a->opposition = tmp_int[1]; memcpy (a->name, tmp_str[0], 24); - for (j = 0; j < 2 && str != NULL; j++) // ˆÊ’uƒXƒLƒbƒv + for (j = 0; j < 2 && str != NULL; j++) // ä½ç½®ã‚¹ã‚ップ str = strchr (str + 1, '\t'); } // printf("GuildAllianceInfo OK\n"); - // ’Ç•úƒŠƒXƒg + // 追放リスト if (sscanf (str + 1, "%d\t", &c) < 1) return 1; - str = strchr (str + 1, '\t'); // ˆÊ’uƒXƒLƒbƒv + str = strchr (str + 1, '\t'); // ä½ç½®ã‚¹ã‚ップ for (i = 0; i < c; i++) { struct guild_explusion *e = &g->explusion[i]; @@ -251,11 +251,11 @@ int inter_guild_fromstr (char *str, struct guild *g) tmp_str[2][strlen (tmp_str[2]) - 1] = 0; memcpy (e->mes, tmp_str[2], 40); - for (j = 0; j < 4 && str != NULL; j++) // ˆÊ’uƒXƒLƒbƒv + for (j = 0; j < 4 && str != NULL; j++) // ä½ç½®ã‚¹ã‚ップ str = strchr (str + 1, '\t'); } // printf("GuildExplusionInfo OK\n"); - // ƒMƒ‹ƒhƒXƒLƒ‹ + // ギルドスã‚ル for (i = 0; i < MAX_GUILDSKILL; i++) { if (sscanf (str + 1, "%d,%d ", &tmp_int[0], &tmp_int[1]) < 2) @@ -270,7 +270,7 @@ int inter_guild_fromstr (char *str, struct guild *g) return 0; } -// ƒMƒ‹ƒhéƒf[ƒ^‚Ì•¶Žš—ñ‚Ö‚Ì•ÏŠ· +// ギルド城データã®æ–‡å—列ã¸ã®å¤‰æ› int inter_guildcastle_tostr (char *str, struct guild_castle *gc) { int len; @@ -286,7 +286,7 @@ int inter_guildcastle_tostr (char *str, struct guild_castle *gc) return 0; } -// ƒMƒ‹ƒhéƒf[ƒ^‚Ì•¶Žš—ñ‚©‚ç‚Ì•ÏŠ· +// ギルド城データã®æ–‡å—列ã‹ã‚‰ã®å¤‰æ› int inter_guildcastle_fromstr (char *str, struct guild_castle *gc) { int tmp_int[26]; @@ -397,7 +397,7 @@ int inter_guildcastle_fromstr (char *str, struct guild_castle *gc) return 0; } -// ƒMƒ‹ƒhŠÖ˜Aƒf[ƒ^ƒx[ƒX“Ç‚Ýž‚Ý +// ギルド関連データベースèªã¿è¾¼ã¿ int inter_guild_readdb () { int i; @@ -423,7 +423,7 @@ int inter_guild_readdb () return 0; } -// ƒMƒ‹ƒhƒf[ƒ^‚Ì“Ç‚Ýž‚Ý +// ギルドデータã®èªã¿è¾¼ã¿ int inter_guild_init () { char line[16384]; @@ -474,7 +474,7 @@ int inter_guild_init () fclose_ (fp); // printf("int_guild: %s read done (%d guilds)\n", guild_txt, c); - c = 0; //ƒJƒEƒ“ƒ^‰Šú‰» + c = 0; //カウンタåˆæœŸåŒ– if ((fp = fopen_ (castle_txt, "r")) == NULL) { @@ -505,7 +505,7 @@ int inter_guild_init () if (!c) { printf (" %s - making Default Data...\n", castle_txt); - //ƒfƒtƒHƒ‹ƒgƒf[ƒ^‚ðì¬ + //ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ‡ãƒ¼ã‚¿ã‚’ä½œæˆ for (i = 0; i < MAX_GUILDCASTLE; i++) { gc = calloc (sizeof (struct guild_castle), 1); @@ -561,7 +561,7 @@ struct guild *inter_guild_search (int guild_id) return g; } -// ƒMƒ‹ƒhƒf[ƒ^‚̃Z[ƒu—p +// ギルドデータã®ã‚»ãƒ¼ãƒ–用 int inter_guild_save_sub (void *key, void *data, va_list ap) { char line[16384]; @@ -574,7 +574,7 @@ int inter_guild_save_sub (void *key, void *data, va_list ap) return 0; } -// ƒMƒ‹ƒhéƒf[ƒ^‚̃Z[ƒu—p +// ギルド城データã®ã‚»ãƒ¼ãƒ–用 int inter_castle_save_sub (void *key, void *data, va_list ap) { char line[16384]; @@ -587,7 +587,7 @@ int inter_castle_save_sub (void *key, void *data, va_list ap) return 0; } -// ƒMƒ‹ƒhƒf[ƒ^‚̃Z[ƒu +// ギルドデータã®ã‚»ãƒ¼ãƒ– int inter_guild_save () { FILE *fp; @@ -616,7 +616,7 @@ int inter_guild_save () return 0; } -// ƒMƒ‹ƒh–¼ŒŸõ—p +// ギルドå検索用 int search_guildname_sub (void *key, void *data, va_list ap) { struct guild *g = (struct guild *) data, **dst; @@ -629,7 +629,7 @@ int search_guildname_sub (void *key, void *data, va_list ap) return 0; } -// ƒMƒ‹ƒh–¼ŒŸõ +// ギルドå検索 struct guild *search_guildname (char *str) { struct guild *g = NULL; @@ -637,7 +637,7 @@ struct guild *search_guildname (char *str) return g; } -// ƒMƒ‹ƒh‚ª‹ó‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN +// ギルドãŒç©ºã‹ã©ã†ã‹ãƒã‚§ãƒƒã‚¯ int guild_check_empty (struct guild *g) { int i; @@ -649,7 +649,7 @@ int guild_check_empty (struct guild *g) return 0; } } - // ’N‚à‚¢‚È‚¢‚̂ʼnðŽU + // 誰もã„ãªã„ã®ã§è§£æ•£ numdb_foreach (guild_db, guild_break_sub, g->guild_id); numdb_erase (guild_db, g->guild_id); inter_guild_storage_delete (g->guild_id); @@ -659,7 +659,7 @@ int guild_check_empty (struct guild *g) return 1; } -// ƒLƒƒƒ‰‚Ì‹£‡‚ª‚È‚¢‚©ƒ`ƒFƒbƒN—p +// ã‚ャラã®ç«¶åˆãŒãªã„ã‹ãƒã‚§ãƒƒã‚¯ç”¨ int guild_check_conflict_sub (void *key, void *data, va_list ap) { struct guild *g = (struct guild *) data; @@ -669,25 +669,25 @@ int guild_check_conflict_sub (void *key, void *data, va_list ap) account_id = va_arg (ap, int); char_id = va_arg (ap, int); - if (g->guild_id == guild_id) // –{—ˆ‚ÌŠ‘®‚È‚Ì‚Å–â‘è‚È‚µ + if (g->guild_id == guild_id) // 本æ¥ã®æ‰€å±žãªã®ã§å•é¡Œãªã— return 0; for (i = 0; i < MAX_GUILD; i++) { if (g->member[i].account_id == account_id) { - // •Ê‚̃Mƒ‹ƒh‚É‹U‚ÌŠ‘®ƒf[ƒ^‚ª‚ ‚é‚Ì‚Å’E‘Þ + // 別ã®ã‚®ãƒ«ãƒ‰ã«å½ã®æ‰€å±žãƒ‡ãƒ¼ã‚¿ãŒã‚ã‚‹ã®ã§è„±é€€ printf ("int_guild: guild conflict! %d,%d %d!=%d\n", account_id, char_id, guild_id, g->guild_id); mapif_parse_GuildLeave (-1, g->guild_id, account_id, 0 /*char_id*/, 0, - "**ƒf[ƒ^‹£‡**"); + "**データ競åˆ**"); } } return 0; } -// ƒLƒƒƒ‰‚Ì‹£‡‚ª‚È‚¢‚©ƒ`ƒFƒbƒN +// ã‚ャラã®ç«¶åˆãŒãªã„ã‹ãƒã‚§ãƒƒã‚¯ int guild_check_conflict (int guild_id, int account_id, int char_id) { numdb_foreach (guild_db, guild_check_conflict_sub, guild_id, account_id, @@ -704,30 +704,30 @@ int guild_nextexp (int level) return 0; } -// ƒMƒ‹ƒhƒXƒLƒ‹‚ª‚ ‚é‚©Šm”F +// ギルドスã‚ルãŒã‚ã‚‹ã‹ç¢ºèª int guild_checkskill (struct guild *g, int id) { return g->skill[id - 10000].lv; } -// ƒMƒ‹ƒh‚Ìî•ñ‚ÌÄŒvŽZ +// ギルドã®æƒ…å ±ã®å†è¨ˆç®— int guild_calcinfo (struct guild *g) { int i, c, nextexp; struct guild before = *g; - // ƒXƒLƒ‹ID‚ÌÝ’è + // スã‚ルIDã®è¨å®š for (i = 0; i < 5; i++) g->skill[i].id = i + 10000; - // ƒMƒ‹ƒhƒŒƒxƒ‹ + // ギルドレベル if (g->guild_lv <= 0) g->guild_lv = 1; nextexp = guild_nextexp (g->guild_lv); if (nextexp > 0) { while (g->exp >= nextexp) - { // ƒŒƒxƒ‹ƒAƒbƒvˆ— + { // ãƒ¬ãƒ™ãƒ«ã‚¢ãƒƒãƒ—å‡¦ç† g->exp -= nextexp; g->guild_lv++; g->skill_point++; @@ -735,13 +735,13 @@ int guild_calcinfo (struct guild *g) } } - // ƒMƒ‹ƒh‚ÌŽŸ‚ÌŒoŒ±’l + // ギルドã®æ¬¡ã®çµŒé¨“値 g->next_exp = guild_nextexp (g->guild_lv); - // ƒƒ“ƒoãŒÀiƒMƒ‹ƒhŠg’£“K—pj + // メンãƒä¸Šé™ï¼ˆã‚®ãƒ«ãƒ‰æ‹¡å¼µé©ç”¨ï¼‰ g->max_member = 100 + guild_checkskill (g, 10004) * 2; - // •½‹ÏƒŒƒxƒ‹‚ƃIƒ“ƒ‰ƒCƒ“l” + // å¹³å‡ãƒ¬ãƒ™ãƒ«ã¨ã‚ªãƒ³ãƒ©ã‚¤ãƒ³äººæ•° g->average_lv = 0; g->connect_member = 0; c = 0; @@ -757,7 +757,7 @@ int guild_calcinfo (struct guild *g) } g->average_lv /= c; - // ‘Sƒf[ƒ^‚ð‘—‚é•K—v‚ª‚ ‚è‚»‚¤ + // 全データをé€ã‚‹å¿…è¦ãŒã‚ã‚Šãㆠif (g->max_member != before.max_member || g->guild_lv != before.guild_lv || g->skill_point != before.skill_point) @@ -770,9 +770,9 @@ int guild_calcinfo (struct guild *g) } //------------------------------------------------------------------- -// map server‚Ö‚Ì’ÊM +// map serverã¸ã®é€šä¿¡ -// ƒMƒ‹ƒhì¬‰Â”Û +// ギルド作æˆå¯å¦ int mapif_guild_created (int fd, int account_id, struct guild *g) { WFIFOW (fd, 0) = 0x3830; @@ -790,7 +790,7 @@ int mapif_guild_created (int fd, int account_id, struct guild *g) return 0; } -// ƒMƒ‹ƒhî•ñŒ©‚‚©‚炸 +// ã‚®ãƒ«ãƒ‰æƒ…å ±è¦‹ã¤ã‹ã‚‰ãš int mapif_guild_noinfo (int fd, int guild_id) { WFIFOW (fd, 0) = 0x3831; @@ -802,7 +802,7 @@ int mapif_guild_noinfo (int fd, int guild_id) return 0; } -// ƒMƒ‹ƒhî•ñ‚Ü‚Æ‚ß‘—‚è +// ã‚®ãƒ«ãƒ‰æƒ…å ±ã¾ã¨ã‚é€ã‚Š int mapif_guild_info (int fd, struct guild *g) { unsigned char buf[4 + sizeof (struct guild)]; @@ -820,7 +820,7 @@ int mapif_guild_info (int fd, struct guild *g) return 0; } -// ƒƒ“ƒo’ljÁ‰Â”Û +// メンãƒè¿½åŠ å¯å¦ int mapif_guild_memberadded (int fd, int guild_id, int account_id, int char_id, int flag) { @@ -834,7 +834,7 @@ int mapif_guild_memberadded (int fd, int guild_id, int account_id, return 0; } -// ’E‘Þ/’Ç•ú’Ê’m +// 脱退/追放通知 int mapif_guild_leaved (int guild_id, int account_id, int char_id, int flag, const char *name, const char *mes) { @@ -854,7 +854,7 @@ int mapif_guild_leaved (int guild_id, int account_id, int char_id, int flag, return 0; } -// ƒIƒ“ƒ‰ƒCƒ“ó‘Ô‚ÆLvXV’Ê’m +// オンライン状態ã¨Lv更新通知 int mapif_guild_memberinfoshort (struct guild *g, int idx) { unsigned char buf[19]; @@ -870,7 +870,7 @@ int mapif_guild_memberinfoshort (struct guild *g, int idx) return 0; } -// ‰ðŽU’Ê’m +// 解散通知 int mapif_guild_broken (int guild_id, int flag) { unsigned char buf[7]; @@ -884,7 +884,7 @@ int mapif_guild_broken (int guild_id, int flag) return 0; } -// ƒMƒ‹ƒh“à”Œ¾ +// ギルド内発言 int mapif_guild_message (int guild_id, int account_id, char *mes, int len) { unsigned char buf[len + 12]; @@ -899,7 +899,7 @@ int mapif_guild_message (int guild_id, int account_id, char *mes, int len) return 0; } -// ƒMƒ‹ƒhŠî–{î•ñ•ÏX’Ê’m +// ã‚®ãƒ«ãƒ‰åŸºæœ¬æƒ…å ±å¤‰æ›´é€šçŸ¥ int mapif_guild_basicinfochanged (int guild_id, int type, const void *data, int len) { @@ -914,7 +914,7 @@ int mapif_guild_basicinfochanged (int guild_id, int type, const void *data, return 0; } -// ƒMƒ‹ƒhƒƒ“ƒoî•ñ•ÏX’Ê’m +// ギルドメンãƒæƒ…å ±å¤‰æ›´é€šçŸ¥ int mapif_guild_memberinfochanged (int guild_id, int account_id, int char_id, int type, const void *data, int len) { @@ -932,7 +932,7 @@ int mapif_guild_memberinfochanged (int guild_id, int account_id, int char_id, return 0; } -// ƒMƒ‹ƒhƒXƒLƒ‹ƒAƒbƒv’Ê’m +// ギルドスã‚ルアップ通知 int mapif_guild_skillupack (int guild_id, int skill_num, int account_id) { unsigned char buf[14]; @@ -946,7 +946,7 @@ int mapif_guild_skillupack (int guild_id, int skill_num, int account_id) return 0; } -// ƒMƒ‹ƒh“¯–¿/“G‘Î’Ê’m +// ギルドåŒç›Ÿ/敵対通知 int mapif_guild_alliance (int guild_id1, int guild_id2, int account_id1, int account_id2, int flag, const char *name1, const char *name2) @@ -966,7 +966,7 @@ int mapif_guild_alliance (int guild_id1, int guild_id2, int account_id1, return 0; } -// ƒMƒ‹ƒh–ðE•ÏX’Ê’m +// ギルド役è·å¤‰æ›´é€šçŸ¥ int mapif_guild_position (struct guild *g, int idx) { unsigned char buf[sizeof (struct guild_position) + 12]; @@ -982,7 +982,7 @@ int mapif_guild_position (struct guild *g, int idx) return 0; } -// ƒMƒ‹ƒh’m•ÏX’Ê’m +// ギルド告知変更通知 int mapif_guild_notice (struct guild *g) { unsigned char buf[186]; @@ -996,7 +996,7 @@ int mapif_guild_notice (struct guild *g) return 0; } -// ƒMƒ‹ƒhƒGƒ“ƒuƒŒƒ€•ÏX’Ê’m +// ギルドエンブレム変更通知 int mapif_guild_emblem (struct guild *g) { unsigned char buf[2048]; @@ -1062,9 +1062,9 @@ int mapif_guild_castle_alldataload (int fd) } //------------------------------------------------------------------- -// map server‚©‚ç‚Ì’ÊM +// map serverã‹ã‚‰ã®é€šä¿¡ -// ƒMƒ‹ƒh쬗v‹ +// ギルド作æˆè¦æ±‚ int mapif_parse_CreateGuild (int fd, int account_id, char *name, struct guild_member *master) { @@ -1106,7 +1106,7 @@ int mapif_parse_CreateGuild (int fd, int account_id, char *name, for (i = 1; i < MAX_GUILDPOSITION - 1; i++) sprintf (g->position[i].name, "Position %d", i + 1); - // ‚±‚±‚ŃMƒ‹ƒhî•ñŒvŽZ‚ª•K—v‚ÆŽv‚í‚ê‚é + // ã“ã“ã§ã‚®ãƒ«ãƒ‰æƒ…å ±è¨ˆç®—ãŒå¿…è¦ã¨æ€ã‚れる g->max_member = 100; g->average_lv = master->lv; for (i = 0; i < 5; i++) @@ -1123,7 +1123,7 @@ int mapif_parse_CreateGuild (int fd, int account_id, char *name, return 0; } -// ƒMƒ‹ƒhî•ñ—v‹ +// ã‚®ãƒ«ãƒ‰æƒ…å ±è¦æ±‚ int mapif_parse_GuildInfo (int fd, int guild_id) { struct guild *g; @@ -1140,7 +1140,7 @@ int mapif_parse_GuildInfo (int fd, int guild_id) return 0; } -// ƒMƒ‹ƒhƒƒ“ƒo’ljÁ—v‹ +// ギルドメンãƒè¿½åŠ è¦æ±‚ int mapif_parse_GuildAddMember (int fd, int guild_id, struct guild_member *m) { struct guild *g; @@ -1171,7 +1171,7 @@ int mapif_parse_GuildAddMember (int fd, int guild_id, struct guild_member *m) return 0; } -// ƒMƒ‹ƒh’E‘Þ/’Ç•ú—v‹ +// ギルド脱退/追放è¦æ±‚ int mapif_parse_GuildLeave (int fd, int guild_id, int account_id, int char_id, int flag, const char *mes) { @@ -1189,14 +1189,14 @@ int mapif_parse_GuildLeave (int fd, int guild_id, int account_id, int char_id, // printf("%d %s\n", i, g->member[i].name); if (flag) - { // ’Ç•ú‚ÌꇒǕúƒŠƒXƒg‚É“ü‚ê‚é + { // 追放ã®å ´åˆè¿½æ”¾ãƒªã‚¹ãƒˆã«å…¥ã‚Œã‚‹ for (j = 0; j < MAX_GUILDEXPLUSION; j++) { if (g->explusion[j].account_id == 0) break; } if (j == MAX_GUILDEXPLUSION) - { // ˆê”t‚Ȃ̂Ō¢‚Ì‚ðÁ‚· + { // 一æ¯ãªã®ã§å¤ã„ã®ã‚’消㙠for (j = 0; j < MAX_GUILDEXPLUSION - 1; j++) g->explusion[j] = g->explusion[j + 1]; j = MAX_GUILDEXPLUSION - 1; @@ -1214,7 +1214,7 @@ int mapif_parse_GuildLeave (int fd, int guild_id, int account_id, int char_id, memset (&g->member[i], 0, sizeof (struct guild_member)); if (guild_check_empty (g) == 0) - mapif_guild_info (-1, g); // ‚Ü‚¾l‚ª‚¢‚é‚̂Ńf[ƒ^‘—M + mapif_guild_info (-1, g); // ã¾ã 人ãŒã„ã‚‹ã®ã§ãƒ‡ãƒ¼ã‚¿é€ä¿¡ return 0; } @@ -1223,7 +1223,7 @@ int mapif_parse_GuildLeave (int fd, int guild_id, int account_id, int char_id, return 0; } -// ƒIƒ“ƒ‰ƒCƒ“/LvXV +// オンライン/Lvæ›´æ–° int mapif_parse_GuildChangeMemberInfoShort (int fd, int guild_id, int account_id, int char_id, int online, int lv, int class) @@ -1256,13 +1256,13 @@ int mapif_parse_GuildChangeMemberInfoShort (int fd, int guild_id, if (g->member[i].online) g->connect_member++; } - // •½‹ÏƒŒƒxƒ‹ + // å¹³å‡ãƒ¬ãƒ™ãƒ« g->average_lv = alv / c; return 0; } -// ƒMƒ‹ƒh‰ðŽUˆ——pi“¯–¿/“G‘΂ð‰ðœj +// ギルド解散処ç†ç”¨ï¼ˆåŒç›Ÿ/敵対を解除) int guild_break_sub (void *key, void *data, va_list ap) { struct guild *g = (struct guild *) data; @@ -1277,7 +1277,7 @@ int guild_break_sub (void *key, void *data, va_list ap) return 0; } -// ƒMƒ‹ƒh‰ðŽU—v‹ +// ギルド解散è¦æ±‚ int mapif_parse_BreakGuild (int fd, int guild_id) { struct guild *g; @@ -1297,14 +1297,14 @@ int mapif_parse_BreakGuild (int fd, int guild_id) return 0; } -// ƒMƒ‹ƒhƒƒbƒZ[ƒW‘—M +// ギルドメッセージé€ä¿¡ int mapif_parse_GuildMessage (int fd, int guild_id, int account_id, char *mes, int len) { return mapif_guild_message (guild_id, account_id, mes, len); } -// ƒMƒ‹ƒhŠî–{ƒf[ƒ^•ÏX—v‹ +// ギルド基本データ変更è¦æ±‚ int mapif_parse_GuildBasicInfoChange (int fd, int guild_id, int type, const char *data, int len) { @@ -1337,7 +1337,7 @@ int mapif_parse_GuildBasicInfoChange (int fd, int guild_id, int type, return 0; } -// ƒMƒ‹ƒhƒƒ“ƒoƒf[ƒ^•ÏX—v‹ +// ギルドメンãƒãƒ‡ãƒ¼ã‚¿å¤‰æ›´è¦æ±‚ int mapif_parse_GuildMemberInfoChange (int fd, int guild_id, int account_id, int char_id, int type, const char *data, int len) @@ -1360,7 +1360,7 @@ int mapif_parse_GuildMemberInfoChange (int fd, int guild_id, int account_id, } switch (type) { - case GMI_POSITION: // –ðE + case GMI_POSITION: // å½¹è· g->member[i].position = *((int *) data); break; case GMI_EXP: // EXP @@ -1368,7 +1368,7 @@ int mapif_parse_GuildMemberInfoChange (int fd, int guild_id, int account_id, int exp, oldexp = g->member[i].exp; exp = g->member[i].exp = *((unsigned int *) data); g->exp += (exp - oldexp); - guild_calcinfo (g); // LvƒAƒbƒv”»’f + guild_calcinfo (g); // Lvã‚¢ãƒƒãƒ—åˆ¤æ– mapif_guild_basicinfochanged (guild_id, GBI_EXP, &g->exp, 4); } break; @@ -1383,7 +1383,7 @@ int mapif_parse_GuildMemberInfoChange (int fd, int guild_id, int account_id, return 0; } -// ƒMƒ‹ƒh–ðE–¼•ÏX—v‹ +// ギルド役è·å変更è¦æ±‚ int mapif_parse_GuildPosition (int fd, int guild_id, int idx, struct guild_position *p) { @@ -1400,7 +1400,7 @@ int mapif_parse_GuildPosition (int fd, int guild_id, int idx, return 0; } -// ƒMƒ‹ƒhƒXƒLƒ‹ƒAƒbƒv—v‹ +// ギルドスã‚ルアップè¦æ±‚ int mapif_parse_GuildSkillUp (int fd, int guild_id, int skill_num, int account_id) { @@ -1423,7 +1423,7 @@ int mapif_parse_GuildSkillUp (int fd, int guild_id, int skill_num, return 0; } -// ƒMƒ‹ƒh“¯–¿—v‹ +// ギルドåŒç›Ÿè¦æ±‚ int mapif_parse_GuildAlliance (int fd, int guild_id1, int guild_id2, int account_id1, int account_id2, int flag) { @@ -1450,7 +1450,7 @@ int mapif_parse_GuildAlliance (int fd, int guild_id1, int guild_id2, } } else - { // ŠÖŒW‰ðÁ + { // 関係解消 for (i = 0; i < 2 - (flag & 1); i++) { for (j = 0; j < MAX_GUILDALLIANCE; j++) @@ -1468,7 +1468,7 @@ int mapif_parse_GuildAlliance (int fd, int guild_id1, int guild_id2, return 0; } -// ƒMƒ‹ƒh’m•ÏX—v‹ +// ギルド告知変更è¦æ±‚ int mapif_parse_GuildNotice (int fd, int guild_id, const char *mes1, const char *mes2) { @@ -1483,7 +1483,7 @@ int mapif_parse_GuildNotice (int fd, int guild_id, const char *mes1, return mapif_guild_notice (g); } -// ƒMƒ‹ƒhƒGƒ“ƒuƒŒƒ€•ÏX—v‹ +// ギルドエンブレム変更è¦æ±‚ int mapif_parse_GuildEmblem (int fd, int len, int guild_id, int dummy, const char *data) { @@ -1697,17 +1697,17 @@ int mapif_parse_GuildCastleDataSave (int fd, int castle_id, int index, return mapif_guild_castle_datasave (gc->castle_id, index, value); } -// ƒMƒ‹ƒhƒ`ƒFƒbƒN—v‹ +// ギルドãƒã‚§ãƒƒã‚¯è¦æ±‚ int mapif_parse_GuildCheck (int fd, int guild_id, int account_id, int char_id) { return guild_check_conflict (guild_id, account_id, 0 /*char_id*/); } -// map server ‚©‚ç‚Ì’ÊM -// E‚PƒpƒPƒbƒg‚̂݉ðÍ‚·‚邱‚Æ -// EƒpƒPƒbƒg’·ƒf[ƒ^‚Íinter.c‚ɃZƒbƒg‚µ‚Ä‚¨‚‚±‚Æ -// EƒpƒPƒbƒg’·ƒ`ƒFƒbƒN‚âARFIFOSKIP‚͌ĂÑo‚µŒ³‚Ås‚í‚ê‚é‚Ì‚Ås‚Á‚Ä‚Í‚È‚ç‚È‚¢ -// EƒGƒ‰[‚È‚ç0(false)A‚»‚¤‚Å‚È‚¢‚È‚ç1(true)‚ð‚©‚¦‚³‚È‚¯‚ê‚΂Ȃç‚È‚¢ +// map server ã‹ã‚‰ã®é€šä¿¡ +// ・1パケットã®ã¿è§£æžã™ã‚‹ã“㨠+// ・パケット長データã¯inter.cã«ã‚»ãƒƒãƒˆã—ã¦ãŠãã“㨠+// ・パケット長ãƒã‚§ãƒƒã‚¯ã‚„ã€RFIFOSKIPã¯å‘¼ã³å‡ºã—å…ƒã§è¡Œã‚れるã®ã§è¡Œã£ã¦ã¯ãªã‚‰ãªã„ +// ・エラーãªã‚‰0(false)ã€ãã†ã§ãªã„ãªã‚‰1(true)ã‚’ã‹ãˆã•ãªã‘ã‚Œã°ãªã‚‰ãªã„ int inter_guild_parse_frommap (int fd) { switch (RFIFOW (fd, 0)) @@ -1799,15 +1799,15 @@ int inter_guild_parse_frommap (int fd) return 1; } -// ƒ}ƒbƒvƒT[ƒo[‚ÌÚ‘±Žžˆ— +// マップサーãƒãƒ¼ã®æŽ¥ç¶šæ™‚å‡¦ç† int inter_guild_mapif_init (int fd) { return mapif_guild_castle_alldataload (fd); } -// ƒT[ƒo[‚©‚ç’E‘Þ—v‹iƒLƒƒƒ‰íœ—pj +// サーãƒãƒ¼ã‹ã‚‰è„±é€€è¦æ±‚(ã‚ャラ削除用) int inter_guild_leave (int guild_id, int account_id, int char_id) { return mapif_parse_GuildLeave (-1, guild_id, account_id, 0 /*char_id*/, 0, - "**ƒT[ƒo[–½—ß**"); + "**サーãƒãƒ¼å‘½ä»¤**"); } diff --git a/src/char/int_party.c b/src/char/int_party.c index fb9c3ca..c501c74 100644 --- a/src/char/int_party.c +++ b/src/char/int_party.c @@ -19,7 +19,7 @@ int mapif_party_broken (int party_id, int flag); int party_check_empty (struct party *p); int mapif_parse_PartyLeave (int fd, int party_id, int account_id); -// ƒp[ƒeƒBƒf[ƒ^‚Ì•¶Žš—ñ‚Ö‚Ì•ÏŠ· +// パーティデータã®æ–‡å—列ã¸ã®å¤‰æ› int inter_party_tostr (char *str, struct party *p) { int i, len; @@ -38,7 +38,7 @@ int inter_party_tostr (char *str, struct party *p) return 0; } -// ƒp[ƒeƒBƒf[ƒ^‚Ì•¶Žš—ñ‚©‚ç‚Ì•ÏŠ· +// パーティデータã®æ–‡å—列ã‹ã‚‰ã®å¤‰æ› int inter_party_fromstr (char *str, struct party *p) { int i, j; @@ -86,7 +86,7 @@ int inter_party_fromstr (char *str, struct party *p) return 0; } -// ƒp[ƒeƒBƒf[ƒ^‚̃[ƒh +// パーティデータã®ãƒãƒ¼ãƒ‰ int inter_party_init () { char line[8192]; @@ -138,7 +138,7 @@ int inter_party_init () return 0; } -// ƒp[ƒeƒB[ƒf[ƒ^‚̃Z[ƒu—p +// パーティーデータã®ã‚»ãƒ¼ãƒ–用 int inter_party_save_sub (void *key, void *data, va_list ap) { char line[8192]; @@ -151,7 +151,7 @@ int inter_party_save_sub (void *key, void *data, va_list ap) return 0; } -// ƒp[ƒeƒB[ƒf[ƒ^‚̃Z[ƒu +// パーティーデータã®ã‚»ãƒ¼ãƒ– int inter_party_save () { FILE *fp; @@ -171,7 +171,7 @@ int inter_party_save () return 0; } -// ƒp[ƒeƒB–¼ŒŸõ—p +// パーティå検索用 int search_partyname_sub (void *key, void *data, va_list ap) { struct party *p = (struct party *) data, **dst; @@ -185,7 +185,7 @@ int search_partyname_sub (void *key, void *data, va_list ap) return 0; } -// ƒp[ƒeƒB–¼ŒŸõ +// パーティå検索 struct party *search_partyname (char *str) { struct party *p = NULL; @@ -194,7 +194,7 @@ struct party *search_partyname (char *str) return p; } -// EXPŒö•½•ª”z‚Å‚«‚é‚©ƒ`ƒFƒbƒN +// EXP公平分é…ã§ãã‚‹ã‹ãƒã‚§ãƒƒã‚¯ int party_check_exp_share (struct party *p) { int i; @@ -215,7 +215,7 @@ int party_check_exp_share (struct party *p) return (maxlv == 0 || maxlv - minlv <= party_share_level); } -// ƒp[ƒeƒB‚ª‹ó‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN +// パーティãŒç©ºã‹ã©ã†ã‹ãƒã‚§ãƒƒã‚¯ int party_check_empty (struct party *p) { int i; @@ -229,7 +229,7 @@ int party_check_empty (struct party *p) return 0; } } - // ’N‚à‚¢‚È‚¢‚̂ʼnðŽU + // 誰もã„ãªã„ã®ã§è§£æ•£ mapif_party_broken (p->party_id, 0); numdb_erase (party_db, p->party_id); free (p); @@ -237,7 +237,7 @@ int party_check_empty (struct party *p) return 1; } -// ƒLƒƒƒ‰‚Ì‹£‡‚ª‚È‚¢‚©ƒ`ƒFƒbƒN—p +// ã‚ャラã®ç«¶åˆãŒãªã„ã‹ãƒã‚§ãƒƒã‚¯ç”¨ int party_check_conflict_sub (void *key, void *data, va_list ap) { struct party *p = (struct party *) data; @@ -248,7 +248,7 @@ int party_check_conflict_sub (void *key, void *data, va_list ap) account_id = va_arg (ap, int); nick = va_arg (ap, char *); - if (p->party_id == party_id) // –{—ˆ‚ÌŠ‘®‚È‚Ì‚Å–â‘è‚È‚µ + if (p->party_id == party_id) // 本æ¥ã®æ‰€å±žãªã®ã§å•é¡Œãªã— return 0; for (i = 0; i < MAX_PARTY; i++) @@ -256,7 +256,7 @@ int party_check_conflict_sub (void *key, void *data, va_list ap) if (p->member[i].account_id == account_id && strcmp (p->member[i].name, nick) == 0) { - // •Ê‚̃p[ƒeƒB‚É‹U‚ÌŠ‘®ƒf[ƒ^‚ª‚ ‚é‚Ì‚Å’E‘Þ + // 別ã®ãƒ‘ーティã«å½ã®æ‰€å±žãƒ‡ãƒ¼ã‚¿ãŒã‚ã‚‹ã®ã§è„±é€€ printf ("int_party: party conflict! %d %d %d\n", account_id, party_id, p->party_id); mapif_parse_PartyLeave (-1, p->party_id, account_id); @@ -266,7 +266,7 @@ int party_check_conflict_sub (void *key, void *data, va_list ap) return 0; } -// ƒLƒƒƒ‰‚Ì‹£‡‚ª‚È‚¢‚©ƒ`ƒFƒbƒN +// ã‚ャラã®ç«¶åˆãŒãªã„ã‹ãƒã‚§ãƒƒã‚¯ int party_check_conflict (int party_id, int account_id, char *nick) { numdb_foreach (party_db, party_check_conflict_sub, party_id, account_id, @@ -276,9 +276,9 @@ int party_check_conflict (int party_id, int account_id, char *nick) } //------------------------------------------------------------------- -// map server‚Ö‚Ì’ÊM +// map serverã¸ã®é€šä¿¡ -// ƒp[ƒeƒBì¬‰Â”Û +// パーティ作æˆå¯å¦ int mapif_party_created (int fd, int account_id, struct party *p) { WFIFOW (fd, 0) = 0x3820; @@ -301,7 +301,7 @@ int mapif_party_created (int fd, int account_id, struct party *p) return 0; } -// ƒp[ƒeƒBî•ñŒ©‚‚©‚炸 +// ãƒ‘ãƒ¼ãƒ†ã‚£æƒ…å ±è¦‹ã¤ã‹ã‚‰ãš int mapif_party_noinfo (int fd, int party_id) { WFIFOW (fd, 0) = 0x3821; @@ -313,7 +313,7 @@ int mapif_party_noinfo (int fd, int party_id) return 0; } -// ƒp[ƒeƒBî•ñ‚Ü‚Æ‚ß‘—‚è +// ãƒ‘ãƒ¼ãƒ†ã‚£æƒ…å ±ã¾ã¨ã‚é€ã‚Š int mapif_party_info (int fd, struct party *p) { unsigned char buf[4 + sizeof (struct party)]; @@ -330,7 +330,7 @@ int mapif_party_info (int fd, struct party *p) return 0; } -// ƒp[ƒeƒBƒƒ“ƒo’ljÁ‰Â”Û +// パーティメンãƒè¿½åŠ å¯å¦ int mapif_party_memberadded (int fd, int party_id, int account_id, int flag) { WFIFOW (fd, 0) = 0x3822; @@ -342,7 +342,7 @@ int mapif_party_memberadded (int fd, int party_id, int account_id, int flag) return 0; } -// ƒp[ƒeƒBÝ’è•ÏX’Ê’m +// パーティè¨å®šå¤‰æ›´é€šçŸ¥ int mapif_party_optionchanged (int fd, struct party *p, int account_id, int flag) { @@ -364,7 +364,7 @@ int mapif_party_optionchanged (int fd, struct party *p, int account_id, return 0; } -// ƒp[ƒeƒB’E‘Þ’Ê’m +// パーティ脱退通知 int mapif_party_leaved (int party_id, int account_id, char *name) { unsigned char buf[34]; @@ -379,7 +379,7 @@ int mapif_party_leaved (int party_id, int account_id, char *name) return 0; } -// ƒp[ƒeƒBƒ}ƒbƒvXV’Ê’m +// パーティマップ更新通知 int mapif_party_membermoved (struct party *p, int idx) { unsigned char buf[29]; @@ -395,7 +395,7 @@ int mapif_party_membermoved (struct party *p, int idx) return 0; } -// ƒp[ƒeƒB‰ðŽU’Ê’m +// パーティ解散通知 int mapif_party_broken (int party_id, int flag) { unsigned char buf[7]; @@ -408,7 +408,7 @@ int mapif_party_broken (int party_id, int flag) return 0; } -// ƒp[ƒeƒB“à”Œ¾ +// パーティ内発言 int mapif_party_message (int party_id, int account_id, char *mes, int len) { unsigned char buf[len + 12]; @@ -424,9 +424,9 @@ int mapif_party_message (int party_id, int account_id, char *mes, int len) } //------------------------------------------------------------------- -// map server‚©‚ç‚Ì’ÊM +// map serverã‹ã‚‰ã®é€šä¿¡ -// ƒp[ƒeƒB +// パーティ int mapif_parse_CreateParty (int fd, int account_id, char *name, char *nick, char *map, int lv) { @@ -476,7 +476,7 @@ int mapif_parse_CreateParty (int fd, int account_id, char *name, char *nick, return 0; } -// ƒp[ƒeƒBî•ñ—v‹ +// ãƒ‘ãƒ¼ãƒ†ã‚£æƒ…å ±è¦æ±‚ int mapif_parse_PartyInfo (int fd, int party_id) { struct party *p; @@ -490,7 +490,7 @@ int mapif_parse_PartyInfo (int fd, int party_id) return 0; } -// ƒp[ƒeƒB’ljÁ—v‹ +// ãƒ‘ãƒ¼ãƒ†ã‚£è¿½åŠ è¦æ±‚ int mapif_parse_PartyAddMember (int fd, int party_id, int account_id, char *nick, char *map, int lv) { @@ -534,7 +534,7 @@ int mapif_parse_PartyAddMember (int fd, int party_id, int account_id, return 0; } -// ƒp[ƒeƒB[Ý’è•ÏX—v‹ +// パーティーè¨å®šå¤‰æ›´è¦æ±‚ int mapif_parse_PartyChangeOption (int fd, int party_id, int account_id, int exp, int item) { @@ -558,7 +558,7 @@ int mapif_parse_PartyChangeOption (int fd, int party_id, int account_id, return 0; } -// ƒp[ƒeƒB’E‘Þ—v‹ +// パーティ脱退è¦æ±‚ int mapif_parse_PartyLeave (int fd, int party_id, int account_id) { struct party *p; @@ -575,7 +575,7 @@ int mapif_parse_PartyLeave (int fd, int party_id, int account_id) memset (&p->member[i], 0, sizeof (struct party_member)); if (party_check_empty (p) == 0) - mapif_party_info (-1, p); // ‚Ü‚¾l‚ª‚¢‚é‚̂Ńf[ƒ^‘—M + mapif_party_info (-1, p); // ã¾ã 人ãŒã„ã‚‹ã®ã§ãƒ‡ãƒ¼ã‚¿é€ä¿¡ return 0; } } @@ -584,7 +584,7 @@ int mapif_parse_PartyLeave (int fd, int party_id, int account_id) return 0; } -// ƒp[ƒeƒBƒ}ƒbƒvXV—v‹ +// パーティマップ更新è¦æ±‚ int mapif_parse_PartyChangeMap (int fd, int party_id, int account_id, char *map, int online, int lv) { @@ -620,7 +620,7 @@ int mapif_parse_PartyChangeMap (int fd, int party_id, int account_id, return 0; } -// ƒp[ƒeƒB‰ðŽU—v‹ +// パーティ解散è¦æ±‚ int mapif_parse_BreakParty (int fd, int party_id) { struct party *p; @@ -635,24 +635,24 @@ int mapif_parse_BreakParty (int fd, int party_id) return 0; } -// ƒp[ƒeƒBƒƒbƒZ[ƒW‘—M +// パーティメッセージé€ä¿¡ int mapif_parse_PartyMessage (int fd, int party_id, int account_id, char *mes, int len) { return mapif_party_message (party_id, account_id, mes, len); } -// ƒp[ƒeƒBƒ`ƒFƒbƒN—v‹ +// パーティãƒã‚§ãƒƒã‚¯è¦æ±‚ int mapif_parse_PartyCheck (int fd, int party_id, int account_id, char *nick) { return party_check_conflict (party_id, account_id, nick); } -// map server ‚©‚ç‚Ì’ÊM -// E‚PƒpƒPƒbƒg‚̂݉ðÍ‚·‚邱‚Æ -// EƒpƒPƒbƒg’·ƒf[ƒ^‚Íinter.c‚ɃZƒbƒg‚µ‚Ä‚¨‚‚±‚Æ -// EƒpƒPƒbƒg’·ƒ`ƒFƒbƒN‚âARFIFOSKIP‚͌ĂÑo‚µŒ³‚Ås‚í‚ê‚é‚Ì‚Ås‚Á‚Ä‚Í‚È‚ç‚È‚¢ -// EƒGƒ‰[‚È‚ç0(false)A‚»‚¤‚Å‚È‚¢‚È‚ç1(true)‚ð‚©‚¦‚³‚È‚¯‚ê‚΂Ȃç‚È‚¢ +// map server ã‹ã‚‰ã®é€šä¿¡ +// ・1パケットã®ã¿è§£æžã™ã‚‹ã“㨠+// ・パケット長データã¯inter.cã«ã‚»ãƒƒãƒˆã—ã¦ãŠãã“㨠+// ・パケット長ãƒã‚§ãƒƒã‚¯ã‚„ã€RFIFOSKIPã¯å‘¼ã³å‡ºã—å…ƒã§è¡Œã‚れるã®ã§è¡Œã£ã¦ã¯ãªã‚‰ãªã„ +// ・エラーãªã‚‰0(false)ã€ãã†ã§ãªã„ãªã‚‰1(true)ã‚’ã‹ãˆã•ãªã‘ã‚Œã°ãªã‚‰ãªã„ int inter_party_parse_frommap (int fd) { switch (RFIFOW (fd, 0)) @@ -700,7 +700,7 @@ int inter_party_parse_frommap (int fd) return 1; } -// ƒT[ƒo[‚©‚ç’E‘Þ—v‹iƒLƒƒƒ‰íœ—pj +// サーãƒãƒ¼ã‹ã‚‰è„±é€€è¦æ±‚(ã‚ャラ削除用) int inter_party_leave (int party_id, int account_id) { return mapif_parse_PartyLeave (-1, party_id, account_id); diff --git a/src/char/int_storage.c b/src/char/int_storage.c index 47dff67..744a59f 100644 --- a/src/char/int_storage.c +++ b/src/char/int_storage.c @@ -13,15 +13,15 @@ #include "int_storage.h" #include "int_guild.h" -// ƒtƒ@ƒCƒ‹–¼‚̃fƒtƒHƒ‹ƒg -// inter_config_read()‚ÅÄݒ肳‚ê‚é +// ファイルåã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ +// inter_config_read()ã§å†è¨å®šã•ã‚Œã‚‹ char storage_txt[1024] = "save/storage.txt"; char guild_storage_txt[1024] = "save/g_storage.txt"; static struct dbt *storage_db; static struct dbt *guild_storage_db; -// ‘qŒÉƒf[ƒ^‚𕶎š—ñ‚É•ÏŠ· +// 倉庫データを文å—列ã«å¤‰æ› int storage_tostr (char *str, struct storage *p) { int i, f = 0; @@ -49,7 +49,7 @@ int storage_tostr (char *str, struct storage *p) return 0; } -// •¶Žš—ñ‚ð‘qŒÉƒf[ƒ^‚É•ÏŠ· +// æ–‡å—列を倉庫データã«å¤‰æ› int storage_fromstr (char *str, struct storage *p) { int tmp_int[256]; @@ -215,7 +215,7 @@ int guild_storage_fromstr (char *str, struct guild_storage *p) return 0; } -// ƒAƒJƒEƒ“ƒg‚©‚ç‘qŒÉƒf[ƒ^ƒCƒ“ƒfƒbƒNƒX‚𓾂éiV‹K‘qŒÉ’ljÁ‰Â”\j +// アカウントã‹ã‚‰å€‰åº«ãƒ‡ãƒ¼ã‚¿ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’得る(新è¦å€‰åº«è¿½åŠ å¯èƒ½ï¼‰ struct storage *account2storage (int account_id) { struct storage *s; @@ -260,7 +260,7 @@ struct guild_storage *guild2storage (int guild_id) } //--------------------------------------------------------- -// ‘qŒÉƒf[ƒ^‚ð“Ç‚Ýž‚Þ +// 倉庫データをèªã¿è¾¼ã‚€ int inter_storage_init () { char line[65536]; @@ -375,7 +375,7 @@ int inter_storage_save_sub (void *key, void *data, va_list ap) } //--------------------------------------------------------- -// ‘qŒÉƒf[ƒ^‚ð‘‚«ž‚Þ +// 倉庫データを書ã込む int inter_storage_save () { FILE *fp; @@ -413,7 +413,7 @@ int inter_guild_storage_save_sub (void *key, void *data, va_list ap) } //--------------------------------------------------------- -// ‘qŒÉƒf[ƒ^‚ð‘‚«ž‚Þ +// 倉庫データを書ã込む int inter_guild_storage_save () { FILE *fp; @@ -434,7 +434,7 @@ int inter_guild_storage_save () return 0; } -// ‘qŒÉƒf[ƒ^íœ +// 倉庫データ削除 int inter_storage_delete (int account_id) { struct storage *s = @@ -447,7 +447,7 @@ int inter_storage_delete (int account_id) return 0; } -// ƒMƒ‹ƒh‘qŒÉƒf[ƒ^íœ +// ギルド倉庫データ削除 int inter_guild_storage_delete (int guild_id) { struct guild_storage *gs = @@ -461,9 +461,9 @@ int inter_guild_storage_delete (int guild_id) } //--------------------------------------------------------- -// map server‚Ö‚Ì’ÊM +// map serverã¸ã®é€šä¿¡ -// ‘qŒÉƒf[ƒ^‚Ì‘—M +// 倉庫データã®é€ä¿¡ int mapif_load_storage (int fd, int account_id) { struct storage *s = account2storage (account_id); @@ -475,7 +475,7 @@ int mapif_load_storage (int fd, int account_id) return 0; } -// ‘qŒÉƒf[ƒ^•Û‘¶Š®—¹‘—M +// 倉庫データä¿å˜å®Œäº†é€ä¿¡ int mapif_save_storage_ack (int fd, int account_id) { WFIFOW (fd, 0) = 0x3811; @@ -519,16 +519,16 @@ int mapif_save_guild_storage_ack (int fd, int account_id, int guild_id, } //--------------------------------------------------------- -// map server‚©‚ç‚Ì’ÊM +// map serverã‹ã‚‰ã®é€šä¿¡ -// ‘qŒÉƒf[ƒ^—v‹ŽóM +// 倉庫データè¦æ±‚å—ä¿¡ int mapif_parse_LoadStorage (int fd) { mapif_load_storage (fd, RFIFOL (fd, 2)); return 0; } -// ‘qŒÉƒf[ƒ^ŽóM••Û‘¶ +// 倉庫データå—信&ä¿å˜ int mapif_parse_SaveStorage (int fd) { struct storage *s; @@ -578,11 +578,11 @@ int mapif_parse_SaveGuildStorage (int fd) return 0; } -// map server ‚©‚ç‚Ì’ÊM -// E‚PƒpƒPƒbƒg‚̂݉ðÍ‚·‚邱‚Æ -// EƒpƒPƒbƒg’·ƒf[ƒ^‚Íinter.c‚ɃZƒbƒg‚µ‚Ä‚¨‚‚±‚Æ -// EƒpƒPƒbƒg’·ƒ`ƒFƒbƒN‚âARFIFOSKIP‚͌ĂÑo‚µŒ³‚Ås‚í‚ê‚é‚Ì‚Ås‚Á‚Ä‚Í‚È‚ç‚È‚¢ -// EƒGƒ‰[‚È‚ç0(false)A‚»‚¤‚Å‚È‚¢‚È‚ç1(true)‚ð‚©‚¦‚³‚È‚¯‚ê‚΂Ȃç‚È‚¢ +// map server ã‹ã‚‰ã®é€šä¿¡ +// ・1パケットã®ã¿è§£æžã™ã‚‹ã“㨠+// ・パケット長データã¯inter.cã«ã‚»ãƒƒãƒˆã—ã¦ãŠãã“㨠+// ・パケット長ãƒã‚§ãƒƒã‚¯ã‚„ã€RFIFOSKIPã¯å‘¼ã³å‡ºã—å…ƒã§è¡Œã‚れるã®ã§è¡Œã£ã¦ã¯ãªã‚‰ãªã„ +// ・エラーãªã‚‰0(false)ã€ãã†ã§ãªã„ãªã‚‰1(true)ã‚’ã‹ãˆã•ãªã‘ã‚Œã°ãªã‚‰ãªã„ int inter_storage_parse_frommap (int fd) { switch (RFIFOW (fd, 0)) diff --git a/src/char/inter.c b/src/char/inter.c index 19e1d83..89a3e39 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -30,7 +30,7 @@ struct accreg int party_share_level = 10; -// ‘—MƒpƒPƒbƒg’·ƒŠƒXƒg +// é€ä¿¡ãƒ‘ケット長リスト int inter_send_packet_length[] = { -1, -1, 27, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, -1, 11, 0, 0, 0, 0, 0, 0, @@ -43,7 +43,7 @@ int inter_send_packet_length[] = { 11, -1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -// ŽóMƒpƒPƒbƒg’·ƒŠƒXƒg +// å—信パケット長リスト int inter_recv_packet_length[] = { -1, -1, 7, -1, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, -1, 0, 0, 0, 0, 0, 0, 10, -1, 0, 0, 0, 0, 0, 0, @@ -67,7 +67,7 @@ static int wis_dellist[WISDELLIST_MAX], wis_delnum; //-------------------------------------------------------- -// ƒAƒJƒEƒ“ƒg•Ï”‚𕶎š—ñ‚Ö•ÏŠ· +// アカウント変数を文å—列ã¸å¤‰æ› int inter_accreg_tostr (char *str, struct accreg *reg) { int j; @@ -82,7 +82,7 @@ int inter_accreg_tostr (char *str, struct accreg *reg) return 0; } -// ƒAƒJƒEƒ“ƒg•Ï”‚𕶎š—ñ‚©‚ç•ÏŠ· +// アカウント変数を文å—列ã‹ã‚‰å¤‰æ› int inter_accreg_fromstr (const char *str, struct accreg *reg) { int j, v, n; @@ -105,7 +105,7 @@ int inter_accreg_fromstr (const char *str, struct accreg *reg) return 0; } -// ƒAƒJƒEƒ“ƒg•Ï”‚Ì“Ç‚Ýž‚Ý +// アカウント変数ã®èªã¿è¾¼ã¿ int inter_accreg_init () { char line[8192]; @@ -145,7 +145,7 @@ int inter_accreg_init () return 0; } -// ƒAƒJƒEƒ“ƒg•Ï”‚̃Z[ƒu—p +// アカウント変数ã®ã‚»ãƒ¼ãƒ–用 int inter_accreg_save_sub (void *key, void *data, va_list ap) { char line[8192]; @@ -162,7 +162,7 @@ int inter_accreg_save_sub (void *key, void *data, va_list ap) return 0; } -// ƒAƒJƒEƒ“ƒg•Ï”‚̃Z[ƒu +// アカウント変数ã®ã‚»ãƒ¼ãƒ– int inter_accreg_save () { FILE *fp; @@ -184,7 +184,7 @@ int inter_accreg_save () //-------------------------------------------------------- /*========================================== - * Ý’èƒtƒ@ƒCƒ‹‚ð“Ç‚Ýž‚Þ + * è¨å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’èªã¿è¾¼ã‚€ *------------------------------------------ */ int inter_config_read (const char *cfgName) @@ -251,7 +251,7 @@ int inter_config_read (const char *cfgName) return 0; } -// ƒƒO‘‚«o‚µ +// ãƒã‚°æ›¸ã出㗠int inter_log (char *fmt, ...) { FILE *logfp; @@ -269,7 +269,7 @@ int inter_log (char *fmt, ...) return 0; } -// ƒZ[ƒu +// セーブ int inter_save () { inter_party_save (); @@ -281,7 +281,7 @@ int inter_save () return 0; } -// ‰Šú‰» +// åˆæœŸåŒ– int inter_init (const char *file) { inter_config_read (file); @@ -296,7 +296,7 @@ int inter_init (const char *file) return 0; } -// ƒ}ƒbƒvƒT[ƒo[Ú‘± +// マップサーãƒãƒ¼æŽ¥ç¶š int inter_mapif_init (int fd) { inter_guild_mapif_init (fd); @@ -307,7 +307,7 @@ int inter_mapif_init (int fd) //-------------------------------------------------------- // sended packets to map-server -// GMƒƒbƒZ[ƒW‘—M +// GMメッセージé€ä¿¡ int mapif_GMmessage (unsigned char *mes, int len) { unsigned char buf[len]; @@ -351,7 +351,7 @@ int mapif_wis_end (struct WisData *wd, int flag) return 0; } -// ƒAƒJƒEƒ“ƒg•Ï”‘—M +// アカウント変数é€ä¿¡ int mapif_account_reg (int fd, unsigned char *src) { unsigned char buf[WBUFW (src, 2)]; @@ -363,7 +363,7 @@ int mapif_account_reg (int fd, unsigned char *src) return 0; } -// ƒAƒJƒEƒ“ƒg•Ï”—v‹•ÔM +// アカウント変数è¦æ±‚返信 int mapif_account_reg_reply (int fd, int account_id) { struct accreg *reg = numdb_search (accreg_db, account_id); @@ -433,7 +433,7 @@ int check_ttl_wisdata () //-------------------------------------------------------- // received packets from map-server -// GMƒƒbƒZ[ƒW‘—M +// GMメッセージé€ä¿¡ int mapif_parse_GMmessage (int fd) { mapif_GMmessage (RFIFOP (fd, 4), RFIFOW (fd, 2)); @@ -542,7 +542,7 @@ int mapif_parse_WisToGM (int fd) return 0; } -// ƒAƒJƒEƒ“ƒg•Ï”•Û‘¶—v‹ +// アカウント変数ä¿å˜è¦æ±‚ int mapif_parse_AccReg (int fd) { int j, p; @@ -567,12 +567,12 @@ int mapif_parse_AccReg (int fd) } reg->reg_num = j; - mapif_account_reg (fd, RFIFOP (fd, 0)); // ‘¼‚ÌMAPƒT[ƒo[‚É‘—M + mapif_account_reg (fd, RFIFOP (fd, 0)); // ä»–ã®MAPサーãƒãƒ¼ã«é€ä¿¡ return 0; } -// ƒAƒJƒEƒ“ƒg•Ï”‘—M—v‹ +// アカウント変数é€ä¿¡è¦æ±‚ int mapif_parse_AccRegRequest (int fd) { // printf("mapif: accreg request\n"); @@ -581,15 +581,15 @@ int mapif_parse_AccRegRequest (int fd) //-------------------------------------------------------- -// map server ‚©‚ç‚Ì’ÊMi‚PƒpƒPƒbƒg‚̂݉ðÍ‚·‚邱‚Æj -// ƒGƒ‰[‚È‚ç0(false)Aˆ—‚Å‚«‚½‚È‚ç1A -// ƒpƒPƒbƒg’·‚ª‘«‚è‚È‚¯‚ê‚Î2‚ð‚©‚¦‚³‚È‚¯‚ê‚΂Ȃç‚È‚¢ +// map server ã‹ã‚‰ã®é€šä¿¡ï¼ˆï¼‘パケットã®ã¿è§£æžã™ã‚‹ã“ã¨ï¼‰ +// エラーãªã‚‰0(false)ã€å‡¦ç†ã§ããŸãªã‚‰1〠+// パケット長ãŒè¶³ã‚Šãªã‘ã‚Œã°2ã‚’ã‹ãˆã•ãªã‘ã‚Œã°ãªã‚‰ãªã„ int inter_parse_frommap (int fd) { int cmd = RFIFOW (fd, 0); int len = 0; - // interŽIŠÇŠ‚©‚𒲂ׂé + // inter鯖管轄ã‹ã‚’調ã¹ã‚‹ if (cmd < 0x3000 || cmd >= 0x3000 + @@ -597,7 +597,7 @@ int inter_parse_frommap (int fd) sizeof (inter_recv_packet_length[0]))) return 0; - // ƒpƒPƒbƒg’·‚𒲂ׂé + // パケット長を調ã¹ã‚‹ if ((len = inter_check_length (fd, inter_recv_packet_length[cmd - 0x3000])) == 0) @@ -637,18 +637,18 @@ int inter_parse_frommap (int fd) return 1; } -// RFIFO‚̃pƒPƒbƒg’·Šm”F -// •K—vƒpƒPƒbƒg’·‚ª‚ ‚ê‚΃pƒPƒbƒg’·A‚Ü‚¾‘«‚è‚È‚¯‚ê‚Î0 +// RFIFOã®ãƒ‘ã‚±ãƒƒãƒˆé•·ç¢ºèª +// å¿…è¦ãƒ‘ケット長ãŒã‚ã‚Œã°ãƒ‘ケット長ã€ã¾ã 足りãªã‘ã‚Œã°0 int inter_check_length (int fd, int length) { if (length == -1) - { // ‰Â•ÏƒpƒPƒbƒg’· - if (RFIFOREST (fd) < 4) // ƒpƒPƒbƒg’·‚ª–¢’… + { // å¯å¤‰ãƒ‘ケット長 + if (RFIFOREST (fd) < 4) // パケット長ãŒæœªç€ return 0; length = RFIFOW (fd, 2); } - if (RFIFOREST (fd) < length) // ƒpƒPƒbƒg‚ª–¢’… + if (RFIFOREST (fd) < length) // パケットãŒæœªç€ return 0; return length; |