--- a/java/com/l2jserver/gameserver/network/clientpackets/MultiSellChoose.java
+++ b/java/com/l2jserver/gameserver/network/clientpackets/MultiSellChoose.java
@@ -18,8 +18,6 @@
*/
package com.l2jserver.gameserver.network.clientpackets;
-import static com.l2jserver.gameserver.model.actor.L2Npc.INTERACTION_DISTANCE;
-
import java.util.ArrayList;
import java.util.List;
@@ -120,21 +118,13 @@
}
final L2Npc npc = player.getLastFolkNPC();
- if (((npc != null) && !list.isNpcAllowed(npc.getId())) || ((npc == null) && list.isNpcOnly()))
+
+ if (!list.isNpcAllowed(-1) && !isAllowedToUse(player, npc, list))
{
player.setMultiSell(null);
return;
}
- if (!player.isGM() && (npc != null) && !player.isBBSMultisell())
- {
- if (!player.isInsideRadius(npc, INTERACTION_DISTANCE, true, false) || (player.getInstanceId() != npc.getInstanceId()))
- {
- player.setMultiSell(null);
- return;
- }
- }
for (Entry entry : list.getEntries())
{
if (entry.getEntryId() == _entryId)
@@ -469,6 +459,26 @@
}
}
- private boolean isAllowedToUse(L2PcInstance player, L2Npc npc, PreparedListContainer list)
- {
- if (npc != null)
- {
- if (!list.isNpcAllowed(npc.getId()))
- {
- return false;
- }
- else if (list.isNpcOnly() && ((npc.getInstanceId() != player.getInstanceId()) || !player.isInsideRadius(npc, L2Npc.INTERACTION_DISTANCE, true, false)))
- {
- return false;
- }
- }
- else if (list.isNpcOnly())
- {
- return false;
- }
- return true;
- }
@Override
public String getType()
{
--- a/java/com/l2jserver/gameserver/data/xml/impl/MultisellData.java
+++ b/java/com/l2jserver/gameserver/data/xml/impl/MultisellData.java
@@ -243,7 +247,7 @@
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())))
{
LOG.warn("{}: Player {} attempted to open multisell {} from npc {} which is not allowed!", getClass().getSimpleName(), player, listId, npc);
return;
+++ b/dist/game/data/multisell/custom/50000.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list xmlns:xsi="
Вы не можете просматривать ссылку пожалуйста воспользуйтесь следующими ссылками
Вход или
Регистрация
" xsi:noNamespaceSchemaLocation="../../xsd/multisell.xsd">
- <npcs>
- <npc>-1</npc> <!-- CB -->
- </npcs>
- <!-- Scroll -->
- <item>
- <ingredient count="6000000" id="57"/> <!-- Adena -->
- <production count="1" id="956"/> <!-- Scroll: Enchant Armor (D) -->
- </item>
+</list>
--- a/dist/game/data/xsd/multisell.xsd
+++ b/dist/game/data/xsd/multisell.xsd
@@ -8,16 +8,13 @@
<xs:sequence minOccurs="1" maxOccurs="1">
<xs:element name="npc" minOccurs="1" maxOccurs="unbounded">
<xs:simpleType>
- <xs:restriction base="xsositiveInteger">
- <xs:minInclusive value="1" />
- <xs:maxInclusive value="65535" />
- </xs:restriction>
+ <xs:restriction base="xs:integer" />
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="item" minOccurs="1" maxOccurs="unbounded">
+ <xs:element name="item" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="1">
<xs:element name="ingredient" minOccurs="0" maxOccurs="unbounded">