diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/xml/impl/MultisellData.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/xml/impl/MultisellData.java index 8f4f7463aa..bcafe8032e 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/xml/impl/MultisellData.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/xml/impl/MultisellData.java @@ -45,7 +45,6 @@ import com.l2jmobius.gameserver.model.holders.MultisellListHolder; import com.l2jmobius.gameserver.model.holders.PreparedMultisellListHolder; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.network.serverpackets.MultiSellList; -import com.l2jmobius.gameserver.util.Util; public final class MultisellData implements IGameXmlReader { @@ -149,7 +148,7 @@ public final class MultisellData implements IGameXmlReader { // Initialize NPCs with the size of child nodes. final Set allowNpc = new HashSet<>(itemNode.getChildNodes().getLength()); - forEach(itemNode, n -> "npc".equalsIgnoreCase(n.getNodeName()) && Util.isDigit(n.getTextContent()), n -> allowNpc.add(Integer.parseInt(n.getTextContent()))); + forEach(itemNode, n -> "npc".equalsIgnoreCase(n.getNodeName()), n -> allowNpc.add(Integer.parseInt(n.getTextContent()))); // Add npcs to stats set. set.set("allowNpc", allowNpc); @@ -212,7 +211,7 @@ public final class MultisellData implements IGameXmlReader return; } - if (((npc != null) && !template.isNpcAllowed(npc.getId())) || ((npc == null) && template.isNpcOnly())) + if (!template.isNpcAllowed(-1) && (((npc != null) && !template.isNpcAllowed(npc.getId())) || ((npc == null) && template.isNpcOnly()))) { if (player.isGM()) { diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java index f17d3133a4..a975a4e596 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java @@ -116,7 +116,7 @@ public class MultiSellChoose implements IClientIncomingPacket } final L2Npc npc = player.getLastFolkNPC(); - if (!isAllowedToUse(player, npc, list)) + if (!list.isNpcAllowed(-1) && !isAllowedToUse(player, npc, list)) { if (player.isGM()) { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/xml/impl/MultisellData.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/xml/impl/MultisellData.java index 8f4f7463aa..bcafe8032e 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/xml/impl/MultisellData.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/xml/impl/MultisellData.java @@ -45,7 +45,6 @@ import com.l2jmobius.gameserver.model.holders.MultisellListHolder; import com.l2jmobius.gameserver.model.holders.PreparedMultisellListHolder; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.network.serverpackets.MultiSellList; -import com.l2jmobius.gameserver.util.Util; public final class MultisellData implements IGameXmlReader { @@ -149,7 +148,7 @@ public final class MultisellData implements IGameXmlReader { // Initialize NPCs with the size of child nodes. final Set allowNpc = new HashSet<>(itemNode.getChildNodes().getLength()); - forEach(itemNode, n -> "npc".equalsIgnoreCase(n.getNodeName()) && Util.isDigit(n.getTextContent()), n -> allowNpc.add(Integer.parseInt(n.getTextContent()))); + forEach(itemNode, n -> "npc".equalsIgnoreCase(n.getNodeName()), n -> allowNpc.add(Integer.parseInt(n.getTextContent()))); // Add npcs to stats set. set.set("allowNpc", allowNpc); @@ -212,7 +211,7 @@ public final class MultisellData implements IGameXmlReader return; } - if (((npc != null) && !template.isNpcAllowed(npc.getId())) || ((npc == null) && template.isNpcOnly())) + if (!template.isNpcAllowed(-1) && (((npc != null) && !template.isNpcAllowed(npc.getId())) || ((npc == null) && template.isNpcOnly()))) { if (player.isGM()) { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java index febb0c0f84..4292d3ec02 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java @@ -133,7 +133,7 @@ public class MultiSellChoose implements IClientIncomingPacket } final L2Npc npc = player.getLastFolkNPC(); - if (!isAllowedToUse(player, npc, list)) + if (!list.isNpcAllowed(-1) && !isAllowedToUse(player, npc, list)) { if (player.isGM()) { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/xml/impl/MultisellData.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/xml/impl/MultisellData.java index 8f4f7463aa..bcafe8032e 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/xml/impl/MultisellData.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/xml/impl/MultisellData.java @@ -45,7 +45,6 @@ import com.l2jmobius.gameserver.model.holders.MultisellListHolder; import com.l2jmobius.gameserver.model.holders.PreparedMultisellListHolder; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.network.serverpackets.MultiSellList; -import com.l2jmobius.gameserver.util.Util; public final class MultisellData implements IGameXmlReader { @@ -149,7 +148,7 @@ public final class MultisellData implements IGameXmlReader { // Initialize NPCs with the size of child nodes. final Set allowNpc = new HashSet<>(itemNode.getChildNodes().getLength()); - forEach(itemNode, n -> "npc".equalsIgnoreCase(n.getNodeName()) && Util.isDigit(n.getTextContent()), n -> allowNpc.add(Integer.parseInt(n.getTextContent()))); + forEach(itemNode, n -> "npc".equalsIgnoreCase(n.getNodeName()), n -> allowNpc.add(Integer.parseInt(n.getTextContent()))); // Add npcs to stats set. set.set("allowNpc", allowNpc); @@ -212,7 +211,7 @@ public final class MultisellData implements IGameXmlReader return; } - if (((npc != null) && !template.isNpcAllowed(npc.getId())) || ((npc == null) && template.isNpcOnly())) + if (!template.isNpcAllowed(-1) && (((npc != null) && !template.isNpcAllowed(npc.getId())) || ((npc == null) && template.isNpcOnly()))) { if (player.isGM()) { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java index febb0c0f84..4292d3ec02 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java @@ -133,7 +133,7 @@ public class MultiSellChoose implements IClientIncomingPacket } final L2Npc npc = player.getLastFolkNPC(); - if (!isAllowedToUse(player, npc, list)) + if (!list.isNpcAllowed(-1) && !isAllowedToUse(player, npc, list)) { if (player.isGM()) { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/xml/impl/MultisellData.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/xml/impl/MultisellData.java index 8f4f7463aa..bcafe8032e 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/xml/impl/MultisellData.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/xml/impl/MultisellData.java @@ -45,7 +45,6 @@ import com.l2jmobius.gameserver.model.holders.MultisellListHolder; import com.l2jmobius.gameserver.model.holders.PreparedMultisellListHolder; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.network.serverpackets.MultiSellList; -import com.l2jmobius.gameserver.util.Util; public final class MultisellData implements IGameXmlReader { @@ -149,7 +148,7 @@ public final class MultisellData implements IGameXmlReader { // Initialize NPCs with the size of child nodes. final Set allowNpc = new HashSet<>(itemNode.getChildNodes().getLength()); - forEach(itemNode, n -> "npc".equalsIgnoreCase(n.getNodeName()) && Util.isDigit(n.getTextContent()), n -> allowNpc.add(Integer.parseInt(n.getTextContent()))); + forEach(itemNode, n -> "npc".equalsIgnoreCase(n.getNodeName()), n -> allowNpc.add(Integer.parseInt(n.getTextContent()))); // Add npcs to stats set. set.set("allowNpc", allowNpc); @@ -212,7 +211,7 @@ public final class MultisellData implements IGameXmlReader return; } - if (((npc != null) && !template.isNpcAllowed(npc.getId())) || ((npc == null) && template.isNpcOnly())) + if (!template.isNpcAllowed(-1) && (((npc != null) && !template.isNpcAllowed(npc.getId())) || ((npc == null) && template.isNpcOnly()))) { if (player.isGM()) { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java index febb0c0f84..4292d3ec02 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java @@ -133,7 +133,7 @@ public class MultiSellChoose implements IClientIncomingPacket } final L2Npc npc = player.getLastFolkNPC(); - if (!isAllowedToUse(player, npc, list)) + if (!list.isNpcAllowed(-1) && !isAllowedToUse(player, npc, list)) { if (player.isGM()) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/xml/impl/MultisellData.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/xml/impl/MultisellData.java index 8f4f7463aa..bcafe8032e 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/xml/impl/MultisellData.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/xml/impl/MultisellData.java @@ -45,7 +45,6 @@ import com.l2jmobius.gameserver.model.holders.MultisellListHolder; import com.l2jmobius.gameserver.model.holders.PreparedMultisellListHolder; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.network.serverpackets.MultiSellList; -import com.l2jmobius.gameserver.util.Util; public final class MultisellData implements IGameXmlReader { @@ -149,7 +148,7 @@ public final class MultisellData implements IGameXmlReader { // Initialize NPCs with the size of child nodes. final Set allowNpc = new HashSet<>(itemNode.getChildNodes().getLength()); - forEach(itemNode, n -> "npc".equalsIgnoreCase(n.getNodeName()) && Util.isDigit(n.getTextContent()), n -> allowNpc.add(Integer.parseInt(n.getTextContent()))); + forEach(itemNode, n -> "npc".equalsIgnoreCase(n.getNodeName()), n -> allowNpc.add(Integer.parseInt(n.getTextContent()))); // Add npcs to stats set. set.set("allowNpc", allowNpc); @@ -212,7 +211,7 @@ public final class MultisellData implements IGameXmlReader return; } - if (((npc != null) && !template.isNpcAllowed(npc.getId())) || ((npc == null) && template.isNpcOnly())) + if (!template.isNpcAllowed(-1) && (((npc != null) && !template.isNpcAllowed(npc.getId())) || ((npc == null) && template.isNpcOnly()))) { if (player.isGM()) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java index febb0c0f84..4292d3ec02 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java @@ -133,7 +133,7 @@ public class MultiSellChoose implements IClientIncomingPacket } final L2Npc npc = player.getLastFolkNPC(); - if (!isAllowedToUse(player, npc, list)) + if (!list.isNpcAllowed(-1) && !isAllowedToUse(player, npc, list)) { if (player.isGM()) {