Store if item is mineral at EtcItem.
This commit is contained in:
@@ -32,6 +32,7 @@ import org.w3c.dom.Document;
|
|||||||
import org.l2jmobius.commons.util.IXmlReader;
|
import org.l2jmobius.commons.util.IXmlReader;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||||
|
import org.l2jmobius.gameserver.model.item.EtcItem;
|
||||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionDataCategory;
|
import org.l2jmobius.gameserver.model.options.OptionDataCategory;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionDataGroup;
|
import org.l2jmobius.gameserver.model.options.OptionDataGroup;
|
||||||
@@ -139,6 +140,7 @@ public class VariationData implements IXmlReader
|
|||||||
});
|
});
|
||||||
|
|
||||||
_variations.put(mineralId, variation);
|
_variations.put(mineralId, variation);
|
||||||
|
((EtcItem) ItemTable.getInstance().getTemplate(mineralId)).setMineral();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
final Map<Integer, List<Integer>> itemGroups = new HashMap<>();
|
final Map<Integer, List<Integer>> itemGroups = new HashMap<>();
|
||||||
|
@@ -35,6 +35,7 @@ public class EtcItem extends ItemTemplate
|
|||||||
private int _extractableCountMin;
|
private int _extractableCountMin;
|
||||||
private int _extractableCountMax;
|
private int _extractableCountMax;
|
||||||
private boolean _isInfinite;
|
private boolean _isInfinite;
|
||||||
|
private boolean _isMineral = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for EtcItem.
|
* Constructor for EtcItem.
|
||||||
@@ -153,4 +154,14 @@ public class EtcItem extends ItemTemplate
|
|||||||
}
|
}
|
||||||
_extractableItems.add(extractableProduct);
|
_extractableItems.add(extractableProduct);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isMineral()
|
||||||
|
{
|
||||||
|
return _isMineral;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMineral()
|
||||||
|
{
|
||||||
|
_isMineral = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -25,7 +25,6 @@ import org.l2jmobius.commons.threads.ThreadPool;
|
|||||||
import org.l2jmobius.gameserver.ai.CtrlEvent;
|
import org.l2jmobius.gameserver.ai.CtrlEvent;
|
||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.ai.NextAction;
|
import org.l2jmobius.gameserver.ai.NextAction;
|
||||||
import org.l2jmobius.gameserver.data.xml.VariationData;
|
|
||||||
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.handler.AdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.AdminCommandHandler;
|
||||||
@@ -300,8 +299,8 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
// Notify events.
|
// Notify events.
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnItemUse(player, item), item.getTemplate());
|
EventDispatcher.getInstance().notifyEventAsync(new OnItemUse(player, item), item.getTemplate());
|
||||||
}
|
}
|
||||||
// TODO: New item handler for minerals.
|
|
||||||
if (VariationData.getInstance().getVariation(_itemId) != null)
|
if ((etcItem != null) && etcItem.isMineral())
|
||||||
{
|
{
|
||||||
player.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
|
player.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,7 @@ import org.w3c.dom.Document;
|
|||||||
import org.l2jmobius.commons.util.IXmlReader;
|
import org.l2jmobius.commons.util.IXmlReader;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||||
|
import org.l2jmobius.gameserver.model.item.EtcItem;
|
||||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionDataCategory;
|
import org.l2jmobius.gameserver.model.options.OptionDataCategory;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionDataGroup;
|
import org.l2jmobius.gameserver.model.options.OptionDataGroup;
|
||||||
@@ -139,6 +140,7 @@ public class VariationData implements IXmlReader
|
|||||||
});
|
});
|
||||||
|
|
||||||
_variations.put(mineralId, variation);
|
_variations.put(mineralId, variation);
|
||||||
|
((EtcItem) ItemTable.getInstance().getTemplate(mineralId)).setMineral();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
final Map<Integer, List<Integer>> itemGroups = new HashMap<>();
|
final Map<Integer, List<Integer>> itemGroups = new HashMap<>();
|
||||||
|
@@ -35,6 +35,7 @@ public class EtcItem extends ItemTemplate
|
|||||||
private int _extractableCountMin;
|
private int _extractableCountMin;
|
||||||
private int _extractableCountMax;
|
private int _extractableCountMax;
|
||||||
private boolean _isInfinite;
|
private boolean _isInfinite;
|
||||||
|
private boolean _isMineral = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for EtcItem.
|
* Constructor for EtcItem.
|
||||||
@@ -153,4 +154,14 @@ public class EtcItem extends ItemTemplate
|
|||||||
}
|
}
|
||||||
_extractableItems.add(extractableProduct);
|
_extractableItems.add(extractableProduct);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isMineral()
|
||||||
|
{
|
||||||
|
return _isMineral;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMineral()
|
||||||
|
{
|
||||||
|
_isMineral = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -25,7 +25,6 @@ import org.l2jmobius.commons.threads.ThreadPool;
|
|||||||
import org.l2jmobius.gameserver.ai.CtrlEvent;
|
import org.l2jmobius.gameserver.ai.CtrlEvent;
|
||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.ai.NextAction;
|
import org.l2jmobius.gameserver.ai.NextAction;
|
||||||
import org.l2jmobius.gameserver.data.xml.VariationData;
|
|
||||||
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.handler.AdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.AdminCommandHandler;
|
||||||
@@ -300,8 +299,8 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
// Notify events.
|
// Notify events.
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnItemUse(player, item), item.getTemplate());
|
EventDispatcher.getInstance().notifyEventAsync(new OnItemUse(player, item), item.getTemplate());
|
||||||
}
|
}
|
||||||
// TODO: New item handler for minerals.
|
|
||||||
if (VariationData.getInstance().getVariation(_itemId) != null)
|
if ((etcItem != null) && etcItem.isMineral())
|
||||||
{
|
{
|
||||||
player.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
|
player.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,7 @@ import org.w3c.dom.Document;
|
|||||||
import org.l2jmobius.commons.util.IXmlReader;
|
import org.l2jmobius.commons.util.IXmlReader;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||||
|
import org.l2jmobius.gameserver.model.item.EtcItem;
|
||||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionDataCategory;
|
import org.l2jmobius.gameserver.model.options.OptionDataCategory;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionDataGroup;
|
import org.l2jmobius.gameserver.model.options.OptionDataGroup;
|
||||||
@@ -139,6 +140,7 @@ public class VariationData implements IXmlReader
|
|||||||
});
|
});
|
||||||
|
|
||||||
_variations.put(mineralId, variation);
|
_variations.put(mineralId, variation);
|
||||||
|
((EtcItem) ItemTable.getInstance().getTemplate(mineralId)).setMineral();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
final Map<Integer, List<Integer>> itemGroups = new HashMap<>();
|
final Map<Integer, List<Integer>> itemGroups = new HashMap<>();
|
||||||
|
@@ -35,6 +35,7 @@ public class EtcItem extends ItemTemplate
|
|||||||
private int _extractableCountMin;
|
private int _extractableCountMin;
|
||||||
private int _extractableCountMax;
|
private int _extractableCountMax;
|
||||||
private boolean _isInfinite;
|
private boolean _isInfinite;
|
||||||
|
private boolean _isMineral = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for EtcItem.
|
* Constructor for EtcItem.
|
||||||
@@ -153,4 +154,14 @@ public class EtcItem extends ItemTemplate
|
|||||||
}
|
}
|
||||||
_extractableItems.add(extractableProduct);
|
_extractableItems.add(extractableProduct);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isMineral()
|
||||||
|
{
|
||||||
|
return _isMineral;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMineral()
|
||||||
|
{
|
||||||
|
_isMineral = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -25,7 +25,6 @@ import org.l2jmobius.commons.threads.ThreadPool;
|
|||||||
import org.l2jmobius.gameserver.ai.CtrlEvent;
|
import org.l2jmobius.gameserver.ai.CtrlEvent;
|
||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.ai.NextAction;
|
import org.l2jmobius.gameserver.ai.NextAction;
|
||||||
import org.l2jmobius.gameserver.data.xml.VariationData;
|
|
||||||
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.handler.AdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.AdminCommandHandler;
|
||||||
@@ -300,8 +299,8 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
// Notify events.
|
// Notify events.
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnItemUse(player, item), item.getTemplate());
|
EventDispatcher.getInstance().notifyEventAsync(new OnItemUse(player, item), item.getTemplate());
|
||||||
}
|
}
|
||||||
// TODO: New item handler for minerals.
|
|
||||||
if (VariationData.getInstance().getVariation(_itemId) != null)
|
if ((etcItem != null) && etcItem.isMineral())
|
||||||
{
|
{
|
||||||
player.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
|
player.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,7 @@ import org.w3c.dom.Document;
|
|||||||
import org.l2jmobius.commons.util.IXmlReader;
|
import org.l2jmobius.commons.util.IXmlReader;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||||
|
import org.l2jmobius.gameserver.model.item.EtcItem;
|
||||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionDataCategory;
|
import org.l2jmobius.gameserver.model.options.OptionDataCategory;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionDataGroup;
|
import org.l2jmobius.gameserver.model.options.OptionDataGroup;
|
||||||
@@ -139,6 +140,7 @@ public class VariationData implements IXmlReader
|
|||||||
});
|
});
|
||||||
|
|
||||||
_variations.put(mineralId, variation);
|
_variations.put(mineralId, variation);
|
||||||
|
((EtcItem) ItemTable.getInstance().getTemplate(mineralId)).setMineral();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
final Map<Integer, List<Integer>> itemGroups = new HashMap<>();
|
final Map<Integer, List<Integer>> itemGroups = new HashMap<>();
|
||||||
|
@@ -35,6 +35,7 @@ public class EtcItem extends ItemTemplate
|
|||||||
private int _extractableCountMin;
|
private int _extractableCountMin;
|
||||||
private int _extractableCountMax;
|
private int _extractableCountMax;
|
||||||
private boolean _isInfinite;
|
private boolean _isInfinite;
|
||||||
|
private boolean _isMineral = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for EtcItem.
|
* Constructor for EtcItem.
|
||||||
@@ -153,4 +154,14 @@ public class EtcItem extends ItemTemplate
|
|||||||
}
|
}
|
||||||
_extractableItems.add(extractableProduct);
|
_extractableItems.add(extractableProduct);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isMineral()
|
||||||
|
{
|
||||||
|
return _isMineral;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMineral()
|
||||||
|
{
|
||||||
|
_isMineral = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -25,7 +25,6 @@ import org.l2jmobius.commons.threads.ThreadPool;
|
|||||||
import org.l2jmobius.gameserver.ai.CtrlEvent;
|
import org.l2jmobius.gameserver.ai.CtrlEvent;
|
||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.ai.NextAction;
|
import org.l2jmobius.gameserver.ai.NextAction;
|
||||||
import org.l2jmobius.gameserver.data.xml.VariationData;
|
|
||||||
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.handler.AdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.AdminCommandHandler;
|
||||||
@@ -300,8 +299,8 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
// Notify events.
|
// Notify events.
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnItemUse(player, item), item.getTemplate());
|
EventDispatcher.getInstance().notifyEventAsync(new OnItemUse(player, item), item.getTemplate());
|
||||||
}
|
}
|
||||||
// TODO: New item handler for minerals.
|
|
||||||
if (VariationData.getInstance().getVariation(_itemId) != null)
|
if ((etcItem != null) && etcItem.isMineral())
|
||||||
{
|
{
|
||||||
player.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
|
player.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,7 @@ import org.w3c.dom.Document;
|
|||||||
import org.l2jmobius.commons.util.IXmlReader;
|
import org.l2jmobius.commons.util.IXmlReader;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||||
|
import org.l2jmobius.gameserver.model.item.EtcItem;
|
||||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionDataCategory;
|
import org.l2jmobius.gameserver.model.options.OptionDataCategory;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionDataGroup;
|
import org.l2jmobius.gameserver.model.options.OptionDataGroup;
|
||||||
@@ -139,6 +140,7 @@ public class VariationData implements IXmlReader
|
|||||||
});
|
});
|
||||||
|
|
||||||
_variations.put(mineralId, variation);
|
_variations.put(mineralId, variation);
|
||||||
|
((EtcItem) ItemTable.getInstance().getTemplate(mineralId)).setMineral();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
final Map<Integer, List<Integer>> itemGroups = new HashMap<>();
|
final Map<Integer, List<Integer>> itemGroups = new HashMap<>();
|
||||||
|
@@ -35,6 +35,7 @@ public class EtcItem extends ItemTemplate
|
|||||||
private int _extractableCountMin;
|
private int _extractableCountMin;
|
||||||
private int _extractableCountMax;
|
private int _extractableCountMax;
|
||||||
private boolean _isInfinite;
|
private boolean _isInfinite;
|
||||||
|
private boolean _isMineral = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for EtcItem.
|
* Constructor for EtcItem.
|
||||||
@@ -153,4 +154,14 @@ public class EtcItem extends ItemTemplate
|
|||||||
}
|
}
|
||||||
_extractableItems.add(extractableProduct);
|
_extractableItems.add(extractableProduct);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isMineral()
|
||||||
|
{
|
||||||
|
return _isMineral;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMineral()
|
||||||
|
{
|
||||||
|
_isMineral = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -26,7 +26,6 @@ import org.l2jmobius.gameserver.ai.CtrlEvent;
|
|||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.ai.NextAction;
|
import org.l2jmobius.gameserver.ai.NextAction;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.VariationData;
|
|
||||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
@@ -311,8 +310,8 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
sendSharedGroupUpdate(player, sharedReuseGroup, reuseDelay, reuseDelay);
|
sendSharedGroupUpdate(player, sharedReuseGroup, reuseDelay, reuseDelay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO: New item handler for minerals?
|
|
||||||
if (VariationData.getInstance().getVariation(_itemId) != null)
|
if ((etcItem != null) && etcItem.isMineral())
|
||||||
{
|
{
|
||||||
player.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
|
player.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,7 @@ import org.w3c.dom.Document;
|
|||||||
import org.l2jmobius.commons.util.IXmlReader;
|
import org.l2jmobius.commons.util.IXmlReader;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||||
|
import org.l2jmobius.gameserver.model.item.EtcItem;
|
||||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionDataCategory;
|
import org.l2jmobius.gameserver.model.options.OptionDataCategory;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionDataGroup;
|
import org.l2jmobius.gameserver.model.options.OptionDataGroup;
|
||||||
@@ -139,6 +140,7 @@ public class VariationData implements IXmlReader
|
|||||||
});
|
});
|
||||||
|
|
||||||
_variations.put(mineralId, variation);
|
_variations.put(mineralId, variation);
|
||||||
|
((EtcItem) ItemTable.getInstance().getTemplate(mineralId)).setMineral();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
final Map<Integer, List<Integer>> itemGroups = new HashMap<>();
|
final Map<Integer, List<Integer>> itemGroups = new HashMap<>();
|
||||||
|
@@ -35,6 +35,7 @@ public class EtcItem extends ItemTemplate
|
|||||||
private int _extractableCountMin;
|
private int _extractableCountMin;
|
||||||
private int _extractableCountMax;
|
private int _extractableCountMax;
|
||||||
private boolean _isInfinite;
|
private boolean _isInfinite;
|
||||||
|
private boolean _isMineral = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for EtcItem.
|
* Constructor for EtcItem.
|
||||||
@@ -153,4 +154,14 @@ public class EtcItem extends ItemTemplate
|
|||||||
}
|
}
|
||||||
_extractableItems.add(extractableProduct);
|
_extractableItems.add(extractableProduct);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isMineral()
|
||||||
|
{
|
||||||
|
return _isMineral;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMineral()
|
||||||
|
{
|
||||||
|
_isMineral = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -26,7 +26,6 @@ import org.l2jmobius.gameserver.ai.CtrlEvent;
|
|||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.ai.NextAction;
|
import org.l2jmobius.gameserver.ai.NextAction;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.VariationData;
|
|
||||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
@@ -327,8 +326,8 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
sendSharedGroupUpdate(player, sharedReuseGroup, reuseDelay, reuseDelay);
|
sendSharedGroupUpdate(player, sharedReuseGroup, reuseDelay, reuseDelay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO: New item handler for minerals?
|
|
||||||
if (VariationData.getInstance().getVariation(_itemId) != null)
|
if ((etcItem != null) && etcItem.isMineral())
|
||||||
{
|
{
|
||||||
player.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
|
player.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,7 @@ import org.w3c.dom.Document;
|
|||||||
import org.l2jmobius.commons.util.IXmlReader;
|
import org.l2jmobius.commons.util.IXmlReader;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||||
|
import org.l2jmobius.gameserver.model.item.EtcItem;
|
||||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionDataCategory;
|
import org.l2jmobius.gameserver.model.options.OptionDataCategory;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionDataGroup;
|
import org.l2jmobius.gameserver.model.options.OptionDataGroup;
|
||||||
@@ -139,6 +140,7 @@ public class VariationData implements IXmlReader
|
|||||||
});
|
});
|
||||||
|
|
||||||
_variations.put(mineralId, variation);
|
_variations.put(mineralId, variation);
|
||||||
|
((EtcItem) ItemTable.getInstance().getTemplate(mineralId)).setMineral();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
final Map<Integer, List<Integer>> itemGroups = new HashMap<>();
|
final Map<Integer, List<Integer>> itemGroups = new HashMap<>();
|
||||||
|
@@ -35,6 +35,7 @@ public class EtcItem extends ItemTemplate
|
|||||||
private int _extractableCountMin;
|
private int _extractableCountMin;
|
||||||
private int _extractableCountMax;
|
private int _extractableCountMax;
|
||||||
private boolean _isInfinite;
|
private boolean _isInfinite;
|
||||||
|
private boolean _isMineral = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for EtcItem.
|
* Constructor for EtcItem.
|
||||||
@@ -153,4 +154,14 @@ public class EtcItem extends ItemTemplate
|
|||||||
}
|
}
|
||||||
_extractableItems.add(extractableProduct);
|
_extractableItems.add(extractableProduct);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isMineral()
|
||||||
|
{
|
||||||
|
return _isMineral;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMineral()
|
||||||
|
{
|
||||||
|
_isMineral = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -26,7 +26,6 @@ import org.l2jmobius.gameserver.ai.CtrlEvent;
|
|||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.ai.NextAction;
|
import org.l2jmobius.gameserver.ai.NextAction;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.VariationData;
|
|
||||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
@@ -327,8 +326,8 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
sendSharedGroupUpdate(player, sharedReuseGroup, reuseDelay, reuseDelay);
|
sendSharedGroupUpdate(player, sharedReuseGroup, reuseDelay, reuseDelay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO: New item handler for minerals?
|
|
||||||
if (VariationData.getInstance().getVariation(_itemId) != null)
|
if ((etcItem != null) && etcItem.isMineral())
|
||||||
{
|
{
|
||||||
player.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
|
player.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,7 @@ import org.w3c.dom.Document;
|
|||||||
import org.l2jmobius.commons.util.IXmlReader;
|
import org.l2jmobius.commons.util.IXmlReader;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||||
|
import org.l2jmobius.gameserver.model.item.EtcItem;
|
||||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionDataCategory;
|
import org.l2jmobius.gameserver.model.options.OptionDataCategory;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionDataGroup;
|
import org.l2jmobius.gameserver.model.options.OptionDataGroup;
|
||||||
@@ -139,6 +140,7 @@ public class VariationData implements IXmlReader
|
|||||||
});
|
});
|
||||||
|
|
||||||
_variations.put(mineralId, variation);
|
_variations.put(mineralId, variation);
|
||||||
|
((EtcItem) ItemTable.getInstance().getTemplate(mineralId)).setMineral();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
final Map<Integer, List<Integer>> itemGroups = new HashMap<>();
|
final Map<Integer, List<Integer>> itemGroups = new HashMap<>();
|
||||||
|
@@ -35,6 +35,7 @@ public class EtcItem extends ItemTemplate
|
|||||||
private int _extractableCountMin;
|
private int _extractableCountMin;
|
||||||
private int _extractableCountMax;
|
private int _extractableCountMax;
|
||||||
private boolean _isInfinite;
|
private boolean _isInfinite;
|
||||||
|
private boolean _isMineral = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for EtcItem.
|
* Constructor for EtcItem.
|
||||||
@@ -153,4 +154,14 @@ public class EtcItem extends ItemTemplate
|
|||||||
}
|
}
|
||||||
_extractableItems.add(extractableProduct);
|
_extractableItems.add(extractableProduct);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isMineral()
|
||||||
|
{
|
||||||
|
return _isMineral;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMineral()
|
||||||
|
{
|
||||||
|
_isMineral = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -26,7 +26,6 @@ import org.l2jmobius.gameserver.ai.CtrlEvent;
|
|||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.ai.NextAction;
|
import org.l2jmobius.gameserver.ai.NextAction;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.VariationData;
|
|
||||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
@@ -327,8 +326,8 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
sendSharedGroupUpdate(player, sharedReuseGroup, reuseDelay, reuseDelay);
|
sendSharedGroupUpdate(player, sharedReuseGroup, reuseDelay, reuseDelay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO: New item handler for minerals?
|
|
||||||
if (VariationData.getInstance().getVariation(_itemId) != null)
|
if ((etcItem != null) && etcItem.isMineral())
|
||||||
{
|
{
|
||||||
player.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
|
player.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user