Sarada-L2

aCis Protocol 216 + alterações By: D1MITRY-DEV

Jul 17th, 2024
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 186.97 KB | None | 0 0
  1. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java
  2. index fb0a4c2e..9ff755e7 100644
  3. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java
  4. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java
  5. @@ -133,7 +133,8 @@ else if (player.getInventory().getItemByItemId(e.getItemId()) == null)
  6. // this happens if 1 list entry has the same ingredient twice (example 2 swords = 1 dual)
  7. if (ex.getItemId() == e.getItemId() && ex.getEnchantLevel() == e.getEnchantLevel())
  8. {
  9. - if (ex.getItemCount() + e.getItemCount() > Integer.MAX_VALUE)
  10. + //if (ex.getItemCount() + e.getItemCount() > Integer.MAX_VALUE)
  11. + if (ex.getItemCount() > Integer.MAX_VALUE - e.getItemCount())
  12. {
  13. player.sendPacket(SystemMessageId.YOU_HAVE_EXCEEDED_QUANTITY_THAT_CAN_BE_INPUTTED);
  14. return;
  15. @@ -157,7 +158,8 @@ else if (player.getInventory().getItemByItemId(e.getItemId()) == null)
  16. // now check if the player has sufficient items in the inventory to cover the ingredients' expences
  17. for (Ingredient e : ingredientsList)
  18. {
  19. - if (e.getItemCount() * _amount > Integer.MAX_VALUE)
  20. + //if (e.getItemCount() * _amount > Integer.MAX_VALUE)
  21. + if (e.getItemCount() > Integer.MAX_VALUE / _amount)
  22. {
  23. player.sendPacket(SystemMessageId.YOU_HAVE_EXCEEDED_QUANTITY_THAT_CAN_BE_INPUTTED);
  24. return;
  25. @@ -326,7 +328,7 @@ else if (player.getInventory().getItemByItemId(e.getItemId()) == null)
  26. }
  27. }
  28. player.sendPacket(new ItemList(player, false));
  29. -
  30. +
  31. // All ok, send success message, remove items and add final product
  32. player.sendPacket(SystemMessageId.SUCCESSFULLY_TRADED_WITH_NPC);
  33.  
  34. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/NewCharacter.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/NewCharacter.java
  35. index 93469994..2851e9e3 100644
  36. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/NewCharacter.java
  37. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/NewCharacter.java
  38. @@ -2,6 +2,7 @@
  39.  
  40. import com.l2jmega.gameserver.data.xml.PlayerData;
  41. import com.l2jmega.gameserver.model.base.ClassId;
  42. +import com.l2jmega.gameserver.network.serverpackets.NewCharacterSuccess;
  43. import com.l2jmega.gameserver.network.serverpackets.CharTemplates;
  44.  
  45. public final class NewCharacter extends L2GameClientPacket
  46. @@ -14,7 +15,8 @@ protected void readImpl()
  47. @Override
  48. protected void runImpl()
  49. {
  50. - CharTemplates ct = new CharTemplates();
  51. + // CharTemplates ct = new CharTemplates();
  52. + NewCharacterSuccess ct = new NewCharacterSuccess();
  53.  
  54. ct.addChar(PlayerData.getInstance().getTemplate(0));
  55. ct.addChar(PlayerData.getInstance().getTemplate(ClassId.HUMAN_FIGHTER));
  56. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/ProtocolVersion.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/ProtocolVersion.java
  57. index 4eb84a50..2953c52a 100644
  58. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/ProtocolVersion.java
  59. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/ProtocolVersion.java
  60. @@ -16,9 +16,12 @@ protected void readImpl()
  61. @Override
  62. protected void runImpl()
  63. {
  64. - if (_version != 746)
  65. + if (_version != 216)
  66. + {
  67. + // getClient().sendPacket(new KeyPacket(getClient().enableCrypt(),0));
  68. getClient().close((L2GameServerPacket) null);
  69. + }
  70. else
  71. - getClient().sendPacket(new KeyPacket(getClient().enableCrypt()));
  72. + getClient().sendPacket(new KeyPacket(getClient().enableCrypt(),1));
  73. }
  74. }
  75. \ No newline at end of file
  76. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestActionUse.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestActionUse.java
  77. index 02c3c360..373a039b 100644
  78. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestActionUse.java
  79. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestActionUse.java
  80. @@ -19,6 +19,7 @@
  81. import com.l2jmega.gameserver.model.location.Location;
  82. import com.l2jmega.gameserver.network.SystemMessageId;
  83. import com.l2jmega.gameserver.network.serverpackets.ActionFailed;
  84. +import com.l2jmega.gameserver.network.serverpackets.SocialAction;
  85. import com.l2jmega.gameserver.network.serverpackets.NpcSay;
  86.  
  87. public final class RequestActionUse extends L2GameClientPacket
  88. @@ -330,7 +331,9 @@ else if (pet.isAttackingNow() || pet.isInCombat())
  89. case 61: // Private Store Package Sell
  90. player.tryOpenPrivateSellStore(true);
  91. break;
  92. -
  93. + case 65:
  94. +
  95. + break;
  96. case 1000: // Siege Golem - Siege Hammer
  97. if (!(target instanceof Door))
  98. {
  99. @@ -457,6 +460,50 @@ else if (pet.isAttackingNow() || pet.isInCombat())
  100.  
  101. useSkill(5111, target);
  102. break;
  103. + //CT2.3 Social Packets
  104. + case 12:
  105. + tryBroadcastSocial(2);
  106. + break;
  107. + case 13:
  108. + tryBroadcastSocial(3);
  109. + break;
  110. + case 14:
  111. + tryBroadcastSocial(4);
  112. + break;
  113. + case 24:
  114. + tryBroadcastSocial(6);
  115. + break;
  116. + case 25:
  117. + tryBroadcastSocial(5);
  118. + break;
  119. + case 26:
  120. + tryBroadcastSocial(7);
  121. + break;
  122. + case 29:
  123. + tryBroadcastSocial(8);
  124. + break;
  125. + case 30:
  126. + tryBroadcastSocial(9);
  127. + break;
  128. + case 31:
  129. + tryBroadcastSocial(10);
  130. + break;
  131. + case 33:
  132. + tryBroadcastSocial(11);
  133. + break;
  134. + case 34:
  135. + tryBroadcastSocial(12);
  136. + break;
  137. + case 35:
  138. + tryBroadcastSocial(13);
  139. + break;
  140. + case 62:
  141. + tryBroadcastSocial(14);
  142. + break;
  143. + case 66:
  144. + tryBroadcastSocial(15);
  145. + break;
  146. +
  147.  
  148. default:
  149. LOGGER.warn("Unhandled action type {} detected for {}.", _actionId, player.getName());
  150. @@ -507,4 +554,25 @@ private boolean useSkill(int skillId, WorldObject target)
  151. activeSummon.setTarget(target);
  152. return activeSummon.useMagic(skill, _ctrlPressed, _shiftPressed);
  153. }
  154. +
  155. + private void tryBroadcastSocial(int id)
  156. + {
  157. + final Player activeChar = getClient().getActiveChar();
  158. + if (activeChar == null)
  159. + return;
  160. +
  161. + if (activeChar.isFishing())
  162. + {
  163. + activeChar.sendPacket(SystemMessageId.CANNOT_DO_WHILE_FISHING_3);
  164. + return;
  165. + }
  166. +
  167. + //if (_actionId < 2 || _actionId > 13)
  168. + // return;
  169. +
  170. + if (activeChar.isInStoreMode() || activeChar.getActiveRequester() != null || activeChar.isAlikeDead() || activeChar.getAI().getIntention() != CtrlIntention.IDLE)
  171. + return;
  172. +
  173. + activeChar.broadcastPacket(new SocialAction(activeChar, id));
  174. + }
  175. }
  176. \ No newline at end of file
  177. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestAllAgitInfo.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestAllAgitInfo.java
  178. new file mode 100644
  179. index 00000000..a8fde6b5
  180. --- /dev/null
  181. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestAllAgitInfo.java
  182. @@ -0,0 +1,58 @@
  183. +/*
  184. + * This program is free software: you can redistribute it and/or modify it under
  185. + * the terms of the GNU General Public License as published by the Free Software
  186. + * Foundation, either version 3 of the License, or (at your option) any later
  187. + * version.
  188. + *
  189. + * This program is distributed in the hope that it will be useful, but WITHOUT
  190. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  191. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  192. + * details.
  193. + *
  194. + * You should have received a copy of the GNU General Public License along with
  195. + * this program. If not, see <http://www.gnu.org/licenses/>.
  196. + */
  197. +package com.l2jmega.gameserver.network.clientpackets;
  198. +
  199. +import com.l2jmega.gameserver.network.L2GameClient;
  200. +//import com.l2jmega.gameserver.network.serverpackets.ExShowAgitInfo;
  201. +
  202. +/**
  203. + *
  204. + * @author KenM
  205. + */
  206. +public class RequestAllAgitInfo extends L2GameClientPacket
  207. +{
  208. +
  209. + /**
  210. + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#getType()
  211. + */
  212. + @Override
  213. + public String getType()
  214. + {
  215. + return "[C] D0:41 RequestAllAgitInfo";
  216. + }
  217. +
  218. + /**
  219. + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#readImpl()
  220. + */
  221. + @Override
  222. + protected void readImpl()
  223. + {
  224. +
  225. + }
  226. +
  227. + /**
  228. + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#runImpl()
  229. + */
  230. + @Override
  231. + protected void runImpl()
  232. + {
  233. + // L2GameClient client = this.getClient();
  234. + // if (client != null)
  235. + // {
  236. + // client.sendPacket(new ExShowAgitInfo());
  237. + // }
  238. + }
  239. +
  240. +}
  241. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestAllCastleInfo.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestAllCastleInfo.java
  242. new file mode 100644
  243. index 00000000..ef629df5
  244. --- /dev/null
  245. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestAllCastleInfo.java
  246. @@ -0,0 +1,58 @@
  247. +/*
  248. + * This program is free software: you can redistribute it and/or modify it under
  249. + * the terms of the GNU General Public License as published by the Free Software
  250. + * Foundation, either version 3 of the License, or (at your option) any later
  251. + * version.
  252. + *
  253. + * This program is distributed in the hope that it will be useful, but WITHOUT
  254. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  255. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  256. + * details.
  257. + *
  258. + * You should have received a copy of the GNU General Public License along with
  259. + * this program. If not, see <http://www.gnu.org/licenses/>.
  260. + */
  261. +package com.l2jmega.gameserver.network.clientpackets;
  262. +
  263. +import com.l2jmega.gameserver.network.L2GameClient;
  264. +//import com.l2jmega.gameserver.network.serverpackets.ExShowCastleInfo;
  265. +
  266. +/**
  267. + *
  268. + * @author KenM
  269. + */
  270. +public class RequestAllCastleInfo extends L2GameClientPacket
  271. +{
  272. +
  273. + /**
  274. + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#getType()
  275. + */
  276. + @Override
  277. + public String getType()
  278. + {
  279. + return "[C] D0:3F RequestAllCastleInfo";
  280. + }
  281. +
  282. + /**
  283. + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#readImpl()
  284. + */
  285. + @Override
  286. + protected void readImpl()
  287. + {
  288. + // trigger
  289. + }
  290. +
  291. + /**
  292. + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#runImpl()
  293. + */
  294. + @Override
  295. + protected void runImpl()
  296. + {
  297. + // L2GameClient client = this.getClient();
  298. + // if (client != null)
  299. + // {
  300. + // client.sendPacket(new ExShowCastleInfo());
  301. + // }
  302. + }
  303. +
  304. +}
  305. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestAllFortressInfo.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestAllFortressInfo.java
  306. new file mode 100644
  307. index 00000000..9cbcdc00
  308. --- /dev/null
  309. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestAllFortressInfo.java
  310. @@ -0,0 +1,58 @@
  311. +/*
  312. + * This program is free software: you can redistribute it and/or modify it under
  313. + * the terms of the GNU General Public License as published by the Free Software
  314. + * Foundation, either version 3 of the License, or (at your option) any later
  315. + * version.
  316. + *
  317. + * This program is distributed in the hope that it will be useful, but WITHOUT
  318. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  319. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  320. + * details.
  321. + *
  322. + * You should have received a copy of the GNU General Public License along with
  323. + * this program. If not, see <http://www.gnu.org/licenses/>.
  324. + */
  325. +package com.l2jmega.gameserver.network.clientpackets;
  326. +
  327. +import com.l2jmega.gameserver.network.L2GameClient;
  328. +//import com.l2jmega.gameserver.network.serverpackets.ExShowFortressInfo;
  329. +
  330. +/**
  331. + *
  332. + * @author KenM
  333. + */
  334. +public class RequestAllFortressInfo extends L2GameClientPacket
  335. +{
  336. +
  337. + /**
  338. + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#getType()
  339. + */
  340. + @Override
  341. + public String getType()
  342. + {
  343. + return "[C] D0:3D RequestAllFortressInfo";
  344. + }
  345. +
  346. + /**
  347. + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#readImpl()
  348. + */
  349. + @Override
  350. + protected void readImpl()
  351. + {
  352. + // trigger packet
  353. + }
  354. +
  355. + /**
  356. + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#runImpl()
  357. + */
  358. + @Override
  359. + protected void runImpl()
  360. + {
  361. + // L2GameClient client = this.getClient();
  362. + // if (client != null)
  363. + // {
  364. +// client.sendPacket(new ExShowFortressInfo());
  365. +// }
  366. + }
  367. +
  368. +}
  369. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBookMarkSlotInfo.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBookMarkSlotInfo.java
  370. new file mode 100644
  371. index 00000000..578560a4
  372. --- /dev/null
  373. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBookMarkSlotInfo.java
  374. @@ -0,0 +1,58 @@
  375. +/*
  376. + * This program is free software: you can redistribute it and/or modify it under
  377. + * the terms of the GNU General Public License as published by the Free Software
  378. + * Foundation, either version 3 of the License, or (at your option) any later
  379. + * version.
  380. + *
  381. + * This program is distributed in the hope that it will be useful, but WITHOUT
  382. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  383. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  384. + * details.
  385. + *
  386. + * You should have received a copy of the GNU General Public License along with
  387. + * this program. If not, see <http://www.gnu.org/licenses/>.
  388. + */
  389. +package com.l2jmega.gameserver.network.clientpackets;
  390. +
  391. +import com.l2jmega.gameserver.network.L2GameClient;
  392. +//import com.l2jmega.gameserver.network.serverpackets.ExShowFortressInfo;
  393. +
  394. +/**
  395. + *
  396. + * @author KenM
  397. + */
  398. +public class RequestBookMarkSlotInfo extends L2GameClientPacket
  399. +{
  400. +
  401. + /**
  402. + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#getType()
  403. + */
  404. + @Override
  405. + public String getType()
  406. + {
  407. + return "[C] D0:3D RequestBookMarkSlotInfo";
  408. + }
  409. +
  410. + /**
  411. + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#readImpl()
  412. + */
  413. + @Override
  414. + protected void readImpl()
  415. + {
  416. + // trigger packet
  417. + }
  418. +
  419. + /**
  420. + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#runImpl()
  421. + */
  422. + @Override
  423. + protected void runImpl()
  424. + {
  425. + // L2GameClient client = this.getClient();
  426. + // if (client != null)
  427. + // {
  428. +// client.sendPacket(new ExShowFortressInfo());
  429. +// }
  430. + }
  431. +
  432. +}
  433. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuyItem.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuyItem.java
  434. index a02d24fb..ef3ffcbd 100644
  435. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuyItem.java
  436. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuyItem.java
  437. @@ -12,14 +12,11 @@
  438. import com.l2jmega.gameserver.model.buylist.Product;
  439. import com.l2jmega.gameserver.model.holder.IntIntHolder;
  440. import com.l2jmega.gameserver.network.SystemMessageId;
  441. -import com.l2jmega.gameserver.network.serverpackets.ItemList;
  442. -import com.l2jmega.gameserver.network.serverpackets.NpcHtmlMessage;
  443. -import com.l2jmega.gameserver.network.serverpackets.StatusUpdate;
  444. -import com.l2jmega.gameserver.network.serverpackets.SystemMessage;
  445. +import com.l2jmega.gameserver.network.serverpackets.*;
  446.  
  447. public final class RequestBuyItem extends L2GameClientPacket
  448. {
  449. - private static final int BATCH_LENGTH = 8; // length of the one item
  450. + private static final int BATCH_LENGTH = 12; // length of the one item
  451.  
  452. private int _listId;
  453. private IntIntHolder[] _items = null;
  454. @@ -36,7 +33,7 @@ protected void readImpl()
  455. for (int i = 0; i < count; i++)
  456. {
  457. int itemId = readD();
  458. - int cnt = readD();
  459. + int cnt = (int) readQ();
  460.  
  461. if (itemId < 1 || cnt < 1)
  462. {
  463. @@ -80,9 +77,9 @@ protected void runImpl()
  464. castleTaxRate = merchant.getCastle().getTaxRate();
  465. }
  466.  
  467. - int subTotal = 0;
  468. - int slots = 0;
  469. - int weight = 0;
  470. + long subTotal = 0;
  471. + long slots = 0;
  472. + long weight = 0;
  473.  
  474. for (IntIntHolder i : _items)
  475. {
  476. @@ -132,20 +129,20 @@ else if (player.getInventory().getItemByItemId(i.getId()) == null)
  477. slots++;
  478. }
  479.  
  480. - if (weight > Integer.MAX_VALUE || weight < 0 || !player.getInventory().validateWeight(weight))
  481. + if (weight > Integer.MAX_VALUE || weight < 0 || !player.getInventory().validateWeight((int) weight))
  482. {
  483. sendPacket(SystemMessage.getSystemMessage(SystemMessageId.WEIGHT_LIMIT_EXCEEDED));
  484. return;
  485. }
  486.  
  487. - if (slots > Integer.MAX_VALUE || slots < 0 || !player.getInventory().validateCapacity(slots))
  488. + if (slots > Integer.MAX_VALUE || slots < 0 || !player.getInventory().validateCapacity((int) slots))
  489. {
  490. sendPacket(SystemMessage.getSystemMessage(SystemMessageId.SLOTS_FULL));
  491. return;
  492. }
  493.  
  494. // Charge buyer and add tax to castle treasury if not owned by npc clan
  495. - if (subTotal < 0 || !player.reduceAdena("Buy", subTotal, player.getCurrentFolk(), false))
  496. + if (subTotal < 0 || !player.reduceAdena("Buy", (int) subTotal, player.getCurrentFolk(), false))
  497. {
  498. sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_NOT_ENOUGH_ADENA));
  499. return;
  500. @@ -196,5 +193,6 @@ else if (merchant instanceof Merchant)
  501. su.addAttribute(StatusUpdate.CUR_LOAD, player.getCurrentLoad());
  502. player.sendPacket(su);
  503. player.sendPacket(new ItemList(player, true));
  504. + player.sendPacket(new ExBuySellListPacket());
  505. }
  506. }
  507. \ No newline at end of file
  508. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuyProcure.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuyProcure.java
  509. index 82483e04..8eab5de2 100644
  510. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuyProcure.java
  511. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuyProcure.java
  512. @@ -8,7 +8,7 @@
  513.  
  514. public class RequestBuyProcure extends L2GameClientPacket
  515. {
  516. - private static final int BATCH_LENGTH = 8;
  517. + private static final int BATCH_LENGTH = 12;
  518.  
  519. private int _manorId;
  520. private List<IntIntHolder> _items;
  521. @@ -27,7 +27,7 @@ protected void readImpl()
  522. {
  523. readD(); // service
  524. final int itemId = readD();
  525. - final int cnt = readD();
  526. + final int cnt = (int)readQ();
  527.  
  528. if (itemId < 1 || cnt < 1)
  529. {
  530. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuySeed.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuySeed.java
  531. index b2e68801..1dbfe01b 100644
  532. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuySeed.java
  533. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuySeed.java
  534. @@ -24,7 +24,7 @@
  535.  
  536. public class RequestBuySeed extends L2GameClientPacket
  537. {
  538. - private static final int BATCH_LENGTH = 8;
  539. + private static final int BATCH_LENGTH = 12;
  540.  
  541. private int _manorId;
  542. private List<IntIntHolder> _items;
  543. @@ -42,7 +42,7 @@ protected void readImpl()
  544. for (int i = 0; i < count; i++)
  545. {
  546. final int itemId = readD();
  547. - final int cnt = readD();
  548. + final int cnt = (int)readQ();
  549.  
  550. if (cnt < 1 || itemId < 1)
  551. {
  552. @@ -91,7 +91,7 @@ protected void runImpl()
  553. return;
  554. }
  555.  
  556. - int totalPrice = 0;
  557. + long totalPrice = 0;
  558. int slots = 0;
  559. int totalWeight = 0;
  560.  
  561. @@ -166,7 +166,7 @@ else if (player.getInventory().getItemByItemId(ih.getId()) == null)
  562. if (totalPrice > 0)
  563. {
  564. castle.addToTreasuryNoTax(totalPrice);
  565. - player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.S1_DISAPPEARED_ADENA).addItemNumber(totalPrice));
  566. + player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.S1_DISAPPEARED_ADENA).addItemNumber((int) totalPrice));
  567. }
  568. }
  569. }
  570. \ No newline at end of file
  571. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuySellUIClose.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuySellUIClose.java
  572. new file mode 100644
  573. index 00000000..ebb59550
  574. --- /dev/null
  575. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuySellUIClose.java
  576. @@ -0,0 +1,48 @@
  577. +/*
  578. + * This program is free software: you can redistribute it and/or modify it under
  579. + * the terms of the GNU General Public License as published by the Free Software
  580. + * Foundation, either version 3 of the License, or (at your option) any later
  581. + * version.
  582. + *
  583. + * This program is distributed in the hope that it will be useful, but WITHOUT
  584. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  585. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  586. + * details.
  587. + *
  588. + * You should have received a copy of the GNU General Public License along with
  589. + * this program. If not, see <http://www.gnu.org/licenses/>.
  590. + */
  591. +package com.l2jmega.gameserver.network.clientpackets;
  592. +
  593. +import com.l2jmega.gameserver.model.actor.instance.Player;
  594. +import com.l2jmega.gameserver.network.serverpackets.ItemList;
  595. +
  596. +public class RequestBuySellUIClose extends L2GameClientPacket
  597. +{
  598. + private static final String _C__D0_76_REQUESTBUYSELLUICLOSE = "[C] D0:76 RequestBuySellUIClose";
  599. +
  600. + @Override
  601. + protected void readImpl()
  602. + {
  603. + // trigger
  604. + }
  605. +
  606. + @Override
  607. + protected void runImpl()
  608. + {
  609. + final Player activeChar = getClient().getActiveChar();
  610. + if (activeChar == null || activeChar.isInventoryDisabled())
  611. + return;
  612. +
  613. + activeChar.sendPacket(new ItemList(activeChar, true));
  614. + }
  615. +
  616. + /* (non-Javadoc)
  617. + * @see com.l2jmega.gameserver.clientpackets.ClientBasePacket#getType()
  618. + */
  619. + @Override
  620. + public String getType()
  621. + {
  622. + return _C__D0_76_REQUESTBUYSELLUICLOSE;
  623. + }
  624. +}
  625. \ No newline at end of file
  626. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
  627. index bc002495..6695a33c 100644
  628. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
  629. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
  630. @@ -8,6 +8,8 @@
  631. import com.l2jmega.gameserver.data.xml.AdminData;
  632. import com.l2jmega.gameserver.handler.AdminCommandHandler;
  633. import com.l2jmega.gameserver.handler.IAdminCommandHandler;
  634. +import com.l2jmega.gameserver.handler.IVoiceCommandHandler;
  635. +import com.l2jmega.gameserver.handler.VoiceCommandHandler;
  636. import com.l2jmega.gameserver.model.World;
  637. import com.l2jmega.gameserver.model.WorldObject;
  638. import com.l2jmega.gameserver.model.actor.Npc;
  639. @@ -155,6 +157,18 @@ else if (_command.startsWith("_diary"))
  640. if (heroid > 0)
  641. Hero.getInstance().showHeroDiary(player, heroclass, heroid, heropage);
  642. }
  643. + else if (_command.startsWith("user_"))
  644. + {
  645. + final String command = _command.substring(5).trim();
  646. + final String word2 = command.split("\\s+")[0];
  647. + final String args2 = command.substring(word2.length()).trim();
  648. + final IVoiceCommandHandler vch = VoiceCommandHandler.getInstance().getVoicedCommandHandler(word2);
  649. + if (vch != null) {
  650. + vch.useVoicedCommand(word2, player, args2);
  651. + } else {
  652. + LOGGER.warn("Unknown voiced command '" + word2 + "'");
  653. + }
  654. + }
  655. else if (_command.startsWith("arenachange")) // change
  656. {
  657. final boolean isManager = player.getCurrentFolk() instanceof OlympiadManagerNpc;
  658. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDropItem.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDropItem.java
  659. index d0bf5650..753fd096 100644
  660. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDropItem.java
  661. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDropItem.java
  662. @@ -13,7 +13,9 @@
  663. public final class RequestDropItem extends L2GameClientPacket
  664. {
  665. private int _objectId;
  666. - private int _count;
  667. + private long _count;
  668. + private int _countint;
  669. + //private long _count3;
  670. private int _x;
  671. private int _y;
  672. private int _z;
  673. @@ -22,10 +24,11 @@ public final class RequestDropItem extends L2GameClientPacket
  674. protected void readImpl()
  675. {
  676. _objectId = readD();
  677. - _count = readD();
  678. + _count = readQ();
  679. _x = readD();
  680. _y = readD();
  681. _z = readD();
  682. + _countint = (int) _count;
  683. }
  684.  
  685. @Override
  686. @@ -129,6 +132,6 @@ protected void runImpl()
  687. activeChar.sendPacket(new ItemList(activeChar, true));
  688. }
  689.  
  690. - activeChar.dropItem("Drop", _objectId, _count, _x, _y, _z, null, false);
  691. + activeChar.dropItem("Drop", _objectId, _countint, _x, _y, _z, null, false);
  692. }
  693. }
  694. \ No newline at end of file
  695. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDuelStart.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDuelStart.java
  696. index 46418605..fd9fbacd 100644
  697. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDuelStart.java
  698. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDuelStart.java
  699. @@ -30,7 +30,8 @@ protected void runImpl()
  700. final Player targetChar = World.getInstance().getPlayer(_player);
  701. if (targetChar == null || activeChar == targetChar)
  702. {
  703. - activeChar.sendPacket(SystemMessageId.THERE_IS_NO_OPPONENT_TO_RECEIVE_YOUR_CHALLENGE_FOR_A_DUEL);
  704. + //activeChar.sendPacket(SystemMessageId.THERE_IS_NO_OPPONENT_TO_RECEIVE_YOUR_CHALLENGE_FOR_A_DUEL);
  705. + activeChar.sendPacket(SystemMessageId.YOU_ARE_UNABLE_TO_REQUEST_A_DUEL_AT_THIS_TIME);
  706. return;
  707. }
  708.  
  709. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java
  710. index 2a78f67a..9c8a9282 100644
  711. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java
  712. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java
  713. @@ -14,11 +14,7 @@
  714. import com.l2jmega.gameserver.model.item.kind.Weapon;
  715. import com.l2jmega.gameserver.model.itemcontainer.Inventory;
  716. import com.l2jmega.gameserver.network.SystemMessageId;
  717. -import com.l2jmega.gameserver.network.serverpackets.EnchantResult;
  718. -import com.l2jmega.gameserver.network.serverpackets.InventoryUpdate;
  719. -import com.l2jmega.gameserver.network.serverpackets.ItemList;
  720. -import com.l2jmega.gameserver.network.serverpackets.StatusUpdate;
  721. -import com.l2jmega.gameserver.network.serverpackets.SystemMessage;
  722. +import com.l2jmega.gameserver.network.serverpackets.*;
  723.  
  724. public final class RequestEnchantItem extends AbstractEnchantPacket
  725. {
  726. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExCancelEnchantItem.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExCancelEnchantItem.java
  727. new file mode 100644
  728. index 00000000..030c46a6
  729. --- /dev/null
  730. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExCancelEnchantItem.java
  731. @@ -0,0 +1,57 @@
  732. +/*
  733. + * This program is free software: you can redistribute it and/or modify it under
  734. + * the terms of the GNU General Public License as published by the Free Software
  735. + * Foundation, either version 3 of the License, or (at your option) any later
  736. + * version.
  737. + *
  738. + * This program is distributed in the hope that it will be useful, but WITHOUT
  739. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  740. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  741. + * details.
  742. + *
  743. + * You should have received a copy of the GNU General Public License along with
  744. + * this program. If not, see <http://www.gnu.org/licenses/>.
  745. + */
  746. +package com.l2jmega.gameserver.network.clientpackets;
  747. +
  748. +import com.l2jmega.gameserver.model.actor.instance.Player;
  749. +import com.l2jmega.gameserver.network.serverpackets.EnchantResult;
  750. +
  751. +/**
  752. + *
  753. + * @author KenM
  754. + */
  755. +public class RequestExCancelEnchantItem extends L2GameClientPacket
  756. +{
  757. + /**
  758. + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#getType()
  759. + */
  760. + @Override
  761. + public String getType()
  762. + {
  763. + return "[C] D0:51 RequestExCancelEnchantItem";
  764. + }
  765. +
  766. + /**
  767. + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#readImpl()
  768. + */
  769. + @Override
  770. + protected void readImpl()
  771. + {
  772. + // nothing (trigger)
  773. + }
  774. +
  775. + /**
  776. + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#runImpl()
  777. + */
  778. + @Override
  779. + protected void runImpl()
  780. + {
  781. + Player activeChar = this.getClient().getActiveChar();
  782. + if (activeChar != null)
  783. + {
  784. + activeChar.sendPacket(EnchantResult.CANCELLED);
  785. + activeChar.setActiveEnchantItem(null);
  786. + }
  787. + }
  788. +}
  789. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExTryToPutEnchantSupportItem.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExTryToPutEnchantSupportItem.java
  790. new file mode 100644
  791. index 00000000..7d43c3ac
  792. --- /dev/null
  793. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExTryToPutEnchantSupportItem.java
  794. @@ -0,0 +1,58 @@
  795. +/*
  796. + * This program is free software: you can redistribute it and/or modify it under
  797. + * the terms of the GNU General Public License as published by the Free Software
  798. + * Foundation, either version 3 of the License, or (at your option) any later
  799. + * version.
  800. + *
  801. + * This program is distributed in the hope that it will be useful, but WITHOUT
  802. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  803. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  804. + * details.
  805. + *
  806. + * You should have received a copy of the GNU General Public License along with
  807. + * this program. If not, see <http://www.gnu.org/licenses/>.
  808. + */
  809. +package com.l2jmega.gameserver.network.clientpackets;
  810. +
  811. +import com.l2jmega.gameserver.network.L2GameClient;
  812. +//import com.l2jmega.gameserver.network.serverpackets.ExShowFortressInfo;
  813. +
  814. +/**
  815. + *
  816. + * @author KenM
  817. + */
  818. +public class RequestExTryToPutEnchantSupportItem extends L2GameClientPacket
  819. +{
  820. +
  821. + /**
  822. + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#getType()
  823. + */
  824. + @Override
  825. + public String getType()
  826. + {
  827. + return "[C] D0:4d";
  828. + }
  829. +
  830. + /**
  831. + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#readImpl()
  832. + */
  833. + @Override
  834. + protected void readImpl()
  835. + {
  836. + // trigger packet
  837. + }
  838. +
  839. + /**
  840. + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#runImpl()
  841. + */
  842. + @Override
  843. + protected void runImpl()
  844. + {
  845. + // L2GameClient client = this.getClient();
  846. + // if (client != null)
  847. + // {
  848. +// client.sendPacket(new ExShowFortressInfo());
  849. +// }
  850. + }
  851. +
  852. +}
  853. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExTryToPutEnchantTargetItem.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExTryToPutEnchantTargetItem.java
  854. new file mode 100644
  855. index 00000000..2e20b929
  856. --- /dev/null
  857. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExTryToPutEnchantTargetItem.java
  858. @@ -0,0 +1,60 @@
  859. +package com.l2jmega.gameserver.network.clientpackets;
  860. +
  861. +import com.l2jmega.gameserver.model.actor.instance.Player;
  862. +import com.l2jmega.gameserver.model.item.instance.ItemInstance;
  863. +import com.l2jmega.gameserver.network.SystemMessageId;
  864. +import com.l2jmega.gameserver.network.serverpackets.ExPutEnchantTargetItemResult;
  865. +
  866. +/**
  867. + * Lineage2 Classic Project
  868. + * Chronicle: Kamael
  869. + *
  870. + * @author amaranthe
  871. + */
  872. +public class RequestExTryToPutEnchantTargetItem extends AbstractEnchantPacket {
  873. + private int _objectId = 0;
  874. +
  875. + @Override
  876. + protected void readImpl()
  877. + {
  878. + _objectId = readD();
  879. + }
  880. +
  881. + @Override
  882. + protected void runImpl()
  883. + {
  884. + Player activeChar = getClient().getActiveChar();
  885. +
  886. + if(_objectId == 0 || activeChar == null)
  887. + {
  888. + return;
  889. + }
  890. +
  891. + ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId);
  892. + ItemInstance scroll = activeChar.getActiveEnchantItem();
  893. +
  894. + if(item == null || scroll == null)
  895. + {
  896. + return;
  897. + }
  898. +
  899. + if(item.getOwnerId() != activeChar.getObjectId())
  900. + {
  901. + return;
  902. + }
  903. +
  904. + // template for scroll
  905. + EnchantScroll scrollTemplate = getEnchantScroll(scroll);
  906. +
  907. + if(scrollTemplate == null || !scrollTemplate.isValid(item))
  908. + {
  909. + activeChar.sendPacket(SystemMessageId.DOES_NOT_FIT_SCROLL_CONDITIONS);
  910. + // activeChar.setActiveEnchantItem(null);
  911. + activeChar.sendPacket(new ExPutEnchantTargetItemResult(0));
  912. + return;
  913. + }
  914. +
  915. + activeChar.sendPacket(new ExPutEnchantTargetItemResult(1));
  916. + }
  917. +
  918. +}
  919. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestGiveItemToPet.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestGiveItemToPet.java
  920. index 35eeb7b9..91e58334 100644
  921. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestGiveItemToPet.java
  922. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestGiveItemToPet.java
  923. @@ -20,7 +20,7 @@ public final class RequestGiveItemToPet extends L2GameClientPacket
  924. protected void readImpl()
  925. {
  926. _objectId = readD();
  927. - _amount = readD();
  928. + _amount = (int) readQ();
  929. }
  930.  
  931. @Override
  932. @@ -86,6 +86,10 @@ protected void runImpl()
  933. player.sendPacket(SystemMessageId.UNABLE_TO_PLACE_ITEM_YOUR_PET_IS_TOO_ENCUMBERED);
  934. return;
  935. }
  936. + if (player.isCastingNow() || player.isCastingSimultaneouslyNow())
  937. + {
  938. + return;
  939. + }
  940.  
  941. if (player.getActiveEnchantItem() != null)
  942. {
  943. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestItemList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestItemList.java
  944. index ab15bcb3..15043f1f 100644
  945. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestItemList.java
  946. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestItemList.java
  947. @@ -17,7 +17,8 @@ protected void runImpl()
  948. if (activeChar == null)
  949. return;
  950.  
  951. - if (!activeChar.isInventoryDisabled())
  952. + if (!activeChar.isInventoryDisabled()) {
  953. sendPacket(new ItemList(activeChar, true));
  954. + }
  955. }
  956. }
  957. \ No newline at end of file
  958. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestMagicSkillUse.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestMagicSkillUse.java
  959. index 95a5dada..4e2daf06 100644
  960. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestMagicSkillUse.java
  961. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestMagicSkillUse.java
  962. @@ -60,7 +60,7 @@ protected void runImpl()
  963. }
  964.  
  965. if (player.isAttackingNow())
  966. - player.getAI().setNextAction(new NextAction(CtrlEvent.EVT_READY_TO_ACT, CtrlIntention.CAST, () -> player.useMagic(skill, _ctrlPressed, _shiftPressed)));
  967. + player.getAI().setNextAction(new NextAction(CtrlEvent.EVT_FINISH_ATTACK, CtrlIntention.CAST, () -> player.useMagic(skill, _ctrlPressed, _shiftPressed)));
  968. else
  969. player.useMagic(skill, _ctrlPressed, _shiftPressed);
  970. }
  971. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPackageSendableItemList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPackageSendableItemList.java
  972. index bf5b962f..6972513f 100644
  973. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPackageSendableItemList.java
  974. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPackageSendableItemList.java
  975. @@ -25,7 +25,7 @@ public void runImpl()
  976. if (player == null)
  977. return;
  978.  
  979. - final ItemInstance[] items = player.getInventory().getAvailableItems(true, false);
  980. + final ItemInstance[] items = player.getInventory().getAvailableItems(true, false, false);
  981. if (items == null)
  982. return;
  983. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPreviewItem.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPreviewItem.java
  984. index 08ea3787..512b9038 100644
  985. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPreviewItem.java
  986. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPreviewItem.java
  987. @@ -80,7 +80,7 @@ protected void runImpl()
  988. if (buyList == null)
  989. return;
  990.  
  991. - int totalPrice = 0;
  992. + long totalPrice = 0;
  993. _listId = buyList.getListId();
  994. _itemList = new HashMap<>();
  995.  
  996. @@ -113,7 +113,7 @@ protected void runImpl()
  997. }
  998.  
  999. // Charge buyer and add tax to castle treasury if not owned by npc clan because a Try On is not Free
  1000. - if (totalPrice < 0 || !activeChar.reduceAdena("Wear", totalPrice, activeChar.getCurrentFolk(), true))
  1001. + if (totalPrice < 0 || !activeChar.reduceAdena("Wear", (int) totalPrice, activeChar.getCurrentFolk(), true))
  1002. {
  1003. activeChar.sendPacket(SystemMessageId.YOU_NOT_ENOUGH_ADENA);
  1004. return;
  1005. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java
  1006. index 62e2c70c..0ab85dfa 100644
  1007. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java
  1008. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java
  1009. @@ -11,10 +11,11 @@
  1010. import com.l2jmega.gameserver.model.actor.instance.Player.StoreType;
  1011. import com.l2jmega.gameserver.model.tradelist.TradeList;
  1012. import com.l2jmega.gameserver.network.SystemMessageId;
  1013. +import com.l2jmega.gameserver.network.serverpackets.ActionFailed;
  1014.  
  1015. public final class RequestPrivateStoreBuy extends L2GameClientPacket
  1016. {
  1017. - private static final int BATCH_LENGTH = 12; // length of one item
  1018. + private static final int BATCH_LENGTH = 20; // length of one item
  1019.  
  1020. private int _storePlayerId;
  1021. private Set<ItemRequest> _items = null;
  1022. @@ -32,8 +33,8 @@ protected void readImpl()
  1023. for (int i = 0; i < count; i++)
  1024. {
  1025. int objectId = readD();
  1026. - long cnt = readD();
  1027. - int price = readD();
  1028. + long cnt = readQ();
  1029. + int price = (int)readQ();
  1030.  
  1031. if (objectId < 1 || cnt < 1 || price < 0)
  1032. {
  1033. @@ -52,14 +53,14 @@ protected void runImpl()
  1034. return;
  1035.  
  1036. final Player player = getClient().getActiveChar();
  1037. - if (player == null)
  1038. + if (player == null || player.isDead())
  1039. return;
  1040.  
  1041. if (player.isCursedWeaponEquipped())
  1042. return;
  1043.  
  1044. final Player storePlayer = World.getInstance().getPlayer(_storePlayerId);
  1045. - if (storePlayer == null)
  1046. + if (storePlayer == null || storePlayer.isDead())
  1047. return;
  1048.  
  1049. if (!player.isInsideRadius(storePlayer, Npc.INTERACTION_DISTANCE, true, false))
  1050. @@ -80,10 +81,16 @@ protected void runImpl()
  1051.  
  1052. if (storePlayer.getStoreType() == StoreType.PACKAGE_SELL && storeList.getItems().size() > _items.size())
  1053. return;
  1054. -
  1055. - if (!storeList.privateStoreBuy(player, _items))
  1056. +
  1057. + final int result = storeList.privateStoreBuy(player, _items);
  1058. + if (result > 0) {
  1059. + player.sendPacket(ActionFailed.STATIC_PACKET);
  1060. + if (result > 1) {
  1061. + LOGGER.warn("PrivateStore buy has failed due to invalid list or request. Player: " + player.getName() + ", Private store of: " + storePlayer.getName());
  1062. + }
  1063. return;
  1064. -
  1065. + }
  1066. +
  1067. if (storeList.getItems().isEmpty())
  1068. {
  1069. storePlayer.setStoreType(StoreType.NONE);
  1070. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java
  1071. index a10d4bfd..fa95a2cf 100644
  1072. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java
  1073. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java
  1074. @@ -9,12 +9,15 @@
  1075. import com.l2jmega.gameserver.model.tradelist.TradeList;
  1076. import com.l2jmega.gameserver.network.SystemMessageId;
  1077.  
  1078. +import java.util.HashSet;
  1079. +import java.util.Set;
  1080. +
  1081. public final class RequestPrivateStoreSell extends L2GameClientPacket
  1082. {
  1083. - private static final int BATCH_LENGTH = 20; // length of one item
  1084. + private static final int BATCH_LENGTH = 28; // length of one item
  1085.  
  1086. private int _storePlayerId;
  1087. - private ItemRequest[] _items = null;
  1088. + private Set<ItemRequest> _items = null;
  1089.  
  1090. @Override
  1091. protected void readImpl()
  1092. @@ -23,8 +26,8 @@ protected void readImpl()
  1093. int count = readD();
  1094. if (count <= 0 || count > Config.MAX_ITEM_IN_PACKET || count * BATCH_LENGTH != _buf.remaining())
  1095. return;
  1096. -
  1097. - _items = new ItemRequest[count];
  1098. +
  1099. + _items = new HashSet<>();
  1100.  
  1101. for (int i = 0; i < count; i++)
  1102. {
  1103. @@ -32,15 +35,15 @@ protected void readImpl()
  1104. int itemId = readD();
  1105. readH(); // TODO analyse this
  1106. readH(); // TODO analyse this
  1107. - long cnt = readD();
  1108. - int price = readD();
  1109. + long cnt = readQ();
  1110. + int price = (int)readQ();
  1111.  
  1112. if (objectId < 1 || itemId < 1 || cnt < 1 || price < 0)
  1113. {
  1114. _items = null;
  1115. return;
  1116. }
  1117. - _items = new ItemRequest(objectId, itemId, (int) cnt, price);
  1118. + _items.add(new ItemRequest(objectId, itemId, (int) cnt, price));
  1119. }
  1120. }
  1121.  
  1122. @@ -76,8 +79,10 @@ protected void runImpl()
  1123. player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT);
  1124. return;
  1125. }
  1126. -
  1127. - if (!storeList.privateStoreSell(player, _items))
  1128. +
  1129. + _items.removeIf(item -> player.getInventory().getItemByObjectId(item.getObjectId()) == null);
  1130. +
  1131. + if (!storeList.privateStoreSell(player, _items.toArray(new ItemRequest[0])))
  1132. return;
  1133.  
  1134. if (storeList.getItems().isEmpty())
  1135. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestProcureCropList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestProcureCropList.java
  1136. index 68e5b488..1704102b 100644
  1137. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestProcureCropList.java
  1138. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestProcureCropList.java
  1139. @@ -19,7 +19,7 @@
  1140.  
  1141. public class RequestProcureCropList extends L2GameClientPacket
  1142. {
  1143. - private static final int BATCH_LENGTH = 16;
  1144. + private static final int BATCH_LENGTH = 20;
  1145.  
  1146. private List<CropHolder> _items;
  1147.  
  1148. @@ -36,7 +36,7 @@ protected void readImpl()
  1149. final int objId = readD();
  1150. final int itemId = readD();
  1151. final int manorId = readD();
  1152. - final int cnt = readD();
  1153. + final int cnt = (int)readQ();
  1154.  
  1155. if (objId < 1 || itemId < 1 || manorId < 0 || cnt < 0)
  1156. {
  1157. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopListSet.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopListSet.java
  1158. index 7e980969..f562e98c 100644
  1159. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopListSet.java
  1160. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopListSet.java
  1161. @@ -1,19 +1,24 @@
  1162. package com.l2jmega.gameserver.network.clientpackets;
  1163.  
  1164. import com.l2jmega.Config;
  1165. +import com.l2jmega.commons.util.ArraysUtil;
  1166. import com.l2jmega.gameserver.model.actor.instance.Player;
  1167. import com.l2jmega.gameserver.model.actor.instance.Player.StoreType;
  1168. import com.l2jmega.gameserver.model.craft.ManufactureItem;
  1169. import com.l2jmega.gameserver.model.craft.ManufactureList;
  1170. +import com.l2jmega.gameserver.model.item.Recipe;
  1171. import com.l2jmega.gameserver.model.zone.ZoneId;
  1172. import com.l2jmega.gameserver.network.SystemMessageId;
  1173. import com.l2jmega.gameserver.network.serverpackets.ActionFailed;
  1174. +import com.l2jmega.gameserver.network.serverpackets.RecipeShopManageList;
  1175. import com.l2jmega.gameserver.network.serverpackets.RecipeShopMsg;
  1176.  
  1177. +import java.util.Arrays;
  1178. +
  1179. public final class RequestRecipeShopListSet extends L2GameClientPacket
  1180. {
  1181. private int _count;
  1182. - private int[] _items;
  1183. + private ManufactureItem[] _items;
  1184.  
  1185. @Override
  1186. protected void readImpl()
  1187. @@ -21,14 +26,13 @@ protected void readImpl()
  1188. _count = readD();
  1189. if (_count < 0 || _count * 8 > _buf.remaining() || _count > Config.MAX_ITEM_IN_PACKET)
  1190. _count = 0;
  1191. -
  1192. - _items = new int[_count * 2];
  1193. +
  1194. + _items = new ManufactureItem[_count];
  1195. for (int x = 0; x < _count; x++)
  1196. {
  1197. int recipeID = readD();
  1198. - _items[x * 2 + 0] = recipeID;
  1199. - int cost = readD();
  1200. - _items[x * 2 + 1] = cost;
  1201. + int cost = (int)readQ();
  1202. + _items[x] = new ManufactureItem(recipeID, cost);
  1203. }
  1204. }
  1205.  
  1206. @@ -38,39 +42,49 @@ protected void runImpl()
  1207. final Player player = getClient().getActiveChar();
  1208. if (player == null)
  1209. return;
  1210. -
  1211. - if (player.isInDuel())
  1212. - {
  1213. - player.sendPacket(SystemMessageId.CANT_OPERATE_PRIVATE_STORE_DURING_COMBAT);
  1214. +
  1215. + // Integrity check.
  1216. + if (!canPassManufactureProcess(player, _items))
  1217. return;
  1218. - }
  1219. -
  1220. - if (player.isInsideZone(ZoneId.NO_STORE))
  1221. +
  1222. + // Retrieve and clear the manufacture list.
  1223. + final ManufactureList manufactureList = player.getCreateList();
  1224. + manufactureList.clear();
  1225. +
  1226. + // Check multiple conditions. Message is sent directly from the method.
  1227. + if (!player.canOpenPrivateStore(false))
  1228. + return;
  1229. +
  1230. + if (ArraysUtil.isEmpty(_items))
  1231. {
  1232. - player.sendPacket(SystemMessageId.NO_PRIVATE_WORKSHOP_HERE);
  1233. - player.sendPacket(ActionFailed.STATIC_PACKET);
  1234. + player.sendPacket(SystemMessageId.NO_RECIPES_REGISTERED);
  1235. return;
  1236. }
  1237. -
  1238. +
  1239. if (_count == 0)
  1240. player.forceStandUp();
  1241. else
  1242. {
  1243. - ManufactureList createList = new ManufactureList();
  1244. -
  1245. - for (int x = 0; x < _count; x++)
  1246. - {
  1247. - int recipeID = _items[x * 2 + 0];
  1248. - int cost = _items[x * 2 + 1];
  1249. - createList.add(new ManufactureItem(recipeID, cost));
  1250. - }
  1251. - createList.setStoreName(player.getCreateList() != null ? player.getCreateList().getStoreName() : "");
  1252. - player.setCreateList(createList);
  1253. -
  1254. + manufactureList.set(_items);
  1255. player.setStoreType(StoreType.MANUFACTURE);
  1256. player.sitDown();
  1257. player.broadcastUserInfo();
  1258. player.broadcastPacket(new RecipeShopMsg(player));
  1259. }
  1260. }
  1261. +
  1262. + private boolean hasRecipeOnSpecificBook(Player player, int recipeId)
  1263. + {
  1264. + boolean isDwExist = player.getDwarvenRecipeBook().stream().anyMatch(recipe -> recipe.getId() == recipeId);
  1265. + boolean isExist = player.getCommonRecipeBook().stream().anyMatch(recipe -> recipe.getId() == recipeId);
  1266. + return isDwExist || isExist;
  1267. + }
  1268. +
  1269. + public boolean canPassManufactureProcess(Player player, ManufactureItem[] itemsToCheck)
  1270. + {
  1271. + for (ManufactureItem item : itemsToCheck)
  1272. + if (!hasRecipeOnSpecificBook(player, item.getId()))
  1273. + return false;
  1274. + return true;
  1275. + }
  1276. }
  1277. \ No newline at end of file
  1278. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java
  1279. index 4233e0ff..d6856b82 100644
  1280. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java
  1281. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java
  1282. @@ -24,7 +24,7 @@ protected void readImpl()
  1283. {
  1284. _objectId = readD();
  1285. _recipeId = readD();
  1286. - _unknow = readD();
  1287. + _unknow = (int)readQ();
  1288. }
  1289.  
  1290. @Override
  1291. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopMessageSet.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopMessageSet.java
  1292. index c481a73f..278136b6 100644
  1293. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopMessageSet.java
  1294. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopMessageSet.java
  1295. @@ -22,8 +22,8 @@ protected void runImpl()
  1296.  
  1297. if (_name != null && _name.length() > MAX_MSG_LENGTH)
  1298. return;
  1299. -
  1300. - if (player.getCreateList() != null)
  1301. +
  1302. + if (player.getStoreType() == Player.StoreType.MANUFACTURE || player.getStoreType() == Player.StoreType.MANUFACTURE_MANAGE)
  1303. player.getCreateList().setStoreName(_name);
  1304. }
  1305. }
  1306. \ No newline at end of file
  1307. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSellItem.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSellItem.java
  1308. index 1c6b0513..22a3e4c0 100644
  1309. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSellItem.java
  1310. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSellItem.java
  1311. @@ -9,13 +9,11 @@
  1312. import com.l2jmega.gameserver.model.actor.instance.Player;
  1313. import com.l2jmega.gameserver.model.holder.IntIntHolder;
  1314. import com.l2jmega.gameserver.model.item.instance.ItemInstance;
  1315. -import com.l2jmega.gameserver.network.serverpackets.ItemList;
  1316. -import com.l2jmega.gameserver.network.serverpackets.NpcHtmlMessage;
  1317. -import com.l2jmega.gameserver.network.serverpackets.StatusUpdate;
  1318. +import com.l2jmega.gameserver.network.serverpackets.*;
  1319.  
  1320. public final class RequestSellItem extends L2GameClientPacket
  1321. {
  1322. - private static final int BATCH_LENGTH = 12; // length of the one item
  1323. + private static final int BATCH_LENGTH = 16; // length of the one item
  1324.  
  1325. private int _listId;
  1326. private IntIntHolder[] _items = null;
  1327. @@ -33,7 +31,7 @@ protected void readImpl()
  1328. {
  1329. int objectId = readD();
  1330. int itemId = readD();
  1331. - int cnt = readD();
  1332. + int cnt = (int) readQ();
  1333.  
  1334. if (objectId < 1 || itemId < 1 || cnt < 1)
  1335. {
  1336. @@ -65,7 +63,7 @@ protected void runImpl()
  1337. return;
  1338. }
  1339.  
  1340. - int totalPrice = 0;
  1341. + long totalPrice = 0;
  1342. // Proceed the sell
  1343. for (IntIntHolder i : _items)
  1344. {
  1345. @@ -81,7 +79,7 @@ protected void runImpl()
  1346. item = player.getInventory().destroyItem("Sell", i.getId(), i.getValue(), player, merchant);
  1347. }
  1348.  
  1349. - player.addAdena("Sell", totalPrice, merchant, false);
  1350. + player.addAdena("Sell", (int) totalPrice, merchant, false);
  1351.  
  1352. // Send the htm, if existing.
  1353. String htmlFolder = "";
  1354. @@ -107,5 +105,6 @@ else if (merchant instanceof Merchant)
  1355. su.addAttribute(StatusUpdate.CUR_LOAD, player.getCurrentLoad());
  1356. player.sendPacket(su);
  1357. player.sendPacket(new ItemList(player, true));
  1358. + player.sendPacket(new ExBuySellListPacket());
  1359. }
  1360. }
  1361. \ No newline at end of file
  1362. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSetCrop.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSetCrop.java
  1363. index aba7bb7b..d4149ca1 100644
  1364. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSetCrop.java
  1365. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSetCrop.java
  1366. @@ -13,7 +13,7 @@
  1367.  
  1368. public class RequestSetCrop extends L2GameClientPacket
  1369. {
  1370. - private static final int BATCH_LENGTH = 13;
  1371. + private static final int BATCH_LENGTH = 21;
  1372.  
  1373. private int _manorId;
  1374. private List<CropProcure> _items;
  1375. @@ -30,8 +30,8 @@ protected void readImpl()
  1376. for (int i = 0; i < count; i++)
  1377. {
  1378. final int itemId = readD();
  1379. - final int sales = readD();
  1380. - final int price = readD();
  1381. + final int sales = (int)readQ();
  1382. + final int price = (int)readQ();
  1383. final int type = readC();
  1384.  
  1385. if (itemId < 1 || sales < 0 || price < 0)
  1386. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSetSeed.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSetSeed.java
  1387. index 90ea491c..050219c9 100644
  1388. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSetSeed.java
  1389. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSetSeed.java
  1390. @@ -13,7 +13,7 @@
  1391.  
  1392. public class RequestSetSeed extends L2GameClientPacket
  1393. {
  1394. - private static final int BATCH_LENGTH = 12;
  1395. + private static final int BATCH_LENGTH = 20;
  1396.  
  1397. private int _manorId;
  1398. private List<SeedProduction> _items;
  1399. @@ -30,8 +30,8 @@ protected void readImpl()
  1400. for (int i = 0; i < count; i++)
  1401. {
  1402. final int itemId = readD();
  1403. - final int sales = readD();
  1404. - final int price = readD();
  1405. + final int sales = (int)readQ();
  1406. + final int price = (int)readQ();
  1407.  
  1408. if (itemId < 1 || sales < 0 || price < 0)
  1409. {
  1410. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestTargetCanceld.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestTargetCanceld.java
  1411. index 7afb3767..04e56a02 100644
  1412. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestTargetCanceld.java
  1413. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestTargetCanceld.java
  1414. @@ -1,6 +1,10 @@
  1415. package com.l2jmega.gameserver.network.clientpackets;
  1416.  
  1417. +import com.l2jmega.gameserver.model.L2Skill;
  1418. +import com.l2jmega.gameserver.model.WorldObject;
  1419. +import com.l2jmega.gameserver.model.actor.Attackable;
  1420. import com.l2jmega.gameserver.model.actor.instance.Player;
  1421. +import com.l2jmega.gameserver.templates.skills.L2SkillType;
  1422.  
  1423. public final class RequestTargetCanceld extends L2GameClientPacket
  1424. {
  1425. @@ -22,7 +26,17 @@ protected void runImpl()
  1426. if (_unselect == 0)
  1427. {
  1428. if (activeChar.isCastingNow() && activeChar.canAbortCast())
  1429. + {
  1430. activeChar.abortCast();
  1431. + final L2Skill seed = activeChar.getLastSkillCast();
  1432. + if (seed != null && seed.getSkillType() == L2SkillType.SOW && seed.getTargetList(activeChar).length > 0)
  1433. + {
  1434. + for (WorldObject object : seed.getTargetList(activeChar))
  1435. + if (object instanceof Attackable && ((Attackable) object).isSeeded()) {
  1436. + ((Attackable) object).setSeeded(null, 0);
  1437. + }
  1438. + }
  1439. + }
  1440. else
  1441. activeChar.setTarget(null);
  1442. }
  1443. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/Say2.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/Say2.java
  1444. index 790dc05d..dd3743cd 100644
  1445. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/Say2.java
  1446. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/Say2.java
  1447. @@ -7,6 +7,8 @@
  1448. import com.l2jmega.Config;
  1449. import com.l2jmega.gameserver.handler.ChatHandler;
  1450. import com.l2jmega.gameserver.handler.IChatHandler;
  1451. +import com.l2jmega.gameserver.handler.IVoiceCommandHandler;
  1452. +import com.l2jmega.gameserver.handler.VoiceCommandHandler;
  1453. import com.l2jmega.gameserver.model.actor.instance.Player;
  1454. import com.l2jmega.gameserver.network.SystemMessageId;
  1455.  
  1456. @@ -33,6 +35,7 @@ public final class Say2 extends L2GameClientPacket
  1457. public static final int PARTYROOM_ALL = 16; // (Red)
  1458. public static final int HERO_VOICE = 17;
  1459. public static final int CRITICAL_ANNOUNCE = 18;
  1460. + public final static int BATTLEFIELD = 20;
  1461.  
  1462. private static final String[] CHAT_NAMES =
  1463. {
  1464. @@ -156,9 +159,23 @@ protected void runImpl()
  1465.  
  1466. CHAT_LOG.log(record);
  1467. }
  1468. -
  1469. +
  1470. + if (_text.startsWith(".")) {
  1471. + final String fullcmd = _text.substring(1).trim();
  1472. + final String command = fullcmd.split("\\s+")[0];
  1473. + final String args = fullcmd.substring(command.length()).trim();
  1474. + if (command.length() > 0) {
  1475. + final IVoiceCommandHandler voice_handler = VoiceCommandHandler.getInstance().getVoicedCommandHandler(command);
  1476. + if (voice_handler != null) {
  1477. + voice_handler.useVoicedCommand(command, player, args);
  1478. + return;
  1479. + }
  1480. + }
  1481. + return;
  1482. + }
  1483. +
  1484. _text = _text.replaceAll("\\\\n", "");
  1485. -
  1486. +
  1487. final IChatHandler handler = ChatHandler.getInstance().getHandler(_type);
  1488. if (handler == null)
  1489. {
  1490. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SendWarehouseDepositList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SendWarehouseDepositList.java
  1491. index 31903675..9cd3c28e 100644
  1492. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SendWarehouseDepositList.java
  1493. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SendWarehouseDepositList.java
  1494. @@ -17,7 +17,7 @@
  1495.  
  1496. public final class SendWarehouseDepositList extends L2GameClientPacket
  1497. {
  1498. - private static final int BATCH_LENGTH = 8; // length of one item
  1499. + private static final int BATCH_LENGTH = 12; // length of one item
  1500.  
  1501. private IntIntHolder _items[] = null;
  1502.  
  1503. @@ -32,7 +32,7 @@ protected void readImpl()
  1504. for (int i = 0; i < count; i++)
  1505. {
  1506. int objId = readD();
  1507. - int cnt = readD();
  1508. + int cnt = (int)readQ();
  1509.  
  1510. if (objId < 1 || cnt < 0)
  1511. {
  1512. @@ -134,7 +134,7 @@ else if (warehouse.getItemByItemId(item.getItemId()) == null)
  1513. if (oldItem == null)
  1514. return;
  1515.  
  1516. - if (!oldItem.isDepositable(isPrivate) || !oldItem.isAvailable(player, true, isPrivate))
  1517. + if (!oldItem.isDepositable(isPrivate) || !oldItem.isAvailable(player, true, isPrivate, false))
  1518. continue;
  1519.  
  1520. final ItemInstance newItem = player.getInventory().transferItem(warehouse.getName(), i.getId(), i.getValue(), warehouse, player, folk);
  1521. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SendWarehouseWithdrawList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SendWarehouseWithdrawList.java
  1522. index 6f547529..e65dc599 100644
  1523. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SendWarehouseWithdrawList.java
  1524. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SendWarehouseWithdrawList.java
  1525. @@ -17,7 +17,7 @@
  1526.  
  1527. public final class SendWarehouseWithdrawList extends L2GameClientPacket
  1528. {
  1529. - private static final int BATCH_LENGTH = 8; // length of one item
  1530. + private static final int BATCH_LENGTH = 12; // length of one item
  1531.  
  1532. private IntIntHolder _items[] = null;
  1533.  
  1534. @@ -32,7 +32,7 @@ protected void readImpl()
  1535. for (int i = 0; i < count; i++)
  1536. {
  1537. int objId = readD();
  1538. - int cnt = readD();
  1539. + int cnt = (int)readQ();
  1540.  
  1541. if (objId < 1 || cnt < 0)
  1542. {
  1543. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListBuy.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListBuy.java
  1544. index fd5c85cd..04625620 100644
  1545. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListBuy.java
  1546. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListBuy.java
  1547. @@ -12,7 +12,7 @@
  1548.  
  1549. public final class SetPrivateStoreListBuy extends L2GameClientPacket
  1550. {
  1551. - private static final int BATCH_LENGTH = 16; // length of one item
  1552. + private static final int BATCH_LENGTH = 40; // length of one item
  1553.  
  1554. private Item[] _items = null;
  1555.  
  1556. @@ -27,17 +27,21 @@ protected void readImpl()
  1557. for (int i = 0; i < count; i++)
  1558. {
  1559. int itemId = readD();
  1560. + int enchant = readH(); // TODO analyse this
  1561. readH(); // TODO analyse this
  1562. - readH(); // TODO analyse this
  1563. - int cnt = readD();
  1564. - int price = readD();
  1565. + int cnt = (int)readQ();
  1566. + int price = (int)readQ();
  1567.  
  1568. if (itemId < 1 || cnt < 1 || price < 0)
  1569. {
  1570. _items = null;
  1571. return;
  1572. }
  1573. - _items = new Item(itemId, cnt, price);
  1574. + readC(); // FE
  1575. + readD(); // FF 00 00 00
  1576. + readD(); // 00 00 00 00
  1577. + readB(new byte[7]); // Completely Unknown
  1578. + _items = new Item(itemId, cnt, price, enchant);
  1579. }
  1580. }
  1581.  
  1582. @@ -47,38 +51,24 @@ protected void runImpl()
  1583. Player player = getClient().getActiveChar();
  1584. if (player == null)
  1585. return;
  1586. -
  1587. - if (_items == null)
  1588. - {
  1589. - player.setStoreType(StoreType.NONE);
  1590. - player.broadcastUserInfo();
  1591. - player.sendPacket(new PrivateStoreManageListBuy(player));
  1592. +
  1593. + // Integrity check.
  1594. + if (!player.getInventory().canPassBuyProcess(_items))
  1595. return;
  1596. - }
  1597. -
  1598. +
  1599. + final TradeList tradeList = player.getBuyList();
  1600. + tradeList.clear();
  1601. +
  1602. if (!player.getAccessLevel().allowTransaction())
  1603. {
  1604. player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT);
  1605. return;
  1606. }
  1607. -
  1608. - if (AttackStanceTaskManager.getInstance().isInAttackStance(player) || (player.isCastingNow() || player.isCastingSimultaneouslyNow()) || player.isInDuel())
  1609. - {
  1610. - player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT);
  1611. - player.sendPacket(new PrivateStoreManageListBuy(player));
  1612. - return;
  1613. - }
  1614. -
  1615. - if (player.isInsideZone(ZoneId.NO_STORE))
  1616. - {
  1617. - player.sendPacket(SystemMessageId.NO_PRIVATE_STORE_HERE);
  1618. - player.sendPacket(new PrivateStoreManageListBuy(player));
  1619. +
  1620. + // Check multiple conditions. Message is sent directly from the method.
  1621. + if (!player.canOpenPrivateStore(false))
  1622. return;
  1623. - }
  1624. -
  1625. - TradeList tradeList = player.getBuyList();
  1626. - tradeList.clear();
  1627. -
  1628. +
  1629. // Check maximum number of allowed slots for pvt shops
  1630. if (_items.length > player.getPrivateBuyStoreLimit())
  1631. {
  1632. @@ -120,15 +110,16 @@ protected void runImpl()
  1633. player.broadcastPacket(new PrivateStoreMsgBuy(player));
  1634. }
  1635.  
  1636. - private static class Item
  1637. + public static class Item
  1638. {
  1639. - private final int _itemId, _count, _price;
  1640. + private final int _itemId, _count, _price, _enchant;
  1641.  
  1642. - public Item(int id, int num, int pri)
  1643. + public Item(int id, int num, int pri, int enchant)
  1644. {
  1645. _itemId = id;
  1646. _count = num;
  1647. _price = pri;
  1648. + _enchant = enchant;
  1649. }
  1650.  
  1651. public boolean addToTradeList(TradeList list)
  1652. @@ -139,10 +130,29 @@ public boolean addToTradeList(TradeList list)
  1653. list.addItemByItemId(_itemId, _count, _price);
  1654. return true;
  1655. }
  1656. +
  1657. + public int getItemId()
  1658. + {
  1659. + return _itemId;
  1660. + }
  1661. +
  1662. + public int getCount()
  1663. + {
  1664. + return _count;
  1665. + }
  1666. +
  1667. + public int getPrice()
  1668. + {
  1669. + return _price;
  1670. + }
  1671.  
  1672. public long getCost()
  1673. {
  1674. return _count * _price;
  1675. }
  1676. +
  1677. + public int getEnchant() {
  1678. + return _enchant;
  1679. + }
  1680. }
  1681. }
  1682. \ No newline at end of file
  1683. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListSell.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListSell.java
  1684. index 8c64905b..7ecc9a4e 100644
  1685. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListSell.java
  1686. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListSell.java
  1687. @@ -4,15 +4,13 @@
  1688. import com.l2jmega.gameserver.model.actor.instance.Player;
  1689. import com.l2jmega.gameserver.model.actor.instance.Player.StoreType;
  1690. import com.l2jmega.gameserver.model.tradelist.TradeList;
  1691. -import com.l2jmega.gameserver.model.zone.ZoneId;
  1692. import com.l2jmega.gameserver.network.SystemMessageId;
  1693. import com.l2jmega.gameserver.network.serverpackets.PrivateStoreManageListSell;
  1694. import com.l2jmega.gameserver.network.serverpackets.PrivateStoreMsgSell;
  1695. -import com.l2jmega.gameserver.taskmanager.AttackStanceTaskManager;
  1696.  
  1697. public final class SetPrivateStoreListSell extends L2GameClientPacket
  1698. {
  1699. - private static final int BATCH_LENGTH = 12; // length of the one item
  1700. + private static final int BATCH_LENGTH = 20; // length of the one item
  1701.  
  1702. private boolean _packageSale;
  1703. private Item[] _items = null;
  1704. @@ -29,8 +27,8 @@ protected void readImpl()
  1705. for (int i = 0; i < count; i++)
  1706. {
  1707. int itemId = readD();
  1708. - long cnt = readD();
  1709. - int price = readD();
  1710. + long cnt = (int)readQ();
  1711. + int price = (int)readQ();
  1712.  
  1713. if (itemId < 1 || cnt < 1 || price < 0)
  1714. {
  1715. @@ -47,36 +45,24 @@ protected void runImpl()
  1716. Player player = getClient().getActiveChar();
  1717. if (player == null)
  1718. return;
  1719. -
  1720. - if (_items == null)
  1721. - {
  1722. - player.sendPacket(SystemMessageId.NOT_ENOUGH_ITEMS);
  1723. - player.setStoreType(StoreType.NONE);
  1724. - player.broadcastUserInfo();
  1725. - player.sendPacket(new PrivateStoreManageListSell(player, _packageSale));
  1726. +
  1727. + // Integrity check.
  1728. + if (!player.getInventory().canPassSellProcess(_items))
  1729. return;
  1730. - }
  1731. -
  1732. +
  1733. + final TradeList tradeList = player.getSellList();
  1734. + tradeList.clear();
  1735. +
  1736. if (!player.getAccessLevel().allowTransaction())
  1737. {
  1738. player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT);
  1739. return;
  1740. }
  1741. -
  1742. - if (AttackStanceTaskManager.getInstance().isInAttackStance(player) || (player.isCastingNow() || player.isCastingSimultaneouslyNow()) || player.isInDuel())
  1743. - {
  1744. - player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT);
  1745. - player.sendPacket(new PrivateStoreManageListSell(player, _packageSale));
  1746. - return;
  1747. - }
  1748. -
  1749. - if (player.isInsideZone(ZoneId.NO_STORE))
  1750. - {
  1751. - player.sendPacket(SystemMessageId.NO_PRIVATE_STORE_HERE);
  1752. - player.sendPacket(new PrivateStoreManageListSell(player, _packageSale));
  1753. +
  1754. + // Check multiple conditions. Message is sent directly from the method.
  1755. + if (!player.canOpenPrivateStore(false))
  1756. return;
  1757. - }
  1758. -
  1759. +
  1760. // Check maximum number of allowed slots for pvt shops
  1761. if (_items.length > player.getPrivateSellStoreLimit())
  1762. {
  1763. @@ -84,9 +70,6 @@ protected void runImpl()
  1764. player.sendPacket(new PrivateStoreManageListSell(player, _packageSale));
  1765. return;
  1766. }
  1767. -
  1768. - TradeList tradeList = player.getSellList();
  1769. - tradeList.clear();
  1770. tradeList.setPackaged(_packageSale);
  1771.  
  1772. int totalCost = player.getAdena();
  1773. @@ -114,7 +97,7 @@ protected void runImpl()
  1774. player.broadcastPacket(new PrivateStoreMsgSell(player));
  1775. }
  1776.  
  1777. - private static class Item
  1778. + public static class Item
  1779. {
  1780. private final int _itemId, _count, _price;
  1781.  
  1782. @@ -133,8 +116,23 @@ public boolean addToTradeList(TradeList list)
  1783. list.addItem(_itemId, _count, _price);
  1784. return true;
  1785. }
  1786. +
  1787. + public int getItemId()
  1788. + {
  1789. + return _itemId;
  1790. + }
  1791. +
  1792. + public int getCount()
  1793. + {
  1794. + return _count;
  1795. + }
  1796. +
  1797. + public int getPrice()
  1798. + {
  1799. + return _price;
  1800. + }
  1801.  
  1802. - public long getPrice()
  1803. + public long getCost()
  1804. {
  1805. return _count * _price;
  1806. }
  1807. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java
  1808. index f8f4aa4b..5630c10b 100644
  1809. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java
  1810. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java
  1811. @@ -8,6 +8,7 @@
  1812. import com.l2jmega.gameserver.model.L2Skill;
  1813. import com.l2jmega.gameserver.model.actor.instance.Pet;
  1814. import com.l2jmega.gameserver.model.actor.instance.Player;
  1815. +import com.l2jmega.gameserver.model.base.ClassRace;
  1816. import com.l2jmega.gameserver.model.holder.IntIntHolder;
  1817. import com.l2jmega.gameserver.model.item.instance.ItemInstance;
  1818. import com.l2jmega.gameserver.model.item.kind.Item;
  1819. @@ -38,6 +39,7 @@ protected void readImpl()
  1820. @Override
  1821. protected void runImpl()
  1822. {
  1823. + //_ctrlPressed = false;
  1824. final Player activeChar = getClient().getActiveChar();
  1825. if (activeChar == null)
  1826. return;
  1827. @@ -158,6 +160,13 @@ protected void runImpl()
  1828. return;
  1829. }
  1830.  
  1831. + //if ((((activeChar.getClassId().getId()) == 124) || ((activeChar.getClassId().getId()) == 123)) && ((item.getItem().getBodyPart()) == 256)) //blocking Kama shield
  1832. + if ((activeChar.getRace() == ClassRace.MYSTIC_ELF) && ((item.getItem().getBodyPart()) == 256))
  1833. + {
  1834. + activeChar.sendPacket(SystemMessageId.CANNOT_EQUIP_ITEM_DUE_TO_BAD_CONDITION);
  1835. + return;
  1836. + }
  1837. +
  1838. switch (item.getItem().getBodyPart())
  1839. {
  1840. case Item.SLOT_LR_HAND:
  1841. @@ -176,15 +185,29 @@ protected void runImpl()
  1842.  
  1843. break;
  1844. }
  1845. + case Item.SLOT_DECO:
  1846. + {
  1847. + if (!item.isEquipped() && (activeChar.getInventory().getTalismanSlots() == 0))
  1848. + {
  1849. + activeChar.sendPacket(SystemMessageId.CANNOT_EQUIP_ITEM_DUE_TO_BAD_CONDITION);
  1850. + return;
  1851. + }
  1852. + }
  1853. }
  1854.  
  1855. if (activeChar.isCursedWeaponEquipped() && item.getItemId() == 6408) // Don't allow to put formal wear
  1856. return;
  1857.  
  1858. if (activeChar.isAttackingNow())
  1859. - ThreadPool.schedule(() -> activeChar.useEquippableItem(item, false), activeChar.getAttackEndTime() - System.currentTimeMillis());
  1860. - else
  1861. - activeChar.useEquippableItem(item, true);
  1862. + ThreadPool.schedule(() -> {
  1863. + final ItemInstance itemToTest = activeChar.getInventory().getItemByObjectId(_objectId);
  1864. + if(itemToTest == null)
  1865. + return;
  1866. +
  1867. + activeChar.useEquippableItem(itemToTest, false);
  1868. + }, activeChar.getAttackEndTime() - System.currentTimeMillis());
  1869. + else
  1870. + activeChar.useEquippableItem(item, true);
  1871. }
  1872. else
  1873. {
  1874. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/BuyList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/BuyList.java
  1875. index 443391c3..8515d54d 100644
  1876. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/BuyList.java
  1877. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/BuyList.java
  1878. @@ -23,8 +23,11 @@ public BuyList(NpcBuyList list, int currentMoney, double taxRate)
  1879. @Override
  1880. protected final void writeImpl()
  1881. {
  1882. - writeC(0x11);
  1883. - writeD(_money);
  1884. + writeC(0xFE);
  1885. + writeH(0xB7);
  1886. + writeD(0x00);
  1887. +
  1888. + writeQ(_money);
  1889. writeD(_listId);
  1890. writeH(_list.size());
  1891.  
  1892. @@ -32,21 +35,43 @@ protected final void writeImpl()
  1893. {
  1894. if (product.getCount() > 0 || !product.hasLimitedStock())
  1895. {
  1896. - writeH(product.getItem().getType1());
  1897. writeD(product.getItemId());
  1898. writeD(product.getItemId());
  1899. - writeD((product.getCount() < 0) ? 0 : product.getCount());
  1900. + writeD(0);
  1901. + writeQ((product.getCount() < 0) ? 0 : product.getCount());
  1902. writeH(product.getItem().getType2());
  1903. - writeH(0x00); // TODO: ItemInstance getCustomType1()
  1904. + writeH(product.getItem().getType1());
  1905. + writeH(0x00);
  1906. writeD(product.getItem().getBodyPart());
  1907. - writeH(0x00); // TODO: ItemInstance getEnchantLevel()
  1908. - writeH(0x00); // TODO: ItemInstance getCustomType2()
  1909. +
  1910. + writeH(0x00); // Enchant
  1911. + writeH(0x00); // Custom Type
  1912. + writeD(0x00); // Augment
  1913. + writeD(-1); // Mana
  1914. + writeD(-9999); // Time
  1915. + writeH(0x00); // Element Type
  1916. + writeH(0x00); // Element Power
  1917. +
  1918. + for (byte i = 0; i < 6; i++)
  1919. + {
  1920. + writeH(0x00);
  1921. + }
  1922. +
  1923. + // Enchant Effects
  1924. + writeH(0x00);
  1925. writeH(0x00);
  1926. + writeH(0x00);
  1927. +
  1928.  
  1929. if (product.getItemId() >= 3960 && product.getItemId() <= 4026)
  1930. - writeD((int) (product.getPrice() * Config.RATE_SIEGE_GUARDS_PRICE * (1 + _taxRate)));
  1931. + writeQ((int) (product.getPrice() * Config.RATE_SIEGE_GUARDS_PRICE * (1 + _taxRate)));
  1932. else
  1933. - writeD((int) (product.getPrice() * (1 + _taxRate)));
  1934. + writeQ((int) (product.getPrice() * (1 + _taxRate)));
  1935. + // T1
  1936. + // for (byte i = 0; i < 8; i++)
  1937. + // {
  1938. + // writeH(0x00);
  1939. + // }
  1940. }
  1941. }
  1942. }
  1943. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/BuyListSeed.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/BuyListSeed.java
  1944. index 6037b86c..84ae846d 100644
  1945. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/BuyListSeed.java
  1946. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/BuyListSeed.java
  1947. @@ -28,9 +28,9 @@ public BuyListSeed(int currentMoney, int castleId)
  1948. @Override
  1949. protected final void writeImpl()
  1950. {
  1951. - writeC(0xE8);
  1952. + writeC(0xE9);
  1953.  
  1954. - writeD(_money);
  1955. + writeQ(_money);
  1956. writeD(_manorId);
  1957.  
  1958. if (!_list.isEmpty())
  1959. @@ -38,13 +38,30 @@ protected final void writeImpl()
  1960. writeH(_list.size());
  1961. for (SeedProduction s : _list)
  1962. {
  1963. - writeH(0x04);
  1964. writeD(s.getId());
  1965. writeD(s.getId());
  1966. - writeD(s.getAmount());
  1967. - writeH(0x04);
  1968. + writeD(0x00);
  1969. + writeQ(s.getAmount());
  1970. + writeH(0x05);
  1971. + writeH(0x00); // Custom Type 1
  1972. + writeH(0x00); // Equipped
  1973. + writeD(0x00); // Body Part
  1974. + writeH(0x00); // Enchant
  1975. + writeH(0x00); // Custom Type
  1976. + writeD(0x00); // Augment
  1977. + writeD(-1); // Mana
  1978. + writeD(-9999); // Time
  1979. + writeH(0x00); // Element Type
  1980. + writeH(0x00); // Element Power
  1981. + for (byte i = 0; i < 6; i++)
  1982. + {
  1983. + writeH(0x00);
  1984. + }
  1985. + // Enchant Effects
  1986. writeH(0x00);
  1987. - writeD(s.getPrice());
  1988. + writeH(0x00);
  1989. + writeH(0x00);
  1990. + writeQ(s.getPrice());
  1991. }
  1992. }
  1993. }
  1994. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/CreatureSay.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/CreatureSay.java
  1995. index 0a96858d..5c0e56dd 100644
  1996. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/CreatureSay.java
  1997. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/CreatureSay.java
  1998. @@ -49,16 +49,17 @@ protected final void writeImpl()
  1999. writeS(_charName);
  2000. else
  2001. writeD(_charId);
  2002. - writeD(_npcString); // High Five NPCString ID
  2003. + // writeD(_npcString); // High Five NPCString ID
  2004. if (_text != null)
  2005. writeS(_text);
  2006. else
  2007. {
  2008. - if (_parameters != null)
  2009. - {
  2010. - for (String s : _parameters)
  2011. - writeS(s);
  2012. - }
  2013. + writeD(_npcString);
  2014. + // if (_parameters != null)
  2015. + // {
  2016. + // for (String s : _parameters)
  2017. + // writeS(s);
  2018. + // }
  2019. }
  2020. }
  2021. }
  2022. \ No newline at end of file
  2023. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DeleteObject.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DeleteObject.java
  2024. index 90b38f94..ce925160 100644
  2025. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DeleteObject.java
  2026. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DeleteObject.java
  2027. @@ -22,8 +22,8 @@ public DeleteObject(WorldObject obj, boolean sit)
  2028. @Override
  2029. protected final void writeImpl()
  2030. {
  2031. - writeC(0x12);
  2032. + writeC(0x08);
  2033. writeD(_objectId);
  2034. - writeD(_isSeated ? 0x00 : 0x01); // 0 - stand up and delete, 1 - delete
  2035. + //writeD(_isSeated ? 0x00 : 0x01); // 0 - stand up and delete, 1 - delete
  2036. }
  2037. }
  2038. \ No newline at end of file
  2039. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DoorInfo.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DoorInfo.java
  2040. index c6648e3b..a243045b 100644
  2041. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DoorInfo.java
  2042. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DoorInfo.java
  2043. @@ -7,25 +7,32 @@ public class DoorInfo extends L2GameServerPacket
  2044. {
  2045. private final Door _door;
  2046. private final Player _activeChar;
  2047. + private int _damageGrade;
  2048.  
  2049. public DoorInfo(Door door, Player activeChar)
  2050. {
  2051. _door = door;
  2052. _activeChar = activeChar;
  2053. + _damageGrade = door.getDamage();
  2054. }
  2055.  
  2056. @Override
  2057. protected final void writeImpl()
  2058. {
  2059. - writeC(0x4c);
  2060. - writeD(_door.getObjectId());
  2061. +
  2062. + //writeC(0x4c);
  2063. + writeC(0x9f);
  2064. writeD(_door.getDoorId());
  2065. - writeD(_door.isAutoAttackable(_activeChar) ? 0 : 1); // ??? (can attack)
  2066. + writeD(_door.getObjectId());
  2067. + writeD(1);
  2068. + writeD(1);
  2069. writeD(1); // ??? (can target)
  2070. writeD(_door.isOpened() ? 0 : 1);
  2071. - writeD(_door.getMaxHp());
  2072. + writeD(_door.isAutoAttackable(_activeChar) ? 0 : 1); // ??? (can attack)
  2073. writeD((int) _door.getCurrentHp());
  2074. - writeD(0); // ??? (show HP)
  2075. - writeD(0); // ??? (Damage)
  2076. + writeD(_door.getMaxHp());
  2077. + writeD(1); // ??? (show HP)
  2078. + writeD(_damageGrade);
  2079. + //writeD(0); // ??? (Damage)
  2080. }
  2081. }
  2082. \ No newline at end of file
  2083. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DoorStatusUpdate.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DoorStatusUpdate.java
  2084. index 184b7192..27942e19 100644
  2085. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DoorStatusUpdate.java
  2086. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DoorStatusUpdate.java
  2087. @@ -23,7 +23,7 @@ protected final void writeImpl()
  2088. writeD(_door.getDamage());
  2089. writeD(_door.isAutoAttackable(_activeChar) ? 1 : 0);
  2090. writeD(_door.getDoorId());
  2091. - writeD(_door.getMaxHp());
  2092. writeD((int) _door.getCurrentHp());
  2093. + writeD(_door.getMaxHp());
  2094. }
  2095. }
  2096. \ No newline at end of file
  2097. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DropItem.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DropItem.java
  2098. index 57e0f911..1f092547 100644
  2099. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DropItem.java
  2100. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DropItem.java
  2101. @@ -16,7 +16,7 @@ public DropItem(ItemInstance item, int playerObjId)
  2102. @Override
  2103. protected final void writeImpl()
  2104. {
  2105. - writeC(0x0c);
  2106. + writeC(0x16);
  2107. writeD(_charObjId);
  2108. writeD(_item.getObjectId());
  2109. writeD(_item.getItemId());
  2110. @@ -30,7 +30,7 @@ protected final void writeImpl()
  2111. writeD(0x01);
  2112. else
  2113. writeD(0x00);
  2114. - writeD(_item.getCount());
  2115. + writeQ(Long.valueOf(_item.getCount()));
  2116.  
  2117. writeD(1); // unknown
  2118. }
  2119. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/EnchantResult.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/EnchantResult.java
  2120. index 4a90ea67..b8f4aec0 100644
  2121. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/EnchantResult.java
  2122. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/EnchantResult.java
  2123. @@ -18,7 +18,7 @@ private EnchantResult(int result)
  2124. @Override
  2125. protected final void writeImpl()
  2126. {
  2127. - writeC(0x81);
  2128. + writeC(0x87);
  2129. writeD(_result);
  2130. }
  2131. }
  2132. \ No newline at end of file
  2133. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExConfirmCancelItem.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExConfirmCancelItem.java
  2134. index 895d2f5f..14e4ca68 100644
  2135. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExConfirmCancelItem.java
  2136. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExConfirmCancelItem.java
  2137. @@ -26,7 +26,7 @@ public ExConfirmCancelItem(ItemInstance item, int price)
  2138. protected void writeImpl()
  2139. {
  2140. writeC(0xfe);
  2141. - writeH(0x56);
  2142. + writeH(0x57);
  2143. writeD(_itemObjId);
  2144. writeD(_itemId);
  2145. writeD(_itemAug1);
  2146. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExConfirmVariationGemstone.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExConfirmVariationGemstone.java
  2147. index a306d689..241f5104 100644
  2148. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExConfirmVariationGemstone.java
  2149. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExConfirmVariationGemstone.java
  2150. @@ -14,9 +14,9 @@ public class ExConfirmVariationGemstone extends L2GameServerPacket
  2151. public ExConfirmVariationGemstone(int gemstoneObjId, int count)
  2152. {
  2153. _gemstoneObjId = gemstoneObjId;
  2154. - _unk1 = 1;
  2155. + _unk1 = 0;
  2156. _gemstoneCount = count;
  2157. - _unk2 = 1;
  2158. + _unk2 = 0;
  2159. _unk3 = 1;
  2160. }
  2161.  
  2162. @@ -24,10 +24,11 @@ public ExConfirmVariationGemstone(int gemstoneObjId, int count)
  2163. protected void writeImpl()
  2164. {
  2165. writeC(0xfe);
  2166. - writeH(0x54);
  2167. + writeH(0x55);
  2168. writeD(_gemstoneObjId);
  2169. + writeD(0x00);
  2170. + writeQ(_gemstoneCount);
  2171. writeD(_unk1);
  2172. - writeD(_gemstoneCount);
  2173. writeD(_unk2);
  2174. writeD(_unk3);
  2175. }
  2176. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExConfirmVariationRefiner.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExConfirmVariationRefiner.java
  2177. index 308cfac9..75f6d3e1 100644
  2178. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExConfirmVariationRefiner.java
  2179. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExConfirmVariationRefiner.java
  2180. @@ -24,11 +24,11 @@ public ExConfirmVariationRefiner(int refinerItemObjId, int lifeStoneId, int gems
  2181. protected void writeImpl()
  2182. {
  2183. writeC(0xfe);
  2184. - writeH(0x53);
  2185. + writeH(0x54);
  2186. writeD(_refinerItemObjId);
  2187. writeD(_lifestoneItemId);
  2188. writeD(_gemstoneItemId);
  2189. - writeD(_gemstoneCount);
  2190. + writeQ(_gemstoneCount);
  2191. writeD(_unk2);
  2192. }
  2193. }
  2194. \ No newline at end of file
  2195. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelAskStart.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelAskStart.java
  2196. index a13e4c85..74cf16e6 100644
  2197. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelAskStart.java
  2198. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelAskStart.java
  2199. @@ -19,7 +19,7 @@ public ExDuelAskStart(String requestor, int partyDuel)
  2200. protected void writeImpl()
  2201. {
  2202. writeC(0xfe);
  2203. - writeH(0x4b);
  2204. + writeH(0x4c);
  2205.  
  2206. writeS(_requestorName);
  2207. writeD(_partyDuel);
  2208. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelEnd.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelEnd.java
  2209. index b205c31c..096c4b16 100644
  2210. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelEnd.java
  2211. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelEnd.java
  2212. @@ -17,7 +17,7 @@ public ExDuelEnd(int unk1)
  2213. protected void writeImpl()
  2214. {
  2215. writeC(0xfe);
  2216. - writeH(0x4e);
  2217. + writeH(0x4f);
  2218.  
  2219. writeD(_unk1);
  2220. }
  2221. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelReady.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelReady.java
  2222. index b80e5dff..7958b431 100644
  2223. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelReady.java
  2224. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelReady.java
  2225. @@ -17,7 +17,7 @@ public ExDuelReady(int unk1)
  2226. protected void writeImpl()
  2227. {
  2228. writeC(0xfe);
  2229. - writeH(0x4c);
  2230. + writeH(0x4d);
  2231.  
  2232. writeD(_unk1);
  2233. }
  2234. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelStart.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelStart.java
  2235. index 3063f085..b3fb0efd 100644
  2236. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelStart.java
  2237. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelStart.java
  2238. @@ -17,7 +17,7 @@ public ExDuelStart(int unk1)
  2239. protected void writeImpl()
  2240. {
  2241. writeC(0xfe);
  2242. - writeH(0x4d);
  2243. + writeH(0x4e);
  2244.  
  2245. writeD(_unk1);
  2246. }
  2247. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExEnchantSkillInfo.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExEnchantSkillInfo.java
  2248. index 1d696e88..e440d4d2 100644
  2249. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExEnchantSkillInfo.java
  2250. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExEnchantSkillInfo.java
  2251. @@ -46,22 +46,29 @@ public void addRequirement(int type, int id, int count, int unk)
  2252. protected void writeImpl()
  2253. {
  2254. writeC(0xfe);
  2255. - writeH(0x18);
  2256. -
  2257. - writeD(_id);
  2258. - writeD(_level);
  2259. - writeD(_spCost);
  2260. - writeQ(_xpCost);
  2261. - writeD(_rate);
  2262. + writeH(0x2a);
  2263.  
  2264. + writeD(0);
  2265. writeD(_reqs.size());
  2266.  
  2267. +
  2268. +
  2269. +
  2270. +
  2271. for (Req temp : _reqs)
  2272. {
  2273. - writeD(temp.type);
  2274. - writeD(temp.id);
  2275. - writeD(temp.count);
  2276. - writeD(temp.unk);
  2277. + writeD(_level);
  2278. + writeD(_rate);
  2279. + writeD(_spCost);
  2280. + writeQ(_xpCost);
  2281. + writeQ(0);
  2282. + writeD(0); // req type?
  2283. + writeD(0); // required itemId
  2284. + writeD(0); // ?
  2285. + // writeD(temp.type);
  2286. + // writeD(temp.id);
  2287. + // writeD(temp.count);
  2288. + // writeD(temp.unk);
  2289. }
  2290. }
  2291. }
  2292. \ No newline at end of file
  2293. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExEnchantSkillList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExEnchantSkillList.java
  2294. index d59dea0a..d0517afb 100644
  2295. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExEnchantSkillList.java
  2296. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExEnchantSkillList.java
  2297. @@ -17,15 +17,19 @@ public ExEnchantSkillList(List<EnchantSkillNode> skills)
  2298. protected void writeImpl()
  2299. {
  2300. writeC(0xfe);
  2301. - writeH(0x17);
  2302. -
  2303. + writeH(0x29);
  2304. + writeD(0x00);
  2305. writeD(_skills.size());
  2306. for (EnchantSkillNode esn : _skills)
  2307. {
  2308. writeD(esn.getId());
  2309. + //int superval = (esn.getValue());
  2310. + //if (superval > 101)
  2311. + //writeD(superval -1);
  2312. + //else
  2313. writeD(esn.getValue());
  2314. - writeD(esn.getSp());
  2315. - writeQ(esn.getExp());
  2316. + //writeD(esn.getSp());
  2317. + //writeQ(esn.getExp());
  2318. }
  2319. }
  2320. }
  2321. \ No newline at end of file
  2322. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingEnd.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingEnd.java
  2323. index fb60f678..2909f598 100644
  2324. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingEnd.java
  2325. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingEnd.java
  2326. @@ -15,7 +15,7 @@ public ExFishingEnd(boolean win, int playerId)
  2327. protected void writeImpl()
  2328. {
  2329. writeC(0xfe);
  2330. - writeH(0x14);
  2331. + writeH(0x1f);
  2332. writeD(_playerId);
  2333. writeC((_win) ? 1 : 0);
  2334. }
  2335. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingHpRegen.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingHpRegen.java
  2336. index 29b7d768..c1165458 100644
  2337. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingHpRegen.java
  2338. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingHpRegen.java
  2339. @@ -27,7 +27,7 @@ public ExFishingHpRegen(Creature character, int time, int fishHP, int HPmode, in
  2340. protected void writeImpl()
  2341. {
  2342. writeC(0xfe);
  2343. - writeH(0x16);
  2344. + writeH(0x28);
  2345.  
  2346. writeD(_activeChar.getObjectId());
  2347. writeD(_time);
  2348. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingStart.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingStart.java
  2349. index dff1b62a..79864807 100644
  2350. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingStart.java
  2351. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingStart.java
  2352. @@ -27,7 +27,7 @@ public ExFishingStart(Creature character, int fishType, Location loc, boolean is
  2353. protected void writeImpl()
  2354. {
  2355. writeC(0xfe);
  2356. - writeH(0x13);
  2357. + writeH(0x1e);
  2358. writeD(_activeChar.getObjectId());
  2359. writeD(_fishType); // fish type
  2360. writeD(_loc.getX()); // x position
  2361. @@ -35,5 +35,7 @@ protected void writeImpl()
  2362. writeD(_loc.getZ()); // z position
  2363. writeC(_isNightLure ? 0x01 : 0x00); // night lure
  2364. writeC(Config.ALT_FISH_CHAMPIONSHIP_ENABLED ? 0x01 : 0x00); // show fish rank result button
  2365. + writeC((_fishType >= 7 && _fishType <= 9) ? 0x01 : 0x00); // 0 = day lure 1 = night lure
  2366. + writeC(0x00);
  2367. }
  2368. }
  2369. \ No newline at end of file
  2370. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingStartCombat.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingStartCombat.java
  2371. index cf97701a..5ad6a618 100644
  2372. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingStartCombat.java
  2373. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingStartCombat.java
  2374. @@ -26,7 +26,7 @@ public ExFishingStartCombat(Creature character, int time, int hp, int mode, int
  2375. protected void writeImpl()
  2376. {
  2377. writeC(0xfe);
  2378. - writeH(0x15);
  2379. + writeH(0x27);
  2380.  
  2381. writeD(_activeChar.getObjectId());
  2382. writeD(_time);
  2383. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExGetBossRecord.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExGetBossRecord.java
  2384. index 794ba6d9..e8c73f4a 100644
  2385. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExGetBossRecord.java
  2386. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExGetBossRecord.java
  2387. @@ -23,7 +23,7 @@ public ExGetBossRecord(int ranking, int totalScore, Map<Integer, Integer> list)
  2388. protected void writeImpl()
  2389. {
  2390. writeC(0xfe);
  2391. - writeH(0x33);
  2392. + writeH(0x34);
  2393. writeD(_ranking);
  2394. writeD(_totalPoints);
  2395. if (_bossRecordInfo == null)
  2396. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExHeroList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExHeroList.java
  2397. index ef5b313d..5ade481a 100644
  2398. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExHeroList.java
  2399. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExHeroList.java
  2400. @@ -23,7 +23,7 @@ public ExHeroList()
  2401. protected void writeImpl()
  2402. {
  2403. writeC(0xfe);
  2404. - writeH(0x23);
  2405. + writeH(0x79);
  2406. writeD(_heroList.size());
  2407.  
  2408. for (StatsSet hero : _heroList)
  2409. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExPutEnchantTargetItemResult.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExPutEnchantTargetItemResult.java
  2410. new file mode 100644
  2411. index 00000000..2ef39ab6
  2412. --- /dev/null
  2413. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExPutEnchantTargetItemResult.java
  2414. @@ -0,0 +1,54 @@
  2415. +/*
  2416. + * This program is free software: you can redistribute it and/or modify it under
  2417. + * the terms of the GNU General Public License as published by the Free Software
  2418. + * Foundation, either version 3 of the License, or (at your option) any later
  2419. + * version.
  2420. + *
  2421. + * This program is distributed in the hope that it will be useful, but WITHOUT
  2422. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  2423. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  2424. + * details.
  2425. + *
  2426. + * You should have received a copy of the GNU General Public License along with
  2427. + * this program. If not, see <http://www.gnu.org/licenses/>.
  2428. + */
  2429. +package com.l2jmega.gameserver.network.serverpackets;
  2430. +
  2431. +/**
  2432. + *
  2433. + * @author nBd
  2434. + */
  2435. +public class ExPutEnchantTargetItemResult extends L2GameServerPacket
  2436. +{
  2437. + private static final String _S__81_EXPUTENCHANTTARGETITEMRESULT = " 81 ExPutEnchantTargetItemResult";
  2438. +
  2439. + private int _result;
  2440. +
  2441. + /**
  2442. + *
  2443. + */
  2444. + public ExPutEnchantTargetItemResult(int result)
  2445. + {
  2446. + _result = result;
  2447. + }
  2448. +
  2449. + /**
  2450. + * @see com.l2jmega.gameserver.network.serverpackets.L2GameServerPacket#getType()
  2451. + */
  2452. + @Override
  2453. + public String getType()
  2454. + {
  2455. + return _S__81_EXPUTENCHANTTARGETITEMRESULT;
  2456. + }
  2457. +
  2458. + /**
  2459. + * @see com.l2jmega.gameserver.network.serverpackets.L2GameServerPacket#writeImpl()
  2460. + */
  2461. + @Override
  2462. + protected void writeImpl()
  2463. + {
  2464. + writeC(0xfe);
  2465. + writeH(0x81);
  2466. + writeD(_result);
  2467. + }
  2468. +}
  2469. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExServerPrimitive.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExServerPrimitive.java
  2470. index f50dff4a..ad40418b 100644
  2471. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExServerPrimitive.java
  2472. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExServerPrimitive.java
  2473. @@ -396,7 +396,7 @@ public void addLine(Color color, Location location, Location location2)
  2474. protected void writeImpl()
  2475. {
  2476. writeC(0xFE);
  2477. - writeH(0x24);
  2478. + writeH(0x11);
  2479. writeS(_name);
  2480. writeD(_x);
  2481. writeD(_y);
  2482. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowAdventurerGuideBook.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowAdventurerGuideBook.java
  2483. index 9f95bbad..053126ad 100644
  2484. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowAdventurerGuideBook.java
  2485. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowAdventurerGuideBook.java
  2486. @@ -16,6 +16,6 @@ private ExShowAdventurerGuideBook()
  2487. protected void writeImpl()
  2488. {
  2489. writeC(0xFE);
  2490. - writeH(0x37);
  2491. + writeH(0x38);
  2492. }
  2493. }
  2494. \ No newline at end of file
  2495. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowCropInfo.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowCropInfo.java
  2496. index 90eeba7d..cbc0600c 100644
  2497. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowCropInfo.java
  2498. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowCropInfo.java
  2499. @@ -25,7 +25,7 @@ public ExShowCropInfo(int manorId, boolean nextPeriod, boolean hideButtons)
  2500. protected void writeImpl()
  2501. {
  2502. writeC(0xFE);
  2503. - writeH(0x1D);
  2504. + writeH(0x24);
  2505. writeC(_hideButtons ? 0x01 : 0x00);
  2506. writeD(_manorId);
  2507. writeD(0);
  2508. @@ -39,9 +39,9 @@ protected void writeImpl()
  2509. for (CropProcure crop : _crops)
  2510. {
  2511. writeD(crop.getId());
  2512. - writeD(crop.getAmount());
  2513. - writeD(crop.getStartAmount());
  2514. - writeD(crop.getPrice());
  2515. + writeQ(crop.getAmount());
  2516. + writeQ(crop.getStartAmount());
  2517. + writeQ(crop.getPrice());
  2518. writeC(crop.getReward());
  2519.  
  2520. final Seed seed = CastleManorManager.getInstance().getSeedByCrop(crop.getId());
  2521. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowCropSetting.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowCropSetting.java
  2522. index e22905cf..bf41e11e 100644
  2523. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowCropSetting.java
  2524. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowCropSetting.java
  2525. @@ -39,7 +39,7 @@ public ExShowCropSetting(int manorId)
  2526. public void writeImpl()
  2527. {
  2528. writeC(0xFE); // Id
  2529. - writeH(0x20); // SubId
  2530. + writeH(0x2b); // SubId
  2531.  
  2532. writeD(_manorId); // manor id
  2533. writeD(_seeds.size()); // size
  2534. @@ -63,28 +63,28 @@ public void writeImpl()
  2535. if (_current.containsKey(s.getCropId()))
  2536. {
  2537. cp = _current.get(s.getCropId());
  2538. - writeD(cp.getStartAmount()); // buy
  2539. - writeD(cp.getPrice()); // price
  2540. + writeQ(cp.getStartAmount()); // buy
  2541. + writeQ(cp.getPrice()); // price
  2542. writeC(cp.getReward()); // reward
  2543. }
  2544. else
  2545. {
  2546. - writeD(0);
  2547. - writeD(0);
  2548. + writeQ(0);
  2549. + writeQ(0);
  2550. writeC(0);
  2551. }
  2552. // Next period
  2553. if (_next.containsKey(s.getCropId()))
  2554. {
  2555. cp = _next.get(s.getCropId());
  2556. - writeD(cp.getStartAmount()); // buy
  2557. - writeD(cp.getPrice()); // price
  2558. + writeQ(cp.getStartAmount()); // buy
  2559. + writeQ(cp.getPrice()); // price
  2560. writeC(cp.getReward()); // reward
  2561. }
  2562. else
  2563. {
  2564. - writeD(0);
  2565. - writeD(0);
  2566. + writeQ(0);
  2567. + writeQ(0);
  2568. writeC(0);
  2569. }
  2570. }
  2571. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowManorDefaultInfo.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowManorDefaultInfo.java
  2572. index 240da3a5..72d48b44 100644
  2573. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowManorDefaultInfo.java
  2574. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowManorDefaultInfo.java
  2575. @@ -20,7 +20,7 @@ public ExShowManorDefaultInfo(boolean hideButtons)
  2576. protected void writeImpl()
  2577. {
  2578. writeC(0xFE);
  2579. - writeH(0x1E);
  2580. + writeH(0x25);
  2581. writeC(_hideButtons ? 0x01 : 0x00);
  2582. writeD(_crops.size());
  2583. for (Seed crop : _crops)
  2584. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowProcureCropDetail.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowProcureCropDetail.java
  2585. index e5b61956..618634d8 100644
  2586. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowProcureCropDetail.java
  2587. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowProcureCropDetail.java
  2588. @@ -30,7 +30,7 @@ public ExShowProcureCropDetail(int cropId)
  2589. public void writeImpl()
  2590. {
  2591. writeC(0xFE);
  2592. - writeH(0x22);
  2593. + writeH(0x78);
  2594.  
  2595. writeD(_cropId);
  2596. writeD(_castleCrops.size());
  2597. @@ -40,8 +40,8 @@ public void writeImpl()
  2598. final CropProcure crop = entry.getValue();
  2599.  
  2600. writeD(entry.getKey());
  2601. - writeD(crop.getAmount());
  2602. - writeD(crop.getPrice());
  2603. + writeQ(crop.getAmount());
  2604. + writeQ(crop.getPrice());
  2605. writeC(crop.getReward());
  2606. }
  2607. }
  2608. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowQuestMark.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowQuestMark.java
  2609. index d5d8a462..eca6633b 100644
  2610. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowQuestMark.java
  2611. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowQuestMark.java
  2612. @@ -16,7 +16,7 @@ public ExShowQuestMark(int questId)
  2613. protected void writeImpl()
  2614. {
  2615. writeC(0xfe);
  2616. - writeH(0x1a);
  2617. + writeH(0x21);
  2618. writeD(_questId);
  2619. }
  2620. }
  2621. \ No newline at end of file
  2622. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExSendManorList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExSendManorList.java
  2623. index efb4b557..e75268e2 100644
  2624. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExSendManorList.java
  2625. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExSendManorList.java
  2626. @@ -29,7 +29,7 @@ private ExSendManorList()
  2627. protected void writeImpl()
  2628. {
  2629. writeC(0xFE);
  2630. - writeH(0x1B);
  2631. + writeH(0x22);
  2632. writeD(_manorList.length);
  2633. for (int i = 0; i < _manorList.length; i++)
  2634. {
  2635.  
  2636. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowSeedInfo.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowSeedInfo.java
  2637. index e92c3807..63204f04 100644
  2638. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowSeedInfo.java
  2639. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowSeedInfo.java
  2640. @@ -25,7 +25,7 @@ public ExShowSeedInfo(int manorId, boolean nextPeriod, boolean hideButtons)
  2641. protected void writeImpl()
  2642. {
  2643. writeC(0xFE);
  2644. - writeH(0x1C);
  2645. + writeH(0x23);
  2646. writeC(_hideButtons ? 0x01 : 0x00);
  2647. writeD(_manorId);
  2648. writeD(0);
  2649. @@ -40,9 +40,9 @@ protected void writeImpl()
  2650. for (SeedProduction seed : _seeds)
  2651. {
  2652. writeD(seed.getId()); // Seed id
  2653. - writeD(seed.getAmount()); // Left to buy
  2654. - writeD(seed.getStartAmount()); // Started amount
  2655. - writeD(seed.getPrice()); // Sell Price
  2656. + writeQ(seed.getAmount()); // Left to buy
  2657. + writeQ(seed.getStartAmount()); // Started amount
  2658. + writeQ(seed.getPrice()); // Sell Price
  2659.  
  2660. final Seed s = CastleManorManager.getInstance().getSeed(seed.getId());
  2661. if (s == null)
  2662. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowSeedSetting.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowSeedSetting.java
  2663. index c92e38e9..fcdbd70d 100644
  2664. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowSeedSetting.java
  2665. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowSeedSetting.java
  2666. @@ -40,7 +40,7 @@ public ExShowSeedSetting(int manorId)
  2667. public void writeImpl()
  2668. {
  2669. writeC(0xFE);
  2670. - writeH(0x1F);
  2671. + writeH(0x26);
  2672.  
  2673. writeD(_manorId);
  2674. writeD(_seeds.size());
  2675. @@ -64,25 +64,25 @@ public void writeImpl()
  2676. if (_current.containsKey(s.getSeedId()))
  2677. {
  2678. sp = _current.get(s.getSeedId());
  2679. - writeD(sp.getStartAmount()); // sales
  2680. - writeD(sp.getPrice()); // price
  2681. + writeQ(sp.getStartAmount()); // sales
  2682. + writeQ(sp.getPrice()); // price
  2683. }
  2684. else
  2685. {
  2686. - writeD(0);
  2687. - writeD(0);
  2688. + writeQ(0);
  2689. + writeQ(0);
  2690. }
  2691. // Next period
  2692. if (_next.containsKey(s.getSeedId()))
  2693. {
  2694. sp = _next.get(s.getSeedId());
  2695. - writeD(sp.getStartAmount()); // sales
  2696. - writeD(sp.getPrice()); // price
  2697. + writeQ(sp.getStartAmount()); // sales
  2698. + writeQ(sp.getPrice()); // price
  2699. }
  2700. else
  2701. {
  2702. - writeD(0);
  2703. - writeD(0);
  2704. + writeQ(0);
  2705. + writeQ(0);
  2706. }
  2707. }
  2708. }
  2709. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowSellCropList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowSellCropList.java
  2710. index 764eaf83..efbe87f9 100644
  2711. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowSellCropList.java
  2712. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowSellCropList.java
  2713. @@ -39,7 +39,7 @@ public ExShowSellCropList(PcInventory inventory, int manorId)
  2714. public void writeImpl()
  2715. {
  2716. writeC(0xFE);
  2717. - writeH(0x21);
  2718. + writeH(0x2c);
  2719.  
  2720. writeD(_manorId);
  2721. writeD(_cropsItems.size());
  2722. @@ -60,18 +60,18 @@ public void writeImpl()
  2723. {
  2724. final CropProcure crop = _castleCrops.get(item.getItemId());
  2725. writeD(_manorId);
  2726. - writeD(crop.getAmount());
  2727. - writeD(crop.getPrice());
  2728. + writeQ(crop.getAmount());
  2729. + writeQ(crop.getPrice());
  2730. writeC(crop.getReward());
  2731. }
  2732. else
  2733. {
  2734. writeD(0xFFFFFFFF);
  2735. - writeD(0);
  2736. - writeD(0);
  2737. + writeQ(0);
  2738. + writeQ(0);
  2739. writeC(0);
  2740. }
  2741. - writeD(item.getCount());
  2742. + writeQ(item.getCount());
  2743. }
  2744. }
  2745. }
  2746. \ No newline at end of file
  2747. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ItemList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ItemList.java
  2748. index 3cf42e2b..84b0d7f5 100644
  2749. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ItemList.java
  2750. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ItemList.java
  2751. @@ -1,45 +1,88 @@
  2752. package com.l2jmega.gameserver.network.serverpackets;
  2753.  
  2754. +import java.util.HashSet;
  2755. import java.util.Set;
  2756.  
  2757. import com.l2jmega.gameserver.model.actor.instance.Player;
  2758. import com.l2jmega.gameserver.model.item.instance.ItemInstance;
  2759. import com.l2jmega.gameserver.model.item.kind.Item;
  2760.  
  2761. +//1B - packet
  2762. +//00 00 - windows
  2763. +//07 00 - count
  2764. +//01 00 - item typer
  2765. +//B4 A4 00 10 -objid
  2766. +//7B 04 00 00 - ItemID
  2767. +//01 00 00 00 - count
  2768. +//01 00 - itemtype 1
  2769. +//00 00 - custtype
  2770. +//01 00 - is equipped
  2771. +//00 08 00 00 - body part
  2772. +//00 00 -enchant level
  2773. +//00 00 -custtype 2
  2774. +//00 00 00 00 - aug id
  2775. +//FF FF FF FF - shadowtime
  2776. +
  2777. public class ItemList extends L2GameServerPacket
  2778. {
  2779. - private final Set<ItemInstance> _items;
  2780. + private Set<ItemInstance> _items = new HashSet<>();
  2781. private final boolean _showWindow;
  2782. -
  2783. public ItemList(Player cha, boolean showWindow)
  2784. {
  2785. - _items = cha.getInventory().getItems();
  2786. + _items.addAll(cha.getInventory().getItems());
  2787. +
  2788. _showWindow = showWindow;
  2789. }
  2790. -
  2791. +
  2792. @Override
  2793. protected final void writeImpl()
  2794. {
  2795. - writeC(0x1b);
  2796. + writeC(0x11);
  2797. writeH(_showWindow ? 0x01 : 0x00);
  2798. writeH(_items.size());
  2799. -
  2800. +
  2801. for (ItemInstance temp : _items)
  2802. {
  2803. Item item = temp.getItem();
  2804. -
  2805. - writeH(item.getType1());
  2806. +
  2807. + //writeH(item.getType1());
  2808. writeD(temp.getObjectId());
  2809. writeD(temp.getItemId());
  2810. - writeD(temp.getCount());
  2811. + //writeD(0); //writeD(0);writeD(0);writeD(0);
  2812. + //writeD(item.getBodyPart());
  2813. + writeD(0);
  2814. + writeQ(Long.valueOf(temp.getCount()));
  2815. + //writeQ(0);
  2816. writeH(item.getType2());
  2817. writeH(temp.getCustomType1());
  2818. writeH(temp.isEquipped() ? 0x01 : 0x00);
  2819. + //writeD(2048);
  2820. writeD(item.getBodyPart());
  2821. + //writeD(temp.getItem().getBodyPart());
  2822. + //writeD(temp.getItem().getBodyPart());
  2823. writeH(temp.getEnchantLevel());
  2824. writeH(temp.getCustomType2());
  2825. writeD((temp.isAugmented()) ? temp.getAugmentation().getAugmentationId() : 0x00);
  2826. + //writeH((temp.isAugmented()) ? temp.getAugmentation().getAugmentationId() : 0x00);
  2827. writeD(temp.getMana());
  2828. + writeD(0);
  2829. +
  2830. + writeH(0);//elemttpe
  2831. + writeH(0);
  2832. +
  2833. + writeH(0);//elements
  2834. + writeH(0);
  2835. + writeH(0);
  2836. + writeH(0);
  2837. + writeH(0);
  2838. + writeH(0);
  2839. +
  2840. + //writeD(0);
  2841. + writeH(0x00);//enchanteffects
  2842. + writeH(0x00);
  2843. + writeH(0x00);
  2844. +
  2845. + //writeH(0x00); //invblock?
  2846. }
  2847. }
  2848. }
  2849. \ No newline at end of file
  2850. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/MultiSellList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/MultiSellList.java
  2851. index b8b5db07..7882fdeb 100644
  2852. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/MultiSellList.java
  2853. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/MultiSellList.java
  2854. @@ -37,7 +37,8 @@ protected void writeImpl()
  2855. writeD(_list.getId()); // list id
  2856. writeD(1 + (_index / PAGE_SIZE)); // page
  2857. writeD(_finished ? 1 : 0); // finished
  2858. - writeD(PAGE_SIZE); // size of pages
  2859. + writeD(0x28);
  2860. + // writeD(PAGE_SIZE); // size of pages
  2861. writeD(_size); // list lenght
  2862.  
  2863. while (_size-- > 0)
  2864. @@ -45,15 +46,25 @@ protected void writeImpl()
  2865. Entry ent = _list.getEntries().get(_index++);
  2866.  
  2867. writeD(ent.getId());
  2868. - writeD(0x00); // C6
  2869. - writeD(0x00); // C6
  2870. writeC(ent.isStackable() ? 1 : 0);
  2871. + writeH(0x00); // C6
  2872. + writeD(0x00); // C6
  2873. + writeD(0x00); // T1
  2874. + writeH(65534); // T1
  2875. + writeH(0x00); // T1
  2876. + writeH(0x00); // T1
  2877. + writeH(0x00); // T1
  2878. + writeH(0x00); // T1
  2879. + writeH(0x00); // T1
  2880. + writeH(0x00); // T1
  2881. + writeH(0x00); // T1
  2882. writeH(ent.getProducts().size());
  2883. writeH(ent.getIngredients().size());
  2884.  
  2885. for (Ingredient ing : ent.getProducts())
  2886. {
  2887. - writeH(ing.getItemId());
  2888. + //writeH(ing.getItemId());
  2889. + writeD(ing.getItemId());
  2890. if (ing.getTemplate() != null)
  2891. {
  2892. writeD(ing.getTemplate().getBodyPart());
  2893. @@ -64,20 +75,37 @@ protected void writeImpl()
  2894. writeD(0);
  2895. writeH(65535);
  2896. }
  2897. - writeD(ing.getItemCount());
  2898. + writeQ(ing.getItemCount());
  2899. writeH(ing.getEnchantLevel());
  2900. writeD(0x00); // TODO: i.getAugmentId()
  2901. writeD(0x00); // TODO: i.getManaLeft()
  2902. + writeH(0x00);
  2903. + writeH(0x00);
  2904. + writeH(0x00);
  2905. + writeH(0x00);
  2906. + writeH(0x00);
  2907. + writeH(0x00);
  2908. + writeH(0x00);
  2909. + writeH(0x00);
  2910. }
  2911.  
  2912. for (Ingredient ing : ent.getIngredients())
  2913. {
  2914. - writeH(ing.getItemId());
  2915. + //writeH(ing.getItemId());
  2916. + writeD(ing.getItemId());
  2917. writeH(ing.getTemplate() != null ? ing.getTemplate().getType2() : 65535);
  2918. - writeD(ing.getItemCount());
  2919. + writeQ(ing.getItemCount());
  2920. writeH(ing.getEnchantLevel());
  2921. writeD(0x00); // TODO: i.getAugmentId()
  2922. writeD(0x00); // TODO: i.getManaLeft()
  2923. + writeH(0x00);
  2924. + writeH(0x00);
  2925. + writeH(0x00);
  2926. + writeH(0x00);
  2927. + writeH(0x00);
  2928. + writeH(0x00);
  2929. + writeH(0x00);
  2930. + writeH(0x00);
  2931. }
  2932. }
  2933. }
  2934. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetDelete.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetDelete.java
  2935. index ba45f42c..3266ebc4 100644
  2936. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetDelete.java
  2937. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetDelete.java
  2938. @@ -14,7 +14,7 @@ public PetDelete(int summonType, int objId)
  2939. @Override
  2940. protected final void writeImpl()
  2941. {
  2942. - writeC(0xb6);
  2943. + writeC(0xb7);
  2944. writeD(_summonType);
  2945. writeD(_objId);
  2946. }
  2947. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetInfo.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetInfo.java
  2948. index 0c27da73..d3e32795 100644
  2949. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetInfo.java
  2950. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetInfo.java
  2951. @@ -33,7 +33,7 @@ else if (_summon instanceof Servitor)
  2952. @Override
  2953. protected final void writeImpl()
  2954. {
  2955. - writeC(0xb1);
  2956. + writeC(0xb2);
  2957. writeD(_summon.getSummonType());
  2958. writeD(_summon.getObjectId());
  2959. writeD(_summon.getTemplate().getIdTemplate() + 1000000);
  2960. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetInventoryUpdate.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetInventoryUpdate.java
  2961. index 043b721b..91a58764 100644
  2962. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetInventoryUpdate.java
  2963. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetInventoryUpdate.java
  2964. @@ -60,7 +60,7 @@ public void addItems(List<ItemInstance> items)
  2965. @Override
  2966. protected final void writeImpl()
  2967. {
  2968. - writeC(0xb3);
  2969. + writeC(0xb4);
  2970. writeH(_items.size());
  2971.  
  2972. for (ItemInfo temp : _items)
  2973. @@ -68,16 +68,34 @@ protected final void writeImpl()
  2974. Item item = temp.getItem();
  2975.  
  2976. writeH(temp.getChange().ordinal());
  2977. - writeH(item.getType1());
  2978. + //writeH(item.getType1());
  2979. writeD(temp.getObjectId());
  2980. writeD(item.getItemId());
  2981. - writeD(temp.getCount());
  2982. + writeD(0x00);
  2983. + writeQ(temp.getCount());
  2984. writeH(item.getType2());
  2985. writeH(temp.getCustomType1());
  2986. writeH(temp.getEquipped());
  2987. writeD(item.getBodyPart());
  2988. writeH(temp.getEnchant());
  2989. writeH(temp.getCustomType2());
  2990. + writeD(0x00);
  2991. + writeD(0x00);
  2992. + writeD(0x00);
  2993. +
  2994. + writeH(0x00);
  2995. + writeH(0x00);
  2996. +
  2997. + writeH(0x00);
  2998. + writeH(0x00);
  2999. + writeH(0x00);
  3000. + writeH(0x00);
  3001. + writeH(0x00);
  3002. + writeH(0x00);
  3003. +
  3004. + writeH(0x00);
  3005. + writeH(0x00);
  3006. + writeH(0x00);
  3007. }
  3008. }
  3009. }
  3010. \ No newline at end of file
  3011. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetItemList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetItemList.java
  3012. index 055090dd..7381a8da 100644
  3013. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetItemList.java
  3014. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetItemList.java
  3015. @@ -18,7 +18,7 @@ public PetItemList(Pet character)
  3016. @Override
  3017. protected final void writeImpl()
  3018. {
  3019. - writeC(0xB2);
  3020. + writeC(0xB3);
  3021. writeH(_items.size());
  3022.  
  3023. for (ItemInstance temp : _items)
  3024. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetStatusShow.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetStatusShow.java
  3025. index b9b1f8d0..f608c65a 100644
  3026. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetStatusShow.java
  3027. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetStatusShow.java
  3028. @@ -17,7 +17,7 @@ public PetStatusShow(Summon summon)
  3029. @Override
  3030. protected final void writeImpl()
  3031. {
  3032. - writeC(0xB0);
  3033. + writeC(0xB1);
  3034. writeD(_summonType);
  3035. }
  3036. }
  3037. \ No newline at end of file
  3038. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetStatusUpdate.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetStatusUpdate.java
  3039. index b7c906d0..eed18d58 100644
  3040. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetStatusUpdate.java
  3041. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetStatusUpdate.java
  3042. @@ -32,7 +32,7 @@ else if (_summon instanceof Servitor)
  3043. @Override
  3044. protected final void writeImpl()
  3045. {
  3046. - writeC(0xb5);
  3047. + writeC(0xb6);
  3048. writeD(_summon.getSummonType());
  3049. writeD(_summon.getObjectId());
  3050. writeD(_summon.getX());
  3051. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PledgeStatusChanged.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PledgeStatusChanged.java
  3052. index 098a5c4c..fd94d2f9 100644
  3053. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PledgeStatusChanged.java
  3054. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PledgeStatusChanged.java
  3055. @@ -23,6 +23,12 @@ protected final void writeImpl()
  3056. writeD(_clan.getCrestId());
  3057. writeD(_clan.getAllyId());
  3058. writeD(_clan.getAllyCrestId());
  3059. + //writeD(0);
  3060. + //writeD(_clan.getLevel());
  3061. + // writeD(_clan.getCrestId());
  3062. + // writeD(_clan.getAllyId());
  3063. + // writeD(_clan.getAllyCrestId());
  3064. + //writeD(0);
  3065. writeD(0);
  3066. writeD(0);
  3067. }
  3068. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreListBuy.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreListBuy.java
  3069. index a27d6c49..1c2db0d8 100644
  3070. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreListBuy.java
  3071. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreListBuy.java
  3072. @@ -23,26 +23,46 @@ public PrivateStoreListBuy(Player player, Player storePlayer)
  3073. @Override
  3074. protected final void writeImpl()
  3075. {
  3076. - writeC(0xb8);
  3077. + writeC(0xbe);
  3078. writeD(_storePlayer.getObjectId());
  3079. - writeD(_playerAdena);
  3080. + writeQ(_playerAdena);
  3081. writeD(_items.size());
  3082.  
  3083. for (TradeItem item : _items)
  3084. {
  3085. writeD(item.getObjectId());
  3086. writeD(item.getItem().getItemId());
  3087. + writeD(0x00);
  3088. + //writeD(item.getItem().getBodyPart());
  3089. + writeQ(item.getCount()); // give max possible sell amount
  3090. + writeH(item.getItem().getType2());
  3091. + writeH(0x00);
  3092. + writeH(0x00);
  3093. + writeD(item.getItem().getBodyPart());
  3094. writeH(item.getEnchant());
  3095. - writeD(item.getCount()); // give max possible sell amount
  3096. + writeH(0x00);
  3097.  
  3098. - writeD(item.getItem().getReferencePrice());
  3099. - writeH(0);
  3100. + writeD(0x00);
  3101. + writeD(0x00);
  3102. + writeD(0x00);
  3103.  
  3104. - writeD(item.getItem().getBodyPart());
  3105. - writeH(item.getItem().getType2());
  3106. - writeD(item.getPrice());// buyers price
  3107. + writeH(0x00);
  3108. + writeH(0x00);
  3109. + for (byte i = 0; i < 6; i++)
  3110. + {
  3111. + writeH(0x00);
  3112. + }
  3113.  
  3114. - writeD(item.getCount()); // maximum possible tradecount
  3115. + writeH(0x00);
  3116. + writeH(0x00);
  3117. + writeH(0x00);
  3118. +
  3119. + writeD(item.getObjectId());
  3120. + writeQ(item.getPrice());// buyers price
  3121. + writeQ(item.getItem().getReferencePrice());
  3122. + writeQ(item.getCount()); // maximum possible tradecount
  3123. +
  3124. +
  3125. }
  3126. }
  3127. }
  3128. \ No newline at end of file
  3129. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreListSell.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreListSell.java
  3130. index f4a7d0ef..36a4a701 100644
  3131. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreListSell.java
  3132. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreListSell.java
  3133. @@ -23,24 +23,44 @@ public PrivateStoreListSell(Player player, Player storePlayer)
  3134. @Override
  3135. protected final void writeImpl()
  3136. {
  3137. - writeC(0x9b);
  3138. + writeC(0xa1);
  3139. writeD(_storePlayer.getObjectId());
  3140. writeD(_packageSale ? 1 : 0);
  3141. - writeD(_playerAdena);
  3142. + writeQ(_playerAdena);
  3143. writeD(_items.size());
  3144.  
  3145. for (TradeItem item : _items)
  3146. {
  3147. - writeD(item.getItem().getType2());
  3148. writeD(item.getObjectId());
  3149. writeD(item.getItem().getItemId());
  3150. - writeD(item.getCount());
  3151. + writeD(0x00);
  3152. + //writeD(item.getItem().getBodyPart());
  3153. + writeQ(item.getCount());
  3154. + writeH(item.getItem().getType2());
  3155. writeH(0x00);
  3156. - writeH(item.getEnchant());
  3157. writeH(0x00);
  3158. writeD(item.getItem().getBodyPart());
  3159. - writeD(item.getPrice()); // your price
  3160. - writeD(item.getItem().getReferencePrice()); // store price
  3161. + writeH(item.getEnchant());
  3162. + writeH(0x00);
  3163. +
  3164. + writeD(0x00);
  3165. + writeD(0x00);
  3166. + writeD(0x00);
  3167. +
  3168. + writeH(0x00);
  3169. + writeH(0x00);
  3170. + for (byte i = 0; i < 6; i++)
  3171. + {
  3172. + writeH(0x00);
  3173. + }
  3174. +
  3175. + writeH(0x00);
  3176. + writeH(0x00);
  3177. + writeH(0x00);
  3178. +
  3179. + writeQ(item.getPrice()); // your price
  3180. + writeQ(item.getItem().getReferencePrice()); // store price
  3181. +
  3182. }
  3183. }
  3184. }
  3185. \ No newline at end of file
  3186. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreManageListBuy.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreManageListBuy.java
  3187. index 7c021309..5c81f864 100644
  3188. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreManageListBuy.java
  3189. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreManageListBuy.java
  3190. @@ -17,41 +17,84 @@ public PrivateStoreManageListBuy(Player player)
  3191. {
  3192. _objId = player.getObjectId();
  3193. _playerAdena = player.getAdena();
  3194. - _itemList = player.getInventory().getUniqueItems(false, true);
  3195. + _itemList = player.getInventory().getUniqueItems(false, true, true);
  3196. _buyList = player.getBuyList().getItems();
  3197. }
  3198.  
  3199. @Override
  3200. protected final void writeImpl()
  3201. {
  3202. - writeC(0xb7);
  3203. + writeC(0xbd);
  3204. writeD(_objId);
  3205. - writeD(_playerAdena);
  3206. + writeQ(_playerAdena);
  3207.  
  3208. writeD(_itemList.length); // inventory items for potential buy
  3209. for (ItemInstance item : _itemList)
  3210. {
  3211. + writeD(item.getObjectId());
  3212. writeD(item.getItemId());
  3213. - writeH(item.getEnchantLevel());
  3214. - writeD(item.getCount());
  3215. - writeD(item.getReferencePrice());
  3216. + writeD(0x00);
  3217. + //writeD(item.getItem().getBodyPart());
  3218. + writeQ(item.getCount());
  3219. + writeH(item.getItem().getType2());
  3220. + writeH(0x00);
  3221. writeH(0x00);
  3222. writeD(item.getItem().getBodyPart());
  3223. - writeH(item.getItem().getType2());
  3224. + writeH(item.getEnchantLevel());
  3225. + writeH(0x00);
  3226. +
  3227. + writeD(0x00);
  3228. + writeD(0x00);
  3229. + writeD(0x00);
  3230. +
  3231. + writeH(0x00);
  3232. + writeH(0x00);
  3233. + for (byte i = 0; i < 6; i++)
  3234. + {
  3235. + writeH(0x00);
  3236. + }
  3237. +
  3238. + writeH(0x00);
  3239. + writeH(0x00);
  3240. + writeH(0x00);
  3241. +
  3242. + writeQ(item.getReferencePrice());
  3243. +
  3244. }
  3245.  
  3246. writeD(_buyList.size()); // count for all items already added for buy
  3247. for (TradeItem item : _buyList)
  3248. {
  3249. + writeD(item.getObjectId());
  3250. writeD(item.getItem().getItemId());
  3251. - writeH(item.getEnchant());
  3252. - writeD(item.getCount());
  3253. - writeD(item.getItem().getReferencePrice());
  3254. - writeH(0x00);
  3255. writeD(item.getItem().getBodyPart());
  3256. + writeQ(item.getCount());
  3257. +
  3258. writeH(item.getItem().getType2());
  3259. - writeD(item.getPrice());// your price
  3260. - writeD(item.getItem().getReferencePrice());// fixed store price
  3261. + writeH(0x00);
  3262. + writeH(0x00);
  3263. + writeD(item.getItem().getBodyPart());
  3264. + writeH(item.getEnchant());
  3265. + writeH(0x00);
  3266. +
  3267. + writeD(0x00);
  3268. + writeD(0x00);
  3269. + writeD(0x00);
  3270. +
  3271. + writeH(0x00);
  3272. + writeH(0x00);
  3273. + for (byte i = 0; i < 6; i++)
  3274. + {
  3275. + writeH(0x00);
  3276. + }
  3277. +
  3278. + writeH(0x00);
  3279. + writeH(0x00);
  3280. + writeH(0x00);
  3281. +
  3282. + writeQ(item.getPrice());// your price
  3283. + writeQ(item.getItem().getReferencePrice());// fixed store price
  3284. + writeQ(item.getCount());
  3285. }
  3286. }
  3287. }
  3288. \ No newline at end of file
  3289. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreManageListSell.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreManageListSell.java
  3290. index 592efbb9..5de3c1b8 100644
  3291. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreManageListSell.java
  3292. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreManageListSell.java
  3293. @@ -21,45 +21,86 @@ public PrivateStoreManageListSell(Player player, boolean isPackageSale)
  3294. player.getSellList().updateItems();
  3295.  
  3296. _packageSale = (player.getSellList().isPackaged()) ? true : isPackageSale;
  3297. - _itemList = player.getInventory().getAvailableItems(player.getSellList());
  3298. + _itemList = player.getInventory().getAvailableItems(player.getSellList(), false);
  3299. _sellList = player.getSellList().getItems();
  3300. }
  3301.  
  3302. @Override
  3303. protected final void writeImpl()
  3304. {
  3305. - writeC(0x9a);
  3306. + writeC(0xa0);
  3307. writeD(_objId);
  3308. writeD(_packageSale ? 1 : 0);
  3309. - writeD(_playerAdena);
  3310. + writeQ(_playerAdena);
  3311.  
  3312. writeD(_itemList.length);
  3313. for (TradeItem item : _itemList)
  3314. {
  3315. - writeD(item.getItem().getType2());
  3316. +
  3317. writeD(item.getObjectId());
  3318. writeD(item.getItem().getItemId());
  3319. - writeD(item.getCount());
  3320. + writeD(0x00);
  3321. + //writeD(item.getItem().getBodyPart());
  3322. + writeQ(item.getCount());
  3323. + writeH(item.getItem().getType2());
  3324. writeH(0x00);
  3325. - writeH(item.getEnchant());
  3326. writeH(0x00);
  3327. writeD(item.getItem().getBodyPart());
  3328. - writeD(item.getPrice());
  3329. + writeH(item.getEnchant());
  3330. + writeH(0x00);
  3331. +
  3332. + writeD(0x00);
  3333. + writeD(0x00);
  3334. + writeD(0x00);
  3335. +
  3336. +
  3337. +
  3338. + writeH(0x00);
  3339. + writeH(0x00);
  3340. + for (byte i = 0; i < 6; i++)
  3341. + {
  3342. + writeH(0x00);
  3343. + }
  3344. +
  3345. + writeH(0x00);
  3346. + writeH(0x00);
  3347. + writeH(0x00);
  3348. + writeQ(item.getPrice());
  3349. }
  3350.  
  3351. writeD(_sellList.size());
  3352. for (TradeItem item : _sellList)
  3353. {
  3354. - writeD(item.getItem().getType2());
  3355. +
  3356. writeD(item.getObjectId());
  3357. writeD(item.getItem().getItemId());
  3358. - writeD(item.getCount());
  3359. + writeD(item.getItem().getBodyPart());
  3360. + writeQ(item.getCount());
  3361. + writeH(item.getItem().getType2());
  3362. + writeH(0x00);//cust
  3363. writeH(0x00);
  3364. + writeD(item.getItem().getBodyPart());
  3365. writeH(item.getEnchant());
  3366. writeH(0x00);
  3367. - writeD(item.getItem().getBodyPart());
  3368. - writeD(item.getPrice());
  3369. - writeD(item.getItem().getReferencePrice());
  3370. +
  3371. + writeD(0x00);
  3372. + writeD(0x00);
  3373. + writeD(0x00);
  3374. +
  3375. +
  3376. + writeH(0x00);
  3377. + writeH(0x00);
  3378. + for (byte i = 0; i < 6; i++)
  3379. + {
  3380. + writeH(0x00);
  3381. + }
  3382. +
  3383. + writeH(0x00);
  3384. + writeH(0x00);
  3385. + writeH(0x00);
  3386. +
  3387. + writeQ(item.getPrice());
  3388. + writeQ(item.getItem().getReferencePrice());
  3389. }
  3390. }
  3391. }
  3392. \ No newline at end of file
  3393. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreMsgBuy.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreMsgBuy.java
  3394. index f38b8869..a608deb4 100644
  3395. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreMsgBuy.java
  3396. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreMsgBuy.java
  3397. @@ -17,7 +17,7 @@ public PrivateStoreMsgBuy(Player player)
  3398. @Override
  3399. protected final void writeImpl()
  3400. {
  3401. - writeC(0xb9);
  3402. + writeC(0xbf);
  3403. writeD(_activeChar.getObjectId());
  3404. writeS(_storeMsg);
  3405. }
  3406. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreMsgSell.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreMsgSell.java
  3407. index 0592cd22..79a9c3bf 100644
  3408. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreMsgSell.java
  3409. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreMsgSell.java
  3410. @@ -17,7 +17,7 @@ public PrivateStoreMsgSell(Player player)
  3411. @Override
  3412. protected final void writeImpl()
  3413. {
  3414. - writeC(0x9c);
  3415. + writeC(0xa2);
  3416. writeD(_activeChar.getObjectId());
  3417. writeS(_storeMsg);
  3418. }
  3419. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeBookItemList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeBookItemList.java
  3420. index 62928806..d2eefff6 100644
  3421. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeBookItemList.java
  3422. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeBookItemList.java
  3423. @@ -21,7 +21,7 @@ public RecipeBookItemList(Player player, boolean isDwarven)
  3424. @Override
  3425. protected final void writeImpl()
  3426. {
  3427. - writeC(0xD6);
  3428. + writeC(0xDc);
  3429.  
  3430. writeD((_isDwarven) ? 0x00 : 0x01);
  3431. writeD(_maxMp);
  3432. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeItemMakeInfo.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeItemMakeInfo.java
  3433. index b4f30b38..2d49a66a 100644
  3434. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeItemMakeInfo.java
  3435. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeItemMakeInfo.java
  3436. @@ -30,7 +30,7 @@ protected final void writeImpl()
  3437. Recipe recipe = RecipeData.getInstance().getRecipeList(_id);
  3438. if (recipe != null)
  3439. {
  3440. - writeC(0xD7);
  3441. + writeC(0xDD);
  3442.  
  3443. writeD(_id);
  3444. writeD((recipe.isDwarven()) ? 0 : 1);
  3445. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopItemInfo.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopItemInfo.java
  3446. index 97a625fb..318788bc 100644
  3447. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopItemInfo.java
  3448. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopItemInfo.java
  3449. @@ -16,7 +16,7 @@ public RecipeShopItemInfo(Player player, int recipeId)
  3450. @Override
  3451. protected final void writeImpl()
  3452. {
  3453. - writeC(0xda);
  3454. + writeC(0xe0);
  3455. writeD(_player.getObjectId());
  3456. writeD(_recipeId);
  3457. writeD((int) _player.getCurrentMp());
  3458. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopManageList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopManageList.java
  3459. index e21e338b..d32e499f 100644
  3460. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopManageList.java
  3461. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopManageList.java
  3462. @@ -41,7 +41,7 @@ public RecipeShopManageList(Player seller, boolean isDwarven)
  3463. @Override
  3464. protected final void writeImpl()
  3465. {
  3466. - writeC(0xd8);
  3467. + writeC(0xde);
  3468. writeD(_seller.getObjectId());
  3469. writeD(_seller.getAdena());
  3470. writeD(_isDwarven ? 0x00 : 0x01);
  3471. @@ -71,7 +71,7 @@ protected final void writeImpl()
  3472. {
  3473. writeD(item.getId());
  3474. writeD(0x00);
  3475. - writeD(item.getValue());
  3476. + writeQ(item.getValue());
  3477. }
  3478. }
  3479. }
  3480. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopMsg.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopMsg.java
  3481. index 82bfefee..65f20ae3 100644
  3482. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopMsg.java
  3483. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopMsg.java
  3484. @@ -14,7 +14,7 @@ public RecipeShopMsg(Player player)
  3485. @Override
  3486. protected final void writeImpl()
  3487. {
  3488. - writeC(0xdb);
  3489. + writeC(0xe1);
  3490. writeD(_activeChar.getObjectId());
  3491. writeS(_activeChar.getCreateList().getStoreName());
  3492. }
  3493. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopSellList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopSellList.java
  3494. index ae36d28e..81e3d850 100644
  3495. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopSellList.java
  3496. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopSellList.java
  3497. @@ -23,11 +23,11 @@ protected final void writeImpl()
  3498. final ManufactureList createList = _manufacturer.getCreateList();
  3499. if (createList != null)
  3500. {
  3501. - writeC(0xd9);
  3502. + writeC(0xdf);
  3503. writeD(_manufacturer.getObjectId());
  3504. writeD((int) _manufacturer.getCurrentMp());
  3505. writeD(_manufacturer.getMaxMp());
  3506. - writeD(_buyer.getAdena());
  3507. + writeQ(_buyer.getAdena());
  3508.  
  3509. final List<ManufactureItem> list = createList.getList();
  3510. writeD(list.size());
  3511. @@ -36,7 +36,7 @@ protected final void writeImpl()
  3512. {
  3513. writeD(item.getId());
  3514. writeD(0x00); // unknown
  3515. - writeD(item.getValue());
  3516. + writeQ(item.getValue());
  3517. }
  3518. }
  3519. }
  3520. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/Ride.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/Ride.java
  3521. index ebb23891..d58f66ae 100644
  3522. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/Ride.java
  3523. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/Ride.java
  3524. @@ -1,35 +1,79 @@
  3525. +/*
  3526. + * This program is free software: you can redistribute it and/or modify it under
  3527. + * the terms of the GNU General Public License as published by the Free Software
  3528. + * Foundation, either version 3 of the License, or (at your option) any later
  3529. + * version.
  3530. + *
  3531. + * This program is distributed in the hope that it will be useful, but WITHOUT
  3532. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  3533. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  3534. + * details.
  3535. + *
  3536. + * You should have received a copy of the GNU General Public License along with
  3537. + * this program. If not, see <http://www.gnu.org/licenses/>.
  3538. + */
  3539. package com.l2jmega.gameserver.network.serverpackets;
  3540.  
  3541. -public class Ride extends L2GameServerPacket
  3542. +import com.l2jmega.gameserver.model.actor.instance.Player;
  3543. +
  3544. +public final class Ride extends L2GameServerPacket
  3545. {
  3546. + private static final String _S__8c_Ride = " 8c Ride";
  3547. public static final int ACTION_MOUNT = 1;
  3548. public static final int ACTION_DISMOUNT = 0;
  3549. -
  3550. private final int _id;
  3551. private final int _bRide;
  3552. - private int _rideType;
  3553. + private final int _rideType;
  3554. private final int _rideClassID;
  3555. + private final int _x, _y, _z;
  3556.  
  3557. - public Ride(int id, int action, int rideClassId)
  3558. + public Ride(Player cha, boolean mount, int rideClassId)
  3559. {
  3560. - _id = id; // charobjectID
  3561. - _bRide = action; // 1 for mount ; 2 for dismount
  3562. + _id = cha.getObjectId();
  3563. + _bRide = mount ? 1 : 0;
  3564. _rideClassID = rideClassId + 1000000; // npcID
  3565.  
  3566. + _x = cha.getX();
  3567. + _y = cha.getY();
  3568. + _z = cha.getZ();
  3569. +
  3570. switch (rideClassId)
  3571. {
  3572. - case 12526:
  3573. - case 12527: // Striders
  3574. - case 12528:
  3575. + case 0: // dismount
  3576. + _rideType = 0;
  3577. + break;
  3578. + case 12526: // Wind
  3579. + case 12527: // Star
  3580. + case 12528: // Twilight
  3581. + case 16038: // red strider of wind
  3582. + case 16039: // red strider of star
  3583. + case 16040: // red strider of dusk
  3584. _rideType = 1;
  3585. break;
  3586. -
  3587. case 12621: // Wyvern
  3588. _rideType = 2;
  3589. break;
  3590. + case 16037: // Great Snow Wolf
  3591. + case 16041: // Fenrir Wolf
  3592. + case 16042: // White Fenrir Wolf
  3593. + _rideType = 3;
  3594. + break;
  3595. + case 13130: // Light Purple Maned Horse
  3596. + case 13146: // Tawny-Maned Lion
  3597. + case 13147: // Steam Sledge
  3598. + _rideType = 4;
  3599. + break;
  3600. + default:
  3601. + throw new IllegalArgumentException("Unsupported mount NpcId: " + rideClassId);
  3602. }
  3603. }
  3604.  
  3605. + @Override
  3606. + public void runImpl()
  3607. + {
  3608. +
  3609. + }
  3610. +
  3611. public int getMountType()
  3612. {
  3613. return _rideType;
  3614. @@ -38,10 +82,22 @@ public int getMountType()
  3615. @Override
  3616. protected final void writeImpl()
  3617. {
  3618. - writeC(0x86);
  3619. + writeC(0x8c);
  3620. writeD(_id);
  3621. writeD(_bRide);
  3622. writeD(_rideType);
  3623. writeD(_rideClassID);
  3624. + writeD(_x);
  3625. + writeD(_y);
  3626. + writeD(_z);
  3627. + }
  3628. +
  3629. + /* (non-Javadoc)
  3630. + * @see com.l2jmega.gameserver.serverpackets.ServerBasePacket#getType()
  3631. + */
  3632. + @Override
  3633. + public String getType()
  3634. + {
  3635. + return _S__8c_Ride;
  3636. }
  3637. -}
  3638. \ No newline at end of file
  3639. +}
  3640. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SSQStatus.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SSQStatus.java
  3641. index 7a503737..99acad12 100644
  3642. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SSQStatus.java
  3643. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SSQStatus.java
  3644. @@ -28,7 +28,7 @@ protected final void writeImpl()
  3645. final int totalDawnMembers = SevenSigns.getInstance().getTotalMembers(CabalType.DAWN);
  3646. final int totalDuskMembers = SevenSigns.getInstance().getTotalMembers(CabalType.DUSK);
  3647.  
  3648. - writeC(0xf5);
  3649. + writeC(0xfb);
  3650.  
  3651. writeC(_page);
  3652. writeC(SevenSigns.getInstance().getCurrentPeriod().ordinal());
  3653. @@ -68,8 +68,8 @@ protected final void writeImpl()
  3654. writeC(SevenSigns.getInstance().getPlayerCabal(_objectId).ordinal());
  3655. writeC(SevenSigns.getInstance().getPlayerSeal(_objectId).ordinal());
  3656.  
  3657. - writeD(SevenSigns.getInstance().getPlayerStoneContrib(_objectId)); // Seal Stones Turned-In
  3658. - writeD(SevenSigns.getInstance().getPlayerAdenaCollect(_objectId)); // Ancient Adena to Collect
  3659. + writeQ(SevenSigns.getInstance().getPlayerStoneContrib(_objectId)); // Seal Stones Turned-In
  3660. + writeQ(SevenSigns.getInstance().getPlayerAdenaCollect(_objectId)); // Ancient Adena to Collect
  3661.  
  3662. double dawnStoneScore = SevenSigns.getInstance().getCurrentStoneScore(CabalType.DAWN);
  3663. int dawnFestivalScore = SevenSigns.getInstance().getCurrentFestivalScore(CabalType.DAWN);
  3664. @@ -103,16 +103,16 @@ protected final void writeImpl()
  3665. }
  3666.  
  3667. /* DUSK */
  3668. - writeD(duskStoneScoreProp); // Seal Stone Score
  3669. - writeD(duskFestivalScore); // Festival Score
  3670. - writeD(duskTotalScore); // Total Score
  3671. + writeQ(duskStoneScoreProp); // Seal Stone Score
  3672. + writeQ(duskFestivalScore); // Festival Score
  3673. + writeQ(duskTotalScore); // Total Score
  3674.  
  3675. writeC(duskPercent); // Dusk %
  3676.  
  3677. /* DAWN */
  3678. - writeD(dawnStoneScoreProp); // Seal Stone Score
  3679. - writeD(dawnFestivalScore); // Festival Score
  3680. - writeD(dawnTotalScore); // Total Score
  3681. + writeQ(dawnStoneScoreProp); // Seal Stone Score
  3682. + writeQ(dawnFestivalScore); // Festival Score
  3683. + writeQ(dawnTotalScore); // Total Score
  3684.  
  3685. writeC(dawnPercent); // Dawn %
  3686. break;
  3687. @@ -133,7 +133,7 @@ protected final void writeImpl()
  3688. int dawnScore = SevenSignsFestival.getInstance().getHighestScore(CabalType.DAWN, festivalId);
  3689.  
  3690. // Dusk Score \\
  3691. - writeD(duskScore);
  3692. + writeQ(duskScore);
  3693.  
  3694. StatsSet highScoreData = SevenSignsFestival.getInstance().getHighestScoreData(CabalType.DUSK, festivalId);
  3695. String[] partyMembers = highScoreData.getString("members").split(",");
  3696. @@ -151,7 +151,7 @@ protected final void writeImpl()
  3697. }
  3698.  
  3699. // Dawn Score \\
  3700. - writeD(dawnScore);
  3701. + writeQ(dawnScore);
  3702.  
  3703. highScoreData = SevenSignsFestival.getInstance().getHighestScoreData(CabalType.DAWN, festivalId);
  3704. partyMembers = highScoreData.getString("members").split(",");
  3705. @@ -239,30 +239,30 @@ protected final void writeImpl()
  3706. {
  3707. case NORMAL:
  3708. writeC(CabalType.NORMAL.ordinal());
  3709. - writeH(SystemMessageId.COMPETITION_TIE_SEAL_NOT_AWARDED.getId());
  3710. + writeD(SystemMessageId.COMPETITION_TIE_SEAL_NOT_AWARDED.getId());
  3711. break;
  3712. case DAWN:
  3713. if (dawnPercent >= 35)
  3714. {
  3715. writeC(CabalType.DAWN.ordinal());
  3716. - writeH(SystemMessageId.SEAL_NOT_OWNED_35_MORE_VOTED.getId());
  3717. + writeD(SystemMessageId.SEAL_NOT_OWNED_35_MORE_VOTED.getId());
  3718. }
  3719. else
  3720. {
  3721. writeC(CabalType.NORMAL.ordinal());
  3722. - writeH(SystemMessageId.SEAL_NOT_OWNED_35_LESS_VOTED.getId());
  3723. + writeD(SystemMessageId.SEAL_NOT_OWNED_35_LESS_VOTED.getId());
  3724. }
  3725. break;
  3726. case DUSK:
  3727. if (duskPercent >= 35)
  3728. {
  3729. writeC(CabalType.DUSK.ordinal());
  3730. - writeH(SystemMessageId.SEAL_NOT_OWNED_35_MORE_VOTED.getId());
  3731. + writeD(SystemMessageId.SEAL_NOT_OWNED_35_MORE_VOTED.getId());
  3732. }
  3733. else
  3734. {
  3735. writeC(CabalType.NORMAL.ordinal());
  3736. - writeH(SystemMessageId.SEAL_NOT_OWNED_35_LESS_VOTED.getId());
  3737. + writeD(SystemMessageId.SEAL_NOT_OWNED_35_LESS_VOTED.getId());
  3738. }
  3739. break;
  3740. }
  3741. @@ -275,12 +275,12 @@ protected final void writeImpl()
  3742. if (dawnPercent >= 10)
  3743. {
  3744. writeC(CabalType.DAWN.ordinal());
  3745. - writeH(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
  3746. + writeD(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
  3747. }
  3748. else
  3749. {
  3750. writeC(CabalType.NORMAL.ordinal());
  3751. - writeH(SystemMessageId.COMPETITION_TIE_SEAL_NOT_AWARDED.getId());
  3752. + writeD(SystemMessageId.COMPETITION_TIE_SEAL_NOT_AWARDED.getId());
  3753. }
  3754. break;
  3755.  
  3756. @@ -288,12 +288,12 @@ protected final void writeImpl()
  3757. if (dawnPercent >= 10)
  3758. {
  3759. writeC(sealOwner.ordinal());
  3760. - writeH(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
  3761. + writeD(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
  3762. }
  3763. else
  3764. {
  3765. writeC(CabalType.NORMAL.ordinal());
  3766. - writeH(SystemMessageId.SEAL_OWNED_10_LESS_VOTED.getId());
  3767. + writeD(SystemMessageId.SEAL_OWNED_10_LESS_VOTED.getId());
  3768. }
  3769. break;
  3770.  
  3771. @@ -301,17 +301,17 @@ protected final void writeImpl()
  3772. if (duskPercent >= 35)
  3773. {
  3774. writeC(CabalType.DUSK.ordinal());
  3775. - writeH(SystemMessageId.SEAL_NOT_OWNED_35_MORE_VOTED.getId());
  3776. + writeD(SystemMessageId.SEAL_NOT_OWNED_35_MORE_VOTED.getId());
  3777. }
  3778. else if (dawnPercent >= 10)
  3779. {
  3780. writeC(CabalType.DAWN.ordinal());
  3781. - writeH(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
  3782. + writeD(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
  3783. }
  3784. else
  3785. {
  3786. writeC(CabalType.NORMAL.ordinal());
  3787. - writeH(SystemMessageId.SEAL_OWNED_10_LESS_VOTED.getId());
  3788. + writeD(SystemMessageId.SEAL_OWNED_10_LESS_VOTED.getId());
  3789. }
  3790. break;
  3791. }
  3792. @@ -324,12 +324,12 @@ else if (dawnPercent >= 10)
  3793. if (duskPercent >= 10)
  3794. {
  3795. writeC(CabalType.DUSK.ordinal());
  3796. - writeH(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
  3797. + writeD(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
  3798. }
  3799. else
  3800. {
  3801. writeC(CabalType.NORMAL.ordinal());
  3802. - writeH(SystemMessageId.COMPETITION_TIE_SEAL_NOT_AWARDED.getId());
  3803. + writeD(SystemMessageId.COMPETITION_TIE_SEAL_NOT_AWARDED.getId());
  3804. }
  3805. break;
  3806.  
  3807. @@ -337,17 +337,17 @@ else if (dawnPercent >= 10)
  3808. if (dawnPercent >= 35)
  3809. {
  3810. writeC(CabalType.DAWN.ordinal());
  3811. - writeH(SystemMessageId.SEAL_NOT_OWNED_35_MORE_VOTED.getId());
  3812. + writeD(SystemMessageId.SEAL_NOT_OWNED_35_MORE_VOTED.getId());
  3813. }
  3814. else if (duskPercent >= 10)
  3815. {
  3816. writeC(sealOwner.ordinal());
  3817. - writeH(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
  3818. + writeD(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
  3819. }
  3820. else
  3821. {
  3822. writeC(CabalType.NORMAL.ordinal());
  3823. - writeH(SystemMessageId.SEAL_OWNED_10_LESS_VOTED.getId());
  3824. + writeD(SystemMessageId.SEAL_OWNED_10_LESS_VOTED.getId());
  3825. }
  3826. break;
  3827.  
  3828. @@ -355,12 +355,12 @@ else if (duskPercent >= 10)
  3829. if (duskPercent >= 10)
  3830. {
  3831. writeC(sealOwner.ordinal());
  3832. - writeH(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
  3833. + writeD(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
  3834. }
  3835. else
  3836. {
  3837. writeC(CabalType.NORMAL.ordinal());
  3838. - writeH(SystemMessageId.SEAL_OWNED_10_LESS_VOTED.getId());
  3839. + writeD(SystemMessageId.SEAL_OWNED_10_LESS_VOTED.getId());
  3840. }
  3841. break;
  3842. }
  3843. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SellList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SellList.java
  3844. index 1133799b..993cae75 100644
  3845. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SellList.java
  3846. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SellList.java
  3847. @@ -18,24 +18,42 @@ public SellList(int adena, List<ItemInstance> items)
  3848. @Override
  3849. protected final void writeImpl()
  3850. {
  3851. - writeC(0x10);
  3852. - writeD(_money);
  3853. - writeD(0x00);
  3854. + writeC(0xFE);
  3855. + writeH(0xB7);
  3856. + writeD(0x01);
  3857. writeH(_items.size());
  3858.  
  3859. for (ItemInstance item : _items)
  3860. {
  3861. - writeH(item.getItem().getType1());
  3862. - writeD(item.getObjectId());
  3863. - writeD(item.getItemId());
  3864. - writeD(item.getCount());
  3865. - writeH(item.getItem().getType2());
  3866. - writeH(item.getCustomType1());
  3867. - writeD(item.getItem().getBodyPart());
  3868. - writeH(item.getEnchantLevel());
  3869. - writeH(item.getCustomType2());
  3870. - writeH(0x00);
  3871. - writeD(item.getItem().getReferencePrice() / 2);
  3872. + writeD(item.getObjectId());
  3873. + writeD(item.getItemId());
  3874. + writeD(item.getItem().getBodyPart());
  3875. + writeQ((item.getCount() < 0) ? 0 : item.getCount());
  3876. + writeH(item.getItem().getType2());
  3877. + writeH(0x00);
  3878. + writeH(0x00);
  3879. + writeD(item.getItem().getBodyPart());
  3880. + writeH(0x00);
  3881. + writeH(0x00);
  3882. +
  3883. + writeD(0x00);
  3884. + writeD(-1);
  3885. + writeD(-9999);
  3886. +
  3887. + writeH(0x00);
  3888. + writeH(0x00);
  3889. + for (byte i = 0; i < 6; i++)
  3890. + {
  3891. + writeH(0x00);
  3892. + }
  3893. +
  3894. + // Enchant Effects
  3895. + writeH(0x00);
  3896. + writeH(0x00);
  3897. + writeH(0x00);
  3898. + writeQ(item.getItem().getReferencePrice() / 2);
  3899. }
  3900. + writeH(0x00);
  3901. + writeC(0x01);
  3902. }
  3903. }
  3904. \ No newline at end of file
  3905. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SellListProcure.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SellListProcure.java
  3906. index 697786ac..40ca933d 100644
  3907. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SellListProcure.java
  3908. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SellListProcure.java
  3909. @@ -30,8 +30,8 @@ public SellListProcure(Player player, int castleId)
  3910. @Override
  3911. protected final void writeImpl()
  3912. {
  3913. - writeC(0xE9);
  3914. - writeD(_money);
  3915. + writeC(0xEF);
  3916. + writeQ(_money);
  3917. writeD(0x00);
  3918. writeH(_sellList.size());
  3919.  
  3920. @@ -42,10 +42,10 @@ protected final void writeImpl()
  3921. writeH(item.getItem().getType1());
  3922. writeD(item.getObjectId());
  3923. writeD(item.getItemId());
  3924. - writeD(itemEntry.getValue());
  3925. + writeQ(itemEntry.getValue());
  3926. writeH(item.getItem().getType2());
  3927. writeH(0);
  3928. - writeD(0);
  3929. + writeQ(0);
  3930. }
  3931. }
  3932. }
  3933. \ No newline at end of file
  3934. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SendTradeDone.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SendTradeDone.java
  3935. index 79c4ecc9..9d18e4f2 100644
  3936. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SendTradeDone.java
  3937. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SendTradeDone.java
  3938. @@ -12,7 +12,7 @@ public SendTradeDone(int num)
  3939. @Override
  3940. protected final void writeImpl()
  3941. {
  3942. - writeC(0x22);
  3943. + writeC(0x1c);
  3944. writeD(_num);
  3945. }
  3946. }
  3947. \ No newline at end of file
  3948. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SendTradeRequest.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SendTradeRequest.java
  3949. index 1ae4bb5a..ea49b57b 100644
  3950. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SendTradeRequest.java
  3951. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SendTradeRequest.java
  3952. @@ -12,7 +12,7 @@ public SendTradeRequest(int senderID)
  3953. @Override
  3954. protected final void writeImpl()
  3955. {
  3956. - writeC(0x5e);
  3957. + writeC(0x70);
  3958. writeD(_senderID);
  3959. }
  3960. }
  3961. \ No newline at end of file
  3962. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ShopPreviewInfo.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ShopPreviewInfo.java
  3963. index 0135758e..7280892a 100644
  3964. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ShopPreviewInfo.java
  3965. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ShopPreviewInfo.java
  3966. @@ -22,14 +22,18 @@ public ShopPreviewInfo(Map<Integer, Integer> itemlist)
  3967. @Override
  3968. protected final void writeImpl()
  3969. {
  3970. - writeC(0xf0);
  3971. - writeD(Inventory.PAPERDOLL_TOTALSLOTS);
  3972. + writeC(0xf6);
  3973. + writeD(29); //totalslots
  3974. + //writeD(Inventory.PAPERDOLL_TOTALSLOTS);
  3975. // Slots
  3976. + writeD(0x00); //under
  3977. writeD(getFromList(Inventory.PAPERDOLL_REAR)); // unverified
  3978. writeD(getFromList(Inventory.PAPERDOLL_LEAR)); // unverified
  3979. + //writeD(0x00); //lrear
  3980. writeD(getFromList(Inventory.PAPERDOLL_NECK)); // unverified
  3981. writeD(getFromList(Inventory.PAPERDOLL_RFINGER)); // unverified
  3982. writeD(getFromList(Inventory.PAPERDOLL_LFINGER)); // unverified
  3983. + // writeD(0x00); //lrfinger
  3984. writeD(getFromList(Inventory.PAPERDOLL_HEAD)); // unverified
  3985. writeD(getFromList(Inventory.PAPERDOLL_RHAND)); // good
  3986. writeD(getFromList(Inventory.PAPERDOLL_LHAND)); // good
  3987. @@ -38,10 +42,23 @@ protected final void writeImpl()
  3988. writeD(getFromList(Inventory.PAPERDOLL_LEGS)); // good
  3989. writeD(getFromList(Inventory.PAPERDOLL_FEET)); // good
  3990. writeD(getFromList(Inventory.PAPERDOLL_BACK)); // unverified
  3991. + writeD(getFromList(Inventory.PAPERDOLL_RHAND)); //lrhand
  3992. + writeD(0x00); //fullarmor
  3993. writeD(getFromList(Inventory.PAPERDOLL_FACE)); // unverified
  3994. + writeD(0x00); //alldress
  3995. writeD(getFromList(Inventory.PAPERDOLL_HAIR)); // unverified
  3996. writeD(getFromList(Inventory.PAPERDOLL_HAIRALL)); // unverified
  3997. - writeD(getFromList(Inventory.PAPERDOLL_UNDER)); // unverified
  3998. + writeD(0x00); //rbracelet
  3999. + writeD(0x00); //lbracelet
  4000. + writeD(0x00); //decos
  4001. + writeD(0x00);
  4002. + writeD(0x00);
  4003. + writeD(0x00);
  4004. + writeD(0x00);
  4005. + writeD(0x00);
  4006. + writeD(0x00);//belt
  4007. + writeD(0x00);
  4008. + //writeD(getFromList(Inventory.PAPERDOLL_UNDER)); // unverified
  4009. }
  4010.  
  4011. private int getFromList(int key)
  4012. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ShopPreviewList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ShopPreviewList.java
  4013. index d2b83c63..9e003f31 100644
  4014. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ShopPreviewList.java
  4015. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ShopPreviewList.java
  4016. @@ -25,12 +25,12 @@ public ShopPreviewList(NpcBuyList list, int currentMoney, int expertiseIndex)
  4017. @Override
  4018. protected final void writeImpl()
  4019. {
  4020. - writeC(0xef);
  4021. + writeC(0xf5);
  4022. writeC(0xc0); // ?
  4023. writeC(0x13); // ?
  4024. writeC(0x00); // ?
  4025. writeC(0x00); // ?
  4026. - writeD(_money); // current money
  4027. + writeQ(_money); // current money
  4028. writeD(_listId);
  4029.  
  4030. int newlength = 0;
  4031. @@ -49,11 +49,12 @@ protected final void writeImpl()
  4032. writeH(product.getItem().getType2()); // item type2
  4033.  
  4034. if (product.getItem().getType1() != Item.TYPE1_ITEM_QUESTITEM_ADENA)
  4035. + //writeH(product.getItem().getBodyPart()); // slot
  4036. writeH(product.getItem().getBodyPart()); // slot
  4037. else
  4038. writeH(0x00); // slot
  4039.  
  4040. - writeD(Config.WEAR_PRICE);
  4041. + writeQ(Config.WEAR_PRICE);
  4042. }
  4043. }
  4044. }
  4045. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ShortCutInit.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ShortCutInit.java
  4046. index a70c433e..16cde98c 100644
  4047. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ShortCutInit.java
  4048. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ShortCutInit.java
  4049. @@ -32,51 +32,14 @@ protected final void writeImpl()
  4050. {
  4051. case L2ShortCut.TYPE_ITEM: // 1
  4052. writeD(sc.getId());
  4053. - writeD(sc.getCharacterType());
  4054. - writeD(sc.getSharedReuseGroup());
  4055. -
  4056. - if (sc.getSharedReuseGroup() < 0)
  4057. - {
  4058. - writeD(0x00); // Remaining time
  4059. - writeD(0x00); // Cooldown time
  4060. - }
  4061. - else
  4062. - {
  4063. - final ItemInstance item = _activeChar.getInventory().getItemByObjectId(sc.getId());
  4064. - if (item == null || !item.isEtcItem())
  4065. - {
  4066. - writeD(0x00); // Remaining time
  4067. - writeD(0x00); // Cooldown time
  4068. - }
  4069. - else
  4070. - {
  4071. - final IntIntHolder[] skills = item.getEtcItem().getSkills();
  4072. - if (skills == null)
  4073. - {
  4074. - writeD(0x00); // Remaining time
  4075. - writeD(0x00); // Cooldown time
  4076. - }
  4077. - else
  4078. - {
  4079. - for (IntIntHolder skillInfo : skills)
  4080. - {
  4081. - final L2Skill itemSkill = skillInfo.getSkill();
  4082. - if (_activeChar.getReuseTimeStamp().containsKey(itemSkill.getReuseHashCode()))
  4083. - {
  4084. - writeD((int) (_activeChar.getReuseTimeStamp().get(itemSkill.getReuseHashCode()).getRemaining() / 1000L));
  4085. - writeD((int) (itemSkill.getReuseDelay() / 1000L));
  4086. - }
  4087. - else
  4088. - {
  4089. - writeD(0x00); // Remaining time
  4090. - writeD(0x00); // Cooldown time
  4091. - }
  4092. - }
  4093. - }
  4094. - }
  4095. - }
  4096. -
  4097. - writeD(0x00); // Augmentation
  4098. + writeD(0x01);
  4099. + writeD(-1);
  4100. + writeD(0x00);
  4101. + writeD(0x00);
  4102. + writeH(0x00);
  4103. + writeH(0x00);
  4104. + //writeD(sc.getCharacterType());
  4105. + //writeD(sc.getSharedReuseGroup());
  4106. break;
  4107.  
  4108. case L2ShortCut.TYPE_SKILL: // 2
  4109. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SystemMessage.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SystemMessage.java
  4110. index 5615ae9d..1408fba9 100644
  4111. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SystemMessage.java
  4112. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SystemMessage.java
  4113. @@ -111,6 +111,11 @@ public final SystemMessage addItemNumber(final int number)
  4114. append(new SMParam(TYPE_ITEM_NUMBER, number));
  4115. return this;
  4116. }
  4117. + public final SystemMessage addItemNumberL(final long number)
  4118. + {
  4119. + append(new SMParam(TYPE_ITEM_NUMBER, number));
  4120. + return this;
  4121. + }
  4122.  
  4123. public final SystemMessage addCharName(final Creature cha)
  4124. {
  4125. @@ -168,7 +173,7 @@ public final SystemMessageId getSystemMessageId()
  4126. @Override
  4127. protected final void writeImpl()
  4128. {
  4129. - writeC(0x64);
  4130. + writeC(0x62);
  4131.  
  4132. writeD(_smId.getId());
  4133. writeD(_paramIndex);
  4134. @@ -186,6 +191,9 @@ protected final void writeImpl()
  4135. break;
  4136.  
  4137. case TYPE_ITEM_NUMBER:
  4138. + writeQ((Integer) param.getObject());
  4139. + break;
  4140. +
  4141. case TYPE_ITEM_NAME:
  4142. case TYPE_CASTLE_NAME:
  4143. case TYPE_NUMBER:
  4144. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeItemUpdate.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeItemUpdate.java
  4145. index c2af70db..2f0c47c0 100644
  4146. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeItemUpdate.java
  4147. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeItemUpdate.java
  4148. @@ -1,22 +1,20 @@
  4149. package com.l2jmega.gameserver.network.serverpackets;
  4150.  
  4151. -import java.util.List;
  4152. import java.util.Set;
  4153.  
  4154. import com.l2jmega.gameserver.model.actor.instance.Player;
  4155. import com.l2jmega.gameserver.model.item.instance.ItemInstance;
  4156. import com.l2jmega.gameserver.model.tradelist.TradeItem;
  4157. -import com.l2jmega.gameserver.model.tradelist.TradeList;
  4158.  
  4159. public class TradeItemUpdate extends L2GameServerPacket
  4160. {
  4161. private final Set<ItemInstance> _items;
  4162. - private final List<TradeItem> _currentTrade;
  4163. + private final TradeItem _item;
  4164.  
  4165. - public TradeItemUpdate(TradeList trade, Player activeChar)
  4166. + public TradeItemUpdate(TradeItem item, Player activeChar)
  4167. {
  4168. _items = activeChar.getInventory().getItems();
  4169. - _currentTrade = trade.getItems();
  4170. + _item = item;
  4171. }
  4172.  
  4173. private int getItemCount(int objectId)
  4174. @@ -31,31 +29,28 @@ private int getItemCount(int objectId)
  4175. @Override
  4176. protected final void writeImpl()
  4177. {
  4178. - writeC(0x74);
  4179. - writeH(_currentTrade.size());
  4180. -
  4181. - for (TradeItem item : _currentTrade)
  4182. + writeC(0x81);
  4183. + writeH(1);
  4184. +
  4185. + int availableCount = getItemCount(_item.getObjectId()) - _item.getCount();
  4186. + boolean stackable = _item.getItem().isStackable();
  4187. +
  4188. + if (availableCount == 0)
  4189. {
  4190. - int availableCount = getItemCount(item.getObjectId()) - item.getCount();
  4191. - boolean stackable = item.getItem().isStackable();
  4192. -
  4193. - if (availableCount == 0)
  4194. - {
  4195. - availableCount = 1;
  4196. - stackable = false;
  4197. - }
  4198. -
  4199. + availableCount = 1;
  4200. + stackable = false;
  4201. + }
  4202. +
  4203. writeH(stackable ? 3 : 2);
  4204. - writeH(item.getItem().getType1());
  4205. - writeD(item.getObjectId());
  4206. - writeD(item.getItem().getItemId());
  4207. - writeD(availableCount);
  4208. - writeH(item.getItem().getType2());
  4209. + writeH(_item.getItem().getType1());
  4210. + writeD(_item.getObjectId());
  4211. + writeD(_item.getItem().getItemId());
  4212. + writeQ(availableCount);
  4213. + writeH(_item.getItem().getType2());
  4214. writeH(0x00);
  4215. - writeD(item.getItem().getBodyPart());
  4216. - writeH(item.getEnchant());
  4217. + writeQ(_item.getItem().getBodyPart());
  4218. + writeH(_item.getEnchant());
  4219. writeH(0x00);
  4220. writeH(0x00);
  4221. - }
  4222. }
  4223. }
  4224. \ No newline at end of file
  4225. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeOtherAdd.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeOtherAdd.java
  4226. index eb4d1550..8dbdff19 100644
  4227. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeOtherAdd.java
  4228. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeOtherAdd.java
  4229. @@ -17,14 +17,14 @@ public TradeOtherAdd(TradeItem item)
  4230. @Override
  4231. protected final void writeImpl()
  4232. {
  4233. - writeC(0x21);
  4234. + writeC(0x1b);
  4235.  
  4236. writeH(1); // item count
  4237.  
  4238. writeH(_item.getItem().getType1()); // item type1
  4239. writeD(_item.getObjectId());
  4240. writeD(_item.getItem().getItemId());
  4241. - writeD(_item.getCount());
  4242. + writeQ(_item.getCount());
  4243. writeH(_item.getItem().getType2()); // item type2
  4244. writeH(0x00); // ?
  4245.  
  4246. @@ -32,5 +32,14 @@ protected final void writeImpl()
  4247. writeH(_item.getEnchant()); // enchant level
  4248. writeH(0x00); // ?
  4249. writeH(0x00);
  4250. + //t1
  4251. + writeH(0x00);
  4252. + writeH(0x00);
  4253. + writeH(0x00);
  4254. + writeH(0x00);
  4255. + writeH(0x00);
  4256. + writeH(0x00);
  4257. + writeH(0x00);
  4258. + writeH(0x00);
  4259. }
  4260. }
  4261. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeOwnAdd.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeOwnAdd.java
  4262. index 7c46dc3e..04ecf3ae 100644
  4263. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeOwnAdd.java
  4264. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeOwnAdd.java
  4265. @@ -14,14 +14,14 @@ public TradeOwnAdd(TradeItem item)
  4266. @Override
  4267. protected final void writeImpl()
  4268. {
  4269. - writeC(0x20);
  4270. + writeC(0x1a);
  4271.  
  4272. writeH(1); // item count
  4273.  
  4274. writeH(_item.getItem().getType1());
  4275. writeD(_item.getObjectId());
  4276. writeD(_item.getItem().getItemId());
  4277. - writeD(_item.getCount());
  4278. + writeQ(_item.getCount());
  4279. writeH(_item.getItem().getType2());
  4280. writeH(0x00); // ?
  4281.  
  4282. @@ -29,5 +29,14 @@ protected final void writeImpl()
  4283. writeH(_item.getEnchant());
  4284. writeH(0x00); // ?
  4285. writeH(0x00);
  4286. + //t1
  4287. + writeH(0x00);
  4288. + writeH(0x00);
  4289. + writeH(0x00);
  4290. + writeH(0x00);
  4291. + writeH(0x00);
  4292. + writeH(0x00);
  4293. + writeH(0x00);
  4294. + writeH(0x00);
  4295. }
  4296. }
  4297. \ No newline at end of file
  4298. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradePressOtherOk.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradePressOtherOk.java
  4299. index b6e3e9da..7dff791c 100644
  4300. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradePressOtherOk.java
  4301. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradePressOtherOk.java
  4302. @@ -11,6 +11,6 @@ private TradePressOtherOk()
  4303. @Override
  4304. protected void writeImpl()
  4305. {
  4306. - writeC(0x7c);
  4307. + writeC(0x82);
  4308. }
  4309. }
  4310. \ No newline at end of file
  4311. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradePressOwnOk.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradePressOwnOk.java
  4312. index 17e34c05..7fde7165 100644
  4313. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradePressOwnOk.java
  4314. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradePressOwnOk.java
  4315. @@ -11,6 +11,6 @@ private TradePressOwnOk()
  4316. @Override
  4317. protected void writeImpl()
  4318. {
  4319. - writeC(0x75);
  4320. + writeC(0x53);
  4321. }
  4322. }
  4323. \ No newline at end of file
  4324. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeStart.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeStart.java
  4325. index 20969d83..3b298099 100644
  4326. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeStart.java
  4327. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeStart.java
  4328. @@ -11,11 +11,12 @@ public class TradeStart extends L2GameServerPacket
  4329. {
  4330. private final Player _activeChar;
  4331. private final ItemInstance[] _itemList;
  4332. + //private long qcount;
  4333.  
  4334. public TradeStart(Player player)
  4335. {
  4336. _activeChar = player;
  4337. - _itemList = player.getInventory().getAvailableItems(true, false);
  4338. + _itemList = player.getInventory().getAvailableItems(true, false, false);
  4339. }
  4340.  
  4341. @Override
  4342. @@ -24,7 +25,7 @@ protected final void writeImpl()
  4343. if (_activeChar.getActiveTradeList() == null || _activeChar.getActiveTradeList().getPartner() == null)
  4344. return;
  4345.  
  4346. - writeC(0x1E);
  4347. + writeC(0x14);
  4348. writeD(_activeChar.getActiveTradeList().getPartner().getObjectId());
  4349. writeH(_itemList.length);
  4350.  
  4351. @@ -35,16 +36,32 @@ protected final void writeImpl()
  4352.  
  4353. Item item = temp.getItem();
  4354.  
  4355. - writeH(item.getType1());
  4356. writeD(temp.getObjectId());
  4357. writeD(temp.getItemId());
  4358. - writeD(temp.getCount());
  4359. + writeD(0x00);
  4360. + //writeD(item.getBodyPart());
  4361. + writeQ(temp.getCount());
  4362. writeH(item.getType2());
  4363. - writeH(temp.getCustomType1());
  4364. + writeH(0x00);
  4365. + writeH(0x00);
  4366. writeD(item.getBodyPart());
  4367. writeH(temp.getEnchantLevel());
  4368. writeH(temp.getCustomType2());
  4369. +
  4370. + writeD(0x00); // Augment
  4371. + writeD(-1); // Mana
  4372. + writeD(-9999); // Time
  4373. + writeH(0x00);
  4374. writeH(0x00);
  4375. + for (byte i = 0; i < 6; i++)
  4376. + {
  4377. + writeH(0x00);
  4378. + }
  4379. + // Enchant Effects
  4380. + writeH(0x00);
  4381. + writeH(0x00);
  4382. + writeH(0x00);
  4383. +
  4384. }
  4385. }
  4386. }
  4387. \ No newline at end of file
  4388. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/WarehouseDepositList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/WarehouseDepositList.java
  4389. index 43395b4c..8eb20763 100644
  4390. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/WarehouseDepositList.java
  4391. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/WarehouseDepositList.java
  4392. @@ -25,7 +25,7 @@ public WarehouseDepositList(Player player, int type)
  4393. _items = new ArrayList<>();
  4394.  
  4395. final boolean isPrivate = _whType == PRIVATE;
  4396. - for (ItemInstance temp : player.getInventory().getAvailableItems(true, isPrivate))
  4397. + for (ItemInstance temp : player.getInventory().getAvailableItems(true, isPrivate, false))
  4398. {
  4399. if (temp != null && temp.isDepositable(isPrivate))
  4400. _items.add(temp);
  4401. @@ -37,7 +37,7 @@ protected final void writeImpl()
  4402. {
  4403. writeC(0x41);
  4404. writeH(_whType);
  4405. - writeD(_playerAdena);
  4406. + writeQ(_playerAdena);
  4407. writeH(_items.size());
  4408.  
  4409. for (ItemInstance temp : _items)
  4410. @@ -47,24 +47,42 @@ protected final void writeImpl()
  4411.  
  4412. Item item = temp.getItem();
  4413.  
  4414. - writeH(item.getType1());
  4415. + //writeH(item.getType1());
  4416. writeD(temp.getObjectId());
  4417. writeD(temp.getItemId());
  4418. - writeD(temp.getCount());
  4419. + writeD(0x00);
  4420. + //writeD(item.getBodyPart());
  4421. + writeQ(temp.getCount());
  4422. writeH(item.getType2());
  4423. writeH(temp.getCustomType1());
  4424. + writeH(0x00);
  4425. writeD(item.getBodyPart());
  4426. writeH(temp.getEnchantLevel());
  4427. writeH(temp.getCustomType2());
  4428. - writeH(0x00);
  4429. - writeD(temp.getObjectId());
  4430. +
  4431. if (temp.isAugmented())
  4432. {
  4433. - writeD(0x0000FFFF & temp.getAugmentation().getAugmentationId());
  4434. - writeD(temp.getAugmentation().getAugmentationId() >> 16);
  4435. + //writeD(0x0000FFFF & temp.getAugmentation().getAugmentationId());
  4436. + //writeD(temp.getAugmentation().getAugmentationId() >> 16);
  4437. + writeD(temp.getAugmentation().getAugmentationId());
  4438. }
  4439. else
  4440. - writeQ(0x00);
  4441. + writeD(0x00);
  4442. +
  4443. + writeD(0x00);
  4444. + writeD(0x00);
  4445. +
  4446. + writeH(0x00);
  4447. + writeH(0x00);
  4448. + for (byte i = 0; i < 6; i++)
  4449. + {
  4450. + writeH(0x00);
  4451. + }
  4452. + // Enchant Effects
  4453. + writeH(0x00);
  4454. + writeH(0x00);
  4455. + writeH(0x00);
  4456. + writeD(temp.getObjectId());
  4457. }
  4458. _items.clear();
  4459. }
  4460. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/WarehouseWithdrawList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/WarehouseWithdrawList.java
  4461. index 7adc533b..58603dcd 100644
  4462. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/WarehouseWithdrawList.java
  4463. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/WarehouseWithdrawList.java
  4464. @@ -32,31 +32,52 @@ protected final void writeImpl()
  4465. {
  4466. writeC(0x42);
  4467. writeH(_whType);
  4468. - writeD(_playerAdena);
  4469. + writeQ(_playerAdena);
  4470. writeH(_items.size());
  4471.  
  4472. for (ItemInstance temp : _items)
  4473. {
  4474. Item item = temp.getItem();
  4475.  
  4476. - writeH(item.getType1());
  4477. + //writeH(item.getType1());
  4478. writeD(temp.getObjectId());
  4479. writeD(temp.getItemId());
  4480. - writeD(temp.getCount());
  4481. + writeD(0x00);
  4482. + //writeD(item.getBodyPart());
  4483. + writeQ(temp.getCount());
  4484. writeH(item.getType2());
  4485. writeH(temp.getCustomType1());
  4486. + writeH(0x00);
  4487. writeD(item.getBodyPart());
  4488. writeH(temp.getEnchantLevel());
  4489. writeH(temp.getCustomType2());
  4490. - writeH(0x00);
  4491. - writeD(temp.getObjectId());
  4492. +
  4493. +
  4494. + //writeD(temp.getObjectId());
  4495. +
  4496. if (temp.isAugmented())
  4497. {
  4498. - writeD(0x0000FFFF & temp.getAugmentation().getAugmentationId());
  4499. - writeD(temp.getAugmentation().getAugmentationId() >> 16);
  4500. + //writeD(0x0000FFFF & temp.getAugmentation().getAugmentationId());
  4501. + //writeD(temp.getAugmentation().getAugmentationId() >> 16);
  4502. + writeD(temp.getAugmentation().getAugmentationId());
  4503. }
  4504. else
  4505. - writeQ(0x00);
  4506. + writeD(0x00);
  4507. +
  4508. + writeD(0x00);
  4509. + writeD(0x00);
  4510. +
  4511. + writeH(0x00);
  4512. + writeH(0x00);
  4513. + for (byte i = 0; i < 6; i++)
  4514. + {
  4515. + writeH(0x00);
  4516. + }
  4517. + // Enchant Effects
  4518. + writeH(0x00);
  4519. + writeH(0x00);
  4520. + writeH(0x00);
  4521. + writeD(temp.getObjectId());
  4522. }
  4523. }
  4524. }
  4525. \ No newline at end of file
Add Comment
Please, Sign In to add comment