diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java index fec83da610..8d95139ceb 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java @@ -16,8 +16,6 @@ */ package org.l2jmobius.gameserver.network.clientpackets; -import static org.l2jmobius.gameserver.model.actor.Npc.INTERACTION_DISTANCE; - import java.util.Collections; import java.util.List; import java.util.OptionalLong; @@ -117,7 +115,11 @@ public class MultiSellChoose implements IClientIncomingPacket final Npc npc = player.getLastFolkNPC(); if (!list.isNpcAllowed(-1)) { - if ((npc == null) || !list.isNpcAllowed(npc.getId())) + if ((npc == null) // + || !list.isNpcAllowed(npc.getId()) // + || !list.checkNpcObjectId(npc.getObjectId()) // + || (player.getInstanceId() != npc.getInstanceId()) // + || !player.isInsideRadius3D(npc, Npc.INTERACTION_DISTANCE)) { if (player.isGM()) { @@ -131,15 +133,6 @@ public class MultiSellChoose implements IClientIncomingPacket } } - if (!player.isGM() && (npc != null)) - { - if (!player.isInsideRadius3D(npc, INTERACTION_DISTANCE) || (player.getInstanceId() != npc.getInstanceId())) - { - player.setMultiSell(null); - return; - } - } - final MultisellEntryHolder entry = list.getEntries().get(_entryId - 1); // Entry Id begins from 1. We currently use entry IDs as index pointer. if (entry == null) { diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java index 233c3dfe73..804a2f7713 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java @@ -16,8 +16,6 @@ */ package org.l2jmobius.gameserver.network.clientpackets; -import static org.l2jmobius.gameserver.model.actor.Npc.INTERACTION_DISTANCE; - import java.util.Collections; import java.util.List; import java.util.OptionalLong; @@ -134,7 +132,11 @@ public class MultiSellChoose implements IClientIncomingPacket final Npc npc = player.getLastFolkNPC(); if (!list.isNpcAllowed(-1)) { - if ((npc == null) || !list.isNpcAllowed(npc.getId())) + if ((npc == null) // + || !list.isNpcAllowed(npc.getId()) // + || !list.checkNpcObjectId(npc.getObjectId()) // + || (player.getInstanceId() != npc.getInstanceId()) // + || !player.isInsideRadius3D(npc, Npc.INTERACTION_DISTANCE)) { if (player.isGM()) { @@ -148,15 +150,6 @@ public class MultiSellChoose implements IClientIncomingPacket } } - if (!player.isGM() && (npc != null)) - { - if (!player.isInsideRadius3D(npc, INTERACTION_DISTANCE) || (player.getInstanceId() != npc.getInstanceId())) - { - player.setMultiSell(null); - return; - } - } - if (((_soulCrystalOptions != null) && CommonUtil.contains(_soulCrystalOptions, null)) || ((_soulCrystalSpecialOptions != null) && CommonUtil.contains(_soulCrystalSpecialOptions, null))) { LOGGER.severe("Character: " + player.getName() + " requested multisell entry with invalid soul crystal options. Multisell: " + _listId + " entry: " + _entryId); diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java index 233c3dfe73..804a2f7713 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java @@ -16,8 +16,6 @@ */ package org.l2jmobius.gameserver.network.clientpackets; -import static org.l2jmobius.gameserver.model.actor.Npc.INTERACTION_DISTANCE; - import java.util.Collections; import java.util.List; import java.util.OptionalLong; @@ -134,7 +132,11 @@ public class MultiSellChoose implements IClientIncomingPacket final Npc npc = player.getLastFolkNPC(); if (!list.isNpcAllowed(-1)) { - if ((npc == null) || !list.isNpcAllowed(npc.getId())) + if ((npc == null) // + || !list.isNpcAllowed(npc.getId()) // + || !list.checkNpcObjectId(npc.getObjectId()) // + || (player.getInstanceId() != npc.getInstanceId()) // + || !player.isInsideRadius3D(npc, Npc.INTERACTION_DISTANCE)) { if (player.isGM()) { @@ -148,15 +150,6 @@ public class MultiSellChoose implements IClientIncomingPacket } } - if (!player.isGM() && (npc != null)) - { - if (!player.isInsideRadius3D(npc, INTERACTION_DISTANCE) || (player.getInstanceId() != npc.getInstanceId())) - { - player.setMultiSell(null); - return; - } - } - if (((_soulCrystalOptions != null) && CommonUtil.contains(_soulCrystalOptions, null)) || ((_soulCrystalSpecialOptions != null) && CommonUtil.contains(_soulCrystalSpecialOptions, null))) { LOGGER.severe("Character: " + player.getName() + " requested multisell entry with invalid soul crystal options. Multisell: " + _listId + " entry: " + _entryId); diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java index 233c3dfe73..804a2f7713 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java @@ -16,8 +16,6 @@ */ package org.l2jmobius.gameserver.network.clientpackets; -import static org.l2jmobius.gameserver.model.actor.Npc.INTERACTION_DISTANCE; - import java.util.Collections; import java.util.List; import java.util.OptionalLong; @@ -134,7 +132,11 @@ public class MultiSellChoose implements IClientIncomingPacket final Npc npc = player.getLastFolkNPC(); if (!list.isNpcAllowed(-1)) { - if ((npc == null) || !list.isNpcAllowed(npc.getId())) + if ((npc == null) // + || !list.isNpcAllowed(npc.getId()) // + || !list.checkNpcObjectId(npc.getObjectId()) // + || (player.getInstanceId() != npc.getInstanceId()) // + || !player.isInsideRadius3D(npc, Npc.INTERACTION_DISTANCE)) { if (player.isGM()) { @@ -148,15 +150,6 @@ public class MultiSellChoose implements IClientIncomingPacket } } - if (!player.isGM() && (npc != null)) - { - if (!player.isInsideRadius3D(npc, INTERACTION_DISTANCE) || (player.getInstanceId() != npc.getInstanceId())) - { - player.setMultiSell(null); - return; - } - } - if (((_soulCrystalOptions != null) && CommonUtil.contains(_soulCrystalOptions, null)) || ((_soulCrystalSpecialOptions != null) && CommonUtil.contains(_soulCrystalSpecialOptions, null))) { LOGGER.severe("Character: " + player.getName() + " requested multisell entry with invalid soul crystal options. Multisell: " + _listId + " entry: " + _entryId); diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java index 70539f4ce7..0007ad8b7d 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java @@ -16,8 +16,6 @@ */ package org.l2jmobius.gameserver.network.clientpackets; -import static org.l2jmobius.gameserver.model.actor.Npc.INTERACTION_DISTANCE; - import java.util.Collections; import java.util.List; import java.util.OptionalLong; @@ -134,7 +132,11 @@ public class MultiSellChoose implements IClientIncomingPacket final Npc npc = player.getLastFolkNPC(); if (!list.isNpcAllowed(-1)) { - if ((npc == null) || !list.isNpcAllowed(npc.getId())) + if ((npc == null) // + || !list.isNpcAllowed(npc.getId()) // + || !list.checkNpcObjectId(npc.getObjectId()) // + || (player.getInstanceId() != npc.getInstanceId()) // + || !player.isInsideRadius3D(npc, Npc.INTERACTION_DISTANCE)) { if (player.isGM()) { @@ -148,15 +150,6 @@ public class MultiSellChoose implements IClientIncomingPacket } } - if (!player.isGM() && (npc != null)) - { - if (!player.isInsideRadius3D(npc, INTERACTION_DISTANCE) || (player.getInstanceId() != npc.getInstanceId())) - { - player.setMultiSell(null); - return; - } - } - if (((_soulCrystalOptions != null) && CommonUtil.contains(_soulCrystalOptions, null)) || ((_soulCrystalSpecialOptions != null) && CommonUtil.contains(_soulCrystalSpecialOptions, null))) { LOGGER.severe("Character: " + player.getName() + " requested multisell entry with invalid soul crystal options. Multisell: " + _listId + " entry: " + _entryId); diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java index 70539f4ce7..0007ad8b7d 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java @@ -16,8 +16,6 @@ */ package org.l2jmobius.gameserver.network.clientpackets; -import static org.l2jmobius.gameserver.model.actor.Npc.INTERACTION_DISTANCE; - import java.util.Collections; import java.util.List; import java.util.OptionalLong; @@ -134,7 +132,11 @@ public class MultiSellChoose implements IClientIncomingPacket final Npc npc = player.getLastFolkNPC(); if (!list.isNpcAllowed(-1)) { - if ((npc == null) || !list.isNpcAllowed(npc.getId())) + if ((npc == null) // + || !list.isNpcAllowed(npc.getId()) // + || !list.checkNpcObjectId(npc.getObjectId()) // + || (player.getInstanceId() != npc.getInstanceId()) // + || !player.isInsideRadius3D(npc, Npc.INTERACTION_DISTANCE)) { if (player.isGM()) { @@ -148,15 +150,6 @@ public class MultiSellChoose implements IClientIncomingPacket } } - if (!player.isGM() && (npc != null)) - { - if (!player.isInsideRadius3D(npc, INTERACTION_DISTANCE) || (player.getInstanceId() != npc.getInstanceId())) - { - player.setMultiSell(null); - return; - } - } - if (((_soulCrystalOptions != null) && CommonUtil.contains(_soulCrystalOptions, null)) || ((_soulCrystalSpecialOptions != null) && CommonUtil.contains(_soulCrystalSpecialOptions, null))) { LOGGER.severe("Character: " + player.getName() + " requested multisell entry with invalid soul crystal options. Multisell: " + _listId + " entry: " + _entryId); diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java index 48f7e18239..4d7950a32c 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java @@ -16,8 +16,6 @@ */ package org.l2jmobius.gameserver.network.clientpackets; -import static org.l2jmobius.gameserver.model.actor.Npc.INTERACTION_DISTANCE; - import java.util.Collections; import java.util.List; import java.util.OptionalLong; @@ -134,7 +132,11 @@ public class MultiSellChoose implements IClientIncomingPacket final Npc npc = player.getLastFolkNPC(); if (!list.isNpcAllowed(-1)) { - if ((npc == null) || !list.isNpcAllowed(npc.getId())) + if ((npc == null) // + || !list.isNpcAllowed(npc.getId()) // + || !list.checkNpcObjectId(npc.getObjectId()) // + || (player.getInstanceId() != npc.getInstanceId()) // + || !player.isInsideRadius3D(npc, Npc.INTERACTION_DISTANCE)) { if (player.isGM()) { @@ -148,15 +150,6 @@ public class MultiSellChoose implements IClientIncomingPacket } } - if (!player.isGM() && (npc != null)) - { - if (!player.isInsideRadius3D(npc, INTERACTION_DISTANCE) || (player.getInstanceId() != npc.getInstanceId())) - { - player.setMultiSell(null); - return; - } - } - if (((_soulCrystalOptions != null) && CommonUtil.contains(_soulCrystalOptions, null)) || ((_soulCrystalSpecialOptions != null) && CommonUtil.contains(_soulCrystalSpecialOptions, null))) { LOGGER.severe("Character: " + player.getName() + " requested multisell entry with invalid soul crystal options. Multisell: " + _listId + " entry: " + _entryId); diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java index 587caf2b2c..c5edbb68b4 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java @@ -16,8 +16,6 @@ */ package org.l2jmobius.gameserver.network.clientpackets; -import static org.l2jmobius.gameserver.model.actor.Npc.INTERACTION_DISTANCE; - import java.util.ArrayList; import java.util.List; @@ -121,7 +119,11 @@ public class MultiSellChoose implements IClientIncomingPacket final Npc npc = player.getLastFolkNPC(); if (!list.isNpcAllowed(-1)) { - if ((npc == null) || !list.isNpcAllowed(npc.getId())) + if ((npc == null) // + || !list.isNpcAllowed(npc.getId()) // + || !list.checkNpcObjectId(npc.getObjectId()) // + || (player.getInstanceId() != npc.getInstanceId()) // + || !player.isInsideRadius3D(npc, Npc.INTERACTION_DISTANCE)) { if (player.isGM()) { @@ -135,15 +137,6 @@ public class MultiSellChoose implements IClientIncomingPacket } } - if (!player.isGM() && (npc != null)) - { - if (!player.isInsideRadius3D(npc, INTERACTION_DISTANCE) || (player.getInstanceId() != npc.getInstanceId())) - { - player.setMultiSell(null); - return; - } - } - for (Entry entry : list.getEntries()) { if (entry.getEntryId() == _entryId) diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java index 3aa4a5b789..2dec96b038 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java @@ -16,8 +16,6 @@ */ package org.l2jmobius.gameserver.network.clientpackets; -import static org.l2jmobius.gameserver.model.actor.Npc.INTERACTION_DISTANCE; - import java.util.Collections; import java.util.List; import java.util.OptionalLong; @@ -134,7 +132,11 @@ public class MultiSellChoose implements IClientIncomingPacket final Npc npc = player.getLastFolkNPC(); if (!list.isNpcAllowed(-1)) { - if ((npc == null) || !list.isNpcAllowed(npc.getId())) + if ((npc == null) // + || !list.isNpcAllowed(npc.getId()) // + || !list.checkNpcObjectId(npc.getObjectId()) // + || (player.getInstanceId() != npc.getInstanceId()) // + || !player.isInsideRadius3D(npc, Npc.INTERACTION_DISTANCE)) { if (player.isGM()) { @@ -148,15 +150,6 @@ public class MultiSellChoose implements IClientIncomingPacket } } - if (!player.isGM() && (npc != null)) - { - if (!player.isInsideRadius3D(npc, INTERACTION_DISTANCE) || (player.getInstanceId() != npc.getInstanceId())) - { - player.setMultiSell(null); - return; - } - } - if (((_soulCrystalOptions != null) && CommonUtil.contains(_soulCrystalOptions, null)) || ((_soulCrystalSpecialOptions != null) && CommonUtil.contains(_soulCrystalSpecialOptions, null))) { LOGGER.severe("Character: " + player.getName() + " requested multisell entry with invalid soul crystal options. Multisell: " + _listId + " entry: " + _entryId); diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java index 3aa4a5b789..2dec96b038 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java @@ -16,8 +16,6 @@ */ package org.l2jmobius.gameserver.network.clientpackets; -import static org.l2jmobius.gameserver.model.actor.Npc.INTERACTION_DISTANCE; - import java.util.Collections; import java.util.List; import java.util.OptionalLong; @@ -134,7 +132,11 @@ public class MultiSellChoose implements IClientIncomingPacket final Npc npc = player.getLastFolkNPC(); if (!list.isNpcAllowed(-1)) { - if ((npc == null) || !list.isNpcAllowed(npc.getId())) + if ((npc == null) // + || !list.isNpcAllowed(npc.getId()) // + || !list.checkNpcObjectId(npc.getObjectId()) // + || (player.getInstanceId() != npc.getInstanceId()) // + || !player.isInsideRadius3D(npc, Npc.INTERACTION_DISTANCE)) { if (player.isGM()) { @@ -148,15 +150,6 @@ public class MultiSellChoose implements IClientIncomingPacket } } - if (!player.isGM() && (npc != null)) - { - if (!player.isInsideRadius3D(npc, INTERACTION_DISTANCE) || (player.getInstanceId() != npc.getInstanceId())) - { - player.setMultiSell(null); - return; - } - } - if (((_soulCrystalOptions != null) && CommonUtil.contains(_soulCrystalOptions, null)) || ((_soulCrystalSpecialOptions != null) && CommonUtil.contains(_soulCrystalSpecialOptions, null))) { LOGGER.severe("Character: " + player.getName() + " requested multisell entry with invalid soul crystal options. Multisell: " + _listId + " entry: " + _entryId); diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java index 3aa4a5b789..2dec96b038 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java @@ -16,8 +16,6 @@ */ package org.l2jmobius.gameserver.network.clientpackets; -import static org.l2jmobius.gameserver.model.actor.Npc.INTERACTION_DISTANCE; - import java.util.Collections; import java.util.List; import java.util.OptionalLong; @@ -134,7 +132,11 @@ public class MultiSellChoose implements IClientIncomingPacket final Npc npc = player.getLastFolkNPC(); if (!list.isNpcAllowed(-1)) { - if ((npc == null) || !list.isNpcAllowed(npc.getId())) + if ((npc == null) // + || !list.isNpcAllowed(npc.getId()) // + || !list.checkNpcObjectId(npc.getObjectId()) // + || (player.getInstanceId() != npc.getInstanceId()) // + || !player.isInsideRadius3D(npc, Npc.INTERACTION_DISTANCE)) { if (player.isGM()) { @@ -148,15 +150,6 @@ public class MultiSellChoose implements IClientIncomingPacket } } - if (!player.isGM() && (npc != null)) - { - if (!player.isInsideRadius3D(npc, INTERACTION_DISTANCE) || (player.getInstanceId() != npc.getInstanceId())) - { - player.setMultiSell(null); - return; - } - } - if (((_soulCrystalOptions != null) && CommonUtil.contains(_soulCrystalOptions, null)) || ((_soulCrystalSpecialOptions != null) && CommonUtil.contains(_soulCrystalSpecialOptions, null))) { LOGGER.severe("Character: " + player.getName() + " requested multisell entry with invalid soul crystal options. Multisell: " + _listId + " entry: " + _entryId); diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java index 3aa4a5b789..2dec96b038 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java @@ -16,8 +16,6 @@ */ package org.l2jmobius.gameserver.network.clientpackets; -import static org.l2jmobius.gameserver.model.actor.Npc.INTERACTION_DISTANCE; - import java.util.Collections; import java.util.List; import java.util.OptionalLong; @@ -134,7 +132,11 @@ public class MultiSellChoose implements IClientIncomingPacket final Npc npc = player.getLastFolkNPC(); if (!list.isNpcAllowed(-1)) { - if ((npc == null) || !list.isNpcAllowed(npc.getId())) + if ((npc == null) // + || !list.isNpcAllowed(npc.getId()) // + || !list.checkNpcObjectId(npc.getObjectId()) // + || (player.getInstanceId() != npc.getInstanceId()) // + || !player.isInsideRadius3D(npc, Npc.INTERACTION_DISTANCE)) { if (player.isGM()) { @@ -148,15 +150,6 @@ public class MultiSellChoose implements IClientIncomingPacket } } - if (!player.isGM() && (npc != null)) - { - if (!player.isInsideRadius3D(npc, INTERACTION_DISTANCE) || (player.getInstanceId() != npc.getInstanceId())) - { - player.setMultiSell(null); - return; - } - } - if (((_soulCrystalOptions != null) && CommonUtil.contains(_soulCrystalOptions, null)) || ((_soulCrystalSpecialOptions != null) && CommonUtil.contains(_soulCrystalSpecialOptions, null))) { LOGGER.severe("Character: " + player.getName() + " requested multisell entry with invalid soul crystal options. Multisell: " + _listId + " entry: " + _entryId); diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java index 3aa4a5b789..2dec96b038 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java @@ -16,8 +16,6 @@ */ package org.l2jmobius.gameserver.network.clientpackets; -import static org.l2jmobius.gameserver.model.actor.Npc.INTERACTION_DISTANCE; - import java.util.Collections; import java.util.List; import java.util.OptionalLong; @@ -134,7 +132,11 @@ public class MultiSellChoose implements IClientIncomingPacket final Npc npc = player.getLastFolkNPC(); if (!list.isNpcAllowed(-1)) { - if ((npc == null) || !list.isNpcAllowed(npc.getId())) + if ((npc == null) // + || !list.isNpcAllowed(npc.getId()) // + || !list.checkNpcObjectId(npc.getObjectId()) // + || (player.getInstanceId() != npc.getInstanceId()) // + || !player.isInsideRadius3D(npc, Npc.INTERACTION_DISTANCE)) { if (player.isGM()) { @@ -148,15 +150,6 @@ public class MultiSellChoose implements IClientIncomingPacket } } - if (!player.isGM() && (npc != null)) - { - if (!player.isInsideRadius3D(npc, INTERACTION_DISTANCE) || (player.getInstanceId() != npc.getInstanceId())) - { - player.setMultiSell(null); - return; - } - } - if (((_soulCrystalOptions != null) && CommonUtil.contains(_soulCrystalOptions, null)) || ((_soulCrystalSpecialOptions != null) && CommonUtil.contains(_soulCrystalSpecialOptions, null))) { LOGGER.severe("Character: " + player.getName() + " requested multisell entry with invalid soul crystal options. Multisell: " + _listId + " entry: " + _entryId); diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java index 3aa4a5b789..2dec96b038 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java @@ -16,8 +16,6 @@ */ package org.l2jmobius.gameserver.network.clientpackets; -import static org.l2jmobius.gameserver.model.actor.Npc.INTERACTION_DISTANCE; - import java.util.Collections; import java.util.List; import java.util.OptionalLong; @@ -134,7 +132,11 @@ public class MultiSellChoose implements IClientIncomingPacket final Npc npc = player.getLastFolkNPC(); if (!list.isNpcAllowed(-1)) { - if ((npc == null) || !list.isNpcAllowed(npc.getId())) + if ((npc == null) // + || !list.isNpcAllowed(npc.getId()) // + || !list.checkNpcObjectId(npc.getObjectId()) // + || (player.getInstanceId() != npc.getInstanceId()) // + || !player.isInsideRadius3D(npc, Npc.INTERACTION_DISTANCE)) { if (player.isGM()) { @@ -148,15 +150,6 @@ public class MultiSellChoose implements IClientIncomingPacket } } - if (!player.isGM() && (npc != null)) - { - if (!player.isInsideRadius3D(npc, INTERACTION_DISTANCE) || (player.getInstanceId() != npc.getInstanceId())) - { - player.setMultiSell(null); - return; - } - } - if (((_soulCrystalOptions != null) && CommonUtil.contains(_soulCrystalOptions, null)) || ((_soulCrystalSpecialOptions != null) && CommonUtil.contains(_soulCrystalSpecialOptions, null))) { LOGGER.severe("Character: " + player.getName() + " requested multisell entry with invalid soul crystal options. Multisell: " + _listId + " entry: " + _entryId);