Added missing multisell part for previous commit.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list isNewMultisell="true" maintainEnchantment="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">
|
||||
<list isChanceMultisell="true" maintainEnchantment="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">
|
||||
<npcs>
|
||||
<npc>31126</npc> <!-- Blacksmith of Mammon -->
|
||||
</npcs>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list isNewMultisell="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">
|
||||
<list isChanceMultisell="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">
|
||||
<npcs>
|
||||
<npc>33493</npc> <!-- Raminya - Mysterious Dye Merchant -->
|
||||
<npc>33494</npc> <!-- Ephesona - Mysterious Dye Merchant -->
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list isNewMultisell="true" maintainEnchantment="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">
|
||||
<list isChanceMultisell="true" maintainEnchantment="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">
|
||||
<npcs>
|
||||
<npc>31126</npc> <!-- Blacksmith of Mammon -->
|
||||
</npcs>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list isNewMultisell="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">
|
||||
<list isChanceMultisell="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">
|
||||
<npcs>
|
||||
<npc>33715</npc> <!-- Seed Talisman Manager -->
|
||||
</npcs>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list isNewMultisell="true" maintainEnchantment="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">
|
||||
<list isChanceMultisell="true" maintainEnchantment="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">
|
||||
<npcs>
|
||||
<npc>31126</npc> <!-- Blacksmith of Mammon -->
|
||||
</npcs>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list isNewMultisell="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">
|
||||
<list isChanceMultisell="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">
|
||||
<npcs>
|
||||
<npc>33936</npc> <!-- Pelu -->
|
||||
</npcs>
|
||||
|
||||
@@ -30,14 +30,14 @@
|
||||
<xs:attribute name="id" type="xs:integer" use="required" />
|
||||
<xs:attribute name="enchantmentLevel" type="xs:integer" />
|
||||
<xs:attribute name="count" type="xs:positiveInteger" use="required" />
|
||||
<xs:attribute name="chance" type="xs:integer" use="optional" />
|
||||
<xs:attribute name="chance" type="xs:double" use="optional" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="isNewMultisell" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="isChanceMultisell" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="applyTaxes" type="xs:boolean" />
|
||||
<xs:attribute name="maintainEnchantment" type="xs:boolean" />
|
||||
<xs:attribute name="useRate" type="xs:token" />
|
||||
|
||||
@@ -291,14 +291,14 @@
|
||||
<node X="43976" Y="24664" />
|
||||
</zone>
|
||||
<zone name="Labyrinth of Belis" id="12014" type="ScriptZone" shape="NPoly" minZ="-8000" maxZ="-8700">
|
||||
<node X="-117832" Y="214584 "/>
|
||||
<node X="-117832" Y="215000 "/>
|
||||
<node X="-118120" Y="215304 "/>
|
||||
<node X="-118536" Y="215304 "/>
|
||||
<node X="-118840" Y="215000 "/>
|
||||
<node X="-118840" Y="214584 "/>
|
||||
<node X="-118552" Y="214280 "/>
|
||||
<node X="-118120" Y="214280 "/>
|
||||
<node X="-117832" Y="214584" />
|
||||
<node X="-117832" Y="215000" />
|
||||
<node X="-118120" Y="215304" />
|
||||
<node X="-118536" Y="215304" />
|
||||
<node X="-118840" Y="215000" />
|
||||
<node X="-118840" Y="214584" />
|
||||
<node X="-118552" Y="214280" />
|
||||
<node X="-118120" Y="214280" />
|
||||
</zone>
|
||||
<zone name="anghel_waterfall_magmeld_teleport" id="12015" type="ScriptZone" shape="NPoly" minZ="-2371" maxZ="-2171">
|
||||
<node X="175319" Y="90413" />
|
||||
|
||||
@@ -96,7 +96,7 @@ public final class MultisellData implements IGameXmlReader
|
||||
if ("list".equalsIgnoreCase(n.getNodeName()))
|
||||
{
|
||||
list.setApplyTaxes(parseBoolean(n.getAttributes(), "applyTaxes", false));
|
||||
list.setNewMultisell(parseBoolean(n.getAttributes(), "isNewMultisell", false));
|
||||
list.setIsChanceMultisell(parseBoolean(n.getAttributes(), "isChanceMultisell", false));
|
||||
list.setMaintainEnchantment(parseBoolean(n.getAttributes(), "maintainEnchantment", false));
|
||||
|
||||
att = n.getAttributes().getNamedItem("useRate");
|
||||
|
||||
@@ -35,14 +35,14 @@ public class Ingredient
|
||||
private boolean _maintainIngredient;
|
||||
private L2Item _template = null;
|
||||
private ItemInfo _itemInfo = null;
|
||||
private final int _chance;
|
||||
private final double _chance;
|
||||
|
||||
public Ingredient(StatsSet set)
|
||||
{
|
||||
this(set.getInt("id"), set.getLong("count"), set.getInt("enchantmentLevel", 0), set.getInt("chance", 0), set.getBoolean("isTaxIngredient", false), set.getBoolean("maintainIngredient", false));
|
||||
this(set.getInt("id"), set.getLong("count"), set.getInt("enchantmentLevel", 0), set.getDouble("chance", 0), set.getBoolean("isTaxIngredient", false), set.getBoolean("maintainIngredient", false));
|
||||
}
|
||||
|
||||
public Ingredient(int itemId, long itemCount, int enchantmentLevel, int chance, boolean isTaxIngredient, boolean maintainIngredient)
|
||||
public Ingredient(int itemId, long itemCount, int enchantmentLevel, double chance, boolean isTaxIngredient, boolean maintainIngredient)
|
||||
{
|
||||
_itemId = itemId;
|
||||
_itemCount = itemCount;
|
||||
@@ -109,7 +109,7 @@ public class Ingredient
|
||||
return _itemCount;
|
||||
}
|
||||
|
||||
public int getChance()
|
||||
public double getChance()
|
||||
{
|
||||
return _chance;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.util.Set;
|
||||
public class ListContainer
|
||||
{
|
||||
private final int _listId;
|
||||
private boolean _isNewMultisell;
|
||||
private boolean _isChanceMultisell;
|
||||
private boolean _applyTaxes = false;
|
||||
private boolean _maintainEnchantment = false;
|
||||
private double _useRate = 1.0;
|
||||
@@ -43,7 +43,7 @@ public class ListContainer
|
||||
public ListContainer(ListContainer container)
|
||||
{
|
||||
_listId = container.getListId();
|
||||
_isNewMultisell = container.isNewMultisell();
|
||||
_isChanceMultisell = container.isChanceMultisell();
|
||||
_maintainEnchantment = container.getMaintainEnchantment();
|
||||
}
|
||||
|
||||
@@ -57,14 +57,14 @@ public class ListContainer
|
||||
return _listId;
|
||||
}
|
||||
|
||||
public boolean isNewMultisell()
|
||||
public boolean isChanceMultisell()
|
||||
{
|
||||
return _isNewMultisell;
|
||||
return _isChanceMultisell;
|
||||
}
|
||||
|
||||
public void setNewMultisell(boolean val)
|
||||
public void setIsChanceMultisell(boolean val)
|
||||
{
|
||||
_isNewMultisell = val;
|
||||
_isChanceMultisell = val;
|
||||
}
|
||||
|
||||
public final void setApplyTaxes(boolean applyTaxes)
|
||||
|
||||
@@ -368,7 +368,7 @@ public class MultiSellChoose implements IClientIncomingPacket
|
||||
// Generate the appropriate items
|
||||
for (Ingredient e : entry.getProducts())
|
||||
{
|
||||
if (list.isNewMultisell())
|
||||
if (list.isChanceMultisell())
|
||||
{
|
||||
// Skip first entry.
|
||||
if (e.getChance() < 1)
|
||||
|
||||
@@ -59,7 +59,7 @@ public final class MultiSellList implements IClientOutgoingPacket
|
||||
packet.writeD(_finished ? 0x01 : 0x00); // finished
|
||||
packet.writeD(PAGE_SIZE); // size of pages
|
||||
packet.writeD(_size); // list length
|
||||
packet.writeC(_list.isNewMultisell() ? 0x01 : 0x00); // new multisell window
|
||||
packet.writeC(_list.isChanceMultisell() ? 0x01 : 0x00); // new multisell window
|
||||
|
||||
Entry ent;
|
||||
while (_size-- > 0)
|
||||
@@ -100,7 +100,7 @@ public final class MultiSellList implements IClientOutgoingPacket
|
||||
{
|
||||
final ItemInfo item = ing.getItemInfo();
|
||||
packet.writeH(item.getEnchantLevel()); // enchant level
|
||||
packet.writeD(_list.isNewMultisell() ? ing.getChance() : item.getAugmentId()); // augment id
|
||||
packet.writeD((int) (_list.isChanceMultisell() ? ing.getChance() : item.getAugmentId())); // augment id
|
||||
packet.writeD(0x00); // mana
|
||||
packet.writeD(0x00); // time ?
|
||||
packet.writeH(item.getElementId()); // attack element
|
||||
@@ -115,7 +115,7 @@ public final class MultiSellList implements IClientOutgoingPacket
|
||||
else
|
||||
{
|
||||
packet.writeH(ing.getEnchantLevel()); // enchant level
|
||||
packet.writeD(ing.getChance()); // augment id
|
||||
packet.writeD((int) ing.getChance()); // augment id
|
||||
packet.writeD(0x00); // mana
|
||||
packet.writeD(0x00); // time ?
|
||||
packet.writeH(0x00); // attack element
|
||||
@@ -138,7 +138,7 @@ public final class MultiSellList implements IClientOutgoingPacket
|
||||
{
|
||||
final ItemInfo item = ing.getItemInfo();
|
||||
packet.writeH(item.getEnchantLevel()); // enchant level
|
||||
packet.writeD(_list.isNewMultisell() ? ing.getChance() : item.getAugmentId()); // augment id
|
||||
packet.writeD((int) (_list.isChanceMultisell() ? ing.getChance() : item.getAugmentId())); // augment id
|
||||
packet.writeD(0x00); // mana
|
||||
packet.writeH(item.getElementId()); // attack element
|
||||
packet.writeH(item.getElementPower()); // element power
|
||||
@@ -151,7 +151,7 @@ public final class MultiSellList implements IClientOutgoingPacket
|
||||
else
|
||||
{
|
||||
packet.writeH(ing.getEnchantLevel()); // enchant level
|
||||
packet.writeD(ing.getChance()); // augment id
|
||||
packet.writeD((int) ing.getChance()); // augment id
|
||||
packet.writeD(0x00); // mana
|
||||
packet.writeH(0x00); // attack element
|
||||
packet.writeH(0x00); // element power
|
||||
|
||||
Reference in New Issue
Block a user