Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- index fb0a4c2e..9ff755e7 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java
- @@ -133,7 +133,8 @@ else if (player.getInventory().getItemByItemId(e.getItemId()) == null)
- // this happens if 1 list entry has the same ingredient twice (example 2 swords = 1 dual)
- if (ex.getItemId() == e.getItemId() && ex.getEnchantLevel() == e.getEnchantLevel())
- {
- - if (ex.getItemCount() + e.getItemCount() > Integer.MAX_VALUE)
- + //if (ex.getItemCount() + e.getItemCount() > Integer.MAX_VALUE)
- + if (ex.getItemCount() > Integer.MAX_VALUE - e.getItemCount())
- {
- player.sendPacket(SystemMessageId.YOU_HAVE_EXCEEDED_QUANTITY_THAT_CAN_BE_INPUTTED);
- return;
- @@ -157,7 +158,8 @@ else if (player.getInventory().getItemByItemId(e.getItemId()) == null)
- // now check if the player has sufficient items in the inventory to cover the ingredients' expences
- for (Ingredient e : ingredientsList)
- {
- - if (e.getItemCount() * _amount > Integer.MAX_VALUE)
- + //if (e.getItemCount() * _amount > Integer.MAX_VALUE)
- + if (e.getItemCount() > Integer.MAX_VALUE / _amount)
- {
- player.sendPacket(SystemMessageId.YOU_HAVE_EXCEEDED_QUANTITY_THAT_CAN_BE_INPUTTED);
- return;
- @@ -326,7 +328,7 @@ else if (player.getInventory().getItemByItemId(e.getItemId()) == null)
- }
- }
- player.sendPacket(new ItemList(player, false));
- -
- +
- // All ok, send success message, remove items and add final product
- player.sendPacket(SystemMessageId.SUCCESSFULLY_TRADED_WITH_NPC);
- 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
- index 93469994..2851e9e3 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/NewCharacter.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/NewCharacter.java
- @@ -2,6 +2,7 @@
- import com.l2jmega.gameserver.data.xml.PlayerData;
- import com.l2jmega.gameserver.model.base.ClassId;
- +import com.l2jmega.gameserver.network.serverpackets.NewCharacterSuccess;
- import com.l2jmega.gameserver.network.serverpackets.CharTemplates;
- public final class NewCharacter extends L2GameClientPacket
- @@ -14,7 +15,8 @@ protected void readImpl()
- @Override
- protected void runImpl()
- {
- - CharTemplates ct = new CharTemplates();
- + // CharTemplates ct = new CharTemplates();
- + NewCharacterSuccess ct = new NewCharacterSuccess();
- ct.addChar(PlayerData.getInstance().getTemplate(0));
- ct.addChar(PlayerData.getInstance().getTemplate(ClassId.HUMAN_FIGHTER));
- 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
- index 4eb84a50..2953c52a 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/ProtocolVersion.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/ProtocolVersion.java
- @@ -16,9 +16,12 @@ protected void readImpl()
- @Override
- protected void runImpl()
- {
- - if (_version != 746)
- + if (_version != 216)
- + {
- + // getClient().sendPacket(new KeyPacket(getClient().enableCrypt(),0));
- getClient().close((L2GameServerPacket) null);
- + }
- else
- - getClient().sendPacket(new KeyPacket(getClient().enableCrypt()));
- + getClient().sendPacket(new KeyPacket(getClient().enableCrypt(),1));
- }
- }
- \ No newline at end of file
- 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
- index 02c3c360..373a039b 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestActionUse.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestActionUse.java
- @@ -19,6 +19,7 @@
- import com.l2jmega.gameserver.model.location.Location;
- import com.l2jmega.gameserver.network.SystemMessageId;
- import com.l2jmega.gameserver.network.serverpackets.ActionFailed;
- +import com.l2jmega.gameserver.network.serverpackets.SocialAction;
- import com.l2jmega.gameserver.network.serverpackets.NpcSay;
- public final class RequestActionUse extends L2GameClientPacket
- @@ -330,7 +331,9 @@ else if (pet.isAttackingNow() || pet.isInCombat())
- case 61: // Private Store Package Sell
- player.tryOpenPrivateSellStore(true);
- break;
- -
- + case 65:
- +
- + break;
- case 1000: // Siege Golem - Siege Hammer
- if (!(target instanceof Door))
- {
- @@ -457,6 +460,50 @@ else if (pet.isAttackingNow() || pet.isInCombat())
- useSkill(5111, target);
- break;
- + //CT2.3 Social Packets
- + case 12:
- + tryBroadcastSocial(2);
- + break;
- + case 13:
- + tryBroadcastSocial(3);
- + break;
- + case 14:
- + tryBroadcastSocial(4);
- + break;
- + case 24:
- + tryBroadcastSocial(6);
- + break;
- + case 25:
- + tryBroadcastSocial(5);
- + break;
- + case 26:
- + tryBroadcastSocial(7);
- + break;
- + case 29:
- + tryBroadcastSocial(8);
- + break;
- + case 30:
- + tryBroadcastSocial(9);
- + break;
- + case 31:
- + tryBroadcastSocial(10);
- + break;
- + case 33:
- + tryBroadcastSocial(11);
- + break;
- + case 34:
- + tryBroadcastSocial(12);
- + break;
- + case 35:
- + tryBroadcastSocial(13);
- + break;
- + case 62:
- + tryBroadcastSocial(14);
- + break;
- + case 66:
- + tryBroadcastSocial(15);
- + break;
- +
- default:
- LOGGER.warn("Unhandled action type {} detected for {}.", _actionId, player.getName());
- @@ -507,4 +554,25 @@ private boolean useSkill(int skillId, WorldObject target)
- activeSummon.setTarget(target);
- return activeSummon.useMagic(skill, _ctrlPressed, _shiftPressed);
- }
- +
- + private void tryBroadcastSocial(int id)
- + {
- + final Player activeChar = getClient().getActiveChar();
- + if (activeChar == null)
- + return;
- +
- + if (activeChar.isFishing())
- + {
- + activeChar.sendPacket(SystemMessageId.CANNOT_DO_WHILE_FISHING_3);
- + return;
- + }
- +
- + //if (_actionId < 2 || _actionId > 13)
- + // return;
- +
- + if (activeChar.isInStoreMode() || activeChar.getActiveRequester() != null || activeChar.isAlikeDead() || activeChar.getAI().getIntention() != CtrlIntention.IDLE)
- + return;
- +
- + activeChar.broadcastPacket(new SocialAction(activeChar, id));
- + }
- }
- \ No newline at end of file
- 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
- new file mode 100644
- index 00000000..a8fde6b5
- --- /dev/null
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestAllAgitInfo.java
- @@ -0,0 +1,58 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package com.l2jmega.gameserver.network.clientpackets;
- +
- +import com.l2jmega.gameserver.network.L2GameClient;
- +//import com.l2jmega.gameserver.network.serverpackets.ExShowAgitInfo;
- +
- +/**
- + *
- + * @author KenM
- + */
- +public class RequestAllAgitInfo extends L2GameClientPacket
- +{
- +
- + /**
- + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#getType()
- + */
- + @Override
- + public String getType()
- + {
- + return "[C] D0:41 RequestAllAgitInfo";
- + }
- +
- + /**
- + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#readImpl()
- + */
- + @Override
- + protected void readImpl()
- + {
- +
- + }
- +
- + /**
- + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#runImpl()
- + */
- + @Override
- + protected void runImpl()
- + {
- + // L2GameClient client = this.getClient();
- + // if (client != null)
- + // {
- + // client.sendPacket(new ExShowAgitInfo());
- + // }
- + }
- +
- +}
- 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
- new file mode 100644
- index 00000000..ef629df5
- --- /dev/null
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestAllCastleInfo.java
- @@ -0,0 +1,58 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package com.l2jmega.gameserver.network.clientpackets;
- +
- +import com.l2jmega.gameserver.network.L2GameClient;
- +//import com.l2jmega.gameserver.network.serverpackets.ExShowCastleInfo;
- +
- +/**
- + *
- + * @author KenM
- + */
- +public class RequestAllCastleInfo extends L2GameClientPacket
- +{
- +
- + /**
- + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#getType()
- + */
- + @Override
- + public String getType()
- + {
- + return "[C] D0:3F RequestAllCastleInfo";
- + }
- +
- + /**
- + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#readImpl()
- + */
- + @Override
- + protected void readImpl()
- + {
- + // trigger
- + }
- +
- + /**
- + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#runImpl()
- + */
- + @Override
- + protected void runImpl()
- + {
- + // L2GameClient client = this.getClient();
- + // if (client != null)
- + // {
- + // client.sendPacket(new ExShowCastleInfo());
- + // }
- + }
- +
- +}
- 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
- new file mode 100644
- index 00000000..9cbcdc00
- --- /dev/null
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestAllFortressInfo.java
- @@ -0,0 +1,58 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package com.l2jmega.gameserver.network.clientpackets;
- +
- +import com.l2jmega.gameserver.network.L2GameClient;
- +//import com.l2jmega.gameserver.network.serverpackets.ExShowFortressInfo;
- +
- +/**
- + *
- + * @author KenM
- + */
- +public class RequestAllFortressInfo extends L2GameClientPacket
- +{
- +
- + /**
- + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#getType()
- + */
- + @Override
- + public String getType()
- + {
- + return "[C] D0:3D RequestAllFortressInfo";
- + }
- +
- + /**
- + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#readImpl()
- + */
- + @Override
- + protected void readImpl()
- + {
- + // trigger packet
- + }
- +
- + /**
- + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#runImpl()
- + */
- + @Override
- + protected void runImpl()
- + {
- + // L2GameClient client = this.getClient();
- + // if (client != null)
- + // {
- +// client.sendPacket(new ExShowFortressInfo());
- +// }
- + }
- +
- +}
- 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
- new file mode 100644
- index 00000000..578560a4
- --- /dev/null
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBookMarkSlotInfo.java
- @@ -0,0 +1,58 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package com.l2jmega.gameserver.network.clientpackets;
- +
- +import com.l2jmega.gameserver.network.L2GameClient;
- +//import com.l2jmega.gameserver.network.serverpackets.ExShowFortressInfo;
- +
- +/**
- + *
- + * @author KenM
- + */
- +public class RequestBookMarkSlotInfo extends L2GameClientPacket
- +{
- +
- + /**
- + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#getType()
- + */
- + @Override
- + public String getType()
- + {
- + return "[C] D0:3D RequestBookMarkSlotInfo";
- + }
- +
- + /**
- + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#readImpl()
- + */
- + @Override
- + protected void readImpl()
- + {
- + // trigger packet
- + }
- +
- + /**
- + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#runImpl()
- + */
- + @Override
- + protected void runImpl()
- + {
- + // L2GameClient client = this.getClient();
- + // if (client != null)
- + // {
- +// client.sendPacket(new ExShowFortressInfo());
- +// }
- + }
- +
- +}
- 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
- index a02d24fb..ef3ffcbd 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuyItem.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuyItem.java
- @@ -12,14 +12,11 @@
- import com.l2jmega.gameserver.model.buylist.Product;
- import com.l2jmega.gameserver.model.holder.IntIntHolder;
- import com.l2jmega.gameserver.network.SystemMessageId;
- -import com.l2jmega.gameserver.network.serverpackets.ItemList;
- -import com.l2jmega.gameserver.network.serverpackets.NpcHtmlMessage;
- -import com.l2jmega.gameserver.network.serverpackets.StatusUpdate;
- -import com.l2jmega.gameserver.network.serverpackets.SystemMessage;
- +import com.l2jmega.gameserver.network.serverpackets.*;
- public final class RequestBuyItem extends L2GameClientPacket
- {
- - private static final int BATCH_LENGTH = 8; // length of the one item
- + private static final int BATCH_LENGTH = 12; // length of the one item
- private int _listId;
- private IntIntHolder[] _items = null;
- @@ -36,7 +33,7 @@ protected void readImpl()
- for (int i = 0; i < count; i++)
- {
- int itemId = readD();
- - int cnt = readD();
- + int cnt = (int) readQ();
- if (itemId < 1 || cnt < 1)
- {
- @@ -80,9 +77,9 @@ protected void runImpl()
- castleTaxRate = merchant.getCastle().getTaxRate();
- }
- - int subTotal = 0;
- - int slots = 0;
- - int weight = 0;
- + long subTotal = 0;
- + long slots = 0;
- + long weight = 0;
- for (IntIntHolder i : _items)
- {
- @@ -132,20 +129,20 @@ else if (player.getInventory().getItemByItemId(i.getId()) == null)
- slots++;
- }
- - if (weight > Integer.MAX_VALUE || weight < 0 || !player.getInventory().validateWeight(weight))
- + if (weight > Integer.MAX_VALUE || weight < 0 || !player.getInventory().validateWeight((int) weight))
- {
- sendPacket(SystemMessage.getSystemMessage(SystemMessageId.WEIGHT_LIMIT_EXCEEDED));
- return;
- }
- - if (slots > Integer.MAX_VALUE || slots < 0 || !player.getInventory().validateCapacity(slots))
- + if (slots > Integer.MAX_VALUE || slots < 0 || !player.getInventory().validateCapacity((int) slots))
- {
- sendPacket(SystemMessage.getSystemMessage(SystemMessageId.SLOTS_FULL));
- return;
- }
- // Charge buyer and add tax to castle treasury if not owned by npc clan
- - if (subTotal < 0 || !player.reduceAdena("Buy", subTotal, player.getCurrentFolk(), false))
- + if (subTotal < 0 || !player.reduceAdena("Buy", (int) subTotal, player.getCurrentFolk(), false))
- {
- sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_NOT_ENOUGH_ADENA));
- return;
- @@ -196,5 +193,6 @@ else if (merchant instanceof Merchant)
- su.addAttribute(StatusUpdate.CUR_LOAD, player.getCurrentLoad());
- player.sendPacket(su);
- player.sendPacket(new ItemList(player, true));
- + player.sendPacket(new ExBuySellListPacket());
- }
- }
- \ No newline at end of file
- 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
- index 82483e04..8eab5de2 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuyProcure.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuyProcure.java
- @@ -8,7 +8,7 @@
- public class RequestBuyProcure extends L2GameClientPacket
- {
- - private static final int BATCH_LENGTH = 8;
- + private static final int BATCH_LENGTH = 12;
- private int _manorId;
- private List<IntIntHolder> _items;
- @@ -27,7 +27,7 @@ protected void readImpl()
- {
- readD(); // service
- final int itemId = readD();
- - final int cnt = readD();
- + final int cnt = (int)readQ();
- if (itemId < 1 || cnt < 1)
- {
- 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
- index b2e68801..1dbfe01b 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuySeed.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuySeed.java
- @@ -24,7 +24,7 @@
- public class RequestBuySeed extends L2GameClientPacket
- {
- - private static final int BATCH_LENGTH = 8;
- + private static final int BATCH_LENGTH = 12;
- private int _manorId;
- private List<IntIntHolder> _items;
- @@ -42,7 +42,7 @@ protected void readImpl()
- for (int i = 0; i < count; i++)
- {
- final int itemId = readD();
- - final int cnt = readD();
- + final int cnt = (int)readQ();
- if (cnt < 1 || itemId < 1)
- {
- @@ -91,7 +91,7 @@ protected void runImpl()
- return;
- }
- - int totalPrice = 0;
- + long totalPrice = 0;
- int slots = 0;
- int totalWeight = 0;
- @@ -166,7 +166,7 @@ else if (player.getInventory().getItemByItemId(ih.getId()) == null)
- if (totalPrice > 0)
- {
- castle.addToTreasuryNoTax(totalPrice);
- - player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.S1_DISAPPEARED_ADENA).addItemNumber(totalPrice));
- + player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.S1_DISAPPEARED_ADENA).addItemNumber((int) totalPrice));
- }
- }
- }
- \ No newline at end of file
- 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
- new file mode 100644
- index 00000000..ebb59550
- --- /dev/null
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuySellUIClose.java
- @@ -0,0 +1,48 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package com.l2jmega.gameserver.network.clientpackets;
- +
- +import com.l2jmega.gameserver.model.actor.instance.Player;
- +import com.l2jmega.gameserver.network.serverpackets.ItemList;
- +
- +public class RequestBuySellUIClose extends L2GameClientPacket
- +{
- + private static final String _C__D0_76_REQUESTBUYSELLUICLOSE = "[C] D0:76 RequestBuySellUIClose";
- +
- + @Override
- + protected void readImpl()
- + {
- + // trigger
- + }
- +
- + @Override
- + protected void runImpl()
- + {
- + final Player activeChar = getClient().getActiveChar();
- + if (activeChar == null || activeChar.isInventoryDisabled())
- + return;
- +
- + activeChar.sendPacket(new ItemList(activeChar, true));
- + }
- +
- + /* (non-Javadoc)
- + * @see com.l2jmega.gameserver.clientpackets.ClientBasePacket#getType()
- + */
- + @Override
- + public String getType()
- + {
- + return _C__D0_76_REQUESTBUYSELLUICLOSE;
- + }
- +}
- \ No newline at end of file
- 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
- index bc002495..6695a33c 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
- @@ -8,6 +8,8 @@
- import com.l2jmega.gameserver.data.xml.AdminData;
- import com.l2jmega.gameserver.handler.AdminCommandHandler;
- import com.l2jmega.gameserver.handler.IAdminCommandHandler;
- +import com.l2jmega.gameserver.handler.IVoiceCommandHandler;
- +import com.l2jmega.gameserver.handler.VoiceCommandHandler;
- import com.l2jmega.gameserver.model.World;
- import com.l2jmega.gameserver.model.WorldObject;
- import com.l2jmega.gameserver.model.actor.Npc;
- @@ -155,6 +157,18 @@ else if (_command.startsWith("_diary"))
- if (heroid > 0)
- Hero.getInstance().showHeroDiary(player, heroclass, heroid, heropage);
- }
- + else if (_command.startsWith("user_"))
- + {
- + final String command = _command.substring(5).trim();
- + final String word2 = command.split("\\s+")[0];
- + final String args2 = command.substring(word2.length()).trim();
- + final IVoiceCommandHandler vch = VoiceCommandHandler.getInstance().getVoicedCommandHandler(word2);
- + if (vch != null) {
- + vch.useVoicedCommand(word2, player, args2);
- + } else {
- + LOGGER.warn("Unknown voiced command '" + word2 + "'");
- + }
- + }
- else if (_command.startsWith("arenachange")) // change
- {
- final boolean isManager = player.getCurrentFolk() instanceof OlympiadManagerNpc;
- 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
- index d0bf5650..753fd096 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDropItem.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDropItem.java
- @@ -13,7 +13,9 @@
- public final class RequestDropItem extends L2GameClientPacket
- {
- private int _objectId;
- - private int _count;
- + private long _count;
- + private int _countint;
- + //private long _count3;
- private int _x;
- private int _y;
- private int _z;
- @@ -22,10 +24,11 @@ public final class RequestDropItem extends L2GameClientPacket
- protected void readImpl()
- {
- _objectId = readD();
- - _count = readD();
- + _count = readQ();
- _x = readD();
- _y = readD();
- _z = readD();
- + _countint = (int) _count;
- }
- @Override
- @@ -129,6 +132,6 @@ protected void runImpl()
- activeChar.sendPacket(new ItemList(activeChar, true));
- }
- - activeChar.dropItem("Drop", _objectId, _count, _x, _y, _z, null, false);
- + activeChar.dropItem("Drop", _objectId, _countint, _x, _y, _z, null, false);
- }
- }
- \ No newline at end of file
- 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
- index 46418605..fd9fbacd 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDuelStart.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDuelStart.java
- @@ -30,7 +30,8 @@ protected void runImpl()
- final Player targetChar = World.getInstance().getPlayer(_player);
- if (targetChar == null || activeChar == targetChar)
- {
- - activeChar.sendPacket(SystemMessageId.THERE_IS_NO_OPPONENT_TO_RECEIVE_YOUR_CHALLENGE_FOR_A_DUEL);
- + //activeChar.sendPacket(SystemMessageId.THERE_IS_NO_OPPONENT_TO_RECEIVE_YOUR_CHALLENGE_FOR_A_DUEL);
- + activeChar.sendPacket(SystemMessageId.YOU_ARE_UNABLE_TO_REQUEST_A_DUEL_AT_THIS_TIME);
- return;
- }
- 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
- index 2a78f67a..9c8a9282 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java
- @@ -14,11 +14,7 @@
- import com.l2jmega.gameserver.model.item.kind.Weapon;
- import com.l2jmega.gameserver.model.itemcontainer.Inventory;
- import com.l2jmega.gameserver.network.SystemMessageId;
- -import com.l2jmega.gameserver.network.serverpackets.EnchantResult;
- -import com.l2jmega.gameserver.network.serverpackets.InventoryUpdate;
- -import com.l2jmega.gameserver.network.serverpackets.ItemList;
- -import com.l2jmega.gameserver.network.serverpackets.StatusUpdate;
- -import com.l2jmega.gameserver.network.serverpackets.SystemMessage;
- +import com.l2jmega.gameserver.network.serverpackets.*;
- public final class RequestEnchantItem extends AbstractEnchantPacket
- {
- 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
- new file mode 100644
- index 00000000..030c46a6
- --- /dev/null
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExCancelEnchantItem.java
- @@ -0,0 +1,57 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package com.l2jmega.gameserver.network.clientpackets;
- +
- +import com.l2jmega.gameserver.model.actor.instance.Player;
- +import com.l2jmega.gameserver.network.serverpackets.EnchantResult;
- +
- +/**
- + *
- + * @author KenM
- + */
- +public class RequestExCancelEnchantItem extends L2GameClientPacket
- +{
- + /**
- + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#getType()
- + */
- + @Override
- + public String getType()
- + {
- + return "[C] D0:51 RequestExCancelEnchantItem";
- + }
- +
- + /**
- + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#readImpl()
- + */
- + @Override
- + protected void readImpl()
- + {
- + // nothing (trigger)
- + }
- +
- + /**
- + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#runImpl()
- + */
- + @Override
- + protected void runImpl()
- + {
- + Player activeChar = this.getClient().getActiveChar();
- + if (activeChar != null)
- + {
- + activeChar.sendPacket(EnchantResult.CANCELLED);
- + activeChar.setActiveEnchantItem(null);
- + }
- + }
- +}
- 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
- new file mode 100644
- index 00000000..7d43c3ac
- --- /dev/null
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExTryToPutEnchantSupportItem.java
- @@ -0,0 +1,58 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package com.l2jmega.gameserver.network.clientpackets;
- +
- +import com.l2jmega.gameserver.network.L2GameClient;
- +//import com.l2jmega.gameserver.network.serverpackets.ExShowFortressInfo;
- +
- +/**
- + *
- + * @author KenM
- + */
- +public class RequestExTryToPutEnchantSupportItem extends L2GameClientPacket
- +{
- +
- + /**
- + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#getType()
- + */
- + @Override
- + public String getType()
- + {
- + return "[C] D0:4d";
- + }
- +
- + /**
- + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#readImpl()
- + */
- + @Override
- + protected void readImpl()
- + {
- + // trigger packet
- + }
- +
- + /**
- + * @see com.l2jmega.gameserver.network.clientpackets.L2GameClientPacket#runImpl()
- + */
- + @Override
- + protected void runImpl()
- + {
- + // L2GameClient client = this.getClient();
- + // if (client != null)
- + // {
- +// client.sendPacket(new ExShowFortressInfo());
- +// }
- + }
- +
- +}
- 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
- new file mode 100644
- index 00000000..2e20b929
- --- /dev/null
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExTryToPutEnchantTargetItem.java
- @@ -0,0 +1,60 @@
- +package com.l2jmega.gameserver.network.clientpackets;
- +
- +import com.l2jmega.gameserver.model.actor.instance.Player;
- +import com.l2jmega.gameserver.model.item.instance.ItemInstance;
- +import com.l2jmega.gameserver.network.SystemMessageId;
- +import com.l2jmega.gameserver.network.serverpackets.ExPutEnchantTargetItemResult;
- +
- +/**
- + * Lineage2 Classic Project
- + * Chronicle: Kamael
- + *
- + * @author amaranthe
- + */
- +public class RequestExTryToPutEnchantTargetItem extends AbstractEnchantPacket {
- + private int _objectId = 0;
- +
- + @Override
- + protected void readImpl()
- + {
- + _objectId = readD();
- + }
- +
- + @Override
- + protected void runImpl()
- + {
- + Player activeChar = getClient().getActiveChar();
- +
- + if(_objectId == 0 || activeChar == null)
- + {
- + return;
- + }
- +
- + ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId);
- + ItemInstance scroll = activeChar.getActiveEnchantItem();
- +
- + if(item == null || scroll == null)
- + {
- + return;
- + }
- +
- + if(item.getOwnerId() != activeChar.getObjectId())
- + {
- + return;
- + }
- +
- + // template for scroll
- + EnchantScroll scrollTemplate = getEnchantScroll(scroll);
- +
- + if(scrollTemplate == null || !scrollTemplate.isValid(item))
- + {
- + activeChar.sendPacket(SystemMessageId.DOES_NOT_FIT_SCROLL_CONDITIONS);
- + // activeChar.setActiveEnchantItem(null);
- + activeChar.sendPacket(new ExPutEnchantTargetItemResult(0));
- + return;
- + }
- +
- + activeChar.sendPacket(new ExPutEnchantTargetItemResult(1));
- + }
- +
- +}
- 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
- index 35eeb7b9..91e58334 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestGiveItemToPet.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestGiveItemToPet.java
- @@ -20,7 +20,7 @@ public final class RequestGiveItemToPet extends L2GameClientPacket
- protected void readImpl()
- {
- _objectId = readD();
- - _amount = readD();
- + _amount = (int) readQ();
- }
- @Override
- @@ -86,6 +86,10 @@ protected void runImpl()
- player.sendPacket(SystemMessageId.UNABLE_TO_PLACE_ITEM_YOUR_PET_IS_TOO_ENCUMBERED);
- return;
- }
- + if (player.isCastingNow() || player.isCastingSimultaneouslyNow())
- + {
- + return;
- + }
- if (player.getActiveEnchantItem() != null)
- {
- 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
- index ab15bcb3..15043f1f 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestItemList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestItemList.java
- @@ -17,7 +17,8 @@ protected void runImpl()
- if (activeChar == null)
- return;
- - if (!activeChar.isInventoryDisabled())
- + if (!activeChar.isInventoryDisabled()) {
- sendPacket(new ItemList(activeChar, true));
- + }
- }
- }
- \ No newline at end of file
- 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
- index 95a5dada..4e2daf06 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestMagicSkillUse.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestMagicSkillUse.java
- @@ -60,7 +60,7 @@ protected void runImpl()
- }
- if (player.isAttackingNow())
- - player.getAI().setNextAction(new NextAction(CtrlEvent.EVT_READY_TO_ACT, CtrlIntention.CAST, () -> player.useMagic(skill, _ctrlPressed, _shiftPressed)));
- + player.getAI().setNextAction(new NextAction(CtrlEvent.EVT_FINISH_ATTACK, CtrlIntention.CAST, () -> player.useMagic(skill, _ctrlPressed, _shiftPressed)));
- else
- player.useMagic(skill, _ctrlPressed, _shiftPressed);
- }
- 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
- index bf5b962f..6972513f 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPackageSendableItemList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPackageSendableItemList.java
- @@ -25,7 +25,7 @@ public void runImpl()
- if (player == null)
- return;
- - final ItemInstance[] items = player.getInventory().getAvailableItems(true, false);
- + final ItemInstance[] items = player.getInventory().getAvailableItems(true, false, false);
- if (items == null)
- return;
- 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
- index 08ea3787..512b9038 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPreviewItem.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPreviewItem.java
- @@ -80,7 +80,7 @@ protected void runImpl()
- if (buyList == null)
- return;
- - int totalPrice = 0;
- + long totalPrice = 0;
- _listId = buyList.getListId();
- _itemList = new HashMap<>();
- @@ -113,7 +113,7 @@ protected void runImpl()
- }
- // Charge buyer and add tax to castle treasury if not owned by npc clan because a Try On is not Free
- - if (totalPrice < 0 || !activeChar.reduceAdena("Wear", totalPrice, activeChar.getCurrentFolk(), true))
- + if (totalPrice < 0 || !activeChar.reduceAdena("Wear", (int) totalPrice, activeChar.getCurrentFolk(), true))
- {
- activeChar.sendPacket(SystemMessageId.YOU_NOT_ENOUGH_ADENA);
- return;
- 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
- index 62e2c70c..0ab85dfa 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java
- @@ -11,10 +11,11 @@
- import com.l2jmega.gameserver.model.actor.instance.Player.StoreType;
- import com.l2jmega.gameserver.model.tradelist.TradeList;
- import com.l2jmega.gameserver.network.SystemMessageId;
- +import com.l2jmega.gameserver.network.serverpackets.ActionFailed;
- public final class RequestPrivateStoreBuy extends L2GameClientPacket
- {
- - private static final int BATCH_LENGTH = 12; // length of one item
- + private static final int BATCH_LENGTH = 20; // length of one item
- private int _storePlayerId;
- private Set<ItemRequest> _items = null;
- @@ -32,8 +33,8 @@ protected void readImpl()
- for (int i = 0; i < count; i++)
- {
- int objectId = readD();
- - long cnt = readD();
- - int price = readD();
- + long cnt = readQ();
- + int price = (int)readQ();
- if (objectId < 1 || cnt < 1 || price < 0)
- {
- @@ -52,14 +53,14 @@ protected void runImpl()
- return;
- final Player player = getClient().getActiveChar();
- - if (player == null)
- + if (player == null || player.isDead())
- return;
- if (player.isCursedWeaponEquipped())
- return;
- final Player storePlayer = World.getInstance().getPlayer(_storePlayerId);
- - if (storePlayer == null)
- + if (storePlayer == null || storePlayer.isDead())
- return;
- if (!player.isInsideRadius(storePlayer, Npc.INTERACTION_DISTANCE, true, false))
- @@ -80,10 +81,16 @@ protected void runImpl()
- if (storePlayer.getStoreType() == StoreType.PACKAGE_SELL && storeList.getItems().size() > _items.size())
- return;
- -
- - if (!storeList.privateStoreBuy(player, _items))
- +
- + final int result = storeList.privateStoreBuy(player, _items);
- + if (result > 0) {
- + player.sendPacket(ActionFailed.STATIC_PACKET);
- + if (result > 1) {
- + LOGGER.warn("PrivateStore buy has failed due to invalid list or request. Player: " + player.getName() + ", Private store of: " + storePlayer.getName());
- + }
- return;
- -
- + }
- +
- if (storeList.getItems().isEmpty())
- {
- storePlayer.setStoreType(StoreType.NONE);
- 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
- index a10d4bfd..fa95a2cf 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java
- @@ -9,12 +9,15 @@
- import com.l2jmega.gameserver.model.tradelist.TradeList;
- import com.l2jmega.gameserver.network.SystemMessageId;
- +import java.util.HashSet;
- +import java.util.Set;
- +
- public final class RequestPrivateStoreSell extends L2GameClientPacket
- {
- - private static final int BATCH_LENGTH = 20; // length of one item
- + private static final int BATCH_LENGTH = 28; // length of one item
- private int _storePlayerId;
- - private ItemRequest[] _items = null;
- + private Set<ItemRequest> _items = null;
- @Override
- protected void readImpl()
- @@ -23,8 +26,8 @@ protected void readImpl()
- int count = readD();
- if (count <= 0 || count > Config.MAX_ITEM_IN_PACKET || count * BATCH_LENGTH != _buf.remaining())
- return;
- -
- - _items = new ItemRequest[count];
- +
- + _items = new HashSet<>();
- for (int i = 0; i < count; i++)
- {
- @@ -32,15 +35,15 @@ protected void readImpl()
- int itemId = readD();
- readH(); // TODO analyse this
- readH(); // TODO analyse this
- - long cnt = readD();
- - int price = readD();
- + long cnt = readQ();
- + int price = (int)readQ();
- if (objectId < 1 || itemId < 1 || cnt < 1 || price < 0)
- {
- _items = null;
- return;
- }
- - _items = new ItemRequest(objectId, itemId, (int) cnt, price);
- + _items.add(new ItemRequest(objectId, itemId, (int) cnt, price));
- }
- }
- @@ -76,8 +79,10 @@ protected void runImpl()
- player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT);
- return;
- }
- -
- - if (!storeList.privateStoreSell(player, _items))
- +
- + _items.removeIf(item -> player.getInventory().getItemByObjectId(item.getObjectId()) == null);
- +
- + if (!storeList.privateStoreSell(player, _items.toArray(new ItemRequest[0])))
- return;
- if (storeList.getItems().isEmpty())
- 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
- index 68e5b488..1704102b 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestProcureCropList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestProcureCropList.java
- @@ -19,7 +19,7 @@
- public class RequestProcureCropList extends L2GameClientPacket
- {
- - private static final int BATCH_LENGTH = 16;
- + private static final int BATCH_LENGTH = 20;
- private List<CropHolder> _items;
- @@ -36,7 +36,7 @@ protected void readImpl()
- final int objId = readD();
- final int itemId = readD();
- final int manorId = readD();
- - final int cnt = readD();
- + final int cnt = (int)readQ();
- if (objId < 1 || itemId < 1 || manorId < 0 || cnt < 0)
- {
- 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
- index 7e980969..f562e98c 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopListSet.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopListSet.java
- @@ -1,19 +1,24 @@
- package com.l2jmega.gameserver.network.clientpackets;
- import com.l2jmega.Config;
- +import com.l2jmega.commons.util.ArraysUtil;
- import com.l2jmega.gameserver.model.actor.instance.Player;
- import com.l2jmega.gameserver.model.actor.instance.Player.StoreType;
- import com.l2jmega.gameserver.model.craft.ManufactureItem;
- import com.l2jmega.gameserver.model.craft.ManufactureList;
- +import com.l2jmega.gameserver.model.item.Recipe;
- import com.l2jmega.gameserver.model.zone.ZoneId;
- import com.l2jmega.gameserver.network.SystemMessageId;
- import com.l2jmega.gameserver.network.serverpackets.ActionFailed;
- +import com.l2jmega.gameserver.network.serverpackets.RecipeShopManageList;
- import com.l2jmega.gameserver.network.serverpackets.RecipeShopMsg;
- +import java.util.Arrays;
- +
- public final class RequestRecipeShopListSet extends L2GameClientPacket
- {
- private int _count;
- - private int[] _items;
- + private ManufactureItem[] _items;
- @Override
- protected void readImpl()
- @@ -21,14 +26,13 @@ protected void readImpl()
- _count = readD();
- if (_count < 0 || _count * 8 > _buf.remaining() || _count > Config.MAX_ITEM_IN_PACKET)
- _count = 0;
- -
- - _items = new int[_count * 2];
- +
- + _items = new ManufactureItem[_count];
- for (int x = 0; x < _count; x++)
- {
- int recipeID = readD();
- - _items[x * 2 + 0] = recipeID;
- - int cost = readD();
- - _items[x * 2 + 1] = cost;
- + int cost = (int)readQ();
- + _items[x] = new ManufactureItem(recipeID, cost);
- }
- }
- @@ -38,39 +42,49 @@ protected void runImpl()
- final Player player = getClient().getActiveChar();
- if (player == null)
- return;
- -
- - if (player.isInDuel())
- - {
- - player.sendPacket(SystemMessageId.CANT_OPERATE_PRIVATE_STORE_DURING_COMBAT);
- +
- + // Integrity check.
- + if (!canPassManufactureProcess(player, _items))
- return;
- - }
- -
- - if (player.isInsideZone(ZoneId.NO_STORE))
- +
- + // Retrieve and clear the manufacture list.
- + final ManufactureList manufactureList = player.getCreateList();
- + manufactureList.clear();
- +
- + // Check multiple conditions. Message is sent directly from the method.
- + if (!player.canOpenPrivateStore(false))
- + return;
- +
- + if (ArraysUtil.isEmpty(_items))
- {
- - player.sendPacket(SystemMessageId.NO_PRIVATE_WORKSHOP_HERE);
- - player.sendPacket(ActionFailed.STATIC_PACKET);
- + player.sendPacket(SystemMessageId.NO_RECIPES_REGISTERED);
- return;
- }
- -
- +
- if (_count == 0)
- player.forceStandUp();
- else
- {
- - ManufactureList createList = new ManufactureList();
- -
- - for (int x = 0; x < _count; x++)
- - {
- - int recipeID = _items[x * 2 + 0];
- - int cost = _items[x * 2 + 1];
- - createList.add(new ManufactureItem(recipeID, cost));
- - }
- - createList.setStoreName(player.getCreateList() != null ? player.getCreateList().getStoreName() : "");
- - player.setCreateList(createList);
- -
- + manufactureList.set(_items);
- player.setStoreType(StoreType.MANUFACTURE);
- player.sitDown();
- player.broadcastUserInfo();
- player.broadcastPacket(new RecipeShopMsg(player));
- }
- }
- +
- + private boolean hasRecipeOnSpecificBook(Player player, int recipeId)
- + {
- + boolean isDwExist = player.getDwarvenRecipeBook().stream().anyMatch(recipe -> recipe.getId() == recipeId);
- + boolean isExist = player.getCommonRecipeBook().stream().anyMatch(recipe -> recipe.getId() == recipeId);
- + return isDwExist || isExist;
- + }
- +
- + public boolean canPassManufactureProcess(Player player, ManufactureItem[] itemsToCheck)
- + {
- + for (ManufactureItem item : itemsToCheck)
- + if (!hasRecipeOnSpecificBook(player, item.getId()))
- + return false;
- + return true;
- + }
- }
- \ No newline at end of file
- 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
- index 4233e0ff..d6856b82 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java
- @@ -24,7 +24,7 @@ protected void readImpl()
- {
- _objectId = readD();
- _recipeId = readD();
- - _unknow = readD();
- + _unknow = (int)readQ();
- }
- @Override
- 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
- index c481a73f..278136b6 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopMessageSet.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopMessageSet.java
- @@ -22,8 +22,8 @@ protected void runImpl()
- if (_name != null && _name.length() > MAX_MSG_LENGTH)
- return;
- -
- - if (player.getCreateList() != null)
- +
- + if (player.getStoreType() == Player.StoreType.MANUFACTURE || player.getStoreType() == Player.StoreType.MANUFACTURE_MANAGE)
- player.getCreateList().setStoreName(_name);
- }
- }
- \ No newline at end of file
- 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
- index 1c6b0513..22a3e4c0 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSellItem.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSellItem.java
- @@ -9,13 +9,11 @@
- import com.l2jmega.gameserver.model.actor.instance.Player;
- import com.l2jmega.gameserver.model.holder.IntIntHolder;
- import com.l2jmega.gameserver.model.item.instance.ItemInstance;
- -import com.l2jmega.gameserver.network.serverpackets.ItemList;
- -import com.l2jmega.gameserver.network.serverpackets.NpcHtmlMessage;
- -import com.l2jmega.gameserver.network.serverpackets.StatusUpdate;
- +import com.l2jmega.gameserver.network.serverpackets.*;
- public final class RequestSellItem extends L2GameClientPacket
- {
- - private static final int BATCH_LENGTH = 12; // length of the one item
- + private static final int BATCH_LENGTH = 16; // length of the one item
- private int _listId;
- private IntIntHolder[] _items = null;
- @@ -33,7 +31,7 @@ protected void readImpl()
- {
- int objectId = readD();
- int itemId = readD();
- - int cnt = readD();
- + int cnt = (int) readQ();
- if (objectId < 1 || itemId < 1 || cnt < 1)
- {
- @@ -65,7 +63,7 @@ protected void runImpl()
- return;
- }
- - int totalPrice = 0;
- + long totalPrice = 0;
- // Proceed the sell
- for (IntIntHolder i : _items)
- {
- @@ -81,7 +79,7 @@ protected void runImpl()
- item = player.getInventory().destroyItem("Sell", i.getId(), i.getValue(), player, merchant);
- }
- - player.addAdena("Sell", totalPrice, merchant, false);
- + player.addAdena("Sell", (int) totalPrice, merchant, false);
- // Send the htm, if existing.
- String htmlFolder = "";
- @@ -107,5 +105,6 @@ else if (merchant instanceof Merchant)
- su.addAttribute(StatusUpdate.CUR_LOAD, player.getCurrentLoad());
- player.sendPacket(su);
- player.sendPacket(new ItemList(player, true));
- + player.sendPacket(new ExBuySellListPacket());
- }
- }
- \ No newline at end of file
- 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
- index aba7bb7b..d4149ca1 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSetCrop.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSetCrop.java
- @@ -13,7 +13,7 @@
- public class RequestSetCrop extends L2GameClientPacket
- {
- - private static final int BATCH_LENGTH = 13;
- + private static final int BATCH_LENGTH = 21;
- private int _manorId;
- private List<CropProcure> _items;
- @@ -30,8 +30,8 @@ protected void readImpl()
- for (int i = 0; i < count; i++)
- {
- final int itemId = readD();
- - final int sales = readD();
- - final int price = readD();
- + final int sales = (int)readQ();
- + final int price = (int)readQ();
- final int type = readC();
- if (itemId < 1 || sales < 0 || price < 0)
- 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
- index 90ea491c..050219c9 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSetSeed.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSetSeed.java
- @@ -13,7 +13,7 @@
- public class RequestSetSeed extends L2GameClientPacket
- {
- - private static final int BATCH_LENGTH = 12;
- + private static final int BATCH_LENGTH = 20;
- private int _manorId;
- private List<SeedProduction> _items;
- @@ -30,8 +30,8 @@ protected void readImpl()
- for (int i = 0; i < count; i++)
- {
- final int itemId = readD();
- - final int sales = readD();
- - final int price = readD();
- + final int sales = (int)readQ();
- + final int price = (int)readQ();
- if (itemId < 1 || sales < 0 || price < 0)
- {
- 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
- index 7afb3767..04e56a02 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestTargetCanceld.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestTargetCanceld.java
- @@ -1,6 +1,10 @@
- package com.l2jmega.gameserver.network.clientpackets;
- +import com.l2jmega.gameserver.model.L2Skill;
- +import com.l2jmega.gameserver.model.WorldObject;
- +import com.l2jmega.gameserver.model.actor.Attackable;
- import com.l2jmega.gameserver.model.actor.instance.Player;
- +import com.l2jmega.gameserver.templates.skills.L2SkillType;
- public final class RequestTargetCanceld extends L2GameClientPacket
- {
- @@ -22,7 +26,17 @@ protected void runImpl()
- if (_unselect == 0)
- {
- if (activeChar.isCastingNow() && activeChar.canAbortCast())
- + {
- activeChar.abortCast();
- + final L2Skill seed = activeChar.getLastSkillCast();
- + if (seed != null && seed.getSkillType() == L2SkillType.SOW && seed.getTargetList(activeChar).length > 0)
- + {
- + for (WorldObject object : seed.getTargetList(activeChar))
- + if (object instanceof Attackable && ((Attackable) object).isSeeded()) {
- + ((Attackable) object).setSeeded(null, 0);
- + }
- + }
- + }
- else
- activeChar.setTarget(null);
- }
- 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
- index 790dc05d..dd3743cd 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/Say2.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/Say2.java
- @@ -7,6 +7,8 @@
- import com.l2jmega.Config;
- import com.l2jmega.gameserver.handler.ChatHandler;
- import com.l2jmega.gameserver.handler.IChatHandler;
- +import com.l2jmega.gameserver.handler.IVoiceCommandHandler;
- +import com.l2jmega.gameserver.handler.VoiceCommandHandler;
- import com.l2jmega.gameserver.model.actor.instance.Player;
- import com.l2jmega.gameserver.network.SystemMessageId;
- @@ -33,6 +35,7 @@ public final class Say2 extends L2GameClientPacket
- public static final int PARTYROOM_ALL = 16; // (Red)
- public static final int HERO_VOICE = 17;
- public static final int CRITICAL_ANNOUNCE = 18;
- + public final static int BATTLEFIELD = 20;
- private static final String[] CHAT_NAMES =
- {
- @@ -156,9 +159,23 @@ protected void runImpl()
- CHAT_LOG.log(record);
- }
- -
- +
- + if (_text.startsWith(".")) {
- + final String fullcmd = _text.substring(1).trim();
- + final String command = fullcmd.split("\\s+")[0];
- + final String args = fullcmd.substring(command.length()).trim();
- + if (command.length() > 0) {
- + final IVoiceCommandHandler voice_handler = VoiceCommandHandler.getInstance().getVoicedCommandHandler(command);
- + if (voice_handler != null) {
- + voice_handler.useVoicedCommand(command, player, args);
- + return;
- + }
- + }
- + return;
- + }
- +
- _text = _text.replaceAll("\\\\n", "");
- -
- +
- final IChatHandler handler = ChatHandler.getInstance().getHandler(_type);
- if (handler == null)
- {
- 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
- index 31903675..9cd3c28e 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SendWarehouseDepositList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SendWarehouseDepositList.java
- @@ -17,7 +17,7 @@
- public final class SendWarehouseDepositList extends L2GameClientPacket
- {
- - private static final int BATCH_LENGTH = 8; // length of one item
- + private static final int BATCH_LENGTH = 12; // length of one item
- private IntIntHolder _items[] = null;
- @@ -32,7 +32,7 @@ protected void readImpl()
- for (int i = 0; i < count; i++)
- {
- int objId = readD();
- - int cnt = readD();
- + int cnt = (int)readQ();
- if (objId < 1 || cnt < 0)
- {
- @@ -134,7 +134,7 @@ else if (warehouse.getItemByItemId(item.getItemId()) == null)
- if (oldItem == null)
- return;
- - if (!oldItem.isDepositable(isPrivate) || !oldItem.isAvailable(player, true, isPrivate))
- + if (!oldItem.isDepositable(isPrivate) || !oldItem.isAvailable(player, true, isPrivate, false))
- continue;
- final ItemInstance newItem = player.getInventory().transferItem(warehouse.getName(), i.getId(), i.getValue(), warehouse, player, folk);
- 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
- index 6f547529..e65dc599 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SendWarehouseWithdrawList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SendWarehouseWithdrawList.java
- @@ -17,7 +17,7 @@
- public final class SendWarehouseWithdrawList extends L2GameClientPacket
- {
- - private static final int BATCH_LENGTH = 8; // length of one item
- + private static final int BATCH_LENGTH = 12; // length of one item
- private IntIntHolder _items[] = null;
- @@ -32,7 +32,7 @@ protected void readImpl()
- for (int i = 0; i < count; i++)
- {
- int objId = readD();
- - int cnt = readD();
- + int cnt = (int)readQ();
- if (objId < 1 || cnt < 0)
- {
- 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
- index fd5c85cd..04625620 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListBuy.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListBuy.java
- @@ -12,7 +12,7 @@
- public final class SetPrivateStoreListBuy extends L2GameClientPacket
- {
- - private static final int BATCH_LENGTH = 16; // length of one item
- + private static final int BATCH_LENGTH = 40; // length of one item
- private Item[] _items = null;
- @@ -27,17 +27,21 @@ protected void readImpl()
- for (int i = 0; i < count; i++)
- {
- int itemId = readD();
- + int enchant = readH(); // TODO analyse this
- readH(); // TODO analyse this
- - readH(); // TODO analyse this
- - int cnt = readD();
- - int price = readD();
- + int cnt = (int)readQ();
- + int price = (int)readQ();
- if (itemId < 1 || cnt < 1 || price < 0)
- {
- _items = null;
- return;
- }
- - _items = new Item(itemId, cnt, price);
- + readC(); // FE
- + readD(); // FF 00 00 00
- + readD(); // 00 00 00 00
- + readB(new byte[7]); // Completely Unknown
- + _items = new Item(itemId, cnt, price, enchant);
- }
- }
- @@ -47,38 +51,24 @@ protected void runImpl()
- Player player = getClient().getActiveChar();
- if (player == null)
- return;
- -
- - if (_items == null)
- - {
- - player.setStoreType(StoreType.NONE);
- - player.broadcastUserInfo();
- - player.sendPacket(new PrivateStoreManageListBuy(player));
- +
- + // Integrity check.
- + if (!player.getInventory().canPassBuyProcess(_items))
- return;
- - }
- -
- +
- + final TradeList tradeList = player.getBuyList();
- + tradeList.clear();
- +
- if (!player.getAccessLevel().allowTransaction())
- {
- player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT);
- return;
- }
- -
- - if (AttackStanceTaskManager.getInstance().isInAttackStance(player) || (player.isCastingNow() || player.isCastingSimultaneouslyNow()) || player.isInDuel())
- - {
- - player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT);
- - player.sendPacket(new PrivateStoreManageListBuy(player));
- - return;
- - }
- -
- - if (player.isInsideZone(ZoneId.NO_STORE))
- - {
- - player.sendPacket(SystemMessageId.NO_PRIVATE_STORE_HERE);
- - player.sendPacket(new PrivateStoreManageListBuy(player));
- +
- + // Check multiple conditions. Message is sent directly from the method.
- + if (!player.canOpenPrivateStore(false))
- return;
- - }
- -
- - TradeList tradeList = player.getBuyList();
- - tradeList.clear();
- -
- +
- // Check maximum number of allowed slots for pvt shops
- if (_items.length > player.getPrivateBuyStoreLimit())
- {
- @@ -120,15 +110,16 @@ protected void runImpl()
- player.broadcastPacket(new PrivateStoreMsgBuy(player));
- }
- - private static class Item
- + public static class Item
- {
- - private final int _itemId, _count, _price;
- + private final int _itemId, _count, _price, _enchant;
- - public Item(int id, int num, int pri)
- + public Item(int id, int num, int pri, int enchant)
- {
- _itemId = id;
- _count = num;
- _price = pri;
- + _enchant = enchant;
- }
- public boolean addToTradeList(TradeList list)
- @@ -139,10 +130,29 @@ public boolean addToTradeList(TradeList list)
- list.addItemByItemId(_itemId, _count, _price);
- return true;
- }
- +
- + public int getItemId()
- + {
- + return _itemId;
- + }
- +
- + public int getCount()
- + {
- + return _count;
- + }
- +
- + public int getPrice()
- + {
- + return _price;
- + }
- public long getCost()
- {
- return _count * _price;
- }
- +
- + public int getEnchant() {
- + return _enchant;
- + }
- }
- }
- \ No newline at end of file
- 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
- index 8c64905b..7ecc9a4e 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListSell.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListSell.java
- @@ -4,15 +4,13 @@
- import com.l2jmega.gameserver.model.actor.instance.Player;
- import com.l2jmega.gameserver.model.actor.instance.Player.StoreType;
- import com.l2jmega.gameserver.model.tradelist.TradeList;
- -import com.l2jmega.gameserver.model.zone.ZoneId;
- import com.l2jmega.gameserver.network.SystemMessageId;
- import com.l2jmega.gameserver.network.serverpackets.PrivateStoreManageListSell;
- import com.l2jmega.gameserver.network.serverpackets.PrivateStoreMsgSell;
- -import com.l2jmega.gameserver.taskmanager.AttackStanceTaskManager;
- public final class SetPrivateStoreListSell extends L2GameClientPacket
- {
- - private static final int BATCH_LENGTH = 12; // length of the one item
- + private static final int BATCH_LENGTH = 20; // length of the one item
- private boolean _packageSale;
- private Item[] _items = null;
- @@ -29,8 +27,8 @@ protected void readImpl()
- for (int i = 0; i < count; i++)
- {
- int itemId = readD();
- - long cnt = readD();
- - int price = readD();
- + long cnt = (int)readQ();
- + int price = (int)readQ();
- if (itemId < 1 || cnt < 1 || price < 0)
- {
- @@ -47,36 +45,24 @@ protected void runImpl()
- Player player = getClient().getActiveChar();
- if (player == null)
- return;
- -
- - if (_items == null)
- - {
- - player.sendPacket(SystemMessageId.NOT_ENOUGH_ITEMS);
- - player.setStoreType(StoreType.NONE);
- - player.broadcastUserInfo();
- - player.sendPacket(new PrivateStoreManageListSell(player, _packageSale));
- +
- + // Integrity check.
- + if (!player.getInventory().canPassSellProcess(_items))
- return;
- - }
- -
- +
- + final TradeList tradeList = player.getSellList();
- + tradeList.clear();
- +
- if (!player.getAccessLevel().allowTransaction())
- {
- player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT);
- return;
- }
- -
- - if (AttackStanceTaskManager.getInstance().isInAttackStance(player) || (player.isCastingNow() || player.isCastingSimultaneouslyNow()) || player.isInDuel())
- - {
- - player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT);
- - player.sendPacket(new PrivateStoreManageListSell(player, _packageSale));
- - return;
- - }
- -
- - if (player.isInsideZone(ZoneId.NO_STORE))
- - {
- - player.sendPacket(SystemMessageId.NO_PRIVATE_STORE_HERE);
- - player.sendPacket(new PrivateStoreManageListSell(player, _packageSale));
- +
- + // Check multiple conditions. Message is sent directly from the method.
- + if (!player.canOpenPrivateStore(false))
- return;
- - }
- -
- +
- // Check maximum number of allowed slots for pvt shops
- if (_items.length > player.getPrivateSellStoreLimit())
- {
- @@ -84,9 +70,6 @@ protected void runImpl()
- player.sendPacket(new PrivateStoreManageListSell(player, _packageSale));
- return;
- }
- -
- - TradeList tradeList = player.getSellList();
- - tradeList.clear();
- tradeList.setPackaged(_packageSale);
- int totalCost = player.getAdena();
- @@ -114,7 +97,7 @@ protected void runImpl()
- player.broadcastPacket(new PrivateStoreMsgSell(player));
- }
- - private static class Item
- + public static class Item
- {
- private final int _itemId, _count, _price;
- @@ -133,8 +116,23 @@ public boolean addToTradeList(TradeList list)
- list.addItem(_itemId, _count, _price);
- return true;
- }
- +
- + public int getItemId()
- + {
- + return _itemId;
- + }
- +
- + public int getCount()
- + {
- + return _count;
- + }
- +
- + public int getPrice()
- + {
- + return _price;
- + }
- - public long getPrice()
- + public long getCost()
- {
- return _count * _price;
- }
- 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
- index f8f4aa4b..5630c10b 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java
- @@ -8,6 +8,7 @@
- import com.l2jmega.gameserver.model.L2Skill;
- import com.l2jmega.gameserver.model.actor.instance.Pet;
- import com.l2jmega.gameserver.model.actor.instance.Player;
- +import com.l2jmega.gameserver.model.base.ClassRace;
- import com.l2jmega.gameserver.model.holder.IntIntHolder;
- import com.l2jmega.gameserver.model.item.instance.ItemInstance;
- import com.l2jmega.gameserver.model.item.kind.Item;
- @@ -38,6 +39,7 @@ protected void readImpl()
- @Override
- protected void runImpl()
- {
- + //_ctrlPressed = false;
- final Player activeChar = getClient().getActiveChar();
- if (activeChar == null)
- return;
- @@ -158,6 +160,13 @@ protected void runImpl()
- return;
- }
- + //if ((((activeChar.getClassId().getId()) == 124) || ((activeChar.getClassId().getId()) == 123)) && ((item.getItem().getBodyPart()) == 256)) //blocking Kama shield
- + if ((activeChar.getRace() == ClassRace.MYSTIC_ELF) && ((item.getItem().getBodyPart()) == 256))
- + {
- + activeChar.sendPacket(SystemMessageId.CANNOT_EQUIP_ITEM_DUE_TO_BAD_CONDITION);
- + return;
- + }
- +
- switch (item.getItem().getBodyPart())
- {
- case Item.SLOT_LR_HAND:
- @@ -176,15 +185,29 @@ protected void runImpl()
- break;
- }
- + case Item.SLOT_DECO:
- + {
- + if (!item.isEquipped() && (activeChar.getInventory().getTalismanSlots() == 0))
- + {
- + activeChar.sendPacket(SystemMessageId.CANNOT_EQUIP_ITEM_DUE_TO_BAD_CONDITION);
- + return;
- + }
- + }
- }
- if (activeChar.isCursedWeaponEquipped() && item.getItemId() == 6408) // Don't allow to put formal wear
- return;
- if (activeChar.isAttackingNow())
- - ThreadPool.schedule(() -> activeChar.useEquippableItem(item, false), activeChar.getAttackEndTime() - System.currentTimeMillis());
- - else
- - activeChar.useEquippableItem(item, true);
- + ThreadPool.schedule(() -> {
- + final ItemInstance itemToTest = activeChar.getInventory().getItemByObjectId(_objectId);
- + if(itemToTest == null)
- + return;
- +
- + activeChar.useEquippableItem(itemToTest, false);
- + }, activeChar.getAttackEndTime() - System.currentTimeMillis());
- + else
- + activeChar.useEquippableItem(item, true);
- }
- else
- {
- 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
- index 443391c3..8515d54d 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/BuyList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/BuyList.java
- @@ -23,8 +23,11 @@ public BuyList(NpcBuyList list, int currentMoney, double taxRate)
- @Override
- protected final void writeImpl()
- {
- - writeC(0x11);
- - writeD(_money);
- + writeC(0xFE);
- + writeH(0xB7);
- + writeD(0x00);
- +
- + writeQ(_money);
- writeD(_listId);
- writeH(_list.size());
- @@ -32,21 +35,43 @@ protected final void writeImpl()
- {
- if (product.getCount() > 0 || !product.hasLimitedStock())
- {
- - writeH(product.getItem().getType1());
- writeD(product.getItemId());
- writeD(product.getItemId());
- - writeD((product.getCount() < 0) ? 0 : product.getCount());
- + writeD(0);
- + writeQ((product.getCount() < 0) ? 0 : product.getCount());
- writeH(product.getItem().getType2());
- - writeH(0x00); // TODO: ItemInstance getCustomType1()
- + writeH(product.getItem().getType1());
- + writeH(0x00);
- writeD(product.getItem().getBodyPart());
- - writeH(0x00); // TODO: ItemInstance getEnchantLevel()
- - writeH(0x00); // TODO: ItemInstance getCustomType2()
- +
- + writeH(0x00); // Enchant
- + writeH(0x00); // Custom Type
- + writeD(0x00); // Augment
- + writeD(-1); // Mana
- + writeD(-9999); // Time
- + writeH(0x00); // Element Type
- + writeH(0x00); // Element Power
- +
- + for (byte i = 0; i < 6; i++)
- + {
- + writeH(0x00);
- + }
- +
- + // Enchant Effects
- + writeH(0x00);
- writeH(0x00);
- + writeH(0x00);
- +
- if (product.getItemId() >= 3960 && product.getItemId() <= 4026)
- - writeD((int) (product.getPrice() * Config.RATE_SIEGE_GUARDS_PRICE * (1 + _taxRate)));
- + writeQ((int) (product.getPrice() * Config.RATE_SIEGE_GUARDS_PRICE * (1 + _taxRate)));
- else
- - writeD((int) (product.getPrice() * (1 + _taxRate)));
- + writeQ((int) (product.getPrice() * (1 + _taxRate)));
- + // T1
- + // for (byte i = 0; i < 8; i++)
- + // {
- + // writeH(0x00);
- + // }
- }
- }
- }
- 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
- index 6037b86c..84ae846d 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/BuyListSeed.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/BuyListSeed.java
- @@ -28,9 +28,9 @@ public BuyListSeed(int currentMoney, int castleId)
- @Override
- protected final void writeImpl()
- {
- - writeC(0xE8);
- + writeC(0xE9);
- - writeD(_money);
- + writeQ(_money);
- writeD(_manorId);
- if (!_list.isEmpty())
- @@ -38,13 +38,30 @@ protected final void writeImpl()
- writeH(_list.size());
- for (SeedProduction s : _list)
- {
- - writeH(0x04);
- writeD(s.getId());
- writeD(s.getId());
- - writeD(s.getAmount());
- - writeH(0x04);
- + writeD(0x00);
- + writeQ(s.getAmount());
- + writeH(0x05);
- + writeH(0x00); // Custom Type 1
- + writeH(0x00); // Equipped
- + writeD(0x00); // Body Part
- + writeH(0x00); // Enchant
- + writeH(0x00); // Custom Type
- + writeD(0x00); // Augment
- + writeD(-1); // Mana
- + writeD(-9999); // Time
- + writeH(0x00); // Element Type
- + writeH(0x00); // Element Power
- + for (byte i = 0; i < 6; i++)
- + {
- + writeH(0x00);
- + }
- + // Enchant Effects
- writeH(0x00);
- - writeD(s.getPrice());
- + writeH(0x00);
- + writeH(0x00);
- + writeQ(s.getPrice());
- }
- }
- }
- 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
- index 0a96858d..5c0e56dd 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/CreatureSay.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/CreatureSay.java
- @@ -49,16 +49,17 @@ protected final void writeImpl()
- writeS(_charName);
- else
- writeD(_charId);
- - writeD(_npcString); // High Five NPCString ID
- + // writeD(_npcString); // High Five NPCString ID
- if (_text != null)
- writeS(_text);
- else
- {
- - if (_parameters != null)
- - {
- - for (String s : _parameters)
- - writeS(s);
- - }
- + writeD(_npcString);
- + // if (_parameters != null)
- + // {
- + // for (String s : _parameters)
- + // writeS(s);
- + // }
- }
- }
- }
- \ No newline at end of file
- 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
- index 90b38f94..ce925160 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DeleteObject.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DeleteObject.java
- @@ -22,8 +22,8 @@ public DeleteObject(WorldObject obj, boolean sit)
- @Override
- protected final void writeImpl()
- {
- - writeC(0x12);
- + writeC(0x08);
- writeD(_objectId);
- - writeD(_isSeated ? 0x00 : 0x01); // 0 - stand up and delete, 1 - delete
- + //writeD(_isSeated ? 0x00 : 0x01); // 0 - stand up and delete, 1 - delete
- }
- }
- \ No newline at end of file
- 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
- index c6648e3b..a243045b 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DoorInfo.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DoorInfo.java
- @@ -7,25 +7,32 @@ public class DoorInfo extends L2GameServerPacket
- {
- private final Door _door;
- private final Player _activeChar;
- + private int _damageGrade;
- public DoorInfo(Door door, Player activeChar)
- {
- _door = door;
- _activeChar = activeChar;
- + _damageGrade = door.getDamage();
- }
- @Override
- protected final void writeImpl()
- {
- - writeC(0x4c);
- - writeD(_door.getObjectId());
- +
- + //writeC(0x4c);
- + writeC(0x9f);
- writeD(_door.getDoorId());
- - writeD(_door.isAutoAttackable(_activeChar) ? 0 : 1); // ??? (can attack)
- + writeD(_door.getObjectId());
- + writeD(1);
- + writeD(1);
- writeD(1); // ??? (can target)
- writeD(_door.isOpened() ? 0 : 1);
- - writeD(_door.getMaxHp());
- + writeD(_door.isAutoAttackable(_activeChar) ? 0 : 1); // ??? (can attack)
- writeD((int) _door.getCurrentHp());
- - writeD(0); // ??? (show HP)
- - writeD(0); // ??? (Damage)
- + writeD(_door.getMaxHp());
- + writeD(1); // ??? (show HP)
- + writeD(_damageGrade);
- + //writeD(0); // ??? (Damage)
- }
- }
- \ No newline at end of file
- 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
- index 184b7192..27942e19 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DoorStatusUpdate.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DoorStatusUpdate.java
- @@ -23,7 +23,7 @@ protected final void writeImpl()
- writeD(_door.getDamage());
- writeD(_door.isAutoAttackable(_activeChar) ? 1 : 0);
- writeD(_door.getDoorId());
- - writeD(_door.getMaxHp());
- writeD((int) _door.getCurrentHp());
- + writeD(_door.getMaxHp());
- }
- }
- \ No newline at end of file
- 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
- index 57e0f911..1f092547 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DropItem.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/DropItem.java
- @@ -16,7 +16,7 @@ public DropItem(ItemInstance item, int playerObjId)
- @Override
- protected final void writeImpl()
- {
- - writeC(0x0c);
- + writeC(0x16);
- writeD(_charObjId);
- writeD(_item.getObjectId());
- writeD(_item.getItemId());
- @@ -30,7 +30,7 @@ protected final void writeImpl()
- writeD(0x01);
- else
- writeD(0x00);
- - writeD(_item.getCount());
- + writeQ(Long.valueOf(_item.getCount()));
- writeD(1); // unknown
- }
- 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
- index 4a90ea67..b8f4aec0 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/EnchantResult.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/EnchantResult.java
- @@ -18,7 +18,7 @@ private EnchantResult(int result)
- @Override
- protected final void writeImpl()
- {
- - writeC(0x81);
- + writeC(0x87);
- writeD(_result);
- }
- }
- \ No newline at end of file
- 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
- index 895d2f5f..14e4ca68 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExConfirmCancelItem.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExConfirmCancelItem.java
- @@ -26,7 +26,7 @@ public ExConfirmCancelItem(ItemInstance item, int price)
- protected void writeImpl()
- {
- writeC(0xfe);
- - writeH(0x56);
- + writeH(0x57);
- writeD(_itemObjId);
- writeD(_itemId);
- writeD(_itemAug1);
- 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
- index a306d689..241f5104 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExConfirmVariationGemstone.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExConfirmVariationGemstone.java
- @@ -14,9 +14,9 @@ public class ExConfirmVariationGemstone extends L2GameServerPacket
- public ExConfirmVariationGemstone(int gemstoneObjId, int count)
- {
- _gemstoneObjId = gemstoneObjId;
- - _unk1 = 1;
- + _unk1 = 0;
- _gemstoneCount = count;
- - _unk2 = 1;
- + _unk2 = 0;
- _unk3 = 1;
- }
- @@ -24,10 +24,11 @@ public ExConfirmVariationGemstone(int gemstoneObjId, int count)
- protected void writeImpl()
- {
- writeC(0xfe);
- - writeH(0x54);
- + writeH(0x55);
- writeD(_gemstoneObjId);
- + writeD(0x00);
- + writeQ(_gemstoneCount);
- writeD(_unk1);
- - writeD(_gemstoneCount);
- writeD(_unk2);
- writeD(_unk3);
- }
- 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
- index 308cfac9..75f6d3e1 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExConfirmVariationRefiner.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExConfirmVariationRefiner.java
- @@ -24,11 +24,11 @@ public ExConfirmVariationRefiner(int refinerItemObjId, int lifeStoneId, int gems
- protected void writeImpl()
- {
- writeC(0xfe);
- - writeH(0x53);
- + writeH(0x54);
- writeD(_refinerItemObjId);
- writeD(_lifestoneItemId);
- writeD(_gemstoneItemId);
- - writeD(_gemstoneCount);
- + writeQ(_gemstoneCount);
- writeD(_unk2);
- }
- }
- \ No newline at end of file
- 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
- index a13e4c85..74cf16e6 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelAskStart.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelAskStart.java
- @@ -19,7 +19,7 @@ public ExDuelAskStart(String requestor, int partyDuel)
- protected void writeImpl()
- {
- writeC(0xfe);
- - writeH(0x4b);
- + writeH(0x4c);
- writeS(_requestorName);
- writeD(_partyDuel);
- 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
- index b205c31c..096c4b16 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelEnd.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelEnd.java
- @@ -17,7 +17,7 @@ public ExDuelEnd(int unk1)
- protected void writeImpl()
- {
- writeC(0xfe);
- - writeH(0x4e);
- + writeH(0x4f);
- writeD(_unk1);
- }
- 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
- index b80e5dff..7958b431 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelReady.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelReady.java
- @@ -17,7 +17,7 @@ public ExDuelReady(int unk1)
- protected void writeImpl()
- {
- writeC(0xfe);
- - writeH(0x4c);
- + writeH(0x4d);
- writeD(_unk1);
- }
- 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
- index 3063f085..b3fb0efd 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelStart.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExDuelStart.java
- @@ -17,7 +17,7 @@ public ExDuelStart(int unk1)
- protected void writeImpl()
- {
- writeC(0xfe);
- - writeH(0x4d);
- + writeH(0x4e);
- writeD(_unk1);
- }
- 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
- index 1d696e88..e440d4d2 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExEnchantSkillInfo.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExEnchantSkillInfo.java
- @@ -46,22 +46,29 @@ public void addRequirement(int type, int id, int count, int unk)
- protected void writeImpl()
- {
- writeC(0xfe);
- - writeH(0x18);
- -
- - writeD(_id);
- - writeD(_level);
- - writeD(_spCost);
- - writeQ(_xpCost);
- - writeD(_rate);
- + writeH(0x2a);
- + writeD(0);
- writeD(_reqs.size());
- +
- +
- +
- +
- for (Req temp : _reqs)
- {
- - writeD(temp.type);
- - writeD(temp.id);
- - writeD(temp.count);
- - writeD(temp.unk);
- + writeD(_level);
- + writeD(_rate);
- + writeD(_spCost);
- + writeQ(_xpCost);
- + writeQ(0);
- + writeD(0); // req type?
- + writeD(0); // required itemId
- + writeD(0); // ?
- + // writeD(temp.type);
- + // writeD(temp.id);
- + // writeD(temp.count);
- + // writeD(temp.unk);
- }
- }
- }
- \ No newline at end of file
- 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
- index d59dea0a..d0517afb 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExEnchantSkillList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExEnchantSkillList.java
- @@ -17,15 +17,19 @@ public ExEnchantSkillList(List<EnchantSkillNode> skills)
- protected void writeImpl()
- {
- writeC(0xfe);
- - writeH(0x17);
- -
- + writeH(0x29);
- + writeD(0x00);
- writeD(_skills.size());
- for (EnchantSkillNode esn : _skills)
- {
- writeD(esn.getId());
- + //int superval = (esn.getValue());
- + //if (superval > 101)
- + //writeD(superval -1);
- + //else
- writeD(esn.getValue());
- - writeD(esn.getSp());
- - writeQ(esn.getExp());
- + //writeD(esn.getSp());
- + //writeQ(esn.getExp());
- }
- }
- }
- \ No newline at end of file
- 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
- index fb60f678..2909f598 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingEnd.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingEnd.java
- @@ -15,7 +15,7 @@ public ExFishingEnd(boolean win, int playerId)
- protected void writeImpl()
- {
- writeC(0xfe);
- - writeH(0x14);
- + writeH(0x1f);
- writeD(_playerId);
- writeC((_win) ? 1 : 0);
- }
- 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
- index 29b7d768..c1165458 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingHpRegen.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingHpRegen.java
- @@ -27,7 +27,7 @@ public ExFishingHpRegen(Creature character, int time, int fishHP, int HPmode, in
- protected void writeImpl()
- {
- writeC(0xfe);
- - writeH(0x16);
- + writeH(0x28);
- writeD(_activeChar.getObjectId());
- writeD(_time);
- 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
- index dff1b62a..79864807 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingStart.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingStart.java
- @@ -27,7 +27,7 @@ public ExFishingStart(Creature character, int fishType, Location loc, boolean is
- protected void writeImpl()
- {
- writeC(0xfe);
- - writeH(0x13);
- + writeH(0x1e);
- writeD(_activeChar.getObjectId());
- writeD(_fishType); // fish type
- writeD(_loc.getX()); // x position
- @@ -35,5 +35,7 @@ protected void writeImpl()
- writeD(_loc.getZ()); // z position
- writeC(_isNightLure ? 0x01 : 0x00); // night lure
- writeC(Config.ALT_FISH_CHAMPIONSHIP_ENABLED ? 0x01 : 0x00); // show fish rank result button
- + writeC((_fishType >= 7 && _fishType <= 9) ? 0x01 : 0x00); // 0 = day lure 1 = night lure
- + writeC(0x00);
- }
- }
- \ No newline at end of file
- 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
- index cf97701a..5ad6a618 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingStartCombat.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExFishingStartCombat.java
- @@ -26,7 +26,7 @@ public ExFishingStartCombat(Creature character, int time, int hp, int mode, int
- protected void writeImpl()
- {
- writeC(0xfe);
- - writeH(0x15);
- + writeH(0x27);
- writeD(_activeChar.getObjectId());
- writeD(_time);
- 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
- index 794ba6d9..e8c73f4a 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExGetBossRecord.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExGetBossRecord.java
- @@ -23,7 +23,7 @@ public ExGetBossRecord(int ranking, int totalScore, Map<Integer, Integer> list)
- protected void writeImpl()
- {
- writeC(0xfe);
- - writeH(0x33);
- + writeH(0x34);
- writeD(_ranking);
- writeD(_totalPoints);
- if (_bossRecordInfo == null)
- 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
- index ef5b313d..5ade481a 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExHeroList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExHeroList.java
- @@ -23,7 +23,7 @@ public ExHeroList()
- protected void writeImpl()
- {
- writeC(0xfe);
- - writeH(0x23);
- + writeH(0x79);
- writeD(_heroList.size());
- for (StatsSet hero : _heroList)
- 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
- new file mode 100644
- index 00000000..2ef39ab6
- --- /dev/null
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExPutEnchantTargetItemResult.java
- @@ -0,0 +1,54 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package com.l2jmega.gameserver.network.serverpackets;
- +
- +/**
- + *
- + * @author nBd
- + */
- +public class ExPutEnchantTargetItemResult extends L2GameServerPacket
- +{
- + private static final String _S__81_EXPUTENCHANTTARGETITEMRESULT = " 81 ExPutEnchantTargetItemResult";
- +
- + private int _result;
- +
- + /**
- + *
- + */
- + public ExPutEnchantTargetItemResult(int result)
- + {
- + _result = result;
- + }
- +
- + /**
- + * @see com.l2jmega.gameserver.network.serverpackets.L2GameServerPacket#getType()
- + */
- + @Override
- + public String getType()
- + {
- + return _S__81_EXPUTENCHANTTARGETITEMRESULT;
- + }
- +
- + /**
- + * @see com.l2jmega.gameserver.network.serverpackets.L2GameServerPacket#writeImpl()
- + */
- + @Override
- + protected void writeImpl()
- + {
- + writeC(0xfe);
- + writeH(0x81);
- + writeD(_result);
- + }
- +}
- 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
- index f50dff4a..ad40418b 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExServerPrimitive.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExServerPrimitive.java
- @@ -396,7 +396,7 @@ public void addLine(Color color, Location location, Location location2)
- protected void writeImpl()
- {
- writeC(0xFE);
- - writeH(0x24);
- + writeH(0x11);
- writeS(_name);
- writeD(_x);
- writeD(_y);
- 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
- index 9f95bbad..053126ad 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowAdventurerGuideBook.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowAdventurerGuideBook.java
- @@ -16,6 +16,6 @@ private ExShowAdventurerGuideBook()
- protected void writeImpl()
- {
- writeC(0xFE);
- - writeH(0x37);
- + writeH(0x38);
- }
- }
- \ No newline at end of file
- 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
- index 90eeba7d..cbc0600c 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowCropInfo.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowCropInfo.java
- @@ -25,7 +25,7 @@ public ExShowCropInfo(int manorId, boolean nextPeriod, boolean hideButtons)
- protected void writeImpl()
- {
- writeC(0xFE);
- - writeH(0x1D);
- + writeH(0x24);
- writeC(_hideButtons ? 0x01 : 0x00);
- writeD(_manorId);
- writeD(0);
- @@ -39,9 +39,9 @@ protected void writeImpl()
- for (CropProcure crop : _crops)
- {
- writeD(crop.getId());
- - writeD(crop.getAmount());
- - writeD(crop.getStartAmount());
- - writeD(crop.getPrice());
- + writeQ(crop.getAmount());
- + writeQ(crop.getStartAmount());
- + writeQ(crop.getPrice());
- writeC(crop.getReward());
- final Seed seed = CastleManorManager.getInstance().getSeedByCrop(crop.getId());
- 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
- index e22905cf..bf41e11e 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowCropSetting.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowCropSetting.java
- @@ -39,7 +39,7 @@ public ExShowCropSetting(int manorId)
- public void writeImpl()
- {
- writeC(0xFE); // Id
- - writeH(0x20); // SubId
- + writeH(0x2b); // SubId
- writeD(_manorId); // manor id
- writeD(_seeds.size()); // size
- @@ -63,28 +63,28 @@ public void writeImpl()
- if (_current.containsKey(s.getCropId()))
- {
- cp = _current.get(s.getCropId());
- - writeD(cp.getStartAmount()); // buy
- - writeD(cp.getPrice()); // price
- + writeQ(cp.getStartAmount()); // buy
- + writeQ(cp.getPrice()); // price
- writeC(cp.getReward()); // reward
- }
- else
- {
- - writeD(0);
- - writeD(0);
- + writeQ(0);
- + writeQ(0);
- writeC(0);
- }
- // Next period
- if (_next.containsKey(s.getCropId()))
- {
- cp = _next.get(s.getCropId());
- - writeD(cp.getStartAmount()); // buy
- - writeD(cp.getPrice()); // price
- + writeQ(cp.getStartAmount()); // buy
- + writeQ(cp.getPrice()); // price
- writeC(cp.getReward()); // reward
- }
- else
- {
- - writeD(0);
- - writeD(0);
- + writeQ(0);
- + writeQ(0);
- writeC(0);
- }
- }
- 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
- index 240da3a5..72d48b44 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowManorDefaultInfo.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowManorDefaultInfo.java
- @@ -20,7 +20,7 @@ public ExShowManorDefaultInfo(boolean hideButtons)
- protected void writeImpl()
- {
- writeC(0xFE);
- - writeH(0x1E);
- + writeH(0x25);
- writeC(_hideButtons ? 0x01 : 0x00);
- writeD(_crops.size());
- for (Seed crop : _crops)
- 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
- index e5b61956..618634d8 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowProcureCropDetail.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowProcureCropDetail.java
- @@ -30,7 +30,7 @@ public ExShowProcureCropDetail(int cropId)
- public void writeImpl()
- {
- writeC(0xFE);
- - writeH(0x22);
- + writeH(0x78);
- writeD(_cropId);
- writeD(_castleCrops.size());
- @@ -40,8 +40,8 @@ public void writeImpl()
- final CropProcure crop = entry.getValue();
- writeD(entry.getKey());
- - writeD(crop.getAmount());
- - writeD(crop.getPrice());
- + writeQ(crop.getAmount());
- + writeQ(crop.getPrice());
- writeC(crop.getReward());
- }
- }
- 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
- index d5d8a462..eca6633b 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowQuestMark.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowQuestMark.java
- @@ -16,7 +16,7 @@ public ExShowQuestMark(int questId)
- protected void writeImpl()
- {
- writeC(0xfe);
- - writeH(0x1a);
- + writeH(0x21);
- writeD(_questId);
- }
- }
- \ No newline at end of file
- 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
- index efb4b557..e75268e2 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExSendManorList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExSendManorList.java
- @@ -29,7 +29,7 @@ private ExSendManorList()
- protected void writeImpl()
- {
- writeC(0xFE);
- - writeH(0x1B);
- + writeH(0x22);
- writeD(_manorList.length);
- for (int i = 0; i < _manorList.length; i++)
- {
- 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
- index e92c3807..63204f04 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowSeedInfo.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowSeedInfo.java
- @@ -25,7 +25,7 @@ public ExShowSeedInfo(int manorId, boolean nextPeriod, boolean hideButtons)
- protected void writeImpl()
- {
- writeC(0xFE);
- - writeH(0x1C);
- + writeH(0x23);
- writeC(_hideButtons ? 0x01 : 0x00);
- writeD(_manorId);
- writeD(0);
- @@ -40,9 +40,9 @@ protected void writeImpl()
- for (SeedProduction seed : _seeds)
- {
- writeD(seed.getId()); // Seed id
- - writeD(seed.getAmount()); // Left to buy
- - writeD(seed.getStartAmount()); // Started amount
- - writeD(seed.getPrice()); // Sell Price
- + writeQ(seed.getAmount()); // Left to buy
- + writeQ(seed.getStartAmount()); // Started amount
- + writeQ(seed.getPrice()); // Sell Price
- final Seed s = CastleManorManager.getInstance().getSeed(seed.getId());
- if (s == null)
- 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
- index c92e38e9..fcdbd70d 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowSeedSetting.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowSeedSetting.java
- @@ -40,7 +40,7 @@ public ExShowSeedSetting(int manorId)
- public void writeImpl()
- {
- writeC(0xFE);
- - writeH(0x1F);
- + writeH(0x26);
- writeD(_manorId);
- writeD(_seeds.size());
- @@ -64,25 +64,25 @@ public void writeImpl()
- if (_current.containsKey(s.getSeedId()))
- {
- sp = _current.get(s.getSeedId());
- - writeD(sp.getStartAmount()); // sales
- - writeD(sp.getPrice()); // price
- + writeQ(sp.getStartAmount()); // sales
- + writeQ(sp.getPrice()); // price
- }
- else
- {
- - writeD(0);
- - writeD(0);
- + writeQ(0);
- + writeQ(0);
- }
- // Next period
- if (_next.containsKey(s.getSeedId()))
- {
- sp = _next.get(s.getSeedId());
- - writeD(sp.getStartAmount()); // sales
- - writeD(sp.getPrice()); // price
- + writeQ(sp.getStartAmount()); // sales
- + writeQ(sp.getPrice()); // price
- }
- else
- {
- - writeD(0);
- - writeD(0);
- + writeQ(0);
- + writeQ(0);
- }
- }
- }
- 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
- index 764eaf83..efbe87f9 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowSellCropList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExShowSellCropList.java
- @@ -39,7 +39,7 @@ public ExShowSellCropList(PcInventory inventory, int manorId)
- public void writeImpl()
- {
- writeC(0xFE);
- - writeH(0x21);
- + writeH(0x2c);
- writeD(_manorId);
- writeD(_cropsItems.size());
- @@ -60,18 +60,18 @@ public void writeImpl()
- {
- final CropProcure crop = _castleCrops.get(item.getItemId());
- writeD(_manorId);
- - writeD(crop.getAmount());
- - writeD(crop.getPrice());
- + writeQ(crop.getAmount());
- + writeQ(crop.getPrice());
- writeC(crop.getReward());
- }
- else
- {
- writeD(0xFFFFFFFF);
- - writeD(0);
- - writeD(0);
- + writeQ(0);
- + writeQ(0);
- writeC(0);
- }
- - writeD(item.getCount());
- + writeQ(item.getCount());
- }
- }
- }
- \ No newline at end of file
- 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
- index 3cf42e2b..84b0d7f5 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ItemList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ItemList.java
- @@ -1,45 +1,88 @@
- package com.l2jmega.gameserver.network.serverpackets;
- +import java.util.HashSet;
- import java.util.Set;
- import com.l2jmega.gameserver.model.actor.instance.Player;
- import com.l2jmega.gameserver.model.item.instance.ItemInstance;
- import com.l2jmega.gameserver.model.item.kind.Item;
- +//1B - packet
- +//00 00 - windows
- +//07 00 - count
- +//01 00 - item typer
- +//B4 A4 00 10 -objid
- +//7B 04 00 00 - ItemID
- +//01 00 00 00 - count
- +//01 00 - itemtype 1
- +//00 00 - custtype
- +//01 00 - is equipped
- +//00 08 00 00 - body part
- +//00 00 -enchant level
- +//00 00 -custtype 2
- +//00 00 00 00 - aug id
- +//FF FF FF FF - shadowtime
- +
- public class ItemList extends L2GameServerPacket
- {
- - private final Set<ItemInstance> _items;
- + private Set<ItemInstance> _items = new HashSet<>();
- private final boolean _showWindow;
- -
- public ItemList(Player cha, boolean showWindow)
- {
- - _items = cha.getInventory().getItems();
- + _items.addAll(cha.getInventory().getItems());
- +
- _showWindow = showWindow;
- }
- -
- +
- @Override
- protected final void writeImpl()
- {
- - writeC(0x1b);
- + writeC(0x11);
- writeH(_showWindow ? 0x01 : 0x00);
- writeH(_items.size());
- -
- +
- for (ItemInstance temp : _items)
- {
- Item item = temp.getItem();
- -
- - writeH(item.getType1());
- +
- + //writeH(item.getType1());
- writeD(temp.getObjectId());
- writeD(temp.getItemId());
- - writeD(temp.getCount());
- + //writeD(0); //writeD(0);writeD(0);writeD(0);
- + //writeD(item.getBodyPart());
- + writeD(0);
- + writeQ(Long.valueOf(temp.getCount()));
- + //writeQ(0);
- writeH(item.getType2());
- writeH(temp.getCustomType1());
- writeH(temp.isEquipped() ? 0x01 : 0x00);
- + //writeD(2048);
- writeD(item.getBodyPart());
- + //writeD(temp.getItem().getBodyPart());
- + //writeD(temp.getItem().getBodyPart());
- writeH(temp.getEnchantLevel());
- writeH(temp.getCustomType2());
- writeD((temp.isAugmented()) ? temp.getAugmentation().getAugmentationId() : 0x00);
- + //writeH((temp.isAugmented()) ? temp.getAugmentation().getAugmentationId() : 0x00);
- writeD(temp.getMana());
- + writeD(0);
- +
- + writeH(0);//elemttpe
- + writeH(0);
- +
- + writeH(0);//elements
- + writeH(0);
- + writeH(0);
- + writeH(0);
- + writeH(0);
- + writeH(0);
- +
- + //writeD(0);
- + writeH(0x00);//enchanteffects
- + writeH(0x00);
- + writeH(0x00);
- +
- + //writeH(0x00); //invblock?
- }
- }
- }
- \ No newline at end of file
- 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
- index b8b5db07..7882fdeb 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/MultiSellList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/MultiSellList.java
- @@ -37,7 +37,8 @@ protected void writeImpl()
- writeD(_list.getId()); // list id
- writeD(1 + (_index / PAGE_SIZE)); // page
- writeD(_finished ? 1 : 0); // finished
- - writeD(PAGE_SIZE); // size of pages
- + writeD(0x28);
- + // writeD(PAGE_SIZE); // size of pages
- writeD(_size); // list lenght
- while (_size-- > 0)
- @@ -45,15 +46,25 @@ protected void writeImpl()
- Entry ent = _list.getEntries().get(_index++);
- writeD(ent.getId());
- - writeD(0x00); // C6
- - writeD(0x00); // C6
- writeC(ent.isStackable() ? 1 : 0);
- + writeH(0x00); // C6
- + writeD(0x00); // C6
- + writeD(0x00); // T1
- + writeH(65534); // T1
- + writeH(0x00); // T1
- + writeH(0x00); // T1
- + writeH(0x00); // T1
- + writeH(0x00); // T1
- + writeH(0x00); // T1
- + writeH(0x00); // T1
- + writeH(0x00); // T1
- writeH(ent.getProducts().size());
- writeH(ent.getIngredients().size());
- for (Ingredient ing : ent.getProducts())
- {
- - writeH(ing.getItemId());
- + //writeH(ing.getItemId());
- + writeD(ing.getItemId());
- if (ing.getTemplate() != null)
- {
- writeD(ing.getTemplate().getBodyPart());
- @@ -64,20 +75,37 @@ protected void writeImpl()
- writeD(0);
- writeH(65535);
- }
- - writeD(ing.getItemCount());
- + writeQ(ing.getItemCount());
- writeH(ing.getEnchantLevel());
- writeD(0x00); // TODO: i.getAugmentId()
- writeD(0x00); // TODO: i.getManaLeft()
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- }
- for (Ingredient ing : ent.getIngredients())
- {
- - writeH(ing.getItemId());
- + //writeH(ing.getItemId());
- + writeD(ing.getItemId());
- writeH(ing.getTemplate() != null ? ing.getTemplate().getType2() : 65535);
- - writeD(ing.getItemCount());
- + writeQ(ing.getItemCount());
- writeH(ing.getEnchantLevel());
- writeD(0x00); // TODO: i.getAugmentId()
- writeD(0x00); // TODO: i.getManaLeft()
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- }
- }
- }
- 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
- index ba45f42c..3266ebc4 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetDelete.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetDelete.java
- @@ -14,7 +14,7 @@ public PetDelete(int summonType, int objId)
- @Override
- protected final void writeImpl()
- {
- - writeC(0xb6);
- + writeC(0xb7);
- writeD(_summonType);
- writeD(_objId);
- }
- 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
- index 0c27da73..d3e32795 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetInfo.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetInfo.java
- @@ -33,7 +33,7 @@ else if (_summon instanceof Servitor)
- @Override
- protected final void writeImpl()
- {
- - writeC(0xb1);
- + writeC(0xb2);
- writeD(_summon.getSummonType());
- writeD(_summon.getObjectId());
- writeD(_summon.getTemplate().getIdTemplate() + 1000000);
- 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
- index 043b721b..91a58764 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetInventoryUpdate.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetInventoryUpdate.java
- @@ -60,7 +60,7 @@ public void addItems(List<ItemInstance> items)
- @Override
- protected final void writeImpl()
- {
- - writeC(0xb3);
- + writeC(0xb4);
- writeH(_items.size());
- for (ItemInfo temp : _items)
- @@ -68,16 +68,34 @@ protected final void writeImpl()
- Item item = temp.getItem();
- writeH(temp.getChange().ordinal());
- - writeH(item.getType1());
- + //writeH(item.getType1());
- writeD(temp.getObjectId());
- writeD(item.getItemId());
- - writeD(temp.getCount());
- + writeD(0x00);
- + writeQ(temp.getCount());
- writeH(item.getType2());
- writeH(temp.getCustomType1());
- writeH(temp.getEquipped());
- writeD(item.getBodyPart());
- writeH(temp.getEnchant());
- writeH(temp.getCustomType2());
- + writeD(0x00);
- + writeD(0x00);
- + writeD(0x00);
- +
- + writeH(0x00);
- + writeH(0x00);
- +
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- +
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- }
- }
- }
- \ No newline at end of file
- 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
- index 055090dd..7381a8da 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetItemList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetItemList.java
- @@ -18,7 +18,7 @@ public PetItemList(Pet character)
- @Override
- protected final void writeImpl()
- {
- - writeC(0xB2);
- + writeC(0xB3);
- writeH(_items.size());
- for (ItemInstance temp : _items)
- 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
- index b9b1f8d0..f608c65a 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetStatusShow.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetStatusShow.java
- @@ -17,7 +17,7 @@ public PetStatusShow(Summon summon)
- @Override
- protected final void writeImpl()
- {
- - writeC(0xB0);
- + writeC(0xB1);
- writeD(_summonType);
- }
- }
- \ No newline at end of file
- 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
- index b7c906d0..eed18d58 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetStatusUpdate.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PetStatusUpdate.java
- @@ -32,7 +32,7 @@ else if (_summon instanceof Servitor)
- @Override
- protected final void writeImpl()
- {
- - writeC(0xb5);
- + writeC(0xb6);
- writeD(_summon.getSummonType());
- writeD(_summon.getObjectId());
- writeD(_summon.getX());
- 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
- index 098a5c4c..fd94d2f9 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PledgeStatusChanged.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PledgeStatusChanged.java
- @@ -23,6 +23,12 @@ protected final void writeImpl()
- writeD(_clan.getCrestId());
- writeD(_clan.getAllyId());
- writeD(_clan.getAllyCrestId());
- + //writeD(0);
- + //writeD(_clan.getLevel());
- + // writeD(_clan.getCrestId());
- + // writeD(_clan.getAllyId());
- + // writeD(_clan.getAllyCrestId());
- + //writeD(0);
- writeD(0);
- writeD(0);
- }
- 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
- index a27d6c49..1c2db0d8 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreListBuy.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreListBuy.java
- @@ -23,26 +23,46 @@ public PrivateStoreListBuy(Player player, Player storePlayer)
- @Override
- protected final void writeImpl()
- {
- - writeC(0xb8);
- + writeC(0xbe);
- writeD(_storePlayer.getObjectId());
- - writeD(_playerAdena);
- + writeQ(_playerAdena);
- writeD(_items.size());
- for (TradeItem item : _items)
- {
- writeD(item.getObjectId());
- writeD(item.getItem().getItemId());
- + writeD(0x00);
- + //writeD(item.getItem().getBodyPart());
- + writeQ(item.getCount()); // give max possible sell amount
- + writeH(item.getItem().getType2());
- + writeH(0x00);
- + writeH(0x00);
- + writeD(item.getItem().getBodyPart());
- writeH(item.getEnchant());
- - writeD(item.getCount()); // give max possible sell amount
- + writeH(0x00);
- - writeD(item.getItem().getReferencePrice());
- - writeH(0);
- + writeD(0x00);
- + writeD(0x00);
- + writeD(0x00);
- - writeD(item.getItem().getBodyPart());
- - writeH(item.getItem().getType2());
- - writeD(item.getPrice());// buyers price
- + writeH(0x00);
- + writeH(0x00);
- + for (byte i = 0; i < 6; i++)
- + {
- + writeH(0x00);
- + }
- - writeD(item.getCount()); // maximum possible tradecount
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- +
- + writeD(item.getObjectId());
- + writeQ(item.getPrice());// buyers price
- + writeQ(item.getItem().getReferencePrice());
- + writeQ(item.getCount()); // maximum possible tradecount
- +
- +
- }
- }
- }
- \ No newline at end of file
- 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
- index f4a7d0ef..36a4a701 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreListSell.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreListSell.java
- @@ -23,24 +23,44 @@ public PrivateStoreListSell(Player player, Player storePlayer)
- @Override
- protected final void writeImpl()
- {
- - writeC(0x9b);
- + writeC(0xa1);
- writeD(_storePlayer.getObjectId());
- writeD(_packageSale ? 1 : 0);
- - writeD(_playerAdena);
- + writeQ(_playerAdena);
- writeD(_items.size());
- for (TradeItem item : _items)
- {
- - writeD(item.getItem().getType2());
- writeD(item.getObjectId());
- writeD(item.getItem().getItemId());
- - writeD(item.getCount());
- + writeD(0x00);
- + //writeD(item.getItem().getBodyPart());
- + writeQ(item.getCount());
- + writeH(item.getItem().getType2());
- writeH(0x00);
- - writeH(item.getEnchant());
- writeH(0x00);
- writeD(item.getItem().getBodyPart());
- - writeD(item.getPrice()); // your price
- - writeD(item.getItem().getReferencePrice()); // store price
- + writeH(item.getEnchant());
- + writeH(0x00);
- +
- + writeD(0x00);
- + writeD(0x00);
- + writeD(0x00);
- +
- + writeH(0x00);
- + writeH(0x00);
- + for (byte i = 0; i < 6; i++)
- + {
- + writeH(0x00);
- + }
- +
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- +
- + writeQ(item.getPrice()); // your price
- + writeQ(item.getItem().getReferencePrice()); // store price
- +
- }
- }
- }
- \ No newline at end of file
- 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
- index 7c021309..5c81f864 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreManageListBuy.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreManageListBuy.java
- @@ -17,41 +17,84 @@ public PrivateStoreManageListBuy(Player player)
- {
- _objId = player.getObjectId();
- _playerAdena = player.getAdena();
- - _itemList = player.getInventory().getUniqueItems(false, true);
- + _itemList = player.getInventory().getUniqueItems(false, true, true);
- _buyList = player.getBuyList().getItems();
- }
- @Override
- protected final void writeImpl()
- {
- - writeC(0xb7);
- + writeC(0xbd);
- writeD(_objId);
- - writeD(_playerAdena);
- + writeQ(_playerAdena);
- writeD(_itemList.length); // inventory items for potential buy
- for (ItemInstance item : _itemList)
- {
- + writeD(item.getObjectId());
- writeD(item.getItemId());
- - writeH(item.getEnchantLevel());
- - writeD(item.getCount());
- - writeD(item.getReferencePrice());
- + writeD(0x00);
- + //writeD(item.getItem().getBodyPart());
- + writeQ(item.getCount());
- + writeH(item.getItem().getType2());
- + writeH(0x00);
- writeH(0x00);
- writeD(item.getItem().getBodyPart());
- - writeH(item.getItem().getType2());
- + writeH(item.getEnchantLevel());
- + writeH(0x00);
- +
- + writeD(0x00);
- + writeD(0x00);
- + writeD(0x00);
- +
- + writeH(0x00);
- + writeH(0x00);
- + for (byte i = 0; i < 6; i++)
- + {
- + writeH(0x00);
- + }
- +
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- +
- + writeQ(item.getReferencePrice());
- +
- }
- writeD(_buyList.size()); // count for all items already added for buy
- for (TradeItem item : _buyList)
- {
- + writeD(item.getObjectId());
- writeD(item.getItem().getItemId());
- - writeH(item.getEnchant());
- - writeD(item.getCount());
- - writeD(item.getItem().getReferencePrice());
- - writeH(0x00);
- writeD(item.getItem().getBodyPart());
- + writeQ(item.getCount());
- +
- writeH(item.getItem().getType2());
- - writeD(item.getPrice());// your price
- - writeD(item.getItem().getReferencePrice());// fixed store price
- + writeH(0x00);
- + writeH(0x00);
- + writeD(item.getItem().getBodyPart());
- + writeH(item.getEnchant());
- + writeH(0x00);
- +
- + writeD(0x00);
- + writeD(0x00);
- + writeD(0x00);
- +
- + writeH(0x00);
- + writeH(0x00);
- + for (byte i = 0; i < 6; i++)
- + {
- + writeH(0x00);
- + }
- +
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- +
- + writeQ(item.getPrice());// your price
- + writeQ(item.getItem().getReferencePrice());// fixed store price
- + writeQ(item.getCount());
- }
- }
- }
- \ No newline at end of file
- 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
- index 592efbb9..5de3c1b8 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreManageListSell.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreManageListSell.java
- @@ -21,45 +21,86 @@ public PrivateStoreManageListSell(Player player, boolean isPackageSale)
- player.getSellList().updateItems();
- _packageSale = (player.getSellList().isPackaged()) ? true : isPackageSale;
- - _itemList = player.getInventory().getAvailableItems(player.getSellList());
- + _itemList = player.getInventory().getAvailableItems(player.getSellList(), false);
- _sellList = player.getSellList().getItems();
- }
- @Override
- protected final void writeImpl()
- {
- - writeC(0x9a);
- + writeC(0xa0);
- writeD(_objId);
- writeD(_packageSale ? 1 : 0);
- - writeD(_playerAdena);
- + writeQ(_playerAdena);
- writeD(_itemList.length);
- for (TradeItem item : _itemList)
- {
- - writeD(item.getItem().getType2());
- +
- writeD(item.getObjectId());
- writeD(item.getItem().getItemId());
- - writeD(item.getCount());
- + writeD(0x00);
- + //writeD(item.getItem().getBodyPart());
- + writeQ(item.getCount());
- + writeH(item.getItem().getType2());
- writeH(0x00);
- - writeH(item.getEnchant());
- writeH(0x00);
- writeD(item.getItem().getBodyPart());
- - writeD(item.getPrice());
- + writeH(item.getEnchant());
- + writeH(0x00);
- +
- + writeD(0x00);
- + writeD(0x00);
- + writeD(0x00);
- +
- +
- +
- + writeH(0x00);
- + writeH(0x00);
- + for (byte i = 0; i < 6; i++)
- + {
- + writeH(0x00);
- + }
- +
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeQ(item.getPrice());
- }
- writeD(_sellList.size());
- for (TradeItem item : _sellList)
- {
- - writeD(item.getItem().getType2());
- +
- writeD(item.getObjectId());
- writeD(item.getItem().getItemId());
- - writeD(item.getCount());
- + writeD(item.getItem().getBodyPart());
- + writeQ(item.getCount());
- + writeH(item.getItem().getType2());
- + writeH(0x00);//cust
- writeH(0x00);
- + writeD(item.getItem().getBodyPart());
- writeH(item.getEnchant());
- writeH(0x00);
- - writeD(item.getItem().getBodyPart());
- - writeD(item.getPrice());
- - writeD(item.getItem().getReferencePrice());
- +
- + writeD(0x00);
- + writeD(0x00);
- + writeD(0x00);
- +
- +
- + writeH(0x00);
- + writeH(0x00);
- + for (byte i = 0; i < 6; i++)
- + {
- + writeH(0x00);
- + }
- +
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- +
- + writeQ(item.getPrice());
- + writeQ(item.getItem().getReferencePrice());
- }
- }
- }
- \ No newline at end of file
- 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
- index f38b8869..a608deb4 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreMsgBuy.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreMsgBuy.java
- @@ -17,7 +17,7 @@ public PrivateStoreMsgBuy(Player player)
- @Override
- protected final void writeImpl()
- {
- - writeC(0xb9);
- + writeC(0xbf);
- writeD(_activeChar.getObjectId());
- writeS(_storeMsg);
- }
- 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
- index 0592cd22..79a9c3bf 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreMsgSell.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreMsgSell.java
- @@ -17,7 +17,7 @@ public PrivateStoreMsgSell(Player player)
- @Override
- protected final void writeImpl()
- {
- - writeC(0x9c);
- + writeC(0xa2);
- writeD(_activeChar.getObjectId());
- writeS(_storeMsg);
- }
- 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
- index 62928806..d2eefff6 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeBookItemList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeBookItemList.java
- @@ -21,7 +21,7 @@ public RecipeBookItemList(Player player, boolean isDwarven)
- @Override
- protected final void writeImpl()
- {
- - writeC(0xD6);
- + writeC(0xDc);
- writeD((_isDwarven) ? 0x00 : 0x01);
- writeD(_maxMp);
- 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
- index b4f30b38..2d49a66a 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeItemMakeInfo.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeItemMakeInfo.java
- @@ -30,7 +30,7 @@ protected final void writeImpl()
- Recipe recipe = RecipeData.getInstance().getRecipeList(_id);
- if (recipe != null)
- {
- - writeC(0xD7);
- + writeC(0xDD);
- writeD(_id);
- writeD((recipe.isDwarven()) ? 0 : 1);
- 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
- index 97a625fb..318788bc 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopItemInfo.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopItemInfo.java
- @@ -16,7 +16,7 @@ public RecipeShopItemInfo(Player player, int recipeId)
- @Override
- protected final void writeImpl()
- {
- - writeC(0xda);
- + writeC(0xe0);
- writeD(_player.getObjectId());
- writeD(_recipeId);
- writeD((int) _player.getCurrentMp());
- 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
- index e21e338b..d32e499f 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopManageList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopManageList.java
- @@ -41,7 +41,7 @@ public RecipeShopManageList(Player seller, boolean isDwarven)
- @Override
- protected final void writeImpl()
- {
- - writeC(0xd8);
- + writeC(0xde);
- writeD(_seller.getObjectId());
- writeD(_seller.getAdena());
- writeD(_isDwarven ? 0x00 : 0x01);
- @@ -71,7 +71,7 @@ protected final void writeImpl()
- {
- writeD(item.getId());
- writeD(0x00);
- - writeD(item.getValue());
- + writeQ(item.getValue());
- }
- }
- }
- 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
- index 82bfefee..65f20ae3 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopMsg.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopMsg.java
- @@ -14,7 +14,7 @@ public RecipeShopMsg(Player player)
- @Override
- protected final void writeImpl()
- {
- - writeC(0xdb);
- + writeC(0xe1);
- writeD(_activeChar.getObjectId());
- writeS(_activeChar.getCreateList().getStoreName());
- }
- 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
- index ae36d28e..81e3d850 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopSellList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopSellList.java
- @@ -23,11 +23,11 @@ protected final void writeImpl()
- final ManufactureList createList = _manufacturer.getCreateList();
- if (createList != null)
- {
- - writeC(0xd9);
- + writeC(0xdf);
- writeD(_manufacturer.getObjectId());
- writeD((int) _manufacturer.getCurrentMp());
- writeD(_manufacturer.getMaxMp());
- - writeD(_buyer.getAdena());
- + writeQ(_buyer.getAdena());
- final List<ManufactureItem> list = createList.getList();
- writeD(list.size());
- @@ -36,7 +36,7 @@ protected final void writeImpl()
- {
- writeD(item.getId());
- writeD(0x00); // unknown
- - writeD(item.getValue());
- + writeQ(item.getValue());
- }
- }
- }
- 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
- index ebb23891..d58f66ae 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/Ride.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/Ride.java
- @@ -1,35 +1,79 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- package com.l2jmega.gameserver.network.serverpackets;
- -public class Ride extends L2GameServerPacket
- +import com.l2jmega.gameserver.model.actor.instance.Player;
- +
- +public final class Ride extends L2GameServerPacket
- {
- + private static final String _S__8c_Ride = " 8c Ride";
- public static final int ACTION_MOUNT = 1;
- public static final int ACTION_DISMOUNT = 0;
- -
- private final int _id;
- private final int _bRide;
- - private int _rideType;
- + private final int _rideType;
- private final int _rideClassID;
- + private final int _x, _y, _z;
- - public Ride(int id, int action, int rideClassId)
- + public Ride(Player cha, boolean mount, int rideClassId)
- {
- - _id = id; // charobjectID
- - _bRide = action; // 1 for mount ; 2 for dismount
- + _id = cha.getObjectId();
- + _bRide = mount ? 1 : 0;
- _rideClassID = rideClassId + 1000000; // npcID
- + _x = cha.getX();
- + _y = cha.getY();
- + _z = cha.getZ();
- +
- switch (rideClassId)
- {
- - case 12526:
- - case 12527: // Striders
- - case 12528:
- + case 0: // dismount
- + _rideType = 0;
- + break;
- + case 12526: // Wind
- + case 12527: // Star
- + case 12528: // Twilight
- + case 16038: // red strider of wind
- + case 16039: // red strider of star
- + case 16040: // red strider of dusk
- _rideType = 1;
- break;
- -
- case 12621: // Wyvern
- _rideType = 2;
- break;
- + case 16037: // Great Snow Wolf
- + case 16041: // Fenrir Wolf
- + case 16042: // White Fenrir Wolf
- + _rideType = 3;
- + break;
- + case 13130: // Light Purple Maned Horse
- + case 13146: // Tawny-Maned Lion
- + case 13147: // Steam Sledge
- + _rideType = 4;
- + break;
- + default:
- + throw new IllegalArgumentException("Unsupported mount NpcId: " + rideClassId);
- }
- }
- + @Override
- + public void runImpl()
- + {
- +
- + }
- +
- public int getMountType()
- {
- return _rideType;
- @@ -38,10 +82,22 @@ public int getMountType()
- @Override
- protected final void writeImpl()
- {
- - writeC(0x86);
- + writeC(0x8c);
- writeD(_id);
- writeD(_bRide);
- writeD(_rideType);
- writeD(_rideClassID);
- + writeD(_x);
- + writeD(_y);
- + writeD(_z);
- + }
- +
- + /* (non-Javadoc)
- + * @see com.l2jmega.gameserver.serverpackets.ServerBasePacket#getType()
- + */
- + @Override
- + public String getType()
- + {
- + return _S__8c_Ride;
- }
- -}
- \ No newline at end of file
- +}
- 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
- index 7a503737..99acad12 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SSQStatus.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SSQStatus.java
- @@ -28,7 +28,7 @@ protected final void writeImpl()
- final int totalDawnMembers = SevenSigns.getInstance().getTotalMembers(CabalType.DAWN);
- final int totalDuskMembers = SevenSigns.getInstance().getTotalMembers(CabalType.DUSK);
- - writeC(0xf5);
- + writeC(0xfb);
- writeC(_page);
- writeC(SevenSigns.getInstance().getCurrentPeriod().ordinal());
- @@ -68,8 +68,8 @@ protected final void writeImpl()
- writeC(SevenSigns.getInstance().getPlayerCabal(_objectId).ordinal());
- writeC(SevenSigns.getInstance().getPlayerSeal(_objectId).ordinal());
- - writeD(SevenSigns.getInstance().getPlayerStoneContrib(_objectId)); // Seal Stones Turned-In
- - writeD(SevenSigns.getInstance().getPlayerAdenaCollect(_objectId)); // Ancient Adena to Collect
- + writeQ(SevenSigns.getInstance().getPlayerStoneContrib(_objectId)); // Seal Stones Turned-In
- + writeQ(SevenSigns.getInstance().getPlayerAdenaCollect(_objectId)); // Ancient Adena to Collect
- double dawnStoneScore = SevenSigns.getInstance().getCurrentStoneScore(CabalType.DAWN);
- int dawnFestivalScore = SevenSigns.getInstance().getCurrentFestivalScore(CabalType.DAWN);
- @@ -103,16 +103,16 @@ protected final void writeImpl()
- }
- /* DUSK */
- - writeD(duskStoneScoreProp); // Seal Stone Score
- - writeD(duskFestivalScore); // Festival Score
- - writeD(duskTotalScore); // Total Score
- + writeQ(duskStoneScoreProp); // Seal Stone Score
- + writeQ(duskFestivalScore); // Festival Score
- + writeQ(duskTotalScore); // Total Score
- writeC(duskPercent); // Dusk %
- /* DAWN */
- - writeD(dawnStoneScoreProp); // Seal Stone Score
- - writeD(dawnFestivalScore); // Festival Score
- - writeD(dawnTotalScore); // Total Score
- + writeQ(dawnStoneScoreProp); // Seal Stone Score
- + writeQ(dawnFestivalScore); // Festival Score
- + writeQ(dawnTotalScore); // Total Score
- writeC(dawnPercent); // Dawn %
- break;
- @@ -133,7 +133,7 @@ protected final void writeImpl()
- int dawnScore = SevenSignsFestival.getInstance().getHighestScore(CabalType.DAWN, festivalId);
- // Dusk Score \\
- - writeD(duskScore);
- + writeQ(duskScore);
- StatsSet highScoreData = SevenSignsFestival.getInstance().getHighestScoreData(CabalType.DUSK, festivalId);
- String[] partyMembers = highScoreData.getString("members").split(",");
- @@ -151,7 +151,7 @@ protected final void writeImpl()
- }
- // Dawn Score \\
- - writeD(dawnScore);
- + writeQ(dawnScore);
- highScoreData = SevenSignsFestival.getInstance().getHighestScoreData(CabalType.DAWN, festivalId);
- partyMembers = highScoreData.getString("members").split(",");
- @@ -239,30 +239,30 @@ protected final void writeImpl()
- {
- case NORMAL:
- writeC(CabalType.NORMAL.ordinal());
- - writeH(SystemMessageId.COMPETITION_TIE_SEAL_NOT_AWARDED.getId());
- + writeD(SystemMessageId.COMPETITION_TIE_SEAL_NOT_AWARDED.getId());
- break;
- case DAWN:
- if (dawnPercent >= 35)
- {
- writeC(CabalType.DAWN.ordinal());
- - writeH(SystemMessageId.SEAL_NOT_OWNED_35_MORE_VOTED.getId());
- + writeD(SystemMessageId.SEAL_NOT_OWNED_35_MORE_VOTED.getId());
- }
- else
- {
- writeC(CabalType.NORMAL.ordinal());
- - writeH(SystemMessageId.SEAL_NOT_OWNED_35_LESS_VOTED.getId());
- + writeD(SystemMessageId.SEAL_NOT_OWNED_35_LESS_VOTED.getId());
- }
- break;
- case DUSK:
- if (duskPercent >= 35)
- {
- writeC(CabalType.DUSK.ordinal());
- - writeH(SystemMessageId.SEAL_NOT_OWNED_35_MORE_VOTED.getId());
- + writeD(SystemMessageId.SEAL_NOT_OWNED_35_MORE_VOTED.getId());
- }
- else
- {
- writeC(CabalType.NORMAL.ordinal());
- - writeH(SystemMessageId.SEAL_NOT_OWNED_35_LESS_VOTED.getId());
- + writeD(SystemMessageId.SEAL_NOT_OWNED_35_LESS_VOTED.getId());
- }
- break;
- }
- @@ -275,12 +275,12 @@ protected final void writeImpl()
- if (dawnPercent >= 10)
- {
- writeC(CabalType.DAWN.ordinal());
- - writeH(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
- + writeD(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
- }
- else
- {
- writeC(CabalType.NORMAL.ordinal());
- - writeH(SystemMessageId.COMPETITION_TIE_SEAL_NOT_AWARDED.getId());
- + writeD(SystemMessageId.COMPETITION_TIE_SEAL_NOT_AWARDED.getId());
- }
- break;
- @@ -288,12 +288,12 @@ protected final void writeImpl()
- if (dawnPercent >= 10)
- {
- writeC(sealOwner.ordinal());
- - writeH(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
- + writeD(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
- }
- else
- {
- writeC(CabalType.NORMAL.ordinal());
- - writeH(SystemMessageId.SEAL_OWNED_10_LESS_VOTED.getId());
- + writeD(SystemMessageId.SEAL_OWNED_10_LESS_VOTED.getId());
- }
- break;
- @@ -301,17 +301,17 @@ protected final void writeImpl()
- if (duskPercent >= 35)
- {
- writeC(CabalType.DUSK.ordinal());
- - writeH(SystemMessageId.SEAL_NOT_OWNED_35_MORE_VOTED.getId());
- + writeD(SystemMessageId.SEAL_NOT_OWNED_35_MORE_VOTED.getId());
- }
- else if (dawnPercent >= 10)
- {
- writeC(CabalType.DAWN.ordinal());
- - writeH(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
- + writeD(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
- }
- else
- {
- writeC(CabalType.NORMAL.ordinal());
- - writeH(SystemMessageId.SEAL_OWNED_10_LESS_VOTED.getId());
- + writeD(SystemMessageId.SEAL_OWNED_10_LESS_VOTED.getId());
- }
- break;
- }
- @@ -324,12 +324,12 @@ else if (dawnPercent >= 10)
- if (duskPercent >= 10)
- {
- writeC(CabalType.DUSK.ordinal());
- - writeH(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
- + writeD(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
- }
- else
- {
- writeC(CabalType.NORMAL.ordinal());
- - writeH(SystemMessageId.COMPETITION_TIE_SEAL_NOT_AWARDED.getId());
- + writeD(SystemMessageId.COMPETITION_TIE_SEAL_NOT_AWARDED.getId());
- }
- break;
- @@ -337,17 +337,17 @@ else if (dawnPercent >= 10)
- if (dawnPercent >= 35)
- {
- writeC(CabalType.DAWN.ordinal());
- - writeH(SystemMessageId.SEAL_NOT_OWNED_35_MORE_VOTED.getId());
- + writeD(SystemMessageId.SEAL_NOT_OWNED_35_MORE_VOTED.getId());
- }
- else if (duskPercent >= 10)
- {
- writeC(sealOwner.ordinal());
- - writeH(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
- + writeD(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
- }
- else
- {
- writeC(CabalType.NORMAL.ordinal());
- - writeH(SystemMessageId.SEAL_OWNED_10_LESS_VOTED.getId());
- + writeD(SystemMessageId.SEAL_OWNED_10_LESS_VOTED.getId());
- }
- break;
- @@ -355,12 +355,12 @@ else if (duskPercent >= 10)
- if (duskPercent >= 10)
- {
- writeC(sealOwner.ordinal());
- - writeH(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
- + writeD(SystemMessageId.SEAL_OWNED_10_MORE_VOTED.getId());
- }
- else
- {
- writeC(CabalType.NORMAL.ordinal());
- - writeH(SystemMessageId.SEAL_OWNED_10_LESS_VOTED.getId());
- + writeD(SystemMessageId.SEAL_OWNED_10_LESS_VOTED.getId());
- }
- break;
- }
- 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
- index 1133799b..993cae75 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SellList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SellList.java
- @@ -18,24 +18,42 @@ public SellList(int adena, List<ItemInstance> items)
- @Override
- protected final void writeImpl()
- {
- - writeC(0x10);
- - writeD(_money);
- - writeD(0x00);
- + writeC(0xFE);
- + writeH(0xB7);
- + writeD(0x01);
- writeH(_items.size());
- for (ItemInstance item : _items)
- {
- - writeH(item.getItem().getType1());
- - writeD(item.getObjectId());
- - writeD(item.getItemId());
- - writeD(item.getCount());
- - writeH(item.getItem().getType2());
- - writeH(item.getCustomType1());
- - writeD(item.getItem().getBodyPart());
- - writeH(item.getEnchantLevel());
- - writeH(item.getCustomType2());
- - writeH(0x00);
- - writeD(item.getItem().getReferencePrice() / 2);
- + writeD(item.getObjectId());
- + writeD(item.getItemId());
- + writeD(item.getItem().getBodyPart());
- + writeQ((item.getCount() < 0) ? 0 : item.getCount());
- + writeH(item.getItem().getType2());
- + writeH(0x00);
- + writeH(0x00);
- + writeD(item.getItem().getBodyPart());
- + writeH(0x00);
- + writeH(0x00);
- +
- + writeD(0x00);
- + writeD(-1);
- + writeD(-9999);
- +
- + writeH(0x00);
- + writeH(0x00);
- + for (byte i = 0; i < 6; i++)
- + {
- + writeH(0x00);
- + }
- +
- + // Enchant Effects
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeQ(item.getItem().getReferencePrice() / 2);
- }
- + writeH(0x00);
- + writeC(0x01);
- }
- }
- \ No newline at end of file
- 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
- index 697786ac..40ca933d 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SellListProcure.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SellListProcure.java
- @@ -30,8 +30,8 @@ public SellListProcure(Player player, int castleId)
- @Override
- protected final void writeImpl()
- {
- - writeC(0xE9);
- - writeD(_money);
- + writeC(0xEF);
- + writeQ(_money);
- writeD(0x00);
- writeH(_sellList.size());
- @@ -42,10 +42,10 @@ protected final void writeImpl()
- writeH(item.getItem().getType1());
- writeD(item.getObjectId());
- writeD(item.getItemId());
- - writeD(itemEntry.getValue());
- + writeQ(itemEntry.getValue());
- writeH(item.getItem().getType2());
- writeH(0);
- - writeD(0);
- + writeQ(0);
- }
- }
- }
- \ No newline at end of file
- 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
- index 79c4ecc9..9d18e4f2 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SendTradeDone.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SendTradeDone.java
- @@ -12,7 +12,7 @@ public SendTradeDone(int num)
- @Override
- protected final void writeImpl()
- {
- - writeC(0x22);
- + writeC(0x1c);
- writeD(_num);
- }
- }
- \ No newline at end of file
- 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
- index 1ae4bb5a..ea49b57b 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SendTradeRequest.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SendTradeRequest.java
- @@ -12,7 +12,7 @@ public SendTradeRequest(int senderID)
- @Override
- protected final void writeImpl()
- {
- - writeC(0x5e);
- + writeC(0x70);
- writeD(_senderID);
- }
- }
- \ No newline at end of file
- 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
- index 0135758e..7280892a 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ShopPreviewInfo.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ShopPreviewInfo.java
- @@ -22,14 +22,18 @@ public ShopPreviewInfo(Map<Integer, Integer> itemlist)
- @Override
- protected final void writeImpl()
- {
- - writeC(0xf0);
- - writeD(Inventory.PAPERDOLL_TOTALSLOTS);
- + writeC(0xf6);
- + writeD(29); //totalslots
- + //writeD(Inventory.PAPERDOLL_TOTALSLOTS);
- // Slots
- + writeD(0x00); //under
- writeD(getFromList(Inventory.PAPERDOLL_REAR)); // unverified
- writeD(getFromList(Inventory.PAPERDOLL_LEAR)); // unverified
- + //writeD(0x00); //lrear
- writeD(getFromList(Inventory.PAPERDOLL_NECK)); // unverified
- writeD(getFromList(Inventory.PAPERDOLL_RFINGER)); // unverified
- writeD(getFromList(Inventory.PAPERDOLL_LFINGER)); // unverified
- + // writeD(0x00); //lrfinger
- writeD(getFromList(Inventory.PAPERDOLL_HEAD)); // unverified
- writeD(getFromList(Inventory.PAPERDOLL_RHAND)); // good
- writeD(getFromList(Inventory.PAPERDOLL_LHAND)); // good
- @@ -38,10 +42,23 @@ protected final void writeImpl()
- writeD(getFromList(Inventory.PAPERDOLL_LEGS)); // good
- writeD(getFromList(Inventory.PAPERDOLL_FEET)); // good
- writeD(getFromList(Inventory.PAPERDOLL_BACK)); // unverified
- + writeD(getFromList(Inventory.PAPERDOLL_RHAND)); //lrhand
- + writeD(0x00); //fullarmor
- writeD(getFromList(Inventory.PAPERDOLL_FACE)); // unverified
- + writeD(0x00); //alldress
- writeD(getFromList(Inventory.PAPERDOLL_HAIR)); // unverified
- writeD(getFromList(Inventory.PAPERDOLL_HAIRALL)); // unverified
- - writeD(getFromList(Inventory.PAPERDOLL_UNDER)); // unverified
- + writeD(0x00); //rbracelet
- + writeD(0x00); //lbracelet
- + writeD(0x00); //decos
- + writeD(0x00);
- + writeD(0x00);
- + writeD(0x00);
- + writeD(0x00);
- + writeD(0x00);
- + writeD(0x00);//belt
- + writeD(0x00);
- + //writeD(getFromList(Inventory.PAPERDOLL_UNDER)); // unverified
- }
- private int getFromList(int key)
- 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
- index d2b83c63..9e003f31 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ShopPreviewList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ShopPreviewList.java
- @@ -25,12 +25,12 @@ public ShopPreviewList(NpcBuyList list, int currentMoney, int expertiseIndex)
- @Override
- protected final void writeImpl()
- {
- - writeC(0xef);
- + writeC(0xf5);
- writeC(0xc0); // ?
- writeC(0x13); // ?
- writeC(0x00); // ?
- writeC(0x00); // ?
- - writeD(_money); // current money
- + writeQ(_money); // current money
- writeD(_listId);
- int newlength = 0;
- @@ -49,11 +49,12 @@ protected final void writeImpl()
- writeH(product.getItem().getType2()); // item type2
- if (product.getItem().getType1() != Item.TYPE1_ITEM_QUESTITEM_ADENA)
- + //writeH(product.getItem().getBodyPart()); // slot
- writeH(product.getItem().getBodyPart()); // slot
- else
- writeH(0x00); // slot
- - writeD(Config.WEAR_PRICE);
- + writeQ(Config.WEAR_PRICE);
- }
- }
- }
- 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
- index a70c433e..16cde98c 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ShortCutInit.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ShortCutInit.java
- @@ -32,51 +32,14 @@ protected final void writeImpl()
- {
- case L2ShortCut.TYPE_ITEM: // 1
- writeD(sc.getId());
- - writeD(sc.getCharacterType());
- - writeD(sc.getSharedReuseGroup());
- -
- - if (sc.getSharedReuseGroup() < 0)
- - {
- - writeD(0x00); // Remaining time
- - writeD(0x00); // Cooldown time
- - }
- - else
- - {
- - final ItemInstance item = _activeChar.getInventory().getItemByObjectId(sc.getId());
- - if (item == null || !item.isEtcItem())
- - {
- - writeD(0x00); // Remaining time
- - writeD(0x00); // Cooldown time
- - }
- - else
- - {
- - final IntIntHolder[] skills = item.getEtcItem().getSkills();
- - if (skills == null)
- - {
- - writeD(0x00); // Remaining time
- - writeD(0x00); // Cooldown time
- - }
- - else
- - {
- - for (IntIntHolder skillInfo : skills)
- - {
- - final L2Skill itemSkill = skillInfo.getSkill();
- - if (_activeChar.getReuseTimeStamp().containsKey(itemSkill.getReuseHashCode()))
- - {
- - writeD((int) (_activeChar.getReuseTimeStamp().get(itemSkill.getReuseHashCode()).getRemaining() / 1000L));
- - writeD((int) (itemSkill.getReuseDelay() / 1000L));
- - }
- - else
- - {
- - writeD(0x00); // Remaining time
- - writeD(0x00); // Cooldown time
- - }
- - }
- - }
- - }
- - }
- -
- - writeD(0x00); // Augmentation
- + writeD(0x01);
- + writeD(-1);
- + writeD(0x00);
- + writeD(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + //writeD(sc.getCharacterType());
- + //writeD(sc.getSharedReuseGroup());
- break;
- case L2ShortCut.TYPE_SKILL: // 2
- 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
- index 5615ae9d..1408fba9 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SystemMessage.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SystemMessage.java
- @@ -111,6 +111,11 @@ public final SystemMessage addItemNumber(final int number)
- append(new SMParam(TYPE_ITEM_NUMBER, number));
- return this;
- }
- + public final SystemMessage addItemNumberL(final long number)
- + {
- + append(new SMParam(TYPE_ITEM_NUMBER, number));
- + return this;
- + }
- public final SystemMessage addCharName(final Creature cha)
- {
- @@ -168,7 +173,7 @@ public final SystemMessageId getSystemMessageId()
- @Override
- protected final void writeImpl()
- {
- - writeC(0x64);
- + writeC(0x62);
- writeD(_smId.getId());
- writeD(_paramIndex);
- @@ -186,6 +191,9 @@ protected final void writeImpl()
- break;
- case TYPE_ITEM_NUMBER:
- + writeQ((Integer) param.getObject());
- + break;
- +
- case TYPE_ITEM_NAME:
- case TYPE_CASTLE_NAME:
- case TYPE_NUMBER:
- 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
- index c2af70db..2f0c47c0 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeItemUpdate.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeItemUpdate.java
- @@ -1,22 +1,20 @@
- package com.l2jmega.gameserver.network.serverpackets;
- -import java.util.List;
- import java.util.Set;
- import com.l2jmega.gameserver.model.actor.instance.Player;
- import com.l2jmega.gameserver.model.item.instance.ItemInstance;
- import com.l2jmega.gameserver.model.tradelist.TradeItem;
- -import com.l2jmega.gameserver.model.tradelist.TradeList;
- public class TradeItemUpdate extends L2GameServerPacket
- {
- private final Set<ItemInstance> _items;
- - private final List<TradeItem> _currentTrade;
- + private final TradeItem _item;
- - public TradeItemUpdate(TradeList trade, Player activeChar)
- + public TradeItemUpdate(TradeItem item, Player activeChar)
- {
- _items = activeChar.getInventory().getItems();
- - _currentTrade = trade.getItems();
- + _item = item;
- }
- private int getItemCount(int objectId)
- @@ -31,31 +29,28 @@ private int getItemCount(int objectId)
- @Override
- protected final void writeImpl()
- {
- - writeC(0x74);
- - writeH(_currentTrade.size());
- -
- - for (TradeItem item : _currentTrade)
- + writeC(0x81);
- + writeH(1);
- +
- + int availableCount = getItemCount(_item.getObjectId()) - _item.getCount();
- + boolean stackable = _item.getItem().isStackable();
- +
- + if (availableCount == 0)
- {
- - int availableCount = getItemCount(item.getObjectId()) - item.getCount();
- - boolean stackable = item.getItem().isStackable();
- -
- - if (availableCount == 0)
- - {
- - availableCount = 1;
- - stackable = false;
- - }
- -
- + availableCount = 1;
- + stackable = false;
- + }
- +
- writeH(stackable ? 3 : 2);
- - writeH(item.getItem().getType1());
- - writeD(item.getObjectId());
- - writeD(item.getItem().getItemId());
- - writeD(availableCount);
- - writeH(item.getItem().getType2());
- + writeH(_item.getItem().getType1());
- + writeD(_item.getObjectId());
- + writeD(_item.getItem().getItemId());
- + writeQ(availableCount);
- + writeH(_item.getItem().getType2());
- writeH(0x00);
- - writeD(item.getItem().getBodyPart());
- - writeH(item.getEnchant());
- + writeQ(_item.getItem().getBodyPart());
- + writeH(_item.getEnchant());
- writeH(0x00);
- writeH(0x00);
- - }
- }
- }
- \ No newline at end of file
- 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
- index eb4d1550..8dbdff19 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeOtherAdd.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeOtherAdd.java
- @@ -17,14 +17,14 @@ public TradeOtherAdd(TradeItem item)
- @Override
- protected final void writeImpl()
- {
- - writeC(0x21);
- + writeC(0x1b);
- writeH(1); // item count
- writeH(_item.getItem().getType1()); // item type1
- writeD(_item.getObjectId());
- writeD(_item.getItem().getItemId());
- - writeD(_item.getCount());
- + writeQ(_item.getCount());
- writeH(_item.getItem().getType2()); // item type2
- writeH(0x00); // ?
- @@ -32,5 +32,14 @@ protected final void writeImpl()
- writeH(_item.getEnchant()); // enchant level
- writeH(0x00); // ?
- writeH(0x00);
- + //t1
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- }
- }
- 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
- index 7c46dc3e..04ecf3ae 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeOwnAdd.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeOwnAdd.java
- @@ -14,14 +14,14 @@ public TradeOwnAdd(TradeItem item)
- @Override
- protected final void writeImpl()
- {
- - writeC(0x20);
- + writeC(0x1a);
- writeH(1); // item count
- writeH(_item.getItem().getType1());
- writeD(_item.getObjectId());
- writeD(_item.getItem().getItemId());
- - writeD(_item.getCount());
- + writeQ(_item.getCount());
- writeH(_item.getItem().getType2());
- writeH(0x00); // ?
- @@ -29,5 +29,14 @@ protected final void writeImpl()
- writeH(_item.getEnchant());
- writeH(0x00); // ?
- writeH(0x00);
- + //t1
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- }
- }
- \ No newline at end of file
- 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
- index b6e3e9da..7dff791c 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradePressOtherOk.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradePressOtherOk.java
- @@ -11,6 +11,6 @@ private TradePressOtherOk()
- @Override
- protected void writeImpl()
- {
- - writeC(0x7c);
- + writeC(0x82);
- }
- }
- \ No newline at end of file
- 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
- index 17e34c05..7fde7165 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradePressOwnOk.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradePressOwnOk.java
- @@ -11,6 +11,6 @@ private TradePressOwnOk()
- @Override
- protected void writeImpl()
- {
- - writeC(0x75);
- + writeC(0x53);
- }
- }
- \ No newline at end of file
- 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
- index 20969d83..3b298099 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeStart.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/TradeStart.java
- @@ -11,11 +11,12 @@ public class TradeStart extends L2GameServerPacket
- {
- private final Player _activeChar;
- private final ItemInstance[] _itemList;
- + //private long qcount;
- public TradeStart(Player player)
- {
- _activeChar = player;
- - _itemList = player.getInventory().getAvailableItems(true, false);
- + _itemList = player.getInventory().getAvailableItems(true, false, false);
- }
- @Override
- @@ -24,7 +25,7 @@ protected final void writeImpl()
- if (_activeChar.getActiveTradeList() == null || _activeChar.getActiveTradeList().getPartner() == null)
- return;
- - writeC(0x1E);
- + writeC(0x14);
- writeD(_activeChar.getActiveTradeList().getPartner().getObjectId());
- writeH(_itemList.length);
- @@ -35,16 +36,32 @@ protected final void writeImpl()
- Item item = temp.getItem();
- - writeH(item.getType1());
- writeD(temp.getObjectId());
- writeD(temp.getItemId());
- - writeD(temp.getCount());
- + writeD(0x00);
- + //writeD(item.getBodyPart());
- + writeQ(temp.getCount());
- writeH(item.getType2());
- - writeH(temp.getCustomType1());
- + writeH(0x00);
- + writeH(0x00);
- writeD(item.getBodyPart());
- writeH(temp.getEnchantLevel());
- writeH(temp.getCustomType2());
- +
- + writeD(0x00); // Augment
- + writeD(-1); // Mana
- + writeD(-9999); // Time
- + writeH(0x00);
- writeH(0x00);
- + for (byte i = 0; i < 6; i++)
- + {
- + writeH(0x00);
- + }
- + // Enchant Effects
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- +
- }
- }
- }
- \ No newline at end of file
- 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
- index 43395b4c..8eb20763 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/WarehouseDepositList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/WarehouseDepositList.java
- @@ -25,7 +25,7 @@ public WarehouseDepositList(Player player, int type)
- _items = new ArrayList<>();
- final boolean isPrivate = _whType == PRIVATE;
- - for (ItemInstance temp : player.getInventory().getAvailableItems(true, isPrivate))
- + for (ItemInstance temp : player.getInventory().getAvailableItems(true, isPrivate, false))
- {
- if (temp != null && temp.isDepositable(isPrivate))
- _items.add(temp);
- @@ -37,7 +37,7 @@ protected final void writeImpl()
- {
- writeC(0x41);
- writeH(_whType);
- - writeD(_playerAdena);
- + writeQ(_playerAdena);
- writeH(_items.size());
- for (ItemInstance temp : _items)
- @@ -47,24 +47,42 @@ protected final void writeImpl()
- Item item = temp.getItem();
- - writeH(item.getType1());
- + //writeH(item.getType1());
- writeD(temp.getObjectId());
- writeD(temp.getItemId());
- - writeD(temp.getCount());
- + writeD(0x00);
- + //writeD(item.getBodyPart());
- + writeQ(temp.getCount());
- writeH(item.getType2());
- writeH(temp.getCustomType1());
- + writeH(0x00);
- writeD(item.getBodyPart());
- writeH(temp.getEnchantLevel());
- writeH(temp.getCustomType2());
- - writeH(0x00);
- - writeD(temp.getObjectId());
- +
- if (temp.isAugmented())
- {
- - writeD(0x0000FFFF & temp.getAugmentation().getAugmentationId());
- - writeD(temp.getAugmentation().getAugmentationId() >> 16);
- + //writeD(0x0000FFFF & temp.getAugmentation().getAugmentationId());
- + //writeD(temp.getAugmentation().getAugmentationId() >> 16);
- + writeD(temp.getAugmentation().getAugmentationId());
- }
- else
- - writeQ(0x00);
- + writeD(0x00);
- +
- + writeD(0x00);
- + writeD(0x00);
- +
- + writeH(0x00);
- + writeH(0x00);
- + for (byte i = 0; i < 6; i++)
- + {
- + writeH(0x00);
- + }
- + // Enchant Effects
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeD(temp.getObjectId());
- }
- _items.clear();
- }
- 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
- index 7adc533b..58603dcd 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/WarehouseWithdrawList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/WarehouseWithdrawList.java
- @@ -32,31 +32,52 @@ protected final void writeImpl()
- {
- writeC(0x42);
- writeH(_whType);
- - writeD(_playerAdena);
- + writeQ(_playerAdena);
- writeH(_items.size());
- for (ItemInstance temp : _items)
- {
- Item item = temp.getItem();
- - writeH(item.getType1());
- + //writeH(item.getType1());
- writeD(temp.getObjectId());
- writeD(temp.getItemId());
- - writeD(temp.getCount());
- + writeD(0x00);
- + //writeD(item.getBodyPart());
- + writeQ(temp.getCount());
- writeH(item.getType2());
- writeH(temp.getCustomType1());
- + writeH(0x00);
- writeD(item.getBodyPart());
- writeH(temp.getEnchantLevel());
- writeH(temp.getCustomType2());
- - writeH(0x00);
- - writeD(temp.getObjectId());
- +
- +
- + //writeD(temp.getObjectId());
- +
- if (temp.isAugmented())
- {
- - writeD(0x0000FFFF & temp.getAugmentation().getAugmentationId());
- - writeD(temp.getAugmentation().getAugmentationId() >> 16);
- + //writeD(0x0000FFFF & temp.getAugmentation().getAugmentationId());
- + //writeD(temp.getAugmentation().getAugmentationId() >> 16);
- + writeD(temp.getAugmentation().getAugmentationId());
- }
- else
- - writeQ(0x00);
- + writeD(0x00);
- +
- + writeD(0x00);
- + writeD(0x00);
- +
- + writeH(0x00);
- + writeH(0x00);
- + for (byte i = 0; i < 6; i++)
- + {
- + writeH(0x00);
- + }
- + // Enchant Effects
- + writeH(0x00);
- + writeH(0x00);
- + writeH(0x00);
- + writeD(temp.getObjectId());
- }
- }
- }
- \ No newline at end of file
Add Comment
Please, Sign In to add comment