Advertisement
Lighta

guild.c raw doc

Mar 24th, 2012
103
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 22.42 KB
  1. # This patch file was generated by NetBeans IDE
  2. # It uses platform neutral UTF-8 encoding and \n newlines.
  3. --- HEAD
  4. +++ Modified In Working Tree
  5. @@ -39,12 +39,12 @@
  6.     struct eventlist *next;
  7.  };
  8.  
  9. -// �M���h��EXP�L���b�V���̃t���b�V���Ɋ֘A����萔
  10. -#define GUILD_SEND_XY_INVERVAL 5000    // ���W��g�o���M�̊Ԋu
  11. -#define GUILD_PAYEXP_INVERVAL 10000    // �Ԋu(�L���b�V���̍ő吶�����ԁA�~���b)
  12. -#define GUILD_PAYEXP_LIST 8192 // �L���b�V���̍ő吔
  13. +//Constant related to the flash of the Guild EXP cache
  14. +#define GUILD_SEND_XY_INVERVAL 5000 // Interval of sending coordinates and HP
  15. +#define GUILD_PAYEXP_INVERVAL 10000 //Interval (maximum survival time of the cache, in milliseconds)
  16. +#define GUILD_PAYEXP_LIST 8192 //The maximum number of cache
  17.  
  18. -// �M���h��EXP�L���b�V��
  19. +//Guild EXP cache
  20.  struct guild_expcache {
  21.     int guild_id, account_id, char_id;
  22.     uint64 exp;
  23. @@ -91,7 +91,7 @@
  24.     return guild_skill_tree[id-GD_SKILLBASE].max;
  25.  }
  26.  
  27. -// �M���h�X�L�������邩�m�F
  28. +// Retrive skilllv learned by guild
  29.  int guild_checkskill(struct guild *g,int id)
  30.  {
  31.     int idx = id-GD_SKILLBASE;
  32. @@ -261,7 +261,7 @@
  33.     return( i < g->max_member ) ? g->member[i].position : -1;
  34.  }
  35.  
  36. -// �����o�[���̍쐬
  37. +//Creation of member information
  38.  void guild_makemember(struct guild_member *m,struct map_session_data *sd)
  39.  {
  40.     nullpo_retv(sd);
  41. @@ -283,7 +283,7 @@
  42.  }
  43.  
  44.  /**
  45. - *  �M���h��EXP�L���b�V����inter�I�Ƀt���b�V������
  46. + * Server cache to be flushed to inter the Guild EXP
  47.   * @see DBApply
  48.   */
  49.  int guild_payexp_timer_sub(DBKey key, DBData *data, va_list ap) {
  50. @@ -392,7 +392,7 @@
  51.     return 1;
  52.  }
  53.  
  54. -// �쐬�”�
  55. +//Whether or not to create guilde
  56.  int guild_created(int account_id,int guild_id)
  57.  {
  58.     struct map_session_data *sd=map_id2sd(account_id);
  59. @@ -400,7 +400,7 @@
  60.     if(sd==NULL)
  61.         return 0;
  62.     if(!guild_id) {
  63. -       clif_guild_created(sd,2);   // �쐬���s�i�����M���h���݁j
  64. +       clif_guild_created(sd,2);   // Creation failure (presence of the same name Guild)
  65.         return 0;
  66.     }
  67.     //struct guild *g;
  68. @@ -411,13 +411,13 @@
  69.     return 0;
  70.  }
  71.  
  72. -// ���v��
  73. +//Information request
  74.  int guild_request_info(int guild_id)
  75.  {
  76.     return intif_guild_request_info(guild_id);
  77.  }
  78.  
  79. -// �C�x���g�t�����v��
  80. +//Information request with event
  81.  int guild_npc_request_info(int guild_id,const char *event)
  82.  {
  83.     if( guild_search(guild_id) )
  84. @@ -442,7 +442,7 @@
  85.     return guild_request_info(guild_id);
  86.  }
  87.  
  88. -// �����L�����̊m�F
  89. +//Confirmation of the character belongs to guild
  90.  int guild_check_member(struct guild *g)
  91.  {
  92.     int i;
  93. @@ -469,7 +469,7 @@
  94.     return 0;
  95.  }
  96.  
  97. -// ��񏊓����s�i����ID�̃L������S���������ɂ���j
  98. +//Delete association with guild_id for all characters
  99.  int guild_recv_noinfo(int guild_id)
  100.  {
  101.     struct map_session_data *sd;
  102. @@ -486,7 +486,7 @@
  103.     return 0;
  104.  }
  105.  
  106. -// ��񏊓�
  107. +//Get and display information for all member
  108.  int guild_recv_info(struct guild *sg)
  109.  {
  110.     struct guild *g,before;
  111. @@ -504,7 +504,7 @@
  112.         idb_put(guild_db,sg->guild_id,g);
  113.         before=*sg;
  114.  
  115. -       // �ŏ��̃��[�h�Ȃ̂Ń��[�U�[�̃`�F�b�N���s��
  116. +       //Perform the check on the user because the first load
  117.         guild_check_member(sg);
  118.         if ((sd = map_nick2sd(sg->master)) != NULL)
  119.         {
  120. @@ -539,32 +539,32 @@
  121.             bm++;
  122.     }
  123.  
  124. -   for(i=0;i<g->max_member;i++){   // ���̑��M
  125. +   for(i=0;i<g->max_member;i++){   //Transmission of information at all members
  126.         sd = g->member[i].sd;
  127.         if( sd==NULL )
  128.             continue;
  129.  
  130.         if( before.guild_lv!=g->guild_lv || bm!=m ||
  131.             before.max_member!=g->max_member ){
  132. -           clif_guild_basicinfo(sd);   // ��{��񑗐M
  133. -           clif_guild_emblem(sd,g);    // �G���u�������M
  134. +           clif_guild_basicinfo(sd); //Submit basic information
  135. +           clif_guild_emblem(sd,g); //Submit emblem
  136.         }
  137.  
  138. -       if(bm!=m){      // �����o�[��񑗐M
  139. +       if(bm!=m){      //Send members information
  140.             clif_guild_memberlist(g->member[i].sd);
  141.         }
  142.  
  143.         if( before.skill_point!=g->skill_point)
  144. -           clif_guild_skillinfo(sd);   // �X�L����񑗐M
  145. +           clif_guild_skillinfo(sd); //Submit information skills
  146.  
  147. -       if( guild_new ){    // �����M�Ȃ珊����������
  148. +       if( guild_new ){    // Send information and affiliation if unsent
  149.             clif_guild_belonginfo(sd,g);
  150.             clif_guild_notice(sd,g);
  151.             sd->guild_emblem_id=g->emblem_id;
  152.         }
  153.     }
  154.  
  155. -   // �C�x���g�̔���
  156. +   //Occurrence of an event
  157.     if (guild_infoevent_db->remove(guild_infoevent_db, db_i2key(sg->guild_id), &data))
  158.     {
  159.         struct eventlist *ev = db_data2ptr(&data), *ev2;
  160. @@ -579,8 +579,9 @@
  161.     return 0;
  162.  }
  163.  
  164. -
  165. -// �M���h�ւ̊��U
  166. +/*=============================================
  167. + * Player sd send a guild invatation to player tsd to join his guild
  168. + *--------------------------------------------*/
  169.  int guild_invite(struct map_session_data *sd,struct map_session_data *tsd)
  170.  {
  171.     struct guild *g;
  172. @@ -597,7 +598,7 @@
  173.         return 0; //Invite permission.
  174.  
  175.     if(!battle_config.invite_request_check) {
  176. -       if (tsd->party_invite>0 || tsd->trade_partner || tsd->adopt_invite ) {  // ���肪����ǂ���
  177. +       if (tsd->party_invite>0 || tsd->trade_partner || tsd->adopt_invite ) {  //checking if there no other invitation pending
  178.             clif_guild_inviteack(sd,0);
  179.             return 0;
  180.         }
  181. @@ -616,7 +617,7 @@
  182.         return 0;
  183.     }
  184.  
  185. -   // ����m�F
  186. +   //search an empty spot in guild
  187.     ARR_FIND( 0, g->max_member, i, g->member[i].account_id == 0 );
  188.     if(i==g->max_member){
  189.         clif_guild_inviteack(sd,3);
  190. @@ -714,7 +715,9 @@
  191.         g->member[i].sd = sd;
  192.  }
  193.  
  194. -// �M���h�����o���lj����ꂽ
  195. +/*==========================================
  196. + * Add a player to a given guild_id
  197. + *----------------------------------------*/
  198.  int guild_member_added(int guild_id,int account_id,int char_id,int flag)
  199.  {
  200.     struct map_session_data *sd= map_id2sd(account_id),*sd2;
  201. @@ -724,7 +727,7 @@
  202.         return 0;
  203.  
  204.     if(sd==NULL || sd->guild_invite==0){
  205. -       // �L�������ɓo�^�ł��Ȃ��������ߒE�ޗv�����o��
  206. +       // cancel if player not present or invalide guild_id invitation
  207.         if (flag == 0) {
  208.             ShowError("guild: member added error %d is not online\n",account_id);
  209.             intif_guild_leave(guild_id,account_id,char_id,0,"** Data Error **");
  210. @@ -735,13 +738,13 @@
  211.     sd->guild_invite = 0;
  212.     sd->guild_invite_account = 0;
  213.  
  214. -   if(flag==1){    // ���s
  215. +   if(flag==1){    //failure
  216.         if( sd2!=NULL )
  217.             clif_guild_inviteack(sd2,3);
  218.         return 0;
  219.     }
  220.  
  221. -       // ����
  222. +   //if all ok adding player to guild
  223.     sd->status.guild_id = g->guild_id;
  224.     sd->guild_emblem_id = g->emblem_id;
  225.     //Packets which were sent in the previous 'guild_sent' implementation.
  226. @@ -759,7 +762,9 @@
  227.     return 0;
  228.  }
  229.  
  230. -// �M���h�E�ޗv��
  231. +/*==========================================
  232. + * Player request leaving a given guild_id
  233. + *----------------------------------------*/
  234.  int guild_leave(struct map_session_data* sd, int guild_id, int account_id, int char_id, const char* mes)
  235.  {
  236.     struct guild *g;
  237. @@ -780,7 +785,9 @@
  238.     return 0;
  239.  }
  240.  
  241. -// �M���h�Ǖ�v��
  242. +/*==========================================
  243. + * Request remove a player to a given guild_id
  244. + *----------------------------------------*/
  245.  int guild_expulsion(struct map_session_data* sd, int guild_id, int account_id, int char_id, const char* mes)
  246.  {
  247.     struct map_session_data *tsd;
  248. @@ -917,7 +924,7 @@
  249.     }
  250.    
  251.     if(idx == -1 || c == 0) {
  252. -       // �M���h�̃����o�[�O�Ȃ̂ŒǕ�����
  253. +       //Treat char_id who doesn't match guild_id (not found as member)
  254.         struct map_session_data *sd = map_id2sd(account_id);
  255.         if(sd && sd->status.char_id == char_id) {
  256.             sd->status.guild_id=0;
  257. @@ -953,7 +960,10 @@
  258.  
  259.     return 0;
  260.  }
  261. -// �M���h��b���M
  262. +
  263. +/*====================================================
  264. + * Send a message to whole guild
  265. + *---------------------------------------------------*/
  266.  int guild_send_message(struct map_session_data *sd,const char *mes,int len)
  267.  {
  268.     nullpo_ret(sd);
  269. @@ -968,7 +978,10 @@
  270.  
  271.     return 0;
  272.  }
  273. -// �M���h��b��M
  274. +
  275. +/*====================================================
  276. + * Guild receive a message, will be displayed to whole member
  277. + *---------------------------------------------------*/
  278.  int guild_recv_message(int guild_id,int account_id,const char *mes,int len)
  279.  {
  280.     struct guild *g;
  281. @@ -977,12 +990,18 @@
  282.     clif_guild_message(g,account_id,mes,len);
  283.     return 0;
  284.  }
  285. -// �M���h�����o�̖�E�ύX
  286. +
  287. +/*====================================================
  288. + * Member changing position in guild
  289. + *---------------------------------------------------*/
  290.  int guild_change_memberposition(int guild_id,int account_id,int char_id,short idx)
  291.  {
  292.     return intif_guild_change_memberinfo(guild_id,account_id,char_id,GMI_POSITION,&idx,sizeof(idx));
  293.  }
  294. -// �M���h�����o�̖�E�ύX�ʒm
  295. +
  296. +/*====================================================
  297. + * Notification of new position for member
  298. + *---------------------------------------------------*/
  299.  int guild_memberposition_changed(struct guild *g,int idx,int pos)
  300.  {
  301.     nullpo_ret(g);
  302. @@ -995,7 +1014,10 @@
  303.         clif_charnameupdate(g->member[idx].sd);
  304.     return 0;
  305.  }
  306. -// �M���h��E�ύX
  307. +
  308. +/*====================================================
  309. + * Change guild title or member
  310. + *---------------------------------------------------*/
  311.  int guild_change_position(int guild_id,int idx,
  312.     int mode,int exp_mode,const char *name)
  313.  {
  314. @@ -1009,7 +1031,10 @@
  315.     safestrncpy(p.name,name,NAME_LENGTH);
  316.     return intif_guild_position(guild_id,idx,&p);
  317.  }
  318. -// �M���h��E�ύX�ʒm
  319. +
  320. +/*====================================================
  321. + * Notification of member has changed his guild tiltle
  322. + *---------------------------------------------------*/
  323.  int guild_position_changed(int guild_id,int idx,struct guild_position *p)
  324.  {
  325.     struct guild *g=guild_search(guild_id);
  326. @@ -1025,7 +1050,10 @@
  327.             clif_charnameupdate(g->member[i].sd);
  328.     return 0;
  329.  }
  330. -// �M���h���m�ύX
  331. +
  332. +/*====================================================
  333. + * Change guild notice
  334. + *---------------------------------------------------*/
  335.  int guild_change_notice(struct map_session_data *sd,int guild_id,const char *mes1,const char *mes2)
  336.  {
  337.     nullpo_ret(sd);
  338. @@ -1034,7 +1062,10 @@
  339.         return 0;
  340.     return intif_guild_notice(guild_id,mes1,mes2);
  341.  }
  342. -// �M���h���m�ύX�ʒm
  343. +
  344. +/*====================================================
  345. + * Notification of guild has changed his notice
  346. + *---------------------------------------------------*/
  347.  int guild_notice_changed(int guild_id,const char *mes1,const char *mes2)
  348.  {
  349.     int i;
  350. @@ -1052,7 +1083,10 @@
  351.     }
  352.     return 0;
  353.  }
  354. -// �M���h�G���u�����ύX
  355. +
  356. +/*====================================================
  357. + * Change guild emblem
  358. + *---------------------------------------------------*/
  359.  int guild_change_emblem(struct map_session_data *sd,int len,const char *data)
  360.  {
  361.     struct guild *g;
  362. @@ -1066,7 +1100,10 @@
  363.  
  364.     return intif_guild_emblem(sd->status.guild_id,len,data);
  365.  }
  366. -// �M���h�G���u�����ύX�ʒm
  367. +
  368. +/*====================================================
  369. + * Notification of guild emblem changed
  370. + *---------------------------------------------------*/
  371.  int guild_emblem_changed(int len,int guild_id,int emblem_id,const char *data)
  372.  {
  373.     int i;
  374. @@ -1146,7 +1183,9 @@
  375.     return db_ptr2data(c);
  376.  }
  377.  
  378. -// �M���h��EXP��[
  379. +/*====================================================
  380. + * return Taxed experience from player sd to guild
  381. + *---------------------------------------------------*/
  382.  unsigned int guild_payexp(struct map_session_data *sd,unsigned int exp)
  383.  {
  384.     struct guild *g;
  385. @@ -1178,7 +1217,11 @@
  386.     return exp;
  387.  }
  388.  
  389. -// Celest
  390. +/*====================================================
  391. + * Player sd  pay a tribue experience exp to his guild
  392. + * Add this experience to guild exp
  393. + * [Celest]
  394. + *---------------------------------------------------*/
  395.  int guild_getexp(struct map_session_data *sd,int exp)
  396.  {
  397.     struct guild_expcache *c;
  398. @@ -1195,7 +1238,9 @@
  399.     return exp;
  400.  }
  401.  
  402. -// �X�L���|�C���g����U��
  403. +/*====================================================
  404. + * Ask to increase guildskill skill_num
  405. + *---------------------------------------------------*/
  406.  int guild_skillup(TBL_PC* sd, int skill_num)
  407.  {
  408.     struct guild* g;
  409. @@ -1216,7 +1261,10 @@
  410.  
  411.     return 0;
  412.  }
  413. -// �X�L���|�C���g����U��ʒm
  414. +
  415. +/*====================================================
  416. + * Notification of guildskill skill_num increase request
  417. + *---------------------------------------------------*/
  418.  int guild_skillupack(int guild_id,int skill_num,int account_id)
  419.  {
  420.     struct map_session_data *sd=map_id2sd(account_id);
  421. @@ -1238,7 +1286,7 @@
  422.         }
  423.     }
  424.  
  425. -   // �S���ɒʒm
  426. +   // inform all member
  427.     for(i=0;i<g->max_member;i++)
  428.         if((sd=g->member[i].sd)!=NULL)
  429.             clif_guild_skillinfo(sd);
  430. @@ -1263,7 +1311,14 @@
  431.     }
  432.     return;
  433.  }
  434. -// �M���h����������
  435. +
  436. +/*====================================================
  437. + * Count number of relation the guild have
  438. + * flag :
  439. + *     0 = allied
  440. + *     1 = ennemy 
  441. + *---------------------------------------------------*/
  442. +
  443.  int guild_get_alliance_count(struct guild *g,int flag)
  444.  {
  445.     int i,c;
  446. @@ -1287,8 +1342,13 @@
  447.         skill_blockpc_start(sd, skill_num[i], time);
  448.  }
  449.  
  450. -// �����֌W���ǂ����`�F�b�N
  451. -// �����Ȃ�1�A����ȊO��0
  452. +/*====================================================
  453. + * Check relation between guild_id1 and guild_id2
  454. + * flag :
  455. + *     0 = allied
  456. + *     1 = ennemy
  457. + * return true if yes
  458. + *---------------------------------------------------*/
  459.  int guild_check_alliance(int guild_id1, int guild_id2, int flag)
  460.  {
  461.     struct guild *g;
  462. @@ -1302,7 +1362,9 @@
  463.     return( i < MAX_GUILDALLIANCE ) ? 1 : 0;
  464.  }
  465.  
  466. -// �M���h�����v��
  467. +/*====================================================
  468. + * Player sd, asking player tsd an alliance between there 2 guild
  469. + *---------------------------------------------------*/
  470.  int guild_reqalliance(struct map_session_data *sd,struct map_session_data *tsd)
  471.  {
  472.     struct guild *g[2];
  473. @@ -1343,7 +1405,7 @@
  474.         return 0;
  475.     }
  476.  
  477. -   for(i=0;i<MAX_GUILDALLIANCE;i++){   // ���łɓ�����Ԃ��m�F
  478. +   for(i=0;i<MAX_GUILDALLIANCE;i++){   // check if already allied
  479.         if( g[0]->alliance[i].guild_id==tsd->status.guild_id &&
  480.             g[0]->alliance[i].opposition==0){
  481.             clif_guild_allianceack(sd,0);
  482. @@ -1357,7 +1419,10 @@
  483.     clif_guild_reqalliance(tsd,sd->status.account_id,g[0]->name);
  484.     return 0;
  485.  }
  486. -// �M���h���U�ւ̕ԓ�
  487. +
  488. +/*====================================================
  489. + * Player sd, awsser to player tsd (account_id) for an alliance request
  490. + *---------------------------------------------------*/
  491.  int guild_reply_reqalliance(struct map_session_data *sd,int account_id,int flag)
  492.  {
  493.     struct map_session_data *tsd;
  494. @@ -1369,13 +1434,13 @@
  495.         return 0;
  496.     }
  497.  
  498. -   if(sd->guild_alliance!=tsd->status.guild_id)    // ���U�ƃM���hID���Ⴄ
  499. +   if(sd->guild_alliance!=tsd->status.guild_id)    // proposed guild_id alliance doesn't match tsd guildid
  500.         return 0;
  501.  
  502. -   if(flag==1){    // ����
  503. +   if(flag==1){    // consent
  504.         int i;
  505.  
  506. -       struct guild *g,*tg;    // �������Ċm�F
  507. +       struct guild *g,*tg;    // Reconfirm the number of alliance
  508.         g=guild_search(sd->status.guild_id);
  509.         tg=guild_search(tsd->status.guild_id);
  510.        
  511. @@ -1403,11 +1468,11 @@
  512.                     tsd->status.account_id,sd->status.account_id,9 );
  513.         }
  514.  
  515. -       // inter�I�֓����v��
  516. +       // inform other servers
  517.         intif_guild_alliance( sd->status.guild_id,tsd->status.guild_id,
  518.             sd->status.account_id,tsd->status.account_id,0 );
  519.         return 0;
  520. -   }else{      // ����
  521. +   }else{      // deny
  522.         sd->guild_alliance=0;
  523.         sd->guild_alliance_account=0;
  524.         if(tsd!=NULL)
  525. @@ -1416,7 +1481,9 @@
  526.     return 0;
  527.  }
  528.  
  529. -// �M���h�֌W����
  530. +/*====================================================
  531. + * Player sd asking to break alliance with guild guild_id
  532. + *---------------------------------------------------*/
  533.  int guild_delalliance(struct map_session_data *sd,int guild_id,int flag)
  534.  {
  535.     nullpo_ret(sd);
  536. @@ -1430,7 +1497,10 @@
  537.     return 0;
  538.  }
  539.  
  540. -// �M���h�G��
  541. +
  542. +/*====================================================
  543. + * Player sd, asking player tsd a formal ennemy relation between there 2 guild
  544. + *---------------------------------------------------*/
  545.  int guild_opposition(struct map_session_data *sd,struct map_session_data *tsd)
  546.  {
  547.     struct guild *g;
  548. @@ -1451,9 +1521,9 @@
  549.         return 0;
  550.     }
  551.  
  552. -   for(i=0;i<MAX_GUILDALLIANCE;i++){   // ���łɊ֌W�������Ă��邩�m�F
  553. +   for(i=0;i<MAX_GUILDALLIANCE;i++){   // checking relations
  554.         if(g->alliance[i].guild_id==tsd->status.guild_id){
  555. -           if(g->alliance[i].opposition==1){   // ���łɓG��
  556. +           if(g->alliance[i].opposition==1){   // check if not already hostile
  557.                 clif_guild_oppositionack(sd,2);
  558.                 return 0;
  559.             }
  560. @@ -1465,13 +1535,15 @@
  561.         }
  562.     }
  563.  
  564. -   // inter�I�ɓG�Ηv��
  565. +   // inform other serv
  566.     intif_guild_alliance( sd->status.guild_id,tsd->status.guild_id,
  567.             sd->status.account_id,tsd->status.account_id,1 );
  568.     return 0;
  569.  }
  570.  
  571. -// �M���h����/�G�Βʒm
  572. +/*====================================================
  573. + * Notification of a relationship between 2 guild
  574. + *---------------------------------------------------*/
  575.  int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id2,int flag,const char *name1,const char *name2)
  576.  {
  577.     struct guild *g[2];
  578. @@ -1495,14 +1567,14 @@
  579.         sd[0]->guild_alliance_account=0;
  580.     }
  581.  
  582. -   if(flag&0x70){  // ���s
  583. +   if(flag&0x70){  // failure
  584.         for(i=0;i<2-(flag&1);i++)
  585.             if( sd[i]!=NULL )
  586.                 clif_guild_allianceack(sd[i],((flag>>4)==i+1)?3:4);
  587.         return 0;
  588.     }
  589.  
  590. -   if(!(flag&0x08)){   // �֌W�lj�
  591. +   if(!(flag&0x08)){   // new relationship
  592.         for(i=0;i<2-(flag&1);i++)
  593.         {
  594.             if(g[i]!=NULL)
  595. @@ -1516,7 +1588,7 @@
  596.                 }
  597.             }
  598.         }
  599. -   }else{              // �֌W����
  600. +   }else{              // remove relationship
  601.         for(i=0;i<2-(flag&1);i++)
  602.         {
  603.             if(g[i]!=NULL)
  604. @@ -1525,21 +1597,21 @@
  605.                 if( j < MAX_GUILDALLIANCE )
  606.                     g[i]->alliance[j].guild_id = 0;
  607.             }
  608. -           if( sd[i]!=NULL )   // �����ʒm
  609. +           if( sd[i]!=NULL )   // notify players
  610.                 clif_guild_delalliance(sd[i],guild_id[1-i],(flag&1));
  611.         }
  612.     }
  613.  
  614. -   if((flag&0x0f)==0){         // �����ʒm
  615. +   if((flag&0x0f)==0){         // alliance notification
  616.         if( sd[1]!=NULL )
  617.             clif_guild_allianceack(sd[1],2);
  618. -   }else if((flag&0x0f)==1){   // �G�Βʒm
  619. +   }else if((flag&0x0f)==1){   // ennemy notification
  620.         if( sd[0]!=NULL )
  621.             clif_guild_oppositionack(sd[0],0);
  622.     }
  623.  
  624.  
  625. -   for(i=0;i<2-(flag&1);i++){  // ����/�G�΃��X�g�̍đ��M
  626. +   for(i=0;i<2-(flag&1);i++){  // Retransmission of the relationship list to all members
  627.         struct map_session_data *sd;
  628.         if(g[i]!=NULL)
  629.             for(j=0;j<g[i]->max_member;j++)
  630. @@ -1549,10 +1621,9 @@
  631.     return 0;
  632.  }
  633.  
  634. -/**
  635. - * �M���h���U�ʒm�p
  636. - * @see DBApply
  637. - */
  638. +/*====================================================
  639. + * Notification for the guild disbanded
  640. + *---------------------------------------------------*/
  641.  int guild_broken_sub(DBKey key, DBData *data, va_list ap)
  642.  {
  643.     struct guild *g = db_data2ptr(data);
  644. @@ -1562,7 +1633,7 @@
  645.  
  646.     nullpo_ret(g);
  647.  
  648. -   for(i=0;i<MAX_GUILDALLIANCE;i++){   // �֌W��j��
  649. +   for(i=0;i<MAX_GUILDALLIANCE;i++){   // Destroy all relationships
  650.         if(g->alliance[i].guild_id==guild_id){
  651.             for(j=0;j<g->max_member;j++)
  652.                 if( (sd=g->member[j].sd)!=NULL )
  653. @@ -1608,7 +1679,7 @@
  654.     if(flag!=0 || g==NULL)
  655.         return 0;
  656.  
  657. -   for(i=0;i<g->max_member;i++){   // �M���h���U��ʒm
  658. +   for(i=0;i<g->max_member;i++){ //Notification to disband the guild at all remaining member
  659.         if((sd=g->member[i].sd)!=NULL){
  660.             if(sd->state.storage_flag == 2)
  661.                 storage_guild_storage_quit(sd,1);
  662. @@ -1700,7 +1771,10 @@
  663.     return 1;
  664.  }
  665.  
  666. -// �M���h���U
  667. +
  668. +/*====================================================
  669. + * Guild disbanded
  670. + *---------------------------------------------------*/
  671.  int guild_break(struct map_session_data *sd,char *name)
  672.  {
  673.     struct guild *g;
  674. @@ -1850,7 +1924,10 @@
  675.     }
  676.  }
  677.  
  678. -// �M���h�f�[�^�ꊇ��M�i�����j
  679. +
  680. +/*====================================================
  681. + * Guild received bulk data (at initialization)
  682. + *---------------------------------------------------*/
  683.  int guild_castledataloadack(int len, struct guild_castle *gc)
  684.  {
  685.     int i;
  686. @@ -1893,6 +1970,9 @@
  687.     return 0;
  688.  }
  689.  
  690. +/*====================================================
  691. + * Start normal woe and triggers all npc OnAgitStart
  692. + *---------------------------------------------------*/
  693.  int guild_agit_start(void)
  694.  {  // Run All NPC_Event[OnAgitStart]
  695.     int c = npc_event_doall("OnAgitStart");
  696. @@ -1900,6 +1980,9 @@
  697.     return 0;
  698.  }
  699.  
  700. +/*====================================================
  701. + * End normal woe and triggers all npc OnAgitEnd
  702. + *---------------------------------------------------*/
  703.  int guild_agit_end(void)
  704.  {  // Run All NPC_Event[OnAgitEnd]
  705.     int c = npc_event_doall("OnAgitEnd");
  706. @@ -1907,6 +1990,9 @@
  707.     return 0;
  708.  }
  709.  
  710. +/*====================================================
  711. + * Start woe2 and triggers all npc OnAgitStart2
  712. + *---------------------------------------------------*/
  713.  int guild_agit2_start(void)
  714.  {  // Run All NPC_Event[OnAgitStart2]
  715.     int c = npc_event_doall("OnAgitStart2");
  716. @@ -1914,6 +2000,9 @@
  717.     return 0;
  718.  }
  719.  
  720. +/*====================================================
  721. + * End woe2 and triggers all npc OnAgitEnd2
  722. + *---------------------------------------------------*/
  723.  int guild_agit2_end(void)
  724.  {  // Run All NPC_Event[OnAgitEnd2]
  725.     int c = npc_event_doall("OnAgitEnd2");
Advertisement
RAW Paste Data Copied
Advertisement