viewing paste intif.c raw doc | C

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