diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/data/xml/VariationData.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/data/xml/VariationData.java index 079f5b3077..d54a0ff052 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/data/xml/VariationData.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/data/xml/VariationData.java @@ -32,6 +32,7 @@ import org.w3c.dom.Document; import org.l2jmobius.commons.util.IXmlReader; import org.l2jmobius.gameserver.data.ItemTable; 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.options.OptionDataCategory; import org.l2jmobius.gameserver.model.options.OptionDataGroup; @@ -139,6 +140,7 @@ public class VariationData implements IXmlReader }); _variations.put(mineralId, variation); + ((EtcItem) ItemTable.getInstance().getTemplate(mineralId)).setMineral(); })); final Map> itemGroups = new HashMap<>(); diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/item/EtcItem.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/item/EtcItem.java index aada2ffd22..54f7d76a5e 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/item/EtcItem.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/item/EtcItem.java @@ -35,6 +35,7 @@ public class EtcItem extends ItemTemplate private int _extractableCountMin; private int _extractableCountMax; private boolean _isInfinite; + private boolean _isMineral = false; /** * Constructor for EtcItem. @@ -153,4 +154,14 @@ public class EtcItem extends ItemTemplate } _extractableItems.add(extractableProduct); } + + public boolean isMineral() + { + return _isMineral; + } + + public void setMineral() + { + _isMineral = true; + } } diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java index 16d5df32e8..2c39750260 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java @@ -25,7 +25,6 @@ import org.l2jmobius.commons.threads.ThreadPool; import org.l2jmobius.gameserver.ai.CtrlEvent; import org.l2jmobius.gameserver.ai.CtrlIntention; import org.l2jmobius.gameserver.ai.NextAction; -import org.l2jmobius.gameserver.data.xml.VariationData; import org.l2jmobius.gameserver.enums.ItemSkillType; import org.l2jmobius.gameserver.enums.PrivateStoreType; import org.l2jmobius.gameserver.handler.AdminCommandHandler; @@ -300,8 +299,8 @@ public class UseItem implements IClientIncomingPacket // Notify events. 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); } diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/VariationData.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/VariationData.java index 079f5b3077..d54a0ff052 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/VariationData.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/VariationData.java @@ -32,6 +32,7 @@ import org.w3c.dom.Document; import org.l2jmobius.commons.util.IXmlReader; import org.l2jmobius.gameserver.data.ItemTable; 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.options.OptionDataCategory; import org.l2jmobius.gameserver.model.options.OptionDataGroup; @@ -139,6 +140,7 @@ public class VariationData implements IXmlReader }); _variations.put(mineralId, variation); + ((EtcItem) ItemTable.getInstance().getTemplate(mineralId)).setMineral(); })); final Map> itemGroups = new HashMap<>(); diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/item/EtcItem.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/item/EtcItem.java index aada2ffd22..54f7d76a5e 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/item/EtcItem.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/item/EtcItem.java @@ -35,6 +35,7 @@ public class EtcItem extends ItemTemplate private int _extractableCountMin; private int _extractableCountMax; private boolean _isInfinite; + private boolean _isMineral = false; /** * Constructor for EtcItem. @@ -153,4 +154,14 @@ public class EtcItem extends ItemTemplate } _extractableItems.add(extractableProduct); } + + public boolean isMineral() + { + return _isMineral; + } + + public void setMineral() + { + _isMineral = true; + } } diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java index 16d5df32e8..2c39750260 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java @@ -25,7 +25,6 @@ import org.l2jmobius.commons.threads.ThreadPool; import org.l2jmobius.gameserver.ai.CtrlEvent; import org.l2jmobius.gameserver.ai.CtrlIntention; import org.l2jmobius.gameserver.ai.NextAction; -import org.l2jmobius.gameserver.data.xml.VariationData; import org.l2jmobius.gameserver.enums.ItemSkillType; import org.l2jmobius.gameserver.enums.PrivateStoreType; import org.l2jmobius.gameserver.handler.AdminCommandHandler; @@ -300,8 +299,8 @@ public class UseItem implements IClientIncomingPacket // Notify events. 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); } diff --git a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/data/xml/VariationData.java b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/data/xml/VariationData.java index 079f5b3077..d54a0ff052 100644 --- a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/data/xml/VariationData.java +++ b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/data/xml/VariationData.java @@ -32,6 +32,7 @@ import org.w3c.dom.Document; import org.l2jmobius.commons.util.IXmlReader; import org.l2jmobius.gameserver.data.ItemTable; 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.options.OptionDataCategory; import org.l2jmobius.gameserver.model.options.OptionDataGroup; @@ -139,6 +140,7 @@ public class VariationData implements IXmlReader }); _variations.put(mineralId, variation); + ((EtcItem) ItemTable.getInstance().getTemplate(mineralId)).setMineral(); })); final Map> itemGroups = new HashMap<>(); diff --git a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/item/EtcItem.java b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/item/EtcItem.java index aada2ffd22..54f7d76a5e 100644 --- a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/item/EtcItem.java +++ b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/item/EtcItem.java @@ -35,6 +35,7 @@ public class EtcItem extends ItemTemplate private int _extractableCountMin; private int _extractableCountMax; private boolean _isInfinite; + private boolean _isMineral = false; /** * Constructor for EtcItem. @@ -153,4 +154,14 @@ public class EtcItem extends ItemTemplate } _extractableItems.add(extractableProduct); } + + public boolean isMineral() + { + return _isMineral; + } + + public void setMineral() + { + _isMineral = true; + } } diff --git a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java index 06037641b1..4674b46ed4 100644 --- a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java +++ b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java @@ -25,7 +25,6 @@ import org.l2jmobius.commons.threads.ThreadPool; import org.l2jmobius.gameserver.ai.CtrlEvent; import org.l2jmobius.gameserver.ai.CtrlIntention; import org.l2jmobius.gameserver.ai.NextAction; -import org.l2jmobius.gameserver.data.xml.VariationData; import org.l2jmobius.gameserver.enums.ItemSkillType; import org.l2jmobius.gameserver.enums.PrivateStoreType; import org.l2jmobius.gameserver.handler.AdminCommandHandler; @@ -300,8 +299,8 @@ public class UseItem implements IClientIncomingPacket // Notify events. 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); } diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/data/xml/VariationData.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/data/xml/VariationData.java index 079f5b3077..d54a0ff052 100644 --- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/data/xml/VariationData.java +++ b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/data/xml/VariationData.java @@ -32,6 +32,7 @@ import org.w3c.dom.Document; import org.l2jmobius.commons.util.IXmlReader; import org.l2jmobius.gameserver.data.ItemTable; 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.options.OptionDataCategory; import org.l2jmobius.gameserver.model.options.OptionDataGroup; @@ -139,6 +140,7 @@ public class VariationData implements IXmlReader }); _variations.put(mineralId, variation); + ((EtcItem) ItemTable.getInstance().getTemplate(mineralId)).setMineral(); })); final Map> itemGroups = new HashMap<>(); diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/item/EtcItem.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/item/EtcItem.java index aada2ffd22..54f7d76a5e 100644 --- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/item/EtcItem.java +++ b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/item/EtcItem.java @@ -35,6 +35,7 @@ public class EtcItem extends ItemTemplate private int _extractableCountMin; private int _extractableCountMax; private boolean _isInfinite; + private boolean _isMineral = false; /** * Constructor for EtcItem. @@ -153,4 +154,14 @@ public class EtcItem extends ItemTemplate } _extractableItems.add(extractableProduct); } + + public boolean isMineral() + { + return _isMineral; + } + + public void setMineral() + { + _isMineral = true; + } } diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java index 679a807cdc..401b750926 100644 --- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java +++ b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java @@ -25,7 +25,6 @@ import org.l2jmobius.commons.threads.ThreadPool; import org.l2jmobius.gameserver.ai.CtrlEvent; import org.l2jmobius.gameserver.ai.CtrlIntention; import org.l2jmobius.gameserver.ai.NextAction; -import org.l2jmobius.gameserver.data.xml.VariationData; import org.l2jmobius.gameserver.enums.ItemSkillType; import org.l2jmobius.gameserver.enums.PrivateStoreType; import org.l2jmobius.gameserver.handler.AdminCommandHandler; @@ -300,8 +299,8 @@ public class UseItem implements IClientIncomingPacket // Notify events. 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); } diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/VariationData.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/VariationData.java index 079f5b3077..d54a0ff052 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/VariationData.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/VariationData.java @@ -32,6 +32,7 @@ import org.w3c.dom.Document; import org.l2jmobius.commons.util.IXmlReader; import org.l2jmobius.gameserver.data.ItemTable; 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.options.OptionDataCategory; import org.l2jmobius.gameserver.model.options.OptionDataGroup; @@ -139,6 +140,7 @@ public class VariationData implements IXmlReader }); _variations.put(mineralId, variation); + ((EtcItem) ItemTable.getInstance().getTemplate(mineralId)).setMineral(); })); final Map> itemGroups = new HashMap<>(); diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/item/EtcItem.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/item/EtcItem.java index aada2ffd22..54f7d76a5e 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/item/EtcItem.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/item/EtcItem.java @@ -35,6 +35,7 @@ public class EtcItem extends ItemTemplate private int _extractableCountMin; private int _extractableCountMax; private boolean _isInfinite; + private boolean _isMineral = false; /** * Constructor for EtcItem. @@ -153,4 +154,14 @@ public class EtcItem extends ItemTemplate } _extractableItems.add(extractableProduct); } + + public boolean isMineral() + { + return _isMineral; + } + + public void setMineral() + { + _isMineral = true; + } } diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java index 6256cc7d88..14ddf2527b 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java @@ -26,7 +26,6 @@ import org.l2jmobius.gameserver.ai.CtrlEvent; import org.l2jmobius.gameserver.ai.CtrlIntention; import org.l2jmobius.gameserver.ai.NextAction; 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.ItemSkillType; import org.l2jmobius.gameserver.enums.PrivateStoreType; @@ -311,8 +310,8 @@ public class UseItem implements IClientIncomingPacket 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); } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/VariationData.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/VariationData.java index 079f5b3077..d54a0ff052 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/VariationData.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/VariationData.java @@ -32,6 +32,7 @@ import org.w3c.dom.Document; import org.l2jmobius.commons.util.IXmlReader; import org.l2jmobius.gameserver.data.ItemTable; 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.options.OptionDataCategory; import org.l2jmobius.gameserver.model.options.OptionDataGroup; @@ -139,6 +140,7 @@ public class VariationData implements IXmlReader }); _variations.put(mineralId, variation); + ((EtcItem) ItemTable.getInstance().getTemplate(mineralId)).setMineral(); })); final Map> itemGroups = new HashMap<>(); diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/item/EtcItem.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/item/EtcItem.java index aada2ffd22..54f7d76a5e 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/item/EtcItem.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/item/EtcItem.java @@ -35,6 +35,7 @@ public class EtcItem extends ItemTemplate private int _extractableCountMin; private int _extractableCountMax; private boolean _isInfinite; + private boolean _isMineral = false; /** * Constructor for EtcItem. @@ -153,4 +154,14 @@ public class EtcItem extends ItemTemplate } _extractableItems.add(extractableProduct); } + + public boolean isMineral() + { + return _isMineral; + } + + public void setMineral() + { + _isMineral = true; + } } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java index 6ef0927e7c..9ee9a21e77 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java @@ -26,7 +26,6 @@ import org.l2jmobius.gameserver.ai.CtrlEvent; import org.l2jmobius.gameserver.ai.CtrlIntention; import org.l2jmobius.gameserver.ai.NextAction; 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.ItemSkillType; import org.l2jmobius.gameserver.enums.PrivateStoreType; @@ -327,8 +326,8 @@ public class UseItem implements IClientIncomingPacket 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); } diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/data/xml/VariationData.java b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/data/xml/VariationData.java index 079f5b3077..d54a0ff052 100644 --- a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/data/xml/VariationData.java +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/data/xml/VariationData.java @@ -32,6 +32,7 @@ import org.w3c.dom.Document; import org.l2jmobius.commons.util.IXmlReader; import org.l2jmobius.gameserver.data.ItemTable; 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.options.OptionDataCategory; import org.l2jmobius.gameserver.model.options.OptionDataGroup; @@ -139,6 +140,7 @@ public class VariationData implements IXmlReader }); _variations.put(mineralId, variation); + ((EtcItem) ItemTable.getInstance().getTemplate(mineralId)).setMineral(); })); final Map> itemGroups = new HashMap<>(); diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/item/EtcItem.java b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/item/EtcItem.java index aada2ffd22..54f7d76a5e 100644 --- a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/item/EtcItem.java +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/item/EtcItem.java @@ -35,6 +35,7 @@ public class EtcItem extends ItemTemplate private int _extractableCountMin; private int _extractableCountMax; private boolean _isInfinite; + private boolean _isMineral = false; /** * Constructor for EtcItem. @@ -153,4 +154,14 @@ public class EtcItem extends ItemTemplate } _extractableItems.add(extractableProduct); } + + public boolean isMineral() + { + return _isMineral; + } + + public void setMineral() + { + _isMineral = true; + } } diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java index 6ef0927e7c..9ee9a21e77 100644 --- a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java @@ -26,7 +26,6 @@ import org.l2jmobius.gameserver.ai.CtrlEvent; import org.l2jmobius.gameserver.ai.CtrlIntention; import org.l2jmobius.gameserver.ai.NextAction; 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.ItemSkillType; import org.l2jmobius.gameserver.enums.PrivateStoreType; @@ -327,8 +326,8 @@ public class UseItem implements IClientIncomingPacket 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); } diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/VariationData.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/VariationData.java index 079f5b3077..d54a0ff052 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/VariationData.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/VariationData.java @@ -32,6 +32,7 @@ import org.w3c.dom.Document; import org.l2jmobius.commons.util.IXmlReader; import org.l2jmobius.gameserver.data.ItemTable; 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.options.OptionDataCategory; import org.l2jmobius.gameserver.model.options.OptionDataGroup; @@ -139,6 +140,7 @@ public class VariationData implements IXmlReader }); _variations.put(mineralId, variation); + ((EtcItem) ItemTable.getInstance().getTemplate(mineralId)).setMineral(); })); final Map> itemGroups = new HashMap<>(); diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/item/EtcItem.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/item/EtcItem.java index aada2ffd22..54f7d76a5e 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/item/EtcItem.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/item/EtcItem.java @@ -35,6 +35,7 @@ public class EtcItem extends ItemTemplate private int _extractableCountMin; private int _extractableCountMax; private boolean _isInfinite; + private boolean _isMineral = false; /** * Constructor for EtcItem. @@ -153,4 +154,14 @@ public class EtcItem extends ItemTemplate } _extractableItems.add(extractableProduct); } + + public boolean isMineral() + { + return _isMineral; + } + + public void setMineral() + { + _isMineral = true; + } } diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java index 0c794770a8..3594f0aff3 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java @@ -26,7 +26,6 @@ import org.l2jmobius.gameserver.ai.CtrlEvent; import org.l2jmobius.gameserver.ai.CtrlIntention; import org.l2jmobius.gameserver.ai.NextAction; 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.ItemSkillType; import org.l2jmobius.gameserver.enums.PrivateStoreType; @@ -327,8 +326,8 @@ public class UseItem implements IClientIncomingPacket 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); }