diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 70e94532db..001bc08a50 100644 --- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true)) { final double random = (Rnd.nextDouble() * 100); @@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } } diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 70e94532db..001bc08a50 100644 --- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true)) { final double random = (Rnd.nextDouble() * 100); @@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } } diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 70e94532db..001bc08a50 100644 --- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true)) { final double random = (Rnd.nextDouble() * 100); @@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } } diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 70e94532db..001bc08a50 100644 --- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true)) { final double random = (Rnd.nextDouble() * 100); @@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } } diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 70e94532db..001bc08a50 100644 --- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true)) { final double random = (Rnd.nextDouble() * 100); @@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } } diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 70e94532db..001bc08a50 100644 --- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true)) { final double random = (Rnd.nextDouble() * 100); @@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } } diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 70e94532db..001bc08a50 100644 --- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true)) { final double random = (Rnd.nextDouble() * 100); @@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } } diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 70e94532db..001bc08a50 100644 --- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true)) { final double random = (Rnd.nextDouble() * 100); @@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } } diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 6d024a6343..4351404009 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - // iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true)) { final double random = (Rnd.nextDouble() * 100); @@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } } diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 3d54ac4f0d..54ce84fa38 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -111,10 +111,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - // iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true) && ((combinationItem.getCommission() <= 0) || player.reduceAdena("Compound-Commission", combinationItem.getCommission(), player, true))) { final double random = (Rnd.nextDouble() * 100); @@ -131,7 +127,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } } diff --git a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 3d54ac4f0d..54ce84fa38 100644 --- a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -111,10 +111,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - // iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true) && ((combinationItem.getCommission() <= 0) || player.reduceAdena("Compound-Commission", combinationItem.getCommission(), player, true))) { final double random = (Rnd.nextDouble() * 100); @@ -131,7 +127,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 70e94532db..001bc08a50 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true)) { final double random = (Rnd.nextDouble() * 100); @@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 70e94532db..001bc08a50 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true)) { final double random = (Rnd.nextDouble() * 100); @@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 70e94532db..001bc08a50 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true)) { final double random = (Rnd.nextDouble() * 100); @@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } } diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 70e94532db..001bc08a50 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true)) { final double random = (Rnd.nextDouble() * 100); @@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } } diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 70e94532db..001bc08a50 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true)) { final double random = (Rnd.nextDouble() * 100); @@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } } diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 70e94532db..001bc08a50 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true)) { final double random = (Rnd.nextDouble() * 100); @@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } } diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 70e94532db..001bc08a50 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true)) { final double random = (Rnd.nextDouble() * 100); @@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } } diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 6d024a6343..4351404009 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - // iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true)) { final double random = (Rnd.nextDouble() * 100); @@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 3d54ac4f0d..54ce84fa38 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -111,10 +111,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - // iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true) && ((combinationItem.getCommission() <= 0) || player.reduceAdena("Compound-Commission", combinationItem.getCommission(), player, true))) { final double random = (Rnd.nextDouble() * 100); @@ -131,7 +127,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } } diff --git a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index 3d54ac4f0d..54ce84fa38 100644 --- a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -111,10 +111,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket return; } - final InventoryUpdate iu = new InventoryUpdate(); - iu.addRemovedItem(itemOne); - // iu.addRemovedItem(itemTwo); - if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true) && ((combinationItem.getCommission() <= 0) || player.reduceAdena("Compound-Commission", combinationItem.getCommission(), player, true))) { final double random = (Rnd.nextDouble() * 100); @@ -131,7 +127,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket } } + final InventoryUpdate iu = new InventoryUpdate(); + if (itemOne.isStackable() && (itemOne.getCount() > 0)) + { + iu.addModifiedItem(itemOne); + } + else + { + iu.addRemovedItem(itemOne); + } + if (itemTwo.isStackable() && (itemTwo.getCount() > 0)) + { + iu.addModifiedItem(itemTwo); + } + else + { + iu.addRemovedItem(itemTwo); + } player.sendInventoryUpdate(iu); + player.removeRequest(request.getClass()); } }