Advertisement
Guest User

r15115

a guest
Jun 14th, 2012
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 16.86 KB | None | 0 0
  1. Index: clif.c
  2. ===================================================================
  3. --- clif.c  (revisão 16294)
  4. +++ clif.c  (cópia de trabalho)
  5. @@ -9325,6 +9325,19 @@
  6.  }
  7.  
  8.  
  9. +/// Server's tick (ZC_NOTIFY_TIME).
  10. +/// 007f <time>.L
  11. +void clif_notify_time(struct map_session_data* sd, unsigned long time)
  12. +{
  13. +   int fd = sd->fd;
  14. +
  15. +   WFIFOHEAD(fd,packet_len(0x7f));
  16. +   WFIFOW(fd,0) = 0x7f;
  17. +   WFIFOL(fd,2) = time;
  18. +   WFIFOSET(fd,packet_len(0x7f));
  19. +}
  20. +
  21. +
  22.  /// Request for server's tick.
  23.  /// 007e <client tick>.L (CZ_REQUEST_TIME)
  24.  /// 0360 <client tick>.L (CZ_REQUEST_TIME2)
  25. @@ -9333,12 +9346,7 @@
  26.  {
  27.     sd->client_tick = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]);
  28.  
  29. -   WFIFOHEAD(fd, packet_len(0x7f));
  30. -   WFIFOW(fd,0)=0x7f;
  31. -   WFIFOL(fd,2)=gettick();
  32. -   WFIFOSET(fd,packet_len(0x7f));
  33. -   // removed until the socket problems are fixed. [FlavioJS]
  34. -   //flush_fifo(fd); // try to send immediatly so the client gets more accurate "pings"
  35. +   clif_notify_time(sd, gettick());
  36.  }
  37.  
  38.  
  39. @@ -9460,25 +9468,38 @@
  40.  }
  41.  
  42.  
  43. +/// Notification about the result of a disconnect request (ZC_ACK_REQ_DISCONNECT).
  44. +/// 018b <result>.W
  45. +/// result:
  46. +///     0 = disconnect (quit)
  47. +///     1 = cannot disconnect (wait 10 seconds)
  48. +///     ? = ignored
  49. +void clif_disconnect_ack(struct map_session_data* sd, short result)
  50. +{
  51. +   int fd = sd->fd;
  52. +
  53. +   WFIFOHEAD(fd,packet_len(0x18b));
  54. +   WFIFOW(fd,0) = 0x18b;
  55. +   WFIFOW(fd,2) = result;
  56. +   WFIFOSET(fd,packet_len(0x18b));
  57. +}
  58. +
  59. +
  60.  /// Request to disconnect from server (CZ_REQ_DISCONNECT).
  61.  /// 018a <type>.W
  62.  /// type:
  63.  ///     0 = quit
  64.  void clif_parse_QuitGame(int fd, struct map_session_data *sd)
  65.  {
  66. -   WFIFOHEAD(fd,packet_len(0x18b));
  67. -   WFIFOW(fd,0) = 0x18b;
  68. -
  69.     /*  Rovert's prevent logout option fixed [Valaris]  */
  70. -   if( !sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] &&
  71. +   if( !sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] &&
  72.         (!battle_config.prevent_logout || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout) )
  73.     {
  74.         set_eof(fd);
  75. -       WFIFOW(fd,2)=0;
  76. +       clif_disconnect_ack(sd, 0);
  77.     } else {
  78. -       WFIFOW(fd,2)=1;
  79. +       clif_disconnect_ack(sd, 1);
  80.     }
  81. -   WFIFOSET(fd,packet_len(0x18b));
  82.  }
  83.  
  84.  
  85. @@ -9688,15 +9709,25 @@
  86.  }
  87.  
  88.  
  89. +/// Amount of currently online players, reply to /w /who (ZC_USER_COUNT).
  90. +/// 00c2 <count>.L
  91. +void clif_user_count(struct map_session_data* sd, int count)
  92. +{
  93. +   int fd = sd->fd;
  94. +
  95. +   WFIFOHEAD(fd,packet_len(0xc2));
  96. +   WFIFOW(fd,0) = 0xc2;
  97. +   WFIFOL(fd,2) = count;
  98. +   WFIFOSET(fd,packet_len(0xc2));
  99. +}
  100. +
  101. +
  102.  /// /w /who (CZ_REQ_USER_COUNT).
  103.  /// Request to display amount of currently connected players.
  104.  /// 00c1
  105.  void clif_parse_HowManyConnections(int fd, struct map_session_data *sd)
  106.  {
  107. -   WFIFOHEAD(fd,packet_len(0xc2));
  108. -   WFIFOW(fd,0) = 0xc2;
  109. -   WFIFOL(fd,2) = map_getusers();
  110. -   WFIFOSET(fd,packet_len(0xc2));
  111. +   clif_user_count(sd, map_getusers());
  112.  }
  113.  
  114.  
  115. @@ -9820,16 +9851,12 @@
  116.         break;
  117.     case 0x01:
  118.         /*  Rovert's Prevent logout option - Fixed [Valaris]    */
  119. -       if( !sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] &&
  120. +       if( !sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] &&
  121.             (!battle_config.prevent_logout || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout) )
  122.         {   //Send to char-server for character selection.
  123.             chrif_charselectreq(sd, session[fd]->client_addr);
  124.         } else {
  125. -           WFIFOHEAD(fd,packet_len(0x18b));
  126. -           WFIFOW(fd,0)=0x18b;
  127. -           WFIFOW(fd,2)=1;
  128. -
  129. -           WFIFOSET(fd,packet_len(0x018b));
  130. +           clif_disconnect_ack(sd, 1);
  131.         }
  132.         break;
  133.     }
  134. @@ -10205,14 +10232,26 @@
  135.  }
  136.  
  137.  
  138. +/// Notification about the result of a purchase attempt from an NPC shop (ZC_PC_PURCHASE_RESULT).
  139. +/// 00ca <result>.B
  140. +/// result:
  141. +///     0 = "The deal has successfully completed."
  142. +///     1 = "You do not have enough zeny."
  143. +///     2 = "You are over your Weight Limit."
  144. +///     3 = "Out of the maximum capacity, you have too many items."
  145. +void clif_npc_buy_result(struct map_session_data* sd, unsigned char result)
  146. +{
  147. +   int fd = sd->fd;
  148. +
  149. +   WFIFOHEAD(fd,packet_len(0xca));
  150. +   WFIFOW(fd,0) = 0xca;
  151. +   WFIFOB(fd,2) = result;
  152. +   WFIFOSET(fd,packet_len(0xca));
  153. +}
  154. +
  155. +
  156.  /// Request to buy chosen items from npc shop (CZ_PC_PURCHASE_ITEMLIST).
  157.  /// 00c8 <packet len>.W { <amount>.W <name id>.W }*
  158. -///
  159. -/// R 00ca <result>.b
  160. -/// result = 00 -> "The deal has successfully completed."
  161. -/// result = 01 -> "You do not have enough zeny."
  162. -/// result = 02 -> "You are over your Weight Limit."
  163. -/// result = 03 -> "Out of the maximum capacity, you have too many items."
  164.  void clif_parse_NpcBuyListSend(int fd, struct map_session_data* sd)
  165.  {
  166.     int n = (RFIFOW(fd,2)-4) /4;
  167. @@ -10226,19 +10265,28 @@
  168.  
  169.     sd->npc_shopid = 0; //Clear shop data.
  170.  
  171. -   WFIFOHEAD(fd,packet_len(0xca));
  172. -   WFIFOW(fd,0) = 0xca;
  173. +   clif_npc_buy_result(sd, result);
  174. +}
  175. +
  176. +
  177. +/// Notification about the result of a sell attempt to an NPC shop (ZC_PC_SELL_RESULT).
  178. +/// 00cb <result>.B
  179. +/// result:
  180. +///     0 = "The deal has successfully completed."
  181. +///     1 = "The deal has failed."
  182. +void clif_npc_sell_result(struct map_session_data* sd, unsigned char result)
  183. +{
  184. +   int fd = sd->fd;
  185. +
  186. +   WFIFOHEAD(fd,packet_len(0xcb));
  187. +   WFIFOW(fd,0) = 0xcb;
  188.     WFIFOB(fd,2) = result;
  189. -   WFIFOSET(fd,packet_len(0xca));
  190. +   WFIFOSET(fd,packet_len(0xcb));
  191.  }
  192.  
  193.  
  194.  /// Request to sell chosen items to npc shop (CZ_PC_SELL_ITEMLIST).
  195.  /// 00c9 <packet len>.W { <index>.W <amount>.W }*
  196. -///
  197. -/// S 00cb <result>.B
  198. -/// result = 00 -> "The deal has successfully completed."
  199. -/// result = 01 -> "The deal has failed."
  200.  void clif_parse_NpcSellListSend(int fd,struct map_session_data *sd)
  201.  {
  202.     int fail=0,n;
  203. @@ -10254,10 +10302,7 @@
  204.    
  205.     sd->npc_shopid = 0; //Clear shop data.
  206.  
  207. -   WFIFOHEAD(fd,packet_len(0xcb));
  208. -   WFIFOW(fd,0)=0xcb;
  209. -   WFIFOB(fd,2)=fail;
  210. -   WFIFOSET(fd,packet_len(0xcb));
  211. +   clif_npc_sell_result(sd, fail);
  212.  }
  213.  
  214.  
  215. @@ -12427,25 +12472,31 @@
  216.  }
  217.  
  218.  
  219. -/// GM requesting account name (for right-click gm menu) (CZ_REQ_ACCOUNTNAME).
  220. -/// 01df <account id>.L
  221.  /// Result of request to resolve account name (ZC_ACK_ACCOUNTNAME).
  222.  /// 01e0 <account id>.L <account name>.24B
  223. -void clif_parse_GMReqAccountName(int fd, struct map_session_data *sd)
  224. +void clif_account_name(struct map_session_data* sd, int account_id, const char* accname)
  225.  {
  226. -   int tid;
  227. -   tid = RFIFOL(fd,2);
  228. +   int fd = sd->fd;
  229.  
  230. -   //TODO: find out if this works for any player or only for authorized GMs
  231. -
  232.     WFIFOHEAD(fd,packet_len(0x1e0));
  233.     WFIFOW(fd,0) = 0x1e0;
  234. -   WFIFOL(fd,2) = tid;
  235. -   safestrncpy((char*)WFIFOP(fd,6), "", 24); // insert account name here >_<
  236. -   WFIFOSET(fd, packet_len(0x1e0));
  237. +   WFIFOL(fd,2) = account_id;
  238. +   safestrncpy((char*)WFIFOP(fd,6), accname, NAME_LENGTH);
  239. +   WFIFOSET(fd,packet_len(0x1e0));
  240.  }
  241.  
  242.  
  243. +/// GM requesting account name (for right-click gm menu) (CZ_REQ_ACCOUNTNAME).
  244. +/// 01df <account id>.L
  245. +void clif_parse_GMReqAccountName(int fd, struct map_session_data *sd)
  246. +{
  247. +   int account_id = RFIFOL(fd,2);
  248. +
  249. +   //TODO: find out if this works for any player or only for authorized GMs
  250. +   clif_account_name(sd, account_id, ""); // insert account name here >_<
  251. +}
  252. +
  253. +
  254.  /// /changemaptype <x> <y> <type> (CZ_CHANGE_MAPTYPE).
  255.  /// GM single cell type change request.
  256.  /// 0198 <x>.W <y>.W <type>.W
  257. @@ -12484,17 +12535,11 @@
  258.     nick = (char*)RFIFOP(fd,2); // speed up
  259.     nick[NAME_LENGTH-1] = '\0'; // to be sure that the player name has at most 23 characters
  260.     type = RFIFOB(fd,26);
  261. -
  262. -   // FIXME: Use clif_wisexin.
  263. -   WFIFOHEAD(fd,packet_len(0xd1));
  264. -   WFIFOW(fd,0) = 0x0d1;
  265. -   WFIFOB(fd,2) = type;
  266.    
  267.     if( type == 0 )
  268.     {   // Add name to ignore list (block)
  269.         if (strcmp(wisp_server_name, nick) == 0) {
  270. -           WFIFOB(fd,3) = 1; // fail
  271. -           WFIFOSET(fd, packet_len(0x0d1));
  272. +           clif_wisexin(sd, type, 1); // fail
  273.             return;
  274.         }
  275.  
  276. @@ -12502,22 +12547,18 @@
  277.         ARR_FIND( 0, MAX_IGNORE_LIST, i, sd->ignore[i].name[0] == '\0' || strcmp(sd->ignore[i].name, nick) == 0 );
  278.         if( i == MAX_IGNORE_LIST )
  279.         {// no space for new entry
  280. -           WFIFOB(fd,3) = 2; // fail
  281. -           WFIFOSET(fd, packet_len(0x0d1));
  282. +           clif_wisexin(sd, type, 2); // too many blocks
  283.             return;
  284.         }
  285.         if( sd->ignore[i].name[0] != '\0' )
  286.         {// name already exists
  287. -           WFIFOB(fd,3) = 0; // Aegis reports success.
  288. -           WFIFOSET(fd, packet_len(0x0d1));
  289. +           clif_wisexin(sd, type, 0); // Aegis reports success.
  290.             return;
  291.         }
  292.  
  293.         //Insert in position i
  294.         safestrncpy(sd->ignore[i].name, nick, NAME_LENGTH);
  295.  
  296. -       WFIFOB(fd,3) = 0; // success
  297. -       WFIFOSET(fd, packet_len(0x0d1));
  298.     }
  299.     else
  300.     {   // Remove name from ignore list (unblock)
  301. @@ -12526,18 +12567,16 @@
  302.         ARR_FIND( 0, MAX_IGNORE_LIST, i, sd->ignore[i].name[0] == '\0' || strcmp(sd->ignore[i].name, nick) == 0 );
  303.         if( i == MAX_IGNORE_LIST || sd->ignore[i].name[i] == '\0' )
  304.         { //Not found
  305. -           WFIFOB(fd,3) = 1; // fail
  306. -           WFIFOSET(fd, packet_len(0x0d1));
  307. +           clif_wisexin(sd, type, 1); // fail
  308.             return;
  309.         }
  310.         // move everything one place down to overwrite removed entry
  311.         memmove(sd->ignore[i].name, sd->ignore[i+1].name, (MAX_IGNORE_LIST-i-1)*sizeof(sd->ignore[0].name));
  312.         // wipe last entry
  313.         memset(sd->ignore[MAX_IGNORE_LIST-1].name, 0, sizeof(sd->ignore[0].name));
  314. +   }
  315.  
  316. -       WFIFOB(fd,3) = 0; // success
  317. -       WFIFOSET(fd, packet_len(0x0d1));
  318. -   }
  319. +   clif_wisexin(sd, type, 0); // success
  320.  }
  321.  
  322.  
  323. @@ -12549,57 +12588,64 @@
  324.  ///     1 = (/inall) allow all speech
  325.  void clif_parse_PMIgnoreAll(int fd, struct map_session_data *sd)
  326.  {
  327. -   // FIXME: Use clif_wisall.
  328. -   WFIFOHEAD(fd,packet_len(0xd2));
  329. -   WFIFOW(fd,0) = 0x0d2;
  330. -   WFIFOB(fd,2) = RFIFOB(fd,2);
  331. +   int type = RFIFOB(fd,2), flag;
  332.  
  333. -   if( RFIFOB(fd,2) == 0 )
  334. +   if( type == 0 )
  335.     {// Deny all
  336.         if( sd->state.ignoreAll ) {
  337. -           WFIFOB(fd,3) = 1; // fail
  338. +           flag = 1; // fail
  339.         } else {
  340.             sd->state.ignoreAll = 1;
  341. -           WFIFOB(fd,3) = 0; // success
  342. +           flag = 0; // success
  343.         }
  344.     }
  345.     else
  346.     {//Unblock everyone
  347.         if( sd->state.ignoreAll ) {
  348.             sd->state.ignoreAll = 0;
  349. -           WFIFOB(fd,3) = 0; // success
  350. +           flag = 0; // success
  351.         } else {
  352.             if (sd->ignore[0].name[0] != '\0')
  353.             {  //Wipe the ignore list.
  354.                 memset(sd->ignore, 0, sizeof(sd->ignore));
  355. -               WFIFOB(fd,3) = 0; // success
  356. +               flag = 0; // success
  357.             } else {
  358. -               WFIFOB(fd,3) = 1; // fail
  359. +               flag = 1; // fail
  360.             }
  361.         }
  362.     }
  363.  
  364. -   WFIFOSET(fd, packet_len(0x0d2));
  365. +   clif_wisall(sd, type, flag);
  366.  }
  367.  
  368.  
  369. -/// Whisper ignore list request (CZ_REQ_WHISPER_LIST).
  370. -/// 00d3
  371. -void clif_parse_PMIgnoreList(int fd,struct map_session_data *sd)
  372. +/// Whisper ignore list (ZC_WHISPER_LIST).
  373. +/// 00d4 <packet len>.W { <char name>.24B }*
  374. +void clif_PMIgnoreList(struct map_session_data* sd)
  375.  {
  376. -   int i;
  377. +   int i, fd = sd->fd;
  378.  
  379. -   WFIFOHEAD(fd, 4 + (NAME_LENGTH * MAX_IGNORE_LIST));
  380. +   WFIFOHEAD(fd,4+ARRAYLENGTH(sd->ignore)*NAME_LENGTH);
  381.     WFIFOW(fd,0) = 0xd4;
  382.  
  383. -   for(i = 0; i < MAX_IGNORE_LIST && sd->ignore[i].name[0] != '\0'; i++)
  384. -       memcpy(WFIFOP(fd, 4 + i * NAME_LENGTH),sd->ignore[i].name, NAME_LENGTH);
  385. +   for( i = 0; i < ARRAYLENGTH(sd->ignore) && sd->ignore[i].name[0]; i++ )
  386. +   {
  387. +       memcpy(WFIFOP(fd,4+i*NAME_LENGTH), sd->ignore[i].name, NAME_LENGTH);
  388. +   }
  389.  
  390. -   WFIFOW(fd,2) = 4 + i * NAME_LENGTH;
  391. -   WFIFOSET(fd, WFIFOW(fd,2));
  392. +   WFIFOW(fd,2) = 4+i*NAME_LENGTH;
  393. +   WFIFOSET(fd,WFIFOW(fd,2));
  394.  }
  395.  
  396.  
  397. +/// Whisper ignore list request (CZ_REQ_WHISPER_LIST).
  398. +/// 00d3
  399. +void clif_parse_PMIgnoreList(int fd,struct map_session_data *sd)
  400. +{
  401. +   clif_PMIgnoreList(sd);
  402. +}
  403. +
  404. +
  405.  /// Request to invoke the /doridori recovery bonus (CZ_DORIDORI).
  406.  /// 01e7
  407.  void clif_parse_NoviceDoriDori(int fd, struct map_session_data *sd)
  408. @@ -12743,12 +12789,27 @@
  409.  }
  410.  
  411.  
  412. +/// Asks a player for permission to be added as friend (ZC_REQ_ADD_FRIENDS).
  413. +/// 0207 <req account id>.L <req char id>.L <req char name>.24B
  414. +void clif_friendlist_req(struct map_session_data* sd, int account_id, int char_id, const char* name)
  415. +{
  416. +   int fd = sd->fd;
  417. +
  418. +   WFIFOHEAD(fd,packet_len(0x207));
  419. +   WFIFOW(fd,0) = 0x207;
  420. +   WFIFOL(fd,2) = account_id;
  421. +   WFIFOL(fd,6) = char_id;
  422. +   memcpy(WFIFOP(fd,10), name, NAME_LENGTH);
  423. +   WFIFOSET(fd,packet_len(0x207));
  424. +}
  425. +
  426. +
  427.  /// Request to add a player as friend (CZ_ADD_FRIENDS).
  428.  /// 0202 <name>.24B
  429.  void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd)
  430.  {
  431.     struct map_session_data *f_sd;
  432. -   int i, f_fd;
  433. +   int i;
  434.  
  435.     f_sd = map_nick2sd((char*)RFIFOP(fd,2));
  436.  
  437. @@ -12785,16 +12846,13 @@
  438.         }
  439.     }
  440.  
  441. -   f_sd->friend_req = sd->status.char_id;
  442. -   sd->friend_req   = f_sd->status.char_id;
  443. +   if (i == MAX_FRIENDS) {
  444. +       //No space, list full.
  445. +       clif_friendslist_reqack(sd, f_sd, 2);
  446. +       return;
  447. +   }
  448.  
  449. -   f_fd = f_sd->fd;
  450. -   WFIFOHEAD(f_fd,packet_len(0x207));
  451. -   WFIFOW(f_fd,0) = 0x207;
  452. -   WFIFOL(f_fd,2) = sd->status.account_id;
  453. -   WFIFOL(f_fd,6) = sd->status.char_id;
  454. -   memcpy(WFIFOP(f_fd,10), sd->status.name, NAME_LENGTH);
  455. -   WFIFOSET(f_fd, packet_len(0x207));
  456. +   clif_friendlist_req(f_sd, sd->status.account_id, sd->status.char_id, sd->status.name);
  457.  }
  458.  
  459.  
  460. @@ -12931,12 +12989,12 @@
  461.  }
  462.  
  463.  
  464. -/// /pvpinfo (CZ_REQ_PVPPOINT).
  465. -/// 020f <char id>.L <account id>.L
  466.  /// /pvpinfo list (ZC_ACK_PVPPOINT).
  467.  /// 0210 <char id>.L <account id>.L <win point>.L <lose point>.L <point>.L
  468. -void clif_parse_PVPInfo(int fd,struct map_session_data *sd)
  469. +void clif_PVPInfo(struct map_session_data* sd)
  470.  {
  471. +   int fd = sd->fd;
  472. +
  473.     WFIFOHEAD(fd,packet_len(0x210));
  474.     WFIFOW(fd,0) = 0x210;
  475.     WFIFOL(fd,2) = sd->status.char_id;
  476. @@ -12948,13 +13006,20 @@
  477.  }
  478.  
  479.  
  480. -/// /blacksmith (CZ_BLACKSMITH_RANK).
  481. -/// 0217
  482. +/// /pvpinfo (CZ_REQ_PVPPOINT).
  483. +/// 020f <char id>.L <account id>.L
  484. +void clif_parse_PVPInfo(int fd,struct map_session_data *sd)
  485. +{
  486. +   // TODO: Is there a way to use this on an another player (char/acc id)?
  487. +   clif_PVPInfo(sd);
  488. +}
  489. +
  490. +
  491.  /// /blacksmith list (ZC_BLACKSMITH_RANK).
  492.  /// 0219 { <name>.24B }*10 { <point>.L }*10
  493. -void clif_parse_Blacksmith(int fd,struct map_session_data *sd)
  494. +void clif_blacksmith(struct map_session_data* sd)
  495.  {
  496. -   int i;
  497. +   int i, fd = sd->fd;
  498.     const char* name;
  499.  
  500.     WFIFOHEAD(fd,packet_len(0x219));
  501. @@ -12981,11 +13046,20 @@
  502.  }
  503.  
  504.  
  505. +/// /blacksmith (CZ_BLACKSMITH_RANK).
  506. +/// 0217
  507. +void clif_parse_Blacksmith(int fd,struct map_session_data *sd)
  508. +{
  509. +   clif_blacksmith(sd);
  510. +}
  511. +
  512. +
  513.  /// Notification about backsmith points (ZC_BLACKSMITH_POINT).
  514.  /// 021b <points>.L <total points>.L
  515.  void clif_fame_blacksmith(struct map_session_data *sd, int points)
  516.  {
  517.     int fd = sd->fd;
  518. +
  519.     WFIFOHEAD(fd,packet_len(0x21b));
  520.     WFIFOW(fd,0) = 0x21b;
  521.     WFIFOL(fd,2) = points;
  522. @@ -12994,13 +13068,11 @@
  523.  }
  524.  
  525.  
  526. -/// /alchemist (CZ_ALCHEMIST_RANK).
  527. -/// 0218
  528.  /// /alchemist list (ZC_ALCHEMIST_RANK).
  529.  /// 021a { <name>.24B }*10 { <point>.L }*10
  530. -void clif_parse_Alchemist(int fd,struct map_session_data *sd)
  531. +void clif_alchemist(struct map_session_data* sd)
  532.  {
  533. -   int i;
  534. +   int i, fd = sd->fd;
  535.     const char* name;
  536.  
  537.     WFIFOHEAD(fd,packet_len(0x21a));
  538. @@ -13027,11 +13099,20 @@
  539.  }
  540.  
  541.  
  542. +/// /alchemist (CZ_ALCHEMIST_RANK).
  543. +/// 0218
  544. +void clif_parse_Alchemist(int fd,struct map_session_data *sd)
  545. +{
  546. +   clif_alchemist(sd);
  547. +}
  548. +
  549. +
  550.  /// Notification about alchemist points (ZC_ALCHEMIST_POINT).
  551.  /// 021c <points>.L <total points>.L
  552.  void clif_fame_alchemist(struct map_session_data *sd, int points)
  553.  {
  554.     int fd = sd->fd;
  555. +
  556.     WFIFOHEAD(fd,packet_len(0x21c));
  557.     WFIFOW(fd,0) = 0x21c;
  558.     WFIFOL(fd,2) = points;
  559. @@ -13040,13 +13121,11 @@
  560.  }
  561.  
  562.  
  563. -/// /taekwon (CZ_TAEKWON_RANK).
  564. -/// 0225
  565.  /// /taekwon list (ZC_TAEKWON_RANK).
  566.  /// 0226 { <name>.24B }*10 { <point>.L }*10
  567. -void clif_parse_Taekwon(int fd,struct map_session_data *sd)
  568. +void clif_taekwon(struct map_session_data* sd)
  569.  {
  570. -   int i;
  571. +   int i, fd = sd->fd;
  572.     const char* name;
  573.  
  574.     WFIFOHEAD(fd,packet_len(0x226));
  575. @@ -13072,11 +13151,20 @@
  576.  }
  577.  
  578.  
  579. +/// /taekwon (CZ_TAEKWON_RANK).
  580. +/// 0225
  581. +void clif_parse_Taekwon(int fd,struct map_session_data *sd)
  582. +{
  583. +   clif_taekwon(sd);
  584. +}
  585. +
  586. +
  587.  /// Notification about taekwon points (ZC_TAEKWON_POINT).
  588.  /// 0224 <points>.L <total points>.L
  589.  void clif_fame_taekwon(struct map_session_data *sd, int points)
  590.  {
  591.     int fd = sd->fd;
  592. +
  593.     WFIFOHEAD(fd,packet_len(0x224));
  594.     WFIFOW(fd,0) = 0x224;
  595.     WFIFOL(fd,2) = points;
  596. @@ -13085,13 +13173,11 @@
  597.  }
  598.  
  599.  
  600. -/// /pk (CZ_KILLER_RANK).
  601. -/// 0237
  602.  /// /pk list (ZC_KILLER_RANK).
  603.  /// 0238 { <name>.24B }*10 { <point>.L }*10
  604. -void clif_parse_RankingPk(int fd,struct map_session_data *sd)
  605. +void clif_ranking_pk(struct map_session_data* sd)
  606.  {
  607. -   int i;
  608. +   int i, fd = sd->fd;
  609.  
  610.     WFIFOHEAD(fd,packet_len(0x238));
  611.     WFIFOW(fd,0) = 0x238;
  612. @@ -13103,6 +13189,14 @@
  613.  }
  614.  
  615.  
  616. +/// /pk (CZ_KILLER_RANK).
  617. +/// 0237
  618. +void clif_parse_RankingPk(int fd,struct map_session_data *sd)
  619. +{
  620. +   clif_ranking_pk(sd);
  621. +}
  622. +
  623. +
  624.  /// SG Feel save OK [Komurka] (CZ_AGREE_STARPLACE).
  625.  /// 0254 <which>.B
  626.  /// which:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement