Support for extractable item long quantity.

This commit is contained in:
MobiusDevelopment
2021-11-04 02:19:11 +00:00
parent e9430b97dd
commit 35db563e3c
74 changed files with 317 additions and 297 deletions

View File

@@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);

View File

@@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);

View File

@@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);

View File

@@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);

View File

@@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);

View File

@@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);

View File

@@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;

View File

@@ -248,6 +248,10 @@
<set name="is_dropable" val="false" /> <set name="is_dropable" val="false" />
<set name="is_sellable" val="false" /> <set name="is_sellable" val="false" />
<set name="is_stackable" val="true" /> <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>
<item id="80417" name="Box of 10,000 Mammon's Keys" type="EtcItem"> <item id="80417" name="Box of 10,000 Mammon's Keys" type="EtcItem">
<!-- Use it to obtain 10,000 Mammon's Keys. --> <!-- Use it to obtain 10,000 Mammon's Keys. -->

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);

View File

@@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;

View File

@@ -248,6 +248,10 @@
<set name="is_dropable" val="false" /> <set name="is_dropable" val="false" />
<set name="is_sellable" val="false" /> <set name="is_sellable" val="false" />
<set name="is_stackable" val="true" /> <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>
<item id="80417" name="Box of 10,000 Mammon's Keys" type="EtcItem"> <item id="80417" name="Box of 10,000 Mammon's Keys" type="EtcItem">
<!-- Use it to obtain 10,000 Mammon's Keys. --> <!-- Use it to obtain 10,000 Mammon's Keys. -->

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);

View File

@@ -87,9 +87,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -112,7 +112,7 @@ public class ExtractableItems implements IItemHandler
if (expi.getId() == -1) // Prime points 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!"); player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
primeReward = true; primeReward = true;
continue; continue;
@@ -157,9 +157,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -167,7 +167,7 @@ public class ExtractableItems implements IItemHandler
if (expi.getId() == -1) // Prime points 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!"); player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
primeReward = true; primeReward = true;
continue; continue;

View File

@@ -248,6 +248,10 @@
<set name="is_dropable" val="false" /> <set name="is_dropable" val="false" />
<set name="is_sellable" val="false" /> <set name="is_sellable" val="false" />
<set name="is_stackable" val="true" /> <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>
<item id="80417" name="Box of 10,000 Mammon's Keys" type="EtcItem"> <item id="80417" name="Box of 10,000 Mammon's Keys" type="EtcItem">
<!-- Use it to obtain 10,000 Mammon's Keys. --> <!-- Use it to obtain 10,000 Mammon's Keys. -->

View File

@@ -80,8 +80,8 @@
<xs:element maxOccurs="unbounded" name="item"> <xs:element maxOccurs="unbounded" name="item">
<xs:complexType> <xs:complexType>
<xs:attribute name="id" type="xs:unsignedInt" use="required" /> <xs:attribute name="id" type="xs:unsignedInt" use="required" />
<xs:attribute name="min" type="xs:unsignedInt" use="required" /> <xs:attribute name="min" type="xs:unsignedLong" use="required" />
<xs:attribute name="max" type="xs:unsignedInt" use="required" /> <xs:attribute name="max" type="xs:unsignedLong" use="required" />
<xs:attribute name="chance" type="xs:decimal" use="required" /> <xs:attribute name="chance" type="xs:decimal" use="required" />
<xs:attribute name="minEnchant" type="xs:unsignedByte" use="optional" /> <xs:attribute name="minEnchant" type="xs:unsignedByte" use="optional" />
<xs:attribute name="maxEnchant" type="xs:unsignedByte" use="optional" /> <xs:attribute name="maxEnchant" type="xs:unsignedByte" use="optional" />

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);

View File

