Advertisement
Lighta

intif.c raw doc

Mar 24th, 2012
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 14.97 KB | None | 0 0
  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. @@ -44,11 +44,11 @@
  6.     -1,-1, 7, 3,  0, 0, 0, 0,  0, 0, 0, 0,  0, 0,  0, 0, //0x3890  Homunculus [albator]
  7.  };
  8.  
  9. -extern int char_fd;        // inter server��fd��char_fd���g��
  10. -#define inter_fd char_fd   // �G�C���A�X
  11. +extern int char_fd;        // inter server Fd used for char_fd
  12. +#define inter_fd char_fd   // alias
  13.  
  14.  //-----------------------------------------------------------------
  15. -// inter server�ւ̑��M
  16. +// Send to inter server
  17.  
  18.  int CheckForCharServer(void)
  19.  {
  20. @@ -134,7 +134,7 @@
  21.     return 0;
  22.  }
  23.  
  24. -// GM���b�Z�[�W�𑗐M
  25. +// GM Send a message
  26.  int intif_broadcast(const char* mes, int len, int type)
  27.  {
  28.     int lp = type ? 4 : 0;
  29. @@ -363,7 +363,7 @@
  30.     return 0;
  31.  }
  32.  
  33. -// �p�[�e�B�쐬�v��
  34. +// Party creation request
  35.  int intif_create_party(struct party_member *member,char *name,int item,int item2)
  36.  {
  37.     if (CheckForCharServer())
  38. @@ -380,7 +380,8 @@
  39.     WFIFOSET(inter_fd,WFIFOW(inter_fd, 2));
  40.     return 0;
  41.  }
  42. -// �p�[�e�B���v��
  43. +
  44. +// Party information request
  45.  int intif_request_partyinfo(int party_id, int char_id)
  46.  {
  47.     if (CheckForCharServer())
  48. @@ -392,7 +393,8 @@
  49.     WFIFOSET(inter_fd,10);
  50.     return 0;
  51.  }
  52. -// �p�[�e�B�lj��v��
  53. +
  54. +// Request to add a member to party
  55.  int intif_party_addmember(int party_id,struct party_member *member)
  56.  {
  57.     if (CheckForCharServer())
  58. @@ -405,7 +407,8 @@
  59.     WFIFOSET(inter_fd,WFIFOW(inter_fd, 2));
  60.     return 1;
  61.  }
  62. -// �p�[�e�B�ݒ�ύX
  63. +
  64. +// Request to change party configuration (exp,item share)
  65.  int intif_party_changeoption(int party_id,int account_id,int exp,int item)
  66.  {
  67.     if (CheckForCharServer())
  68. @@ -419,7 +422,8 @@
  69.     WFIFOSET(inter_fd,14);
  70.     return 0;
  71.  }
  72. -// �p�[�e�B�E�ޗv��
  73. +
  74. +// Request to leave party
  75.  int intif_party_leave(int party_id,int account_id, int char_id)
  76.  {
  77.     if (CheckForCharServer())
  78. @@ -432,7 +436,8 @@
  79.     WFIFOSET(inter_fd,14);
  80.     return 0;
  81.  }
  82. -// �p�[�e�B�ړ��v��
  83. +
  84. +// Request keeping party for new map ??
  85.  int intif_party_changemap(struct map_session_data *sd,int online)
  86.  {
  87.     int m, mapindex;
  88. @@ -458,7 +463,8 @@
  89.     WFIFOSET(inter_fd,19);
  90.     return 1;
  91.  }
  92. -// �p�[�e�B�[���U�v��
  93. +
  94. +// Request breaking party
  95.  int intif_break_party(int party_id)
  96.  {
  97.     if (CheckForCharServer())
  98. @@ -469,7 +475,8 @@
  99.     WFIFOSET(inter_fd,6);
  100.     return 0;
  101.  }
  102. -// �p�[�e�B��b���M
  103. +
  104. +// Sending party chat
  105.  int intif_party_message(int party_id,int account_id,const char *mes,int len)
  106.  {
  107.     if (CheckForCharServer())
  108. @@ -488,6 +495,7 @@
  109.     return 0;
  110.  }
  111.  
  112. +// Request a new leader for party
  113.  int intif_party_leaderchange(int party_id,int account_id,int char_id)
  114.  {
  115.     if (CheckForCharServer())
  116. @@ -501,8 +509,7 @@
  117.     return 0;
  118.  }
  119.  
  120. -
  121. -// �M���h�쐬�v��
  122. +// Request a Guild creation
  123.  int intif_guild_create(const char *name,const struct guild_member *master)
  124.  {
  125.     if (CheckForCharServer())
  126. @@ -518,7 +525,8 @@
  127.     WFIFOSET(inter_fd,WFIFOW(inter_fd,2));
  128.     return 0;
  129.  }
  130. -// �M���h���v��
  131. +
  132. +// Request Guild information
  133.  int intif_guild_request_info(int guild_id)
  134.  {
  135.     if (CheckForCharServer())
  136. @@ -529,7 +537,8 @@
  137.     WFIFOSET(inter_fd,6);
  138.     return 0;
  139.  }
  140. -// �M���h�����o�lj��v��
  141. +
  142. +// Request to add member to the guild
  143.  int intif_guild_addmember(int guild_id,struct guild_member *m)
  144.  {
  145.     if (CheckForCharServer())
  146. @@ -543,6 +552,7 @@
  147.     return 0;
  148.  }
  149.  
  150. +// Request a new leader for guild
  151.  int intif_guild_change_gm(int guild_id, const char* name, int len)
  152.  {
  153.     if (CheckForCharServer())
  154. @@ -556,7 +566,7 @@
  155.     return 0;
  156.  }
  157.  
  158. -// �M���h�����o�E��/�Ǖ�v��
  159. +// Request to leave guild
  160.  int intif_guild_leave(int guild_id,int account_id,int char_id,int flag,const char *mes)
  161.  {
  162.     if (CheckForCharServer())
  163. @@ -571,7 +581,8 @@
  164.     WFIFOSET(inter_fd,55);
  165.     return 0;
  166.  }
  167. -// �M���h�����o�̃I�����C����/Lv�X�V�v��
  168. +
  169. +//Update request / Lv online status of the guild members
  170.  int intif_guild_memberinfoshort(int guild_id,int account_id,int char_id,int online,int lv,int class_)
  171.  {
  172.     if (CheckForCharServer())
  173. @@ -587,7 +598,8 @@
  174.     WFIFOSET(inter_fd,19);
  175.     return 0;
  176.  }
  177. -// �M���h���U�ʒm
  178. +
  179. +//Guild disbanded notification
  180.  int intif_guild_break(int guild_id)
  181.  {
  182.     if (CheckForCharServer())
  183. @@ -598,7 +610,8 @@
  184.     WFIFOSET(inter_fd,6);
  185.     return 0;
  186.  }
  187. -// �M���h��b���M
  188. +
  189. +// Send a guild message
  190.  int intif_guild_message(int guild_id,int account_id,const char *mes,int len)
  191.  {
  192.     if (CheckForCharServer())
  193. @@ -617,7 +630,8 @@
  194.  
  195.     return 0;
  196.  }
  197. -// �M���h��{���ύX�v��
  198. +
  199. +// Request a change of Guild basic information
  200.  int intif_guild_change_basicinfo(int guild_id,int type,const void *data,int len)
  201.  {
  202.     if (CheckForCharServer())
  203. @@ -631,7 +645,8 @@
  204.     WFIFOSET(inter_fd,len+10);
  205.     return 0;
  206.  }
  207. -// �M���h�����o���ύX�v��
  208. +
  209. +// Request a change of Guild member information
  210.  int intif_guild_change_memberinfo(int guild_id,int account_id,int char_id,
  211.     int type,const void *data,int len)
  212.  {
  213. @@ -648,7 +663,8 @@
  214.     WFIFOSET(inter_fd,len+18);
  215.     return 0;
  216.  }
  217. -// �M���h��E�ύX�v��
  218. +
  219. +// Request a change of Guild title
  220.  int intif_guild_position(int guild_id,int idx,struct guild_position *p)
  221.  {
  222.     if (CheckForCharServer())
  223. @@ -662,7 +678,8 @@
  224.     WFIFOSET(inter_fd,WFIFOW(inter_fd,2));
  225.     return 0;
  226.  }
  227. -// �M���h�X�L���A�b�v�v��
  228. +
  229. +// Request an update of Guildskill skillnum
  230.  int intif_guild_skillup(int guild_id, int skill_num, int account_id, int max)
  231.  {
  232.     if( CheckForCharServer() )
  233. @@ -676,7 +693,8 @@
  234.     WFIFOSET(inter_fd, 18);
  235.     return 0;
  236.  }
  237. -// �M���h����/�G�Ηv��
  238. +
  239. +// Request a new guild relationship
  240.  int intif_guild_alliance(int guild_id1,int guild_id2,int account_id1,int account_id2,int flag)
  241.  {
  242.     if (CheckForCharServer())
  243. @@ -691,7 +709,8 @@
  244.     WFIFOSET(inter_fd,19);
  245.     return 0;
  246.  }
  247. -// �M���h���m�ύX�v��
  248. +
  249. +// Request to change guild notice
  250.  int intif_guild_notice(int guild_id,const char *mes1,const char *mes2)
  251.  {
  252.     if (CheckForCharServer())
  253. @@ -704,7 +723,8 @@
  254.     WFIFOSET(inter_fd,186);
  255.     return 0;
  256.  }
  257. -// �M���h�G���u�����ύX�v��
  258. +
  259. +// Request to change guild emblem
  260.  int intif_guild_emblem(int guild_id,int len,const char *data)
  261.  {
  262.     if (CheckForCharServer())
  263. @@ -738,7 +758,8 @@
  264.     return 1;
  265.  }
  266.  
  267. -//�M���h���̃M���h�ύX�v��
  268. +
  269. +// Request change castle guild owner and save data
  270.  int intif_guild_castle_datasave(int castle_id,int index, int value)
  271.  {
  272.     if (CheckForCharServer())
  273. @@ -845,7 +866,7 @@
  274.     }
  275.     //Success to send whisper.
  276.     clif_wis_message(sd->fd, wisp_source, (char*)RFIFOP(fd,56),RFIFOW(fd,2)-56);
  277. -   intif_wis_replay(id,0);   // ���M����
  278. +   intif_wis_replay(id,0);   // succes
  279.     return 0;
  280.  }
  281.  
  282. @@ -902,7 +923,7 @@
  283.     return 0;
  284.  }
  285.  
  286. -// �A�J�E���g�ϐ��ʒm
  287. +// Request player registre
  288.  int intif_parse_Registers(int fd)
  289.  {
  290.     int j,p,len,max, flag;
  291. @@ -994,13 +1015,15 @@
  292.     storage_guild_storageopen(sd);
  293.     return 0;
  294.  }
  295. +
  296. +// ACK guild_storage saved
  297.  int intif_parse_SaveGuildStorage(int fd)
  298.  {
  299.     storage_guild_storagesaved(/*RFIFOL(fd,2), */RFIFOL(fd,6));
  300.     return 0;
  301.  }
  302.  
  303. -// �p�[�e�B�쐬�”�
  304. +// ACK party creation
  305.  int intif_parse_PartyCreated(int fd)
  306.  {
  307.     if(battle_config.etc_log)
  308. @@ -1008,7 +1031,8 @@
  309.     party_created(RFIFOL(fd,2), RFIFOL(fd,6),RFIFOB(fd,10),RFIFOL(fd,11), (char *)RFIFOP(fd,15));
  310.     return 0;
  311.  }
  312. -// �p�[�e�B���
  313. +
  314. +// Receive party info
  315.  int intif_parse_PartyInfo(int fd)
  316.  {
  317.     if( RFIFOW(fd,2) == 12 ){
  318. @@ -1022,7 +1046,8 @@
  319.     party_recv_info((struct party *)RFIFOP(fd,8), RFIFOL(fd,4));
  320.     return 0;
  321.  }
  322. -// �p�[�e�B�lj��ʒm
  323. +
  324. +// ACK adding party member
  325.  int intif_parse_PartyMemberAdded(int fd)
  326.  {
  327.     if(battle_config.etc_log)
  328. @@ -1030,13 +1055,15 @@
  329.     party_member_added(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10), RFIFOB(fd, 14));
  330.     return 0;
  331.  }
  332. -// �p�[�e�B�ݒ�ύX�ʒm
  333. +
  334. +// ACK changing party option
  335.  int intif_parse_PartyOptionChanged(int fd)
  336.  {
  337.     party_optionchanged(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOW(fd,10),RFIFOW(fd,12),RFIFOB(fd,14));
  338.     return 0;
  339.  }
  340. -// �p�[�e�B�E�ޒʒm
  341. +
  342. +// ACK member leaving party
  343.  int intif_parse_PartyMemberWithdraw(int fd)
  344.  {
  345.     if(battle_config.etc_log)
  346. @@ -1044,32 +1071,36 @@
  347.     party_member_withdraw(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
  348.     return 0;
  349.  }
  350. -// �p�[�e�B���U�ʒm
  351. +
  352. +// ACK party break
  353.  int intif_parse_PartyBroken(int fd)
  354.  {
  355.     party_broken(RFIFOL(fd,2));
  356.     return 0;
  357.  }
  358. -// �p�[�e�B�ړ��ʒm
  359. +
  360. +// ACK party on new map
  361.  int intif_parse_PartyMove(int fd)
  362.  {
  363.     party_recv_movemap(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOW(fd,14),RFIFOB(fd,16),RFIFOW(fd,17));
  364.     return 0;
  365.  }
  366. -// �p�[�e�B���b�Z�[�W
  367. +
  368. +// ACK party messages
  369.  int intif_parse_PartyMessage(int fd)
  370.  {
  371.     party_recv_message(RFIFOL(fd,4),RFIFOL(fd,8),(char *) RFIFOP(fd,12),RFIFOW(fd,2)-12);
  372.     return 0;
  373.  }
  374.  
  375. -// �M���h�쐬�”�
  376. +// ACK guild creation
  377.  int intif_parse_GuildCreated(int fd)
  378.  {
  379.     guild_created(RFIFOL(fd,2),RFIFOL(fd,6));
  380.     return 0;
  381.  }
  382. -// �M���h���
  383. +
  384. +// ACK guild infos
  385.  int intif_parse_GuildInfo(int fd)
  386.  {
  387.     if(RFIFOW(fd,2) == 8) {
  388. @@ -1082,7 +1113,8 @@
  389.     guild_recv_info((struct guild *)RFIFOP(fd,4));
  390.     return 0;
  391.  }
  392. -// �M���h�����o�lj��ʒm
  393. +
  394. +// ACK adding guild member
  395.  int intif_parse_GuildMemberAdded(int fd)
  396.  {
  397.     if(battle_config.etc_log)
  398. @@ -1090,20 +1122,22 @@
  399.     guild_member_added(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14));
  400.     return 0;
  401.  }
  402. -// �M���h�����o�E��/�Ǖ�ʒm
  403. +
  404. +// ACK member leaving guild
  405.  int intif_parse_GuildMemberWithdraw(int fd)
  406.  {
  407.     guild_member_withdraw(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),(char *)RFIFOP(fd,55),(char *)RFIFOP(fd,15));
  408.     return 0;
  409.  }
  410.  
  411. -// �M���h�����o�I�����C�����/Lv�ύX�ʒm
  412. +// ACK guild member basic info
  413.  int intif_parse_GuildMemberInfoShort(int fd)
  414.  {
  415.     guild_recv_memberinfoshort(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOW(fd,15),RFIFOW(fd,17));
  416.     return 0;
  417.  }
  418. -// �M���h���U�ʒm
  419. +
  420. +// ACK guild break
  421.  int intif_parse_GuildBroken(int fd)
  422.  {
  423.     guild_broken(RFIFOL(fd,2),RFIFOB(fd,6));
  424. @@ -1166,7 +1200,7 @@
  425.     return 0;
  426.  }
  427.  
  428. -// �M���h��E�ύX�ʒm
  429. +// ACK change of guild title
  430.  int intif_parse_GuildPosition(int fd)
  431.  {
  432.     if( RFIFOW(fd,2)!=sizeof(struct guild_position)+12 )
  433. @@ -1174,54 +1208,61 @@
  434.     guild_position_changed(RFIFOL(fd,4),RFIFOL(fd,8),(struct guild_position *)RFIFOP(fd,12));
  435.     return 0;
  436.  }
  437. -// �M���h�X�L������U��ʒm
  438. +
  439. +// ACK change of guild skill update
  440.  int intif_parse_GuildSkillUp(int fd)
  441.  {
  442.     guild_skillupack(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
  443.     return 0;
  444.  }
  445. -// �M���h����/�G�Βʒm
  446. +
  447. +// ACK change of guild relationship
  448.  int intif_parse_GuildAlliance(int fd)
  449.  {
  450.     guild_allianceack(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOL(fd,14),RFIFOB(fd,18),(char *) RFIFOP(fd,19),(char *) RFIFOP(fd,43));
  451.     return 0;
  452.  }
  453. -// �M���h���m�ύX�ʒm
  454. +
  455. +// ACK change of guild notice
  456.  int intif_parse_GuildNotice(int fd)
  457.  {
  458.     guild_notice_changed(RFIFOL(fd,2),(char *) RFIFOP(fd,6),(char *) RFIFOP(fd,66));
  459.     return 0;
  460.  }
  461. -// �M���h�G���u�����ύX�ʒm
  462. +
  463. +// ACK change of guild emblem
  464.  int intif_parse_GuildEmblem(int fd)
  465.  {
  466.     guild_emblem_changed(RFIFOW(fd,2)-12,RFIFOL(fd,4),RFIFOL(fd,8), (char *)RFIFOP(fd,12));
  467.     return 0;
  468.  }
  469. -// �M���h��b��M
  470. +
  471. +// ACK guild message
  472.  int intif_parse_GuildMessage(int fd)
  473.  {
  474.     guild_recv_message(RFIFOL(fd,4),RFIFOL(fd,8),(char *) RFIFOP(fd,12),RFIFOW(fd,2)-12);
  475.     return 0;
  476.  }
  477. -// �M���h��f�[�^�v���ԐM
  478. +// Reply guild castle data request
  479.  int intif_parse_GuildCastleDataLoad(int fd)
  480.  {
  481.     return guild_castledataloadack(RFIFOW(fd,2), (struct guild_castle *)RFIFOP(fd,4));
  482.  }
  483.  
  484. +// ACK change of guildmaster
  485.  int intif_parse_GuildMasterChanged(int fd)
  486.  {
  487.     return guild_gm_changed(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
  488.  }
  489.  
  490. -// pet
  491. +// Request pet creation
  492.  int intif_parse_CreatePet(int fd)
  493.  {
  494.     pet_get_egg(RFIFOL(fd,2),RFIFOL(fd,7),RFIFOB(fd,6));
  495.     return 0;
  496.  }
  497.  
  498. +// ACK pet data
  499.  int intif_parse_RecvPetData(int fd)
  500.  {
  501.     struct s_pet p;
  502. @@ -1238,6 +1279,8 @@
  503.  
  504.     return 0;
  505.  }
  506. +
  507. +// ACK pet save data
  508.  int intif_parse_SavePetOk(int fd)
  509.  {
  510.     if(RFIFOB(fd,6) == 1)
  511. @@ -1246,6 +1289,7 @@
  512.     return 0;
  513.  }
  514.  
  515. +// ACK deleting pet
  516.  int intif_parse_DeletePetOk(int fd)
  517.  {
  518.     if(RFIFOB(fd,2) == 1)
  519. @@ -1254,6 +1298,7 @@
  520.     return 0;
  521.  }
  522.  
  523. +// ACK changing name resquest, players,pets,hommon
  524.  int intif_parse_ChangeNameOk(int fd)
  525.  {
  526.     struct map_session_data *sd = NULL;
  527. @@ -1407,6 +1452,7 @@
  528.     return 0;
  529.  }
  530.  
  531. +
  532.  /*==========================================
  533.   * MAIL SYSTEM
  534.   * By Zephyrus
  535. @@ -1870,6 +1916,7 @@
  536.     clif_Auction_message(sd->fd, result);
  537.  }
  538.  
  539. +
  540.  /*==========================================
  541.   * Mercenary's System
  542.   *------------------------------------------*/
  543. @@ -1959,19 +2006,19 @@
  544.  }
  545.  
  546.  //-----------------------------------------------------------------
  547. -// inter server����̒ʐM
  548. -// �G���[�������0(false)��Ԃ�����
  549. -// �p�P�b�g�������ł����1,�p�P�b�g��������Ȃ����2��Ԃ�����
  550. +// Communication from the inter server
  551. +// Return a 0 (false) if there were any errors.
  552. +// 1, 2 if there are not enough to return the length of the packet if the packet processing
  553.  int intif_parse(int fd)
  554.  {
  555.     int packet_len, cmd;
  556.     cmd = RFIFOW(fd,0);
  557. -   // �p�P�b�g��ID�m�F
  558. +   // Verify ID of the packet
  559.     if(cmd<0x3800 || cmd>=0x3800+(sizeof(packet_len_table)/sizeof(packet_len_table[0])) ||
  560.        packet_len_table[cmd-0x3800]==0){
  561.         return 0;
  562.     }
  563. -   // �p�P�b�g�̒����m�F
  564. +   // Check the length of the packet
  565.     packet_len = packet_len_table[cmd-0x3800];
  566.     if(packet_len==-1){
  567.         if(RFIFOREST(fd)<4)
  568. @@ -1981,7 +2028,7 @@
  569.     if((int)RFIFOREST(fd)<packet_len){
  570.         return 2;
  571.     }
  572. -   // ��������
  573. +   // Processing branch
  574.     switch(cmd){
  575.     case 0x3800:
  576.         if (RFIFOL(fd,4) == 0xFF000000) //Normal announce.
  577. @@ -2059,7 +2106,7 @@
  578.         ShowError("intif_parse : unknown packet %d %x\n",fd,RFIFOW(fd,0));
  579.         return 0;
  580.     }
  581. -   // �p�P�b�g�ǂݔ�΂�
  582. +   // Skip packet
  583.     RFIFOSKIP(fd,packet_len);
  584.     return 1;
  585.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement