diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index b7d251f4aa..2563083cec 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -6746,14 +6746,6 @@ public final class L2PcInstance extends L2Playable player.setOverrideCond(masks); } - // Retrieve from the database all items of this L2PcInstance and add them to _inventory - player.getInventory().restore(); - player.getFreight().restore(); - if (!Config.WAREHOUSE_CACHE) - { - player.getWarehouse(); - } - // Retrieve from the database all secondary data of this L2PcInstance // Note that Clan, Noblesse and Hero skills are given separately and not here. // Retrieve from the database all skills of this L2PcInstance and add them to _skills @@ -6762,6 +6754,14 @@ public final class L2PcInstance extends L2Playable // Reward auto-get skills and all available skills if auto-learn skills is true. player.rewardSkills(); + // Retrieve from the database all items of this L2PcInstance and add them to _inventory + player.getInventory().restore(); + player.getFreight().restore(); + if (!Config.WAREHOUSE_CACHE) + { + player.getWarehouse(); + } + player.restoreItemReuse(); // Initialize status update cache diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/itemcontainer/Inventory.java index af79a14ceb..f2f69bae0c 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -1273,7 +1273,7 @@ public abstract class Inventory extends ItemContainer try { unEquipItemInSlot(slot); - if (getOwner() instanceof L2PcInstance) + if (getOwner().isPlayer()) { ((L2PcInstance) getOwner()).refreshExpertisePenalty(); } @@ -1431,7 +1431,7 @@ public abstract class Inventory extends ItemContainer final L2ItemInstance old = setPaperdollItem(pdollSlot, null); if (old != null) { - if (getOwner() instanceof L2PcInstance) + if (getOwner().isPlayer()) { ((L2PcInstance) getOwner()).refreshExpertisePenalty(); } @@ -1473,7 +1473,7 @@ public abstract class Inventory extends ItemContainer return; } - if (getOwner() instanceof L2PcInstance) + if (getOwner().isPlayer()) { final L2PcInstance player = (L2PcInstance) getOwner(); @@ -1794,7 +1794,7 @@ public abstract class Inventory extends ItemContainer while (rs.next()) { final L2ItemInstance item = new L2ItemInstance(rs); - if (getOwner() instanceof L2PcInstance) + if (getOwner().isPlayer()) { final L2PcInstance player = (L2PcInstance) getOwner(); diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java index 0d70dbad0d..4bb46d7ff7 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java @@ -641,6 +641,12 @@ public class EnterWorld implements IClientIncomingPacket activeChar.sendPacket(new ExWorldChatCnt(activeChar)); } + // Fix for equipped item skills + if (!activeChar.getEffectList().getCurrentAbnormalVisualEffects().isEmpty()) + { + activeChar.updateAbnormalVisualEffects(); + } + if (Config.HARDWARE_INFO_ENABLED) { ThreadPoolManager.schedule(() -> diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index 0ba5f048dc..599d6c1cc1 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -6745,14 +6745,6 @@ public final class L2PcInstance extends L2Playable player.setOverrideCond(masks); } - // Retrieve from the database all items of this L2PcInstance and add them to _inventory - player.getInventory().restore(); - player.getFreight().restore(); - if (!Config.WAREHOUSE_CACHE) - { - player.getWarehouse(); - } - // Retrieve from the database all secondary data of this L2PcInstance // Note that Clan, Noblesse and Hero skills are given separately and not here. // Retrieve from the database all skills of this L2PcInstance and add them to _skills @@ -6761,6 +6753,14 @@ public final class L2PcInstance extends L2Playable // Reward auto-get skills and all available skills if auto-learn skills is true. player.rewardSkills(); + // Retrieve from the database all items of this L2PcInstance and add them to _inventory + player.getInventory().restore(); + player.getFreight().restore(); + if (!Config.WAREHOUSE_CACHE) + { + player.getWarehouse(); + } + player.restoreItemReuse(); // Initialize status update cache diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 177255ec02..2d39842af0 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -1303,7 +1303,7 @@ public abstract class Inventory extends ItemContainer try { unEquipItemInSlot(slot); - if (getOwner() instanceof L2PcInstance) + if (getOwner().isPlayer()) { ((L2PcInstance) getOwner()).refreshExpertisePenalty(); } @@ -1461,7 +1461,7 @@ public abstract class Inventory extends ItemContainer final L2ItemInstance old = setPaperdollItem(pdollSlot, null); if (old != null) { - if (getOwner() instanceof L2PcInstance) + if (getOwner().isPlayer()) { ((L2PcInstance) getOwner()).refreshExpertisePenalty(); } @@ -1503,7 +1503,7 @@ public abstract class Inventory extends ItemContainer return; } - if (getOwner() instanceof L2PcInstance) + if (getOwner().isPlayer()) { final L2PcInstance player = (L2PcInstance) getOwner(); @@ -1824,7 +1824,7 @@ public abstract class Inventory extends ItemContainer while (rs.next()) { final L2ItemInstance item = new L2ItemInstance(rs); - if (getOwner() instanceof L2PcInstance) + if (getOwner().isPlayer()) { final L2PcInstance player = (L2PcInstance) getOwner(); diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java index 3765dcee5e..eceb525b7a 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java @@ -652,6 +652,12 @@ public class EnterWorld implements IClientIncomingPacket activeChar.sendPacket(new ExAutoSoulShot(0, true, 2)); activeChar.sendPacket(new ExAutoSoulShot(0, true, 3)); + // Fix for equipped item skills + if (!activeChar.getEffectList().getCurrentAbnormalVisualEffects().isEmpty()) + { + activeChar.updateAbnormalVisualEffects(); + } + if (Config.HARDWARE_INFO_ENABLED) { ThreadPoolManager.schedule(() -> diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index 8ebba7f4d9..7b820d9bab 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -6748,14 +6748,6 @@ public final class L2PcInstance extends L2Playable player.setOverrideCond(masks); } - // Retrieve from the database all items of this L2PcInstance and add them to _inventory - player.getInventory().restore(); - player.getFreight().restore(); - if (!Config.WAREHOUSE_CACHE) - { - player.getWarehouse(); - } - // Retrieve from the database all secondary data of this L2PcInstance // Note that Clan, Noblesse and Hero skills are given separately and not here. // Retrieve from the database all skills of this L2PcInstance and add them to _skills @@ -6764,6 +6756,14 @@ public final class L2PcInstance extends L2Playable // Reward auto-get skills and all available skills if auto-learn skills is true. player.rewardSkills(); + // Retrieve from the database all items of this L2PcInstance and add them to _inventory + player.getInventory().restore(); + player.getFreight().restore(); + if (!Config.WAREHOUSE_CACHE) + { + player.getWarehouse(); + } + player.restoreItemReuse(); // Initialize status update cache diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 177255ec02..2d39842af0 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -1303,7 +1303,7 @@ public abstract class Inventory extends ItemContainer try { unEquipItemInSlot(slot); - if (getOwner() instanceof L2PcInstance) + if (getOwner().isPlayer()) { ((L2PcInstance) getOwner()).refreshExpertisePenalty(); } @@ -1461,7 +1461,7 @@ public abstract class Inventory extends ItemContainer final L2ItemInstance old = setPaperdollItem(pdollSlot, null); if (old != null) { - if (getOwner() instanceof L2PcInstance) + if (getOwner().isPlayer()) { ((L2PcInstance) getOwner()).refreshExpertisePenalty(); } @@ -1503,7 +1503,7 @@ public abstract class Inventory extends ItemContainer return; } - if (getOwner() instanceof L2PcInstance) + if (getOwner().isPlayer()) { final L2PcInstance player = (L2PcInstance) getOwner(); @@ -1824,7 +1824,7 @@ public abstract class Inventory extends ItemContainer while (rs.next()) { final L2ItemInstance item = new L2ItemInstance(rs); - if (getOwner() instanceof L2PcInstance) + if (getOwner().isPlayer()) { final L2PcInstance player = (L2PcInstance) getOwner(); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java index 3765dcee5e..eceb525b7a 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java @@ -652,6 +652,12 @@ public class EnterWorld implements IClientIncomingPacket activeChar.sendPacket(new ExAutoSoulShot(0, true, 2)); activeChar.sendPacket(new ExAutoSoulShot(0, true, 3)); + // Fix for equipped item skills + if (!activeChar.getEffectList().getCurrentAbnormalVisualEffects().isEmpty()) + { + activeChar.updateAbnormalVisualEffects(); + } + if (Config.HARDWARE_INFO_ENABLED) { ThreadPoolManager.schedule(() -> diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index b573905bf9..f0a1ac86b2 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -6718,14 +6718,6 @@ public final class L2PcInstance extends L2Playable player.setOverrideCond(masks); } - // Retrieve from the database all items of this L2PcInstance and add them to _inventory - player.getInventory().restore(); - player.getFreight().restore(); - if (!Config.WAREHOUSE_CACHE) - { - player.getWarehouse(); - } - // Retrieve from the database all secondary data of this L2PcInstance // Note that Clan, Noblesse and Hero skills are given separately and not here. // Retrieve from the database all skills of this L2PcInstance and add them to _skills @@ -6734,6 +6726,14 @@ public final class L2PcInstance extends L2Playable // Reward auto-get skills and all available skills if auto-learn skills is true. player.rewardSkills(); + // Retrieve from the database all items of this L2PcInstance and add them to _inventory + player.getInventory().restore(); + player.getFreight().restore(); + if (!Config.WAREHOUSE_CACHE) + { + player.getWarehouse(); + } + player.restoreItemReuse(); // Initialize status update cache diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 177255ec02..2d39842af0 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -1303,7 +1303,7 @@ public abstract class Inventory extends ItemContainer try { unEquipItemInSlot(slot); - if (getOwner() instanceof L2PcInstance) + if (getOwner().isPlayer()) { ((L2PcInstance) getOwner()).refreshExpertisePenalty(); } @@ -1461,7 +1461,7 @@ public abstract class Inventory extends ItemContainer final L2ItemInstance old = setPaperdollItem(pdollSlot, null); if (old != null) { - if (getOwner() instanceof L2PcInstance) + if (getOwner().isPlayer()) { ((L2PcInstance) getOwner()).refreshExpertisePenalty(); } @@ -1503,7 +1503,7 @@ public abstract class Inventory extends ItemContainer return; } - if (getOwner() instanceof L2PcInstance) + if (getOwner().isPlayer()) { final L2PcInstance player = (L2PcInstance) getOwner(); @@ -1824,7 +1824,7 @@ public abstract class Inventory extends ItemContainer while (rs.next()) { final L2ItemInstance item = new L2ItemInstance(rs); - if (getOwner() instanceof L2PcInstance) + if (getOwner().isPlayer()) { final L2PcInstance player = (L2PcInstance) getOwner(); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java index 3765dcee5e..eceb525b7a 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java @@ -652,6 +652,12 @@ public class EnterWorld implements IClientIncomingPacket activeChar.sendPacket(new ExAutoSoulShot(0, true, 2)); activeChar.sendPacket(new ExAutoSoulShot(0, true, 3)); + // Fix for equipped item skills + if (!activeChar.getEffectList().getCurrentAbnormalVisualEffects().isEmpty()) + { + activeChar.updateAbnormalVisualEffects(); + } + if (Config.HARDWARE_INFO_ENABLED) { ThreadPoolManager.schedule(() ->