@@ -87,9 +87,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -112,7 +112,7 @@ public class ExtractableItems implements IItemHandler
if (expi.getId() == -1) // Prime points 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!"); player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
primeReward = true; primeReward = true;
continue; continue;
@@ -157,9 +157,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -167,7 +167,7 @@ public class ExtractableItems implements IItemHandler
if (expi.getId() == -1) // Prime points 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!"); player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
primeReward = true; primeReward = true;
continue; continue;

View File

@@ -248,6 +248,10 @@
<set name="is_dropable" val="false" /> <set name="is_dropable" val="false" />
<set name="is_sellable" val="false" /> <set name="is_sellable" val="false" />
<set name="is_stackable" val="true" /> <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>
<item id="80417" name="Box of 10,000 Mammon's Keys" type="EtcItem"> <item id="80417" name="Box of 10,000 Mammon's Keys" type="EtcItem">
<!-- Use it to obtain 10,000 Mammon's Keys. --> <!-- Use it to obtain 10,000 Mammon's Keys. -->

View File

@@ -80,8 +80,8 @@
<xs:element maxOccurs="unbounded" name="item"> <xs:element maxOccurs="unbounded" name="item">
<xs:complexType> <xs:complexType>
<xs:attribute name="id" type="xs:unsignedInt" use="required" /> <xs:attribute name="id" type="xs:unsignedInt" use="required" />
<xs:attribute name="min" type="xs:unsignedInt" use="required" /> <xs:attribute name="min" type="xs:unsignedLong" use="required" />
<xs:attribute name="max" type="xs:unsignedInt" use="required" /> <xs:attribute name="max" type="xs:unsignedLong" use="required" />
<xs:attribute name="chance" type="xs:decimal" use="required" /> <xs:attribute name="chance" type="xs:decimal" use="required" />
<xs:attribute name="minEnchant" type="xs:unsignedByte" use="optional" /> <xs:attribute name="minEnchant" type="xs:unsignedByte" use="optional" />
<xs:attribute name="maxEnchant" type="xs:unsignedByte" use="optional" /> <xs:attribute name="maxEnchant" type="xs:unsignedByte" use="optional" />

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);

View File

@@ -87,9 +87,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -112,7 +112,7 @@ public class ExtractableItems implements IItemHandler
if (expi.getId() == -1) // Prime points 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!"); player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
primeReward = true; primeReward = true;
continue; continue;
@@ -157,9 +157,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -167,7 +167,7 @@ public class ExtractableItems implements IItemHandler
if (expi.getId() == -1) // Prime points 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!"); player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
primeReward = true; primeReward = true;
continue; continue;

View File

@@ -248,6 +248,10 @@
<set name="is_dropable" val="false" /> <set name="is_dropable" val="false" />
<set name="is_sellable" val="false" /> <set name="is_sellable" val="false" />
<set name="is_stackable" val="true" /> <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>
<item id="80417" name="Box of 10,000 Mammon's Keys" type="EtcItem"> <item id="80417" name="Box of 10,000 Mammon's Keys" type="EtcItem">
<!-- Use it to obtain 10,000 Mammon's Keys. --> <!-- Use it to obtain 10,000 Mammon's Keys. -->

View File

@@ -80,8 +80,8 @@
<xs:element maxOccurs="unbounded" name="item"> <xs:element maxOccurs="unbounded" name="item">
<xs:complexType> <xs:complexType>
<xs:attribute name="id" type="xs:unsignedInt" use="required" /> <xs:attribute name="id" type="xs:unsignedInt" use="required" />
<xs:attribute name="min" type="xs:unsignedInt" use="required" /> <xs:attribute name="min" type="xs:unsignedLong" use="required" />
<xs:attribute name="max" type="xs:unsignedInt" use="required" /> <xs:attribute name="max" type="xs:unsignedLong" use="required" />
<xs:attribute name="chance" type="xs:decimal" use="required" /> <xs:attribute name="chance" type="xs:decimal" use="required" />
<xs:attribute name="minEnchant" type="xs:unsignedByte" use="optional" /> <xs:attribute name="minEnchant" type="xs:unsignedByte" use="optional" />
<xs:attribute name="maxEnchant" type="xs:unsignedByte" use="optional" /> <xs:attribute name="maxEnchant" type="xs:unsignedByte" use="optional" />

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);

View File

@@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);

View File

@@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);

View File

@@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);

View File

@@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);

View File

@@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);

View File

@@ -86,9 +86,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -148,9 +148,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);

View File

@@ -87,9 +87,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -149,9 +149,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);

View File

@@ -87,9 +87,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -112,7 +112,7 @@ public class ExtractableItems implements IItemHandler
if (expi.getId() == -1) // Prime points 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!"); player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
primeReward = true; primeReward = true;
continue; continue;
@@ -157,9 +157,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -167,7 +167,7 @@ public class ExtractableItems implements IItemHandler
if (expi.getId() == -1) // Prime points 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!"); player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
primeReward = true; primeReward = true;
continue; continue;

View File

@@ -85,8 +85,8 @@
<xs:element maxOccurs="unbounded" name="item"> <xs:element maxOccurs="unbounded" name="item">
<xs:complexType> <xs:complexType>
<xs:attribute name="id" type="xs:unsignedInt" use="required" /> <xs:attribute name="id" type="xs:unsignedInt" use="required" />
<xs:attribute name="min" type="xs:unsignedInt" use="required" /> <xs:attribute name="min" type="xs:unsignedLong" use="required" />
<xs:attribute name="max" type="xs:unsignedInt" use="required" /> <xs:attribute name="max" type="xs:unsignedLong" use="required" />
<xs:attribute name="chance" type="xs:decimal" use="required" /> <xs:attribute name="chance" type="xs:decimal" use="required" />
<xs:attribute name="minEnchant" type="xs:unsignedByte" use="optional" /> <xs:attribute name="minEnchant" type="xs:unsignedByte" use="optional" />
<xs:attribute name="maxEnchant" type="xs:unsignedByte" use="optional" /> <xs:attribute name="maxEnchant" type="xs:unsignedByte" use="optional" />

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);

View File

@@ -87,9 +87,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -112,7 +112,7 @@ public class ExtractableItems implements IItemHandler
if (expi.getId() == -1) // Prime points 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!"); player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
primeReward = true; primeReward = true;
continue; continue;
@@ -157,9 +157,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -167,7 +167,7 @@ public class ExtractableItems implements IItemHandler
if (expi.getId() == -1) // Prime points 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!"); player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
primeReward = true; primeReward = true;
continue; continue;

View File

@@ -85,8 +85,8 @@
<xs:element maxOccurs="unbounded" name="item"> <xs:element maxOccurs="unbounded" name="item">
<xs:complexType> <xs:complexType>
<xs:attribute name="id" type="xs:unsignedInt" use="required" /> <xs:attribute name="id" type="xs:unsignedInt" use="required" />
<xs:attribute name="min" type="xs:unsignedInt" use="required" /> <xs:attribute name="min" type="xs:unsignedLong" use="required" />
<xs:attribute name="max" type="xs:unsignedInt" use="required" /> <xs:attribute name="max" type="xs:unsignedLong" use="required" />
<xs:attribute name="chance" type="xs:decimal" use="required" /> <xs:attribute name="chance" type="xs:decimal" use="required" />
<xs:attribute name="minEnchant" type="xs:unsignedByte" use="optional" /> <xs:attribute name="minEnchant" type="xs:unsignedByte" use="optional" />
<xs:attribute name="maxEnchant" type="xs:unsignedByte" use="optional" /> <xs:attribute name="maxEnchant" type="xs:unsignedByte" use="optional" />

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);

View File

@@ -87,9 +87,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -112,7 +112,7 @@ public class ExtractableItems implements IItemHandler
if (expi.getId() == -1) // Prime points 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!"); player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
primeReward = true; primeReward = true;
continue; continue;
@@ -157,9 +157,9 @@ public class ExtractableItems implements IItemHandler
if (Rnd.get(100000) <= expi.getChance()) if (Rnd.get(100000) <= expi.getChance())
{ {
final int min = (int) (expi.getMin() * Config.RATE_EXTRACTABLE); final long min = (long) (expi.getMin() * Config.RATE_EXTRACTABLE);
final int max = (int) (expi.getMax() * Config.RATE_EXTRACTABLE); final long max = (long) (expi.getMax() * Config.RATE_EXTRACTABLE);
int createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min); long createItemAmount = (max == min) ? min : (Rnd.get((max - min) + 1) + min);
if (createItemAmount == 0) if (createItemAmount == 0)
{ {
continue; continue;
@@ -167,7 +167,7 @@ public class ExtractableItems implements IItemHandler
if (expi.getId() == -1) // Prime points 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!"); player.sendMessage("You have obtained " + (createItemAmount / 100) + " Euro!");
primeReward = true; primeReward = true;
continue; continue;

View File

@@ -85,8 +85,8 @@
<xs:element maxOccurs="unbounded" name="item"> <xs:element maxOccurs="unbounded" name="item">
<xs:complexType> <xs:complexType>
<xs:attribute name="id" type="xs:unsignedInt" use="required" /> <xs:attribute name="id" type="xs:unsignedInt" use="required" />
<xs:attribute name="min" type="xs:unsignedInt" use="required" /> <xs:attribute name="min" type="xs:unsignedLong" use="required" />
<xs:attribute name="max" type="xs:unsignedInt" use="required" /> <xs:attribute name="max" type="xs:unsignedLong" use="required" />
<xs:attribute name="chance" type="xs:decimal" use="required" /> <xs:attribute name="chance" type="xs:decimal" use="required" />
<xs:attribute name="minEnchant" type="xs:unsignedByte" use="optional" /> <xs:attribute name="minEnchant" type="xs:unsignedByte" use="optional" />
<xs:attribute name="maxEnchant" type="xs:unsignedByte" use="optional" /> <xs:attribute name="maxEnchant" type="xs:unsignedByte" use="optional" />

View File

@@ -22,8 +22,8 @@ package org.l2jmobius.gameserver.model;
public class ExtractableProduct public class ExtractableProduct
{ {
private final int _id; private final int _id;
private final int _min; private final long _min;
private final int _max; private final long _max;
private final int _chance; private final int _chance;
private final int _minEnchant; private final int _minEnchant;
private final int _maxEnchant; private final int _maxEnchant;
@@ -37,7 +37,7 @@ public class ExtractableProduct
* @param minEnchant item min enchant * @param minEnchant item min enchant
* @param maxEnchant item max 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; _id = id;
_min = min; _min = min;
@@ -52,12 +52,12 @@ public class ExtractableProduct
return _id; return _id;
} }
public int getMin() public long getMin()
{ {
return _min; return _min;
} }
public int getMax() public long getMax()
{ {
return _max; return _max;
} }

View File

@@ -181,8 +181,8 @@ public class DocumentItem extends DocumentBase implements IXmlReader
if ("item".equals(b.getNodeName())) if ("item".equals(b.getNodeName()))
{ {
final int id = parseInteger(b.getAttributes(), "id"); final int id = parseInteger(b.getAttributes(), "id");
final int min = parseInteger(b.getAttributes(), "min"); final long min = parseInteger(b.getAttributes(), "min");
final int max = parseInteger(b.getAttributes(), "max"); final long max = parseInteger(b.getAttributes(), "max");
final double chance = parseDouble(b.getAttributes(), "chance"); final double chance = parseDouble(b.getAttributes(), "chance");
final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0); final int minEnchant = parseInteger(b.getAttributes(), "minEnchant", 0);
final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0); final int maxEnchant = parseInteger(b.getAttributes(), "maxEnchant", 0);