diff options
Diffstat (limited to 'src/map/party.c')
-rw-r--r-- | src/map/party.c | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/src/map/party.c b/src/map/party.c index 3277edf..f87d390 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -21,13 +21,13 @@ #include "memwatch.h" #endif -#define PARTY_SEND_XYHP_INVERVAL 1000 // À•W‚â‚g‚o‘—M‚ÌŠÔŠu +#define PARTY_SEND_XYHP_INVERVAL 1000 // 座標やHPé€ä¿¡ã®é–“éš” static struct dbt *party_db; int party_send_xyhp_timer (int tid, unsigned int tick, int id, int data); /*========================================== - * I—¹ + * 終了 *------------------------------------------ */ static int party_db_final (void *key, void *data, va_list ap) @@ -42,7 +42,7 @@ void do_final_party (void) numdb_final (party_db, party_db_final); } -// ‰Šú‰» +// åˆæœŸåŒ– void do_init_party (void) { party_db = numdb_init (); @@ -52,7 +52,7 @@ void do_init_party (void) PARTY_SEND_XYHP_INVERVAL); } -// ŒŸõ +// 検索 struct party *party_search (int party_id) { return numdb_search (party_db, party_id); @@ -69,7 +69,7 @@ int party_searchname_sub (void *key, void *data, va_list ap) return 0; } -// ƒp[ƒeƒB–¼ŒŸõ +// パーティå検索 struct party *party_searchname (char *str) { struct party *p = NULL; @@ -135,13 +135,13 @@ int party_created (int account_id, int fail, int party_id, char *name) return 0; } -// î•ñ—v‹ +// æƒ…å ±è¦æ±‚ int party_request_info (int party_id) { return intif_request_partyinfo (party_id); } -// Š‘®ƒLƒƒƒ‰‚ÌŠm”F +// 所属ã‚ャラã®ç¢ºèª int party_check_member (struct party *p) { int i; @@ -157,13 +157,13 @@ int party_check_member (struct party *p) { int j, f = 1; for (j = 0; j < MAX_PARTY; j++) - { // ƒp[ƒeƒB‚Ƀf[ƒ^‚ª‚ ‚é‚©Šm”F + { // パーティã«ãƒ‡ãƒ¼ã‚¿ãŒã‚ã‚‹ã‹ç¢ºèª if (p->member[j].account_id == sd->status.account_id) { if (strcmp (p->member[j].name, sd->status.name) == 0) - f = 0; // ƒf[ƒ^‚ª‚ ‚é + f = 0; // データãŒã‚ã‚‹ else - p->member[j].sd = NULL; // “¯C•ÊƒLƒƒƒ‰‚¾‚Á‚½ + p->member[j].sd = NULL; // åŒåž¢åˆ¥ã‚ャラã ã£ãŸ } } if (f) @@ -179,7 +179,7 @@ int party_check_member (struct party *p) return 0; } -// î•ñŠ“¾Ž¸”si‚»‚ÌID‚̃Lƒƒƒ‰‚ð‘S•”–¢Š‘®‚É‚·‚éj +// æƒ…å ±æ‰€å¾—å¤±æ•—ï¼ˆãã®IDã®ã‚ャラを全部未所属ã«ã™ã‚‹ï¼‰ int party_recv_noinfo (int party_id) { int i; @@ -195,7 +195,7 @@ int party_recv_noinfo (int party_id) return 0; } -// î•ñŠ“¾ +// æƒ…å ±æ‰€å¾— int party_recv_info (struct party *sp) { struct party *p; @@ -208,13 +208,13 @@ int party_recv_info (struct party *sp) p = (struct party *) aCalloc (1, sizeof (struct party)); numdb_insert (party_db, sp->party_id, p); - // ʼn‚̃[ƒh‚Ȃ̂ц[ƒU[‚̃`ƒFƒbƒN‚ðs‚¤ + // 最åˆã®ãƒãƒ¼ãƒ‰ãªã®ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒã‚§ãƒƒã‚¯ã‚’行ㆠparty_check_member (sp); } memcpy (p, sp, sizeof (struct party)); for (i = 0; i < MAX_PARTY; i++) - { // sd‚ÌÝ’è + { // sdã®è¨å®š struct map_session_data *sd = map_id2sd (p->member[i].account_id); p->member[i].sd = (sd != NULL && sd->status.party_id == p->party_id) ? sd : NULL; @@ -223,7 +223,7 @@ int party_recv_info (struct party *sp) clif_party_info (p, -1); for (i = 0; i < MAX_PARTY; i++) - { // Ý’èî•ñ‚Ì‘—M + { // è¨å®šæƒ…å ±ã®é€ä¿¡ // struct map_session_data *sd = map_id2sd(p->member[i].account_id); struct map_session_data *sd = p->member[i].sd; if (sd != NULL && sd->party_sended == 0) @@ -334,7 +334,7 @@ int party_reply_invite (struct map_session_data *sd, int account_id, int flag) return 0; } -// ƒp[ƒeƒB‚ª’ljÁ‚³‚ꂽ +// パーティãŒè¿½åŠ ã•ã‚ŒãŸ int party_member_added (int party_id, int account_id, int flag) { struct map_session_data *sd = map_id2sd (account_id), *sd2; @@ -347,7 +347,7 @@ int party_member_added (int party_id, int account_id, int flag) if (battle_config.error_log) printf ("party: member added error %d is not online\n", account_id); - intif_party_leave (party_id, account_id); // ƒLƒƒƒ‰‘¤‚É“o˜^‚Å‚«‚È‚©‚Á‚½‚½‚ß’E‘Þ—v‹‚ðo‚· + intif_party_leave (party_id, account_id); // ã‚ャラå´ã«ç™»éŒ²ã§ããªã‹ã£ãŸãŸã‚脱退è¦æ±‚を出㙠} return 0; } @@ -363,20 +363,20 @@ int party_member_added (int party_id, int account_id, int flag) } if (flag == 1) - { // Ž¸”s + { // 失敗 if (sd2 != NULL) clif_party_inviteack (sd2, sd->status.name, 0); return 0; } - // ¬Œ÷ + // æˆåŠŸ sd->party_sended = 0; sd->status.party_id = party_id; if (sd2 != NULL) clif_party_inviteack (sd2, sd->status.name, 2); - // ‚¢‚¿‚¨‚¤‹£‡Šm”F + // ã„ã¡ãŠã†ç«¶åˆç¢ºèª party_check_conflict (sd); party_send_xy_clear (p); @@ -384,7 +384,7 @@ int party_member_added (int party_id, int account_id, int flag) return 0; } -// ƒp[ƒeƒBœ–¼—v‹ +// パーティ除åè¦æ±‚ int party_removemember (struct map_session_data *sd, int account_id, char *name) { @@ -397,14 +397,14 @@ int party_removemember (struct map_session_data *sd, int account_id, return 0; for (i = 0; i < MAX_PARTY; i++) - { // ƒŠ[ƒ_[‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN + { // リーダーã‹ã©ã†ã‹ãƒã‚§ãƒƒã‚¯ if (p->member[i].account_id == sd->status.account_id) if (p->member[i].leader == 0) return 0; } for (i = 0; i < MAX_PARTY; i++) - { // Š‘®‚µ‚Ä‚¢‚é‚©’²‚ׂé + { // 所属ã—ã¦ã„ã‚‹ã‹èª¿ã¹ã‚‹ if (p->member[i].account_id == account_id) { intif_party_leave (p->party_id, account_id); @@ -414,7 +414,7 @@ int party_removemember (struct map_session_data *sd, int account_id, return 0; } -// ƒp[ƒeƒB’E‘Þ—v‹ +// パーティ脱退è¦æ±‚ int party_leave (struct map_session_data *sd) { struct party *p; @@ -426,7 +426,7 @@ int party_leave (struct map_session_data *sd) return 0; for (i = 0; i < MAX_PARTY; i++) - { // Š‘®‚µ‚Ä‚¢‚é‚© + { // 所属ã—ã¦ã„ã‚‹ã‹ if (p->member[i].account_id == sd->status.account_id) { intif_party_leave (p->party_id, sd->status.account_id); @@ -436,7 +436,7 @@ int party_leave (struct map_session_data *sd) return 0; } -// ƒp[ƒeƒBƒƒ“ƒo‚ª’E‘Þ‚µ‚½ +// パーティメンãƒãŒè„±é€€ã—㟠int party_member_leaved (int party_id, int account_id, char *name) { struct map_session_data *sd = map_id2sd (account_id); @@ -460,7 +460,7 @@ int party_member_leaved (int party_id, int account_id, char *name) return 0; } -// ƒp[ƒeƒB‰ðŽU’Ê’m +// パーティ解散通知 int party_broken (int party_id) { struct party *p; @@ -483,7 +483,7 @@ int party_broken (int party_id) return 0; } -// ƒp[ƒeƒB‚ÌÝ’è•ÏX—v‹ +// パーティã®è¨å®šå¤‰æ›´è¦æ±‚ int party_changeoption (struct map_session_data *sd, int exp, int item) { struct party *p; @@ -498,7 +498,7 @@ int party_changeoption (struct map_session_data *sd, int exp, int item) return 0; } -// ƒp[ƒeƒB‚ÌÝ’è•ÏX’Ê’m +// パーティã®è¨å®šå¤‰æ›´é€šçŸ¥ int party_optionchanged (int party_id, int account_id, int exp, int item, int flag) { @@ -515,7 +515,7 @@ int party_optionchanged (int party_id, int account_id, int exp, int item, return 0; } -// ƒp[ƒeƒBƒƒ“ƒo‚̈ړ®’Ê’m +// パーティメンãƒã®ç§»å‹•é€šçŸ¥ int party_recv_movemap (int party_id, int account_id, char *map, int online, int lv) { @@ -548,19 +548,19 @@ int party_recv_movemap (int party_id, int account_id, char *map, int online, } for (i = 0; i < MAX_PARTY; i++) - { // sdÄÝ’è + { // sdå†è¨å®š struct map_session_data *sd = map_id2sd (p->member[i].account_id); p->member[i].sd = (sd != NULL && sd->status.party_id == p->party_id) ? sd : NULL; } - party_send_xy_clear (p); // À•WÄ’Ê’m—v¿ + party_send_xy_clear (p); // 座標å†é€šçŸ¥è¦è«‹ clif_party_info (p, -1); return 0; } -// ƒp[ƒeƒBƒƒ“ƒo‚̈ړ® +// パーティメンãƒã®ç§»å‹• int party_send_movemap (struct map_session_data *sd) { struct party *p; @@ -571,16 +571,16 @@ int party_send_movemap (struct map_session_data *sd) return 0; intif_party_changemap (sd, 1); - if (sd->party_sended != 0) // ‚à‚¤ƒp[ƒeƒBƒf[ƒ^‚Í‘—MÏ‚Ý + if (sd->party_sended != 0) // ã‚‚ã†ãƒ‘ーティデータã¯é€ä¿¡æ¸ˆã¿ return 0; - // ‹£‡Šm”F + // 競åˆç¢ºèª party_check_conflict (sd); - // ‚ ‚é‚È‚çƒp[ƒeƒBî•ñ‘—M + // ã‚ã‚‹ãªã‚‰ãƒ‘ãƒ¼ãƒ†ã‚£æƒ…å ±é€ä¿¡ if ((p = party_search (sd->status.party_id)) != NULL) { - party_check_member (p); // Š‘®‚ðŠm”F‚·‚é + party_check_member (p); // 所属を確èªã™ã‚‹ if (sd->status.party_id == p->party_id) { clif_party_info (p, sd->fd); @@ -592,7 +592,7 @@ int party_send_movemap (struct map_session_data *sd) return 0; } -// ƒp[ƒeƒBƒƒ“ƒo‚̃ƒOƒAƒEƒg +// パーティメンãƒã®ãƒã‚°ã‚¢ã‚¦ãƒˆ int party_send_logout (struct map_session_data *sd) { struct party *p; @@ -602,7 +602,7 @@ int party_send_logout (struct map_session_data *sd) if (sd->status.party_id > 0) intif_party_changemap (sd, 0); - // sd‚ª–³Œø‚É‚È‚é‚̂Ńp[ƒeƒBî•ñ‚©‚çíœ + // sdãŒç„¡åŠ¹ã«ãªã‚‹ã®ã§ãƒ‘ãƒ¼ãƒ†ã‚£æƒ…å ±ã‹ã‚‰å‰Šé™¤ if ((p = party_search (sd->status.party_id)) != NULL) { int i; @@ -614,7 +614,7 @@ int party_send_logout (struct map_session_data *sd) return 0; } -// ƒp[ƒeƒBƒƒbƒZ[ƒW‘—M +// パーティメッセージé€ä¿¡ int party_send_message (struct map_session_data *sd, char *mes, int len) { if (sd->status.party_id == 0) @@ -624,7 +624,7 @@ int party_send_message (struct map_session_data *sd, char *mes, int len) return 0; } -// ƒp[ƒeƒBƒƒbƒZ[ƒWŽóM +// パーティメッセージå—ä¿¡ int party_recv_message (int party_id, int account_id, char *mes, int len) { struct party *p; @@ -634,7 +634,7 @@ int party_recv_message (int party_id, int account_id, char *mes, int len) return 0; } -// ƒp[ƒeƒB‹£‡Šm”F +// パーティ競åˆç¢ºèª int party_check_conflict (struct map_session_data *sd) { nullpo_retr (0, sd); @@ -644,7 +644,7 @@ int party_check_conflict (struct map_session_data *sd) return 0; } -// ˆÊ’u‚â‚g‚o’Ê’m—p +// ä½ç½®ã‚„HP通知用 int party_send_xyhp_timer_sub (void *key, void *data, va_list ap) { struct party *p = (struct party *) data; @@ -657,14 +657,14 @@ int party_send_xyhp_timer_sub (void *key, void *data, va_list ap) struct map_session_data *sd; if ((sd = p->member[i].sd) != NULL) { - // À•W’Ê’m + // 座標通知 if (sd->party_x != sd->bl.x || sd->party_y != sd->bl.y) { clif_party_xy (p, sd); sd->party_x = sd->bl.x; sd->party_y = sd->bl.y; } - // ‚g‚o’Ê’m + // HP通知 if (sd->party_hp != sd->status.hp) { clif_party_hp (p, sd); @@ -676,14 +676,14 @@ int party_send_xyhp_timer_sub (void *key, void *data, va_list ap) return 0; } -// ˆÊ’u‚â‚g‚o’Ê’m +// ä½ç½®ã‚„HP通知 int party_send_xyhp_timer (int tid, unsigned int tick, int id, int data) { numdb_foreach (party_db, party_send_xyhp_timer_sub, tick); return 0; } -// ˆÊ’u’Ê’mƒNƒŠƒA +// ä½ç½®é€šçŸ¥ã‚¯ãƒªã‚¢ int party_send_xy_clear (struct party *p) { int i; @@ -703,7 +703,7 @@ int party_send_xy_clear (struct party *p) return 0; } -// HP’Ê’m‚Ì•K—v«ŒŸ¸—pimap_foreachinmovearea‚©‚çŒÄ‚΂ê‚éj +// HP通知ã®å¿…è¦æ€§æ¤œæŸ»ç”¨ï¼ˆmap_foreachinmoveareaã‹ã‚‰å‘¼ã°ã‚Œã‚‹ï¼‰ int party_send_hp_check (struct block_list *bl, va_list ap) { int party_id; @@ -725,7 +725,7 @@ int party_send_hp_check (struct block_list *bl, va_list ap) return 0; } -// ŒoŒ±’lŒö•½•ª”z +// çµŒé¨“å€¤å…¬å¹³åˆ†é… int party_exp_share (struct party *p, int map, int base_exp, int job_exp) { struct map_session_data *sd; @@ -744,9 +744,9 @@ int party_exp_share (struct party *p, int map, int base_exp, int job_exp) return 0; } -// “¯‚¶ƒ}ƒbƒv‚̃p[ƒeƒBƒƒ“ƒo[‘S‘̂Ɉ—‚ð‚©‚¯‚é -// type==0 “¯‚¶ƒ}ƒbƒv -// !=0 ‰æ–Ê“à +// åŒã˜ãƒžãƒƒãƒ—ã®ãƒ‘ーティメンãƒãƒ¼å…¨ä½“ã«å‡¦ç†ã‚’ã‹ã‘ã‚‹ +// type==0 åŒã˜ãƒžãƒƒãƒ— +// !=0 ç”»é¢å†… void party_foreachsamemap (int (*func) (struct block_list *, va_list), struct map_session_data *sd, int type, ...) { @@ -784,13 +784,13 @@ void party_foreachsamemap (int (*func) (struct block_list *, va_list), } } - map_freeblock_lock (); // ƒƒ‚ƒŠ‚©‚ç‚̉ð•ú‚ð‹ÖŽ~‚·‚é + map_freeblock_lock (); // メモリã‹ã‚‰ã®è§£æ”¾ã‚’ç¦æ¢ã™ã‚‹ for (i = 0; i < blockcount; i++) - if (list[i]->prev) // —LŒø‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN + if (list[i]->prev) // 有効ã‹ã©ã†ã‹ãƒã‚§ãƒƒã‚¯ func (list[i], ap); - map_freeblock_unlock (); // ‰ð•ú‚ð‹–‰Â‚·‚é + map_freeblock_unlock (); // 解放を許å¯ã™ã‚‹ va_end (ap); } |