diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/effecthandlers/Restoration.java b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/effecthandlers/Restoration.java index f8560e9d7b..adf474fe77 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/effecthandlers/Restoration.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/effecthandlers/Restoration.java @@ -19,6 +19,7 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; +import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -80,4 +81,10 @@ public final class Restoration extends AbstractEffect effected.getActingPlayer().sendPacket(new PetItemList(effected.getInventory().getItems())); } } + + @Override + public L2EffectType getEffectType() + { + return L2EffectType.EXTRACT_ITEM; + } } diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java index b0865c40e1..339f3dbc38 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java @@ -26,6 +26,7 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; +import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.holders.ItemHolder; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; @@ -104,4 +105,10 @@ public final class RestorationRandom extends AbstractEffect player.addItem("Extract", createdItem.getId(), (long) (createdItem.getCount() * Config.RATE_EXTRACTABLE), effector, true); } } + + @Override + public L2EffectType getEffectType() + { + return L2EffectType.EXTRACT_ITEM; + } } diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java index 867b27549b..473414385b 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java @@ -57,6 +57,12 @@ public class ExtractableItems implements IItemHandler return false; } + if (!activeChar.isInventoryUnder80(false)) + { + activeChar.sendPacket(SystemMessageId.YOU_VE_EXCEEDED_THE_LIMIT_AND_CANNOT_RETRIEVE_THE_ITEM_PLEASE_CHECK_YOUR_LIMIT_IN_THE_INVENTORY); + return false; + } + // destroy item if (!activeChar.destroyItem("Extract", item.getObjectId(), 1, activeChar, true)) { diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/itemhandlers/FatedSupportBox.java b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/itemhandlers/FatedSupportBox.java index d2f0f9aa06..45884513f4 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/itemhandlers/FatedSupportBox.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/itemhandlers/FatedSupportBox.java @@ -57,6 +57,12 @@ public class FatedSupportBox implements IItemHandler final Race race = player.getRace(); final ClassId classId = player.getClassId(); + if (!player.isInventoryUnder80(false)) + { + player.sendPacket(SystemMessageId.YOU_VE_EXCEEDED_THE_LIMIT_AND_CANNOT_RETRIEVE_THE_ITEM_PLEASE_CHECK_YOUR_LIMIT_IN_THE_INVENTORY); + return false; + } + // Characters that have gone through their 2nd class transfer/1st liberation will be able to open the Fated Support Box at level 40. if ((player.getLevel() < 40) || player.isInCategory(CategoryType.FIRST_CLASS_GROUP) || ((race != Race.ERTHEIA) && player.isInCategory(CategoryType.SECOND_CLASS_GROUP))) { diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/itemhandlers/ItemSkillsTemplate.java b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/itemhandlers/ItemSkillsTemplate.java index 94a1ce904b..1378eb2c30 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/itemhandlers/ItemSkillsTemplate.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/itemhandlers/ItemSkillsTemplate.java @@ -79,6 +79,13 @@ public class ItemSkillsTemplate implements IItemHandler if (itemSkill != null) { + + if (itemSkill.hasEffectType(L2EffectType.EXTRACT_ITEM) && (playable.getActingPlayer() != null) && !playable.getActingPlayer().isInventoryUnder80(false)) + { + playable.getActingPlayer().sendPacket(SystemMessageId.YOU_VE_EXCEEDED_THE_LIMIT_AND_CANNOT_RETRIEVE_THE_ITEM_PLEASE_CHECK_YOUR_LIMIT_IN_THE_INVENTORY); + return false; + } + if (itemSkill.getItemConsumeId() > 0) { hasConsumeSkill = true; diff --git a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index 40260a4408..cc0f06444e 100644 --- a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -12696,7 +12696,7 @@ public final class L2PcInstance extends L2Playable } /** - * Test if player inventory is under 90% capaity + * Test if player inventory is under 90% capacity * @param includeQuestInv check also quest inventory * @return */ @@ -12706,7 +12706,7 @@ public final class L2PcInstance extends L2Playable } /** - * Test if player inventory is under 80% capaity + * Test if player inventory is under 80% capacity * @param includeQuestInv check also quest inventory * @return */ diff --git a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/effects/L2EffectType.java b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/effects/L2EffectType.java index 3c402a9c81..ccdfea8884 100644 --- a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/effects/L2EffectType.java +++ b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/effects/L2EffectType.java @@ -32,6 +32,7 @@ public enum L2EffectType MAGICAL_DMG_OVER_TIME, DEATH_LINK, BLOCK_CONTROL, + EXTRACT_ITEM, FISHING, FISHING_START, HATE,