diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/items/L2Item.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/items/L2Item.java
index 4091d7d6f5..c785e2d42f 100644
--- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/items/L2Item.java
+++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/items/L2Item.java
@@ -170,8 +170,6 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
private int _sharedReuseGroup;
private CommissionItemType _commissionItemType;
- private int _compoundItem;
- private float _compoundChance;
private boolean _isAppearanceable;
private boolean _isBlessed;
@@ -230,8 +228,6 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
_reuseDelay = set.getInt("reuse_delay", 0);
_sharedReuseGroup = set.getInt("shared_reuse_group", 0);
_commissionItemType = set.getEnum("commissionItemType", CommissionItemType.class, CommissionItemType.OTHER_ITEM);
- _compoundItem = set.getInt("compoundItem", 0);
- _compoundChance = set.getFloat("compoundChance", 0);
_common = ((_itemId >= 11605) && (_itemId <= 12361));
_heroItem = ((_itemId >= 6611) && (_itemId <= 6621)) || ((_itemId >= 9388) && (_itemId <= 9390)) || (_itemId == 6842);
_pvpItem = ((_itemId >= 10667) && (_itemId <= 10835)) || ((_itemId >= 12852) && (_itemId <= 12977)) || ((_itemId >= 14363) && (_itemId <= 14525)) || (_itemId == 14528) || (_itemId == 14529) || (_itemId == 14558) || ((_itemId >= 15913) && (_itemId <= 16024)) || ((_itemId >= 16134) && (_itemId <= 16147)) || (_itemId == 16149) || (_itemId == 16151) || (_itemId == 16153) || (_itemId == 16155) || (_itemId == 16157) || (_itemId == 16159) || ((_itemId >= 16168) && (_itemId <= 16176)) || ((_itemId >= 16179) && (_itemId <= 16220));
@@ -966,16 +962,6 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
return _commissionItemType;
}
- public int getCompoundItem()
- {
- return _compoundItem;
- }
-
- public float getCompoundChance()
- {
- return _compoundChance;
- }
-
/**
* Usable in HTML windows.
* @return the icon link in client files
diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/items/L2Item.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/items/L2Item.java
index 4091d7d6f5..c785e2d42f 100644
--- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/items/L2Item.java
+++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/items/L2Item.java
@@ -170,8 +170,6 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
private int _sharedReuseGroup;
private CommissionItemType _commissionItemType;
- private int _compoundItem;
- private float _compoundChance;
private boolean _isAppearanceable;
private boolean _isBlessed;
@@ -230,8 +228,6 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
_reuseDelay = set.getInt("reuse_delay", 0);
_sharedReuseGroup = set.getInt("shared_reuse_group", 0);
_commissionItemType = set.getEnum("commissionItemType", CommissionItemType.class, CommissionItemType.OTHER_ITEM);
- _compoundItem = set.getInt("compoundItem", 0);
- _compoundChance = set.getFloat("compoundChance", 0);
_common = ((_itemId >= 11605) && (_itemId <= 12361));
_heroItem = ((_itemId >= 6611) && (_itemId <= 6621)) || ((_itemId >= 9388) && (_itemId <= 9390)) || (_itemId == 6842);
_pvpItem = ((_itemId >= 10667) && (_itemId <= 10835)) || ((_itemId >= 12852) && (_itemId <= 12977)) || ((_itemId >= 14363) && (_itemId <= 14525)) || (_itemId == 14528) || (_itemId == 14529) || (_itemId == 14558) || ((_itemId >= 15913) && (_itemId <= 16024)) || ((_itemId >= 16134) && (_itemId <= 16147)) || (_itemId == 16149) || (_itemId == 16151) || (_itemId == 16153) || (_itemId == 16155) || (_itemId == 16157) || (_itemId == 16159) || ((_itemId >= 16168) && (_itemId <= 16176)) || ((_itemId >= 16179) && (_itemId <= 16220));
@@ -966,16 +962,6 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
return _commissionItemType;
}
- public int getCompoundItem()
- {
- return _compoundItem;
- }
-
- public float getCompoundChance()
- {
- return _compoundChance;
- }
-
/**
* Usable in HTML windows.
* @return the icon link in client files
diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/ExIncomingPackets.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/ExIncomingPackets.java
index abe1065441..a5535885af 100644
--- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/ExIncomingPackets.java
+++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/ExIncomingPackets.java
@@ -54,6 +54,7 @@ import com.l2jmobius.gameserver.network.clientpackets.compound.RequestNewEnchant
import com.l2jmobius.gameserver.network.clientpackets.compound.RequestNewEnchantPushTwo;
import com.l2jmobius.gameserver.network.clientpackets.compound.RequestNewEnchantRemoveOne;
import com.l2jmobius.gameserver.network.clientpackets.compound.RequestNewEnchantRemoveTwo;
+import com.l2jmobius.gameserver.network.clientpackets.compound.RequestNewEnchantRetryToPutItems;
import com.l2jmobius.gameserver.network.clientpackets.compound.RequestNewEnchantTry;
import com.l2jmobius.gameserver.network.clientpackets.crystalization.RequestCrystallizeEstimate;
import com.l2jmobius.gameserver.network.clientpackets.crystalization.RequestCrystallizeItemCancel;
diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/clientpackets/RequestNewEnchantRetryToPutItems.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantRetryToPutItems.java
similarity index 80%
rename from L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/clientpackets/RequestNewEnchantRetryToPutItems.java
rename to L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantRetryToPutItems.java
index a45b5d9e0e..041e0df6eb 100644
--- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/clientpackets/RequestNewEnchantRetryToPutItems.java
+++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantRetryToPutItems.java
@@ -1,12 +1,14 @@
/*
- * This file is part of the L2J Mobius project.
+ * Copyright (C) 2004-2016 L2J Unity
*
- * This program is free software: you can redistribute it and/or modify
+ * This file is part of L2J Unity.
+ *
+ * L2J Unity is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * L2J Unity is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
@@ -14,14 +16,17 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package com.l2jmobius.gameserver.network.clientpackets;
+package com.l2jmobius.gameserver.network.clientpackets.compound;
import com.l2jmobius.commons.network.PacketReader;
+import com.l2jmobius.gameserver.data.xml.impl.CombinationItemsData;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.actor.request.CompoundRequest;
+import com.l2jmobius.gameserver.model.items.combination.CombinationItem;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
import com.l2jmobius.gameserver.network.L2GameClient;
import com.l2jmobius.gameserver.network.SystemMessageId;
+import com.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
import com.l2jmobius.gameserver.network.serverpackets.ExEnchantRetryToPutItemFail;
import com.l2jmobius.gameserver.network.serverpackets.ExEnchantRetryToPutItemOk;
@@ -89,14 +94,15 @@ public class RequestNewEnchantRetryToPutItems implements IClientIncomingPacket
return;
}
+ final CombinationItem combinationItem = CombinationItemsData.getInstance().getItemsBySlots(itemOne.getId(), itemTwo.getId());
+
// Not implemented or not able to merge!
- if ((itemOne.getItem().getCompoundItem() == 0) || (itemOne.getItem().getCompoundChance() == 0))
+ if (combinationItem == null)
{
client.sendPacket(ExEnchantRetryToPutItemFail.STATIC_PACKET);
activeChar.removeRequest(request.getClass());
return;
}
-
client.sendPacket(ExEnchantRetryToPutItemOk.STATIC_PACKET);
}
}
diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/items/L2Item.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/items/L2Item.java
index 4ceded8379..c9858a81be 100644
--- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/items/L2Item.java
+++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/items/L2Item.java
@@ -171,8 +171,6 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
private int _sharedReuseGroup;
private CommissionItemType _commissionItemType;
- private int _compoundItem;
- private float _compoundChance;
private boolean _isAppearanceable;
private boolean _isBlessed;
@@ -231,8 +229,6 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
_reuseDelay = set.getInt("reuse_delay", 0);
_sharedReuseGroup = set.getInt("shared_reuse_group", 0);
_commissionItemType = set.getEnum("commissionItemType", CommissionItemType.class, CommissionItemType.OTHER_ITEM);
- _compoundItem = set.getInt("compoundItem", 0);
- _compoundChance = set.getFloat("compoundChance", 0);
_common = ((_itemId >= 11605) && (_itemId <= 12361));
_heroItem = ((_itemId >= 6611) && (_itemId <= 6621)) || ((_itemId >= 9388) && (_itemId <= 9390)) || (_itemId == 6842);
_pvpItem = ((_itemId >= 10667) && (_itemId <= 10835)) || ((_itemId >= 12852) && (_itemId <= 12977)) || ((_itemId >= 14363) && (_itemId <= 14525)) || (_itemId == 14528) || (_itemId == 14529) || (_itemId == 14558) || ((_itemId >= 15913) && (_itemId <= 16024)) || ((_itemId >= 16134) && (_itemId <= 16147)) || (_itemId == 16149) || (_itemId == 16151) || (_itemId == 16153) || (_itemId == 16155) || (_itemId == 16157) || (_itemId == 16159) || ((_itemId >= 16168) && (_itemId <= 16176)) || ((_itemId >= 16179) && (_itemId <= 16220));
@@ -967,16 +963,6 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
return _commissionItemType;
}
- public int getCompoundItem()
- {
- return _compoundItem;
- }
-
- public float getCompoundChance()
- {
- return _compoundChance;
- }
-
/**
* Usable in HTML windows.
* @return the icon link in client files
diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/ExIncomingPackets.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/ExIncomingPackets.java
index 89190211d8..1ccc664836 100644
--- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/ExIncomingPackets.java
+++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/ExIncomingPackets.java
@@ -54,6 +54,7 @@ import com.l2jmobius.gameserver.network.clientpackets.compound.RequestNewEnchant
import com.l2jmobius.gameserver.network.clientpackets.compound.RequestNewEnchantPushTwo;
import com.l2jmobius.gameserver.network.clientpackets.compound.RequestNewEnchantRemoveOne;
import com.l2jmobius.gameserver.network.clientpackets.compound.RequestNewEnchantRemoveTwo;
+import com.l2jmobius.gameserver.network.clientpackets.compound.RequestNewEnchantRetryToPutItems;
import com.l2jmobius.gameserver.network.clientpackets.compound.RequestNewEnchantTry;
import com.l2jmobius.gameserver.network.clientpackets.crystalization.RequestCrystallizeEstimate;
import com.l2jmobius.gameserver.network.clientpackets.crystalization.RequestCrystallizeItemCancel;
diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestNewEnchantRetryToPutItems.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantRetryToPutItems.java
similarity index 82%
rename from L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestNewEnchantRetryToPutItems.java
rename to L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantRetryToPutItems.java
index a45b5d9e0e..b6d01155ef 100644
--- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestNewEnchantRetryToPutItems.java
+++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantRetryToPutItems.java
@@ -1,102 +1,108 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.network.clientpackets;
-
-import com.l2jmobius.commons.network.PacketReader;
-import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jmobius.gameserver.model.actor.request.CompoundRequest;
-import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
-import com.l2jmobius.gameserver.network.L2GameClient;
-import com.l2jmobius.gameserver.network.SystemMessageId;
-import com.l2jmobius.gameserver.network.serverpackets.ExEnchantRetryToPutItemFail;
-import com.l2jmobius.gameserver.network.serverpackets.ExEnchantRetryToPutItemOk;
-
-/**
- * @author Sdw
- */
-public class RequestNewEnchantRetryToPutItems implements IClientIncomingPacket
-{
- private int _firstItemObjectId;
- private int _secondItemObjectId;
-
- @Override
- public boolean read(L2GameClient client, PacketReader packet)
- {
- _firstItemObjectId = packet.readD();
- _secondItemObjectId = packet.readD();
- return true;
- }
-
- @Override
- public void run(L2GameClient client)
- {
- final L2PcInstance activeChar = client.getActiveChar();
- if (activeChar == null)
- {
- return;
- }
- else if (activeChar.isInStoreMode())
- {
- client.sendPacket(SystemMessageId.YOU_CANNOT_DO_THAT_WHILE_IN_A_PRIVATE_STORE_OR_PRIVATE_WORKSHOP);
- client.sendPacket(ExEnchantRetryToPutItemFail.STATIC_PACKET);
- return;
- }
- else if (activeChar.isProcessingTransaction() || activeChar.isProcessingRequest())
- {
- client.sendPacket(SystemMessageId.YOU_CANNOT_USE_THIS_SYSTEM_DURING_TRADING_PRIVATE_STORE_AND_WORKSHOP_SETUP);
- client.sendPacket(ExEnchantRetryToPutItemFail.STATIC_PACKET);
- return;
- }
-
- final CompoundRequest request = new CompoundRequest(activeChar);
- if (!activeChar.addRequest(request))
- {
- client.sendPacket(ExEnchantRetryToPutItemFail.STATIC_PACKET);
- return;
- }
-
- // Make sure player owns first item.
- request.setItemOne(_firstItemObjectId);
- final L2ItemInstance itemOne = request.getItemOne();
- if (itemOne == null)
- {
- client.sendPacket(ExEnchantRetryToPutItemFail.STATIC_PACKET);
- activeChar.removeRequest(request.getClass());
- return;
- }
-
- // Make sure player owns second item.
- request.setItemTwo(_secondItemObjectId);
- final L2ItemInstance itemTwo = request.getItemTwo();
- if (itemTwo == null)
- {
- client.sendPacket(ExEnchantRetryToPutItemFail.STATIC_PACKET);
- activeChar.removeRequest(request.getClass());
- return;
- }
-
- // Not implemented or not able to merge!
- if ((itemOne.getItem().getCompoundItem() == 0) || (itemOne.getItem().getCompoundChance() == 0))
- {
- client.sendPacket(ExEnchantRetryToPutItemFail.STATIC_PACKET);
- activeChar.removeRequest(request.getClass());
- return;
- }
-
- client.sendPacket(ExEnchantRetryToPutItemOk.STATIC_PACKET);
- }
-}
+/*
+ * Copyright (C) 2004-2016 L2J Unity
+ *
+ * This file is part of L2J Unity.
+ *
+ * L2J Unity is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * L2J Unity is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package com.l2jmobius.gameserver.network.clientpackets.compound;
+
+import com.l2jmobius.commons.network.PacketReader;
+import com.l2jmobius.gameserver.data.xml.impl.CombinationItemsData;
+import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jmobius.gameserver.model.actor.request.CompoundRequest;
+import com.l2jmobius.gameserver.model.items.combination.CombinationItem;
+import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
+import com.l2jmobius.gameserver.network.L2GameClient;
+import com.l2jmobius.gameserver.network.SystemMessageId;
+import com.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
+import com.l2jmobius.gameserver.network.serverpackets.ExEnchantRetryToPutItemFail;
+import com.l2jmobius.gameserver.network.serverpackets.ExEnchantRetryToPutItemOk;
+
+/**
+ * @author Sdw
+ */
+public class RequestNewEnchantRetryToPutItems implements IClientIncomingPacket
+{
+ private int _firstItemObjectId;
+ private int _secondItemObjectId;
+
+ @Override
+ public boolean read(L2GameClient client, PacketReader packet)
+ {
+ _firstItemObjectId = packet.readD();
+ _secondItemObjectId = packet.readD();
+ return true;
+ }
+
+ @Override
+ public void run(L2GameClient client)
+ {
+ final L2PcInstance activeChar = client.getActiveChar();
+ if (activeChar == null)
+ {
+ return;
+ }
+ else if (activeChar.isInStoreMode())
+ {
+ client.sendPacket(SystemMessageId.YOU_CANNOT_DO_THAT_WHILE_IN_A_PRIVATE_STORE_OR_PRIVATE_WORKSHOP);
+ client.sendPacket(ExEnchantRetryToPutItemFail.STATIC_PACKET);
+ return;
+ }
+ else if (activeChar.isProcessingTransaction() || activeChar.isProcessingRequest())
+ {
+ client.sendPacket(SystemMessageId.YOU_CANNOT_USE_THIS_SYSTEM_DURING_TRADING_PRIVATE_STORE_AND_WORKSHOP_SETUP);
+ client.sendPacket(ExEnchantRetryToPutItemFail.STATIC_PACKET);
+ return;
+ }
+
+ final CompoundRequest request = new CompoundRequest(activeChar);
+ if (!activeChar.addRequest(request))
+ {
+ client.sendPacket(ExEnchantRetryToPutItemFail.STATIC_PACKET);
+ return;
+ }
+
+ // Make sure player owns first item.
+ request.setItemOne(_firstItemObjectId);
+ final L2ItemInstance itemOne = request.getItemOne();
+ if (itemOne == null)
+ {
+ client.sendPacket(ExEnchantRetryToPutItemFail.STATIC_PACKET);
+ activeChar.removeRequest(request.getClass());
+ return;
+ }
+
+ // Make sure player owns second item.
+ request.setItemTwo(_secondItemObjectId);
+ final L2ItemInstance itemTwo = request.getItemTwo();
+ if (itemTwo == null)
+ {
+ client.sendPacket(ExEnchantRetryToPutItemFail.STATIC_PACKET);
+ activeChar.removeRequest(request.getClass());
+ return;
+ }
+
+ final CombinationItem combinationItem = CombinationItemsData.getInstance().getItemsBySlots(itemOne.getId(), itemTwo.getId());
+
+ // Not implemented or not able to merge!
+ if (combinationItem == null)
+ {
+ client.sendPacket(ExEnchantRetryToPutItemFail.STATIC_PACKET);
+ activeChar.removeRequest(request.getClass());
+ return;
+ }
+ client.sendPacket(ExEnchantRetryToPutItemOk.STATIC_PACKET);
+ }
+}
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/items/L2Item.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/items/L2Item.java
index 2921565430..5a6909e41d 100644
--- a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/items/L2Item.java
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/items/L2Item.java
@@ -173,8 +173,6 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
private int _sharedReuseGroup;
private CommissionItemType _commissionItemType;
- private int _compoundItem;
- private float _compoundChance;
private boolean _isAppearanceable;
private boolean _isBlessed;
@@ -233,8 +231,6 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
_reuseDelay = set.getInt("reuse_delay", 0);
_sharedReuseGroup = set.getInt("shared_reuse_group", 0);
_commissionItemType = set.getEnum("commissionItemType", CommissionItemType.class, CommissionItemType.OTHER_ITEM);
- _compoundItem = set.getInt("compoundItem", 0);
- _compoundChance = set.getFloat("compoundChance", 0);
_common = ((_itemId >= 11605) && (_itemId <= 12361));
_heroItem = ((_itemId >= 6611) && (_itemId <= 6621)) || ((_itemId >= 9388) && (_itemId <= 9390)) || (_itemId == 6842);
_pvpItem = ((_itemId >= 10667) && (_itemId <= 10835)) || ((_itemId >= 12852) && (_itemId <= 12977)) || ((_itemId >= 14363) && (_itemId <= 14525)) || (_itemId == 14528) || (_itemId == 14529) || (_itemId == 14558) || ((_itemId >= 15913) && (_itemId <= 16024)) || ((_itemId >= 16134) && (_itemId <= 16147)) || (_itemId == 16149) || (_itemId == 16151) || (_itemId == 16153) || (_itemId == 16155) || (_itemId == 16157) || (_itemId == 16159) || ((_itemId >= 16168) && (_itemId <= 16176)) || ((_itemId >= 16179) && (_itemId <= 16220));
@@ -969,16 +965,6 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
return _commissionItemType;
}
- public int getCompoundItem()
- {
- return _compoundItem;
- }
-
- public float getCompoundChance()
- {
- return _compoundChance;
- }
-
/**
* Usable in HTML windows.
* @return the icon link in client files
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/network/ExIncomingPackets.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/network/ExIncomingPackets.java
index 5a712201d7..97e3728e19 100644
--- a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/network/ExIncomingPackets.java
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/network/ExIncomingPackets.java
@@ -54,6 +54,7 @@ import com.l2jmobius.gameserver.network.clientpackets.compound.RequestNewEnchant
import com.l2jmobius.gameserver.network.clientpackets.compound.RequestNewEnchantPushTwo;
import com.l2jmobius.gameserver.network.clientpackets.compound.RequestNewEnchantRemoveOne;
import com.l2jmobius.gameserver.network.clientpackets.compound.RequestNewEnchantRemoveTwo;
+import com.l2jmobius.gameserver.network.clientpackets.compound.RequestNewEnchantRetryToPutItems;
import com.l2jmobius.gameserver.network.clientpackets.compound.RequestNewEnchantTry;
import com.l2jmobius.gameserver.network.clientpackets.crystalization.RequestCrystallizeEstimate;
import com.l2jmobius.gameserver.network.clientpackets.crystalization.RequestCrystallizeItemCancel;
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/network/clientpackets/RequestNewEnchantRetryToPutItems.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/network/clientpackets/RequestNewEnchantRetryToPutItems.java
deleted file mode 100644
index a45b5d9e0e..0000000000
--- a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/network/clientpackets/RequestNewEnchantRetryToPutItems.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.network.clientpackets;
-
-import com.l2jmobius.commons.network.PacketReader;
-import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jmobius.gameserver.model.actor.request.CompoundRequest;
-import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
-import com.l2jmobius.gameserver.network.L2GameClient;
-import com.l2jmobius.gameserver.network.SystemMessageId;
-import com.l2jmobius.gameserver.network.serverpackets.ExEnchantRetryToPutItemFail;
-import com.l2jmobius.gameserver.network.serverpackets.ExEnchantRetryToPutItemOk;
-
-/**
- * @author Sdw
- */
-public class RequestNewEnchantRetryToPutItems implements IClientIncomingPacket
-{
- private int _firstItemObjectId;
- private int _secondItemObjectId;
-
- @Override
- public boolean read(L2GameClient client, PacketReader packet)
- {
- _firstItemObjectId = packet.readD();
- _secondItemObjectId = packet.readD();
- return true;
- }
-
- @Override
- public void run(L2GameClient client)
- {
- final L2PcInstance activeChar = client.getActiveChar();
- if (activeChar == null)
- {
- return;
- }
- else if (activeChar.isInStoreMode())
- {
- client.sendPacket(SystemMessageId.YOU_CANNOT_DO_THAT_WHILE_IN_A_PRIVATE_STORE_OR_PRIVATE_WORKSHOP);
- client.sendPacket(ExEnchantRetryToPutItemFail.STATIC_PACKET);
- return;
- }
- else if (activeChar.isProcessingTransaction() || activeChar.isProcessingRequest())
- {
- client.sendPacket(SystemMessageId.YOU_CANNOT_USE_THIS_SYSTEM_DURING_TRADING_PRIVATE_STORE_AND_WORKSHOP_SETUP);
- client.sendPacket(ExEnchantRetryToPutItemFail.STATIC_PACKET);
- return;
- }
-
- final CompoundRequest request = new CompoundRequest(activeChar);
- if (!activeChar.addRequest(request))
- {
- client.sendPacket(ExEnchantRetryToPutItemFail.STATIC_PACKET);
- return;
- }
-
- // Make sure player owns first item.
- request.setItemOne(_firstItemObjectId);
- final L2ItemInstance itemOne = request.getItemOne();
- if (itemOne == null)
- {
- client.sendPacket(ExEnchantRetryToPutItemFail.STATIC_PACKET);
- activeChar.removeRequest(request.getClass());
- return;
- }
-
- // Make sure player owns second item.
- request.setItemTwo(_secondItemObjectId);
- final L2ItemInstance itemTwo = request.getItemTwo();
- if (itemTwo == null)
- {
- client.sendPacket(ExEnchantRetryToPutItemFail.STATIC_PACKET);
- activeChar.removeRequest(request.getClass());
- return;
- }
-
- // Not implemented or not able to merge!
- if ((itemOne.getItem().getCompoundItem() == 0) || (itemOne.getItem().getCompoundChance() == 0))
- {
- client.sendPacket(ExEnchantRetryToPutItemFail.STATIC_PACKET);
- activeChar.removeRequest(request.getClass());
- return;
- }
-
- client.sendPacket(ExEnchantRetryToPutItemOk.STATIC_PACKET);
- }
-}
diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/clientpackets/RequestNewEnchantRetryToPutItems.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantRetryToPutItems.java
similarity index 80%
rename from L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/clientpackets/RequestNewEnchantRetryToPutItems.java
rename to L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantRetryToPutItems.java
index a45b5d9e0e..041e0df6eb 100644
--- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/clientpackets/RequestNewEnchantRetryToPutItems.java
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/network/clientpackets/compound/RequestNewEnchantRetryToPutItems.java
@@ -1,12 +1,14 @@
/*
- * This file is part of the L2J Mobius project.
+ * Copyright (C) 2004-2016 L2J Unity
*
- * This program is free software: you can redistribute it and/or modify
+ * This file is part of L2J Unity.
+ *
+ * L2J Unity is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * L2J Unity is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
@@ -14,14 +16,17 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package com.l2jmobius.gameserver.network.clientpackets;
+package com.l2jmobius.gameserver.network.clientpackets.compound;
import com.l2jmobius.commons.network.PacketReader;
+import com.l2jmobius.gameserver.data.xml.impl.CombinationItemsData;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.actor.request.CompoundRequest;
+import com.l2jmobius.gameserver.model.items.combination.CombinationItem;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
import com.l2jmobius.gameserver.network.L2GameClient;
import com.l2jmobius.gameserver.network.SystemMessageId;
+import com.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
import com.l2jmobius.gameserver.network.serverpackets.ExEnchantRetryToPutItemFail;
import com.l2jmobius.gameserver.network.serverpackets.ExEnchantRetryToPutItemOk;
@@ -89,14 +94,15 @@ public class RequestNewEnchantRetryToPutItems implements IClientIncomingPacket
return;
}
+ final CombinationItem combinationItem = CombinationItemsData.getInstance().getItemsBySlots(itemOne.getId(), itemTwo.getId());
+
// Not implemented or not able to merge!
- if ((itemOne.getItem().getCompoundItem() == 0) || (itemOne.getItem().getCompoundChance() == 0))
+ if (combinationItem == null)
{
client.sendPacket(ExEnchantRetryToPutItemFail.STATIC_PACKET);
activeChar.removeRequest(request.getClass());
return;
}
-
client.sendPacket(ExEnchantRetryToPutItemOk.STATIC_PACKET);
}
}