Support for extractable item long quantity.
This commit is contained in:
parent
e9430b97dd
commit
35db563e3c
@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
|
@ -248,6 +248,10 @@
|
||||
<set name="is_dropable" val="false" />
|
||||
<set name="is_sellable" val="false" />
|
||||
<set name="is_stackable" val="true" />
|
||||
<set name="handler" val="ExtractableItems" />
|
||||
<capsuled_items>
|
||||
<item id="57" min="10000000000" max="10000000000" chance="100" /> <!-- Adena -->
|
||||
</capsuled_items>
|
||||
</item>
|
||||
<item id="80417" name="Box of 10,000 Mammon's Keys" type="EtcItem">
|
||||
<!-- Use it to obtain 10,000 Mammon's Keys. -->
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
|
@ -248,6 +248,10 @@
|
||||
<set name="is_dropable" val="false" />
|
||||
<set name="is_sellable" val="false" />
|
||||
<set name="is_stackable" val="true" />
|
||||
<set name="handler" val="ExtractableItems" />
|
||||
<capsuled_items>
|
||||
<item id="57" min="10000000000" max="10000000000" chance="100" /> <!-- Adena -->
|
||||
</capsuled_items>
|
||||
</item>
|
||||
<item id="80417" name="Box of 10,000 Mammon's Keys" type="EtcItem">
|
||||
<!-- Use it to obtain 10,000 Mammon's Keys. -->
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
@ -87,9 +87,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -112,7 +112,7 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (expi.getId() == -1) // Prime points
|
||||
{
|
||||
player.setPrimePoints(player.getPrimePoints() + createItemAmount);
|
||||
player.setPrimePoints(player.getPrimePoints() + (int) createItemAmount);
|
||||
player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
|
||||
primeReward = true;
|
||||
continue;
|
||||
@ -157,9 +157,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -167,7 +167,7 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (expi.getId() == -1) // Prime points
|
||||
{
|
||||
player.setPrimePoints(player.getPrimePoints() + createItemAmount);
|
||||
player.setPrimePoints(player.getPrimePoints() + (int) createItemAmount);
|
||||
player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
|
||||
primeReward = true;
|
||||
continue;
|
||||
|
@ -248,6 +248,10 @@
|
||||
<set name="is_dropable" val="false" />
|
||||
<set name="is_sellable" val="false" />
|
||||
<set name="is_stackable" val="true" />
|
||||
<set name="handler" val="ExtractableItems" />
|
||||
<capsuled_items>
|
||||
<item id="57" min="10000000000" max="10000000000" chance="100" /> <!-- Adena -->
|
||||
</capsuled_items>
|
||||
</item>
|
||||
<item id="80417" name="Box of 10,000 Mammon's Keys" type="EtcItem">
|
||||
<!-- Use it to obtain 10,000 Mammon's Keys. -->
|
||||
|
@ -80,8 +80,8 @@
|
||||
<xs:element maxOccurs="unbounded" name="item">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="id" type="xs:unsignedInt" use="required" />
|
||||
<xs:attribute name="min" type="xs:unsignedInt" use="required" />
|
||||
<xs:attribute name="max" type="xs:unsignedInt" use="required" />
|
||||
<xs:attribute name="min" type="xs:unsignedLong" use="required" />
|
||||
<xs:attribute name="max" type="xs:unsignedLong" use="required" />
|
||||
<xs:attribute name="chance" type="xs:decimal" use="required" />
|
||||
<xs:attribute name="minEnchant" type="xs:unsignedByte" use="optional" />
|
||||
<xs:attribute name="maxEnchant" type="xs:unsignedByte" use="optional" />
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
@ -87,9 +87,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -112,7 +112,7 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (expi.getId() == -1) // Prime points
|
||||
{
|
||||
player.setPrimePoints(player.getPrimePoints() + createItemAmount);
|
||||
player.setPrimePoints(player.getPrimePoints() + (int) createItemAmount);
|
||||
player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
|
||||
primeReward = true;
|
||||
continue;
|
||||
@ -157,9 +157,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -167,7 +167,7 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (expi.getId() == -1) // Prime points
|
||||
{
|
||||
player.setPrimePoints(player.getPrimePoints() + createItemAmount);
|
||||
player.setPrimePoints(player.getPrimePoints() + (int) createItemAmount);
|
||||
player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
|
||||
primeReward = true;
|
||||
continue;
|
||||
|
@ -248,6 +248,10 @@
|
||||
<set name="is_dropable" val="false" />
|
||||
<set name="is_sellable" val="false" />
|
||||
<set name="is_stackable" val="true" />
|
||||
<set name="handler" val="ExtractableItems" />
|
||||
<capsuled_items>
|
||||
<item id="57" min="10000000000" max="10000000000" chance="100" /> <!-- Adena -->
|
||||
</capsuled_items>
|
||||
</item>
|
||||
<item id="80417" name="Box of 10,000 Mammon's Keys" type="EtcItem">
|
||||
<!-- Use it to obtain 10,000 Mammon's Keys. -->
|
||||
|
@ -80,8 +80,8 @@
|
||||
<xs:element maxOccurs="unbounded" name="item">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="id" type="xs:unsignedInt" use="required" />
|
||||
<xs:attribute name="min" type="xs:unsignedInt" use="required" />
|
||||
<xs:attribute name="max" type="xs:unsignedInt" use="required" />
|
||||
<xs:attribute name="min" type="xs:unsignedLong" use="required" />
|
||||
<xs:attribute name="max" type="xs:unsignedLong" use="required" />
|
||||
<xs:attribute name="chance" type="xs:decimal" use="required" />
|
||||
<xs:attribute name="minEnchant" type="xs:unsignedByte" use="optional" />
|
||||
<xs:attribute name="maxEnchant" type="xs:unsignedByte" use="optional" />
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
@ -87,9 +87,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -112,7 +112,7 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (expi.getId() == -1) // Prime points
|
||||
{
|
||||
player.setPrimePoints(player.getPrimePoints() + createItemAmount);
|
||||
player.setPrimePoints(player.getPrimePoints() + (int) createItemAmount);
|
||||
player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
|
||||
primeReward = true;
|
||||
continue;
|
||||
@ -157,9 +157,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -167,7 +167,7 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (expi.getId() == -1) // Prime points
|
||||
{
|
||||
player.setPrimePoints(player.getPrimePoints() + createItemAmount);
|
||||
player.setPrimePoints(player.getPrimePoints() + (int) createItemAmount);
|
||||
player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
|
||||
primeReward = true;
|
||||
continue;
|
||||
|
@ -248,6 +248,10 @@
|
||||
<set name="is_dropable" val="false" />
|
||||
<set name="is_sellable" val="false" />
|
||||
<set name="is_stackable" val="true" />
|
||||
<set name="handler" val="ExtractableItems" />
|
||||
<capsuled_items>
|
||||
<item id="57" min="10000000000" max="10000000000" chance="100" /> <!-- Adena -->
|
||||
</capsuled_items>
|
||||
</item>
|
||||
<item id="80417" name="Box of 10,000 Mammon's Keys" type="EtcItem">
|
||||
<!-- Use it to obtain 10,000 Mammon's Keys. -->
|
||||
|
@ -80,8 +80,8 @@
|
||||
<xs:element maxOccurs="unbounded" name="item">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="id" type="xs:unsignedInt" use="required" />
|
||||
<xs:attribute name="min" type="xs:unsignedInt" use="required" />
|
||||
<xs:attribute name="max" type="xs:unsignedInt" use="required" />
|
||||
<xs:attribute name="min" type="xs:unsignedLong" use="required" />
|
||||
<xs:attribute name="max" type="xs:unsignedLong" use="required" />
|
||||
<xs:attribute name="chance" type="xs:decimal" use="required" />
|
||||
<xs:attribute name="minEnchant" type="xs:unsignedByte" use="optional" />
|
||||
<xs:attribute name="maxEnchant" type="xs:unsignedByte" use="optional" />
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
@ -87,9 +87,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -149,9 +149,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
@ -87,9 +87,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -112,7 +112,7 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (expi.getId() == -1) // Prime points
|
||||
{
|
||||
player.setPrimePoints(player.getPrimePoints() + createItemAmount);
|
||||
player.setPrimePoints(player.getPrimePoints() + (int) createItemAmount);
|
||||
player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
|
||||
primeReward = true;
|
||||
continue;
|
||||
@ -157,9 +157,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -167,7 +167,7 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (expi.getId() == -1) // Prime points
|
||||
{
|
||||
player.setPrimePoints(player.getPrimePoints() + createItemAmount);
|
||||
player.setPrimePoints(player.getPrimePoints() + (int) createItemAmount);
|
||||
player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
|
||||
primeReward = true;
|
||||
continue;
|
||||
|
@ -85,8 +85,8 @@
|
||||
<xs:element maxOccurs="unbounded" name="item">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="id" type="xs:unsignedInt" use="required" />
|
||||
<xs:attribute name="min" type="xs:unsignedInt" use="required" />
|
||||
<xs:attribute name="max" type="xs:unsignedInt" use="required" />
|
||||
<xs:attribute name="min" type="xs:unsignedLong" use="required" />
|
||||
<xs:attribute name="max" type="xs:unsignedLong" use="required" />
|
||||
<xs:attribute name="chance" type="xs:decimal" use="required" />
|
||||
<xs:attribute name="minEnchant" type="xs:unsignedByte" use="optional" />
|
||||
<xs:attribute name="maxEnchant" type="xs:unsignedByte" use="optional" />
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
@ -87,9 +87,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -112,7 +112,7 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (expi.getId() == -1) // Prime points
|
||||
{
|
||||
player.setPrimePoints(player.getPrimePoints() + createItemAmount);
|
||||
player.setPrimePoints(player.getPrimePoints() + (int) createItemAmount);
|
||||
player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
|
||||
primeReward = true;
|
||||
continue;
|
||||
@ -157,9 +157,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -167,7 +167,7 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (expi.getId() == -1) // Prime points
|
||||
{
|
||||
player.setPrimePoints(player.getPrimePoints() + createItemAmount);
|
||||
player.setPrimePoints(player.getPrimePoints() + (int) createItemAmount);
|
||||
player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
|
||||
primeReward = true;
|
||||
continue;
|
||||
|
@ -85,8 +85,8 @@
|
||||
<xs:element maxOccurs="unbounded" name="item">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="id" type="xs:unsignedInt" use="required" />
|
||||
<xs:attribute name="min" type="xs:unsignedInt" use="required" />
|
||||
<xs:attribute name="max" type="xs:unsignedInt" use="required" />
|
||||
<xs:attribute name="min" type="xs:unsignedLong" use="required" />
|
||||
<xs:attribute name="max" type="xs:unsignedLong" use="required" />
|
||||
<xs:attribute name="chance" type="xs:decimal" use="required" />
|
||||
<xs:attribute name="minEnchant" type="xs:unsignedByte" use="optional" />
|
||||
<xs:attribute name="maxEnchant" type="xs:unsignedByte" use="optional" />
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
@ -87,9 +87,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -112,7 +112,7 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (expi.getId() == -1) // Prime points
|
||||
{
|
||||
player.setPrimePoints(player.getPrimePoints() + createItemAmount);
|
||||
player.setPrimePoints(player.getPrimePoints() + (int) createItemAmount);
|
||||
player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
|
||||
primeReward = true;
|
||||
continue;
|
||||
@ -157,9 +157,9 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (Rnd.get(100000) <= expi.getChance())
|
||||
{
|
||||
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
|
||||
final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
|
||||
long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
|
||||
if (createItemAmount == 0)
|
||||
{
|
||||
continue;
|
||||
@ -167,7 +167,7 @@ public class ExtractableItems implements IItemHandler
|
||||
|
||||
if (expi.getId() == -1) // Prime points
|
||||
{
|
||||
player.setPrimePoints(player.getPrimePoints() + createItemAmount);
|
||||
player.setPrimePoints(player.getPrimePoints() + (int) createItemAmount);
|
||||
player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
|
||||
primeReward = true;
|
||||
continue;
|
||||
|
@ -85,8 +85,8 @@
|
||||
<xs:element maxOccurs="unbounded" name="item">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="id" type="xs:unsignedInt" use="required" />
|
||||
<xs:attribute name="min" type="xs:unsignedInt" use="required" />
|
||||
<xs:attribute name="max" type="xs:unsignedInt" use="required" />
|
||||
<xs:attribute name="min" type="xs:unsignedLong" use="required" />
|
||||
<xs:attribute name="max" type="xs:unsignedLong" use="required" />
|
||||
<xs:attribute name="chance" type="xs:decimal" use="required" />
|
||||
<xs:attribute name="minEnchant" type="xs:unsignedByte" use="optional" />
|
||||
<xs:attribute name="maxEnchant" type="xs:unsignedByte" use="optional" />
|
||||
|
@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
|
||||
public class ExtractableProduct
|
||||
{
|
||||
private final int _id;
|
||||
private final int _min;
|
||||
private final int _max;
|
||||
private final long _min;
|
||||
private final long _max;
|
||||
private final int _chance;
|
||||
private final int _minEnchant;
|
||||
private final int _maxEnchant;
|
||||
@ -37,7 +37,7 @@ public class ExtractableProduct
|
||||
* @param minEnchant item min enchant
|
||||
* @param maxEnchant item max enchant
|
||||
*/
|
||||
public ExtractableProduct(int id, int min, int max, double chance, int minEnchant, int maxEnchant)
|
||||
public ExtractableProduct(int id, long min, long max, double chance, int minEnchant, int maxEnchant)
|
||||
{
|
||||
_id = id;
|
||||
_min = min;
|
||||
@ -52,12 +52,12 @@ public class ExtractableProduct
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getMin()
|
||||
public long getMin()
|
||||
{
|
||||
return _min;
|
||||
}
|
||||
|
||||
public int getMax()
|
||||
public long getMax()
|
||||
{
|
||||
return _max;
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
if ("item".equals(b.getNodeName()))
|
||||
{
|
||||
final int id = parseInteger(b.getAttributes(), "id");
|
||||
final int min = parseInteger(b.getAttributes(), "min");
|
||||
final int max = parseInteger(b.getAttributes(), "max");
|
||||
final long min = parseInteger(b.getAttributes(), "min");
|
||||
final long max = parseInteger(b.getAttributes(), "max");
|
||||
final double chance = parseDouble(b.getAttributes(), "chance");
|
||||
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
|
||||
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);
|
||||
|
Loading…
Reference in New Issue
Block a user