From 8076954b2239b54ca6d79ca7c08514acbfdd653a Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Fri, 19 Jan 2018 13:34:23 +0000 Subject: [PATCH] Config to make all items destroyable. --- L2J_Mobius_1.0_Ertheia/dist/game/config/General.ini | 4 ++++ L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java | 2 ++ .../gameserver/network/clientpackets/RequestDestroyItem.java | 2 +- L2J_Mobius_2.5_Underground/dist/game/config/General.ini | 4 ++++ L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java | 2 ++ .../gameserver/network/clientpackets/RequestDestroyItem.java | 2 +- L2J_Mobius_3.0_Helios/dist/game/config/General.ini | 4 ++++ L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java | 2 ++ .../gameserver/network/clientpackets/RequestDestroyItem.java | 2 +- L2J_Mobius_4.0_GrandCrusade/dist/game/config/General.ini | 4 ++++ L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java | 2 ++ .../gameserver/network/clientpackets/RequestDestroyItem.java | 2 +- L2J_Mobius_CT_2.6_HighFive/dist/game/config/General.ini | 4 ++++ L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/Config.java | 2 ++ .../gameserver/network/clientpackets/RequestDestroyItem.java | 2 +- L2J_Mobius_Classic_2.0_Saviors/dist/game/config/General.ini | 4 ++++ L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/Config.java | 2 ++ .../gameserver/network/clientpackets/RequestDestroyItem.java | 2 +- 18 files changed, 42 insertions(+), 6 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/config/General.ini b/L2J_Mobius_1.0_Ertheia/dist/game/config/General.ini index bc5d0931e0..5d0c257de2 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/config/General.ini +++ b/L2J_Mobius_1.0_Ertheia/dist/game/config/General.ini @@ -196,6 +196,10 @@ DestroyPlayerDroppedItem = False # Default: False DestroyEquipableItem = False +# Make all items destroyable. +# If enabled players can destroy all items!!! +DestroyAllItems = False + # Save dropped items into the database for restoring after restart. # Default: False SaveDroppedItem = False diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java index 65714d746a..ea13908985 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java @@ -445,6 +445,7 @@ public final class Config public static boolean UPDATE_ITEMS_ON_CHAR_STORE; public static boolean DESTROY_DROPPED_PLAYER_ITEM; public static boolean DESTROY_EQUIPABLE_PLAYER_ITEM; + public static boolean DESTROY_ALL_ITEMS; public static boolean SAVE_DROPPED_ITEM; public static boolean EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD; public static int SAVE_DROPPED_ITEM_INTERVAL; @@ -1835,6 +1836,7 @@ public final class Config UPDATE_ITEMS_ON_CHAR_STORE = General.getBoolean("UpdateItemsOnCharStore", false); DESTROY_DROPPED_PLAYER_ITEM = General.getBoolean("DestroyPlayerDroppedItem", false); DESTROY_EQUIPABLE_PLAYER_ITEM = General.getBoolean("DestroyEquipableItem", false); + DESTROY_ALL_ITEMS = General.getBoolean("DestroyAllItems", false); SAVE_DROPPED_ITEM = General.getBoolean("SaveDroppedItem", false); EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD = General.getBoolean("EmptyDroppedItemTableAfterLoad", false); SAVE_DROPPED_ITEM_INTERVAL = General.getInt("SaveDroppedItemInterval", 60) * 60000; diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java index c6e20c8de4..f48efc3a6d 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java @@ -125,7 +125,7 @@ public final class RequestDestroyItem implements IClientIncomingPacket final int itemId = itemToRemove.getId(); - if ((!activeChar.canOverrideCond(PcCondOverride.DESTROY_ALL_ITEMS) && !itemToRemove.isDestroyable()) || CursedWeaponsManager.getInstance().isCursed(itemId)) + if (!Config.DESTROY_ALL_ITEMS && ((!activeChar.canOverrideCond(PcCondOverride.DESTROY_ALL_ITEMS) && !itemToRemove.isDestroyable()) || CursedWeaponsManager.getInstance().isCursed(itemId))) { if (itemToRemove.isHeroItem()) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/config/General.ini b/L2J_Mobius_2.5_Underground/dist/game/config/General.ini index f14f090ade..832fb08b17 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/config/General.ini +++ b/L2J_Mobius_2.5_Underground/dist/game/config/General.ini @@ -196,6 +196,10 @@ DestroyPlayerDroppedItem = False # Default: False DestroyEquipableItem = False +# Make all items destroyable. +# If enabled players can destroy all items!!! +DestroyAllItems = False + # Save dropped items into the database for restoring after restart. # Default: False SaveDroppedItem = False diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java index af91f59677..e590f4dfaf 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java @@ -445,6 +445,7 @@ public final class Config public static boolean UPDATE_ITEMS_ON_CHAR_STORE; public static boolean DESTROY_DROPPED_PLAYER_ITEM; public static boolean DESTROY_EQUIPABLE_PLAYER_ITEM; + public static boolean DESTROY_ALL_ITEMS; public static boolean SAVE_DROPPED_ITEM; public static boolean EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD; public static int SAVE_DROPPED_ITEM_INTERVAL; @@ -1836,6 +1837,7 @@ public final class Config UPDATE_ITEMS_ON_CHAR_STORE = General.getBoolean("UpdateItemsOnCharStore", false); DESTROY_DROPPED_PLAYER_ITEM = General.getBoolean("DestroyPlayerDroppedItem", false); DESTROY_EQUIPABLE_PLAYER_ITEM = General.getBoolean("DestroyEquipableItem", false); + DESTROY_ALL_ITEMS = General.getBoolean("DestroyAllItems", false); SAVE_DROPPED_ITEM = General.getBoolean("SaveDroppedItem", false); EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD = General.getBoolean("EmptyDroppedItemTableAfterLoad", false); SAVE_DROPPED_ITEM_INTERVAL = General.getInt("SaveDroppedItemInterval", 60) * 60000; diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java index c6e20c8de4..f48efc3a6d 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java @@ -125,7 +125,7 @@ public final class RequestDestroyItem implements IClientIncomingPacket final int itemId = itemToRemove.getId(); - if ((!activeChar.canOverrideCond(PcCondOverride.DESTROY_ALL_ITEMS) && !itemToRemove.isDestroyable()) || CursedWeaponsManager.getInstance().isCursed(itemId)) + if (!Config.DESTROY_ALL_ITEMS && ((!activeChar.canOverrideCond(PcCondOverride.DESTROY_ALL_ITEMS) && !itemToRemove.isDestroyable()) || CursedWeaponsManager.getInstance().isCursed(itemId))) { if (itemToRemove.isHeroItem()) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/config/General.ini b/L2J_Mobius_3.0_Helios/dist/game/config/General.ini index f14f090ade..832fb08b17 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/config/General.ini +++ b/L2J_Mobius_3.0_Helios/dist/game/config/General.ini @@ -196,6 +196,10 @@ DestroyPlayerDroppedItem = False # Default: False DestroyEquipableItem = False +# Make all items destroyable. +# If enabled players can destroy all items!!! +DestroyAllItems = False + # Save dropped items into the database for restoring after restart. # Default: False SaveDroppedItem = False diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java index 30bf2ee698..e21910e041 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java @@ -445,6 +445,7 @@ public final class Config public static boolean UPDATE_ITEMS_ON_CHAR_STORE; public static boolean DESTROY_DROPPED_PLAYER_ITEM; public static boolean DESTROY_EQUIPABLE_PLAYER_ITEM; + public static boolean DESTROY_ALL_ITEMS; public static boolean SAVE_DROPPED_ITEM; public static boolean EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD; public static int SAVE_DROPPED_ITEM_INTERVAL; @@ -1844,6 +1845,7 @@ public final class Config UPDATE_ITEMS_ON_CHAR_STORE = General.getBoolean("UpdateItemsOnCharStore", false); DESTROY_DROPPED_PLAYER_ITEM = General.getBoolean("DestroyPlayerDroppedItem", false); DESTROY_EQUIPABLE_PLAYER_ITEM = General.getBoolean("DestroyEquipableItem", false); + DESTROY_ALL_ITEMS = General.getBoolean("DestroyAllItems", false); SAVE_DROPPED_ITEM = General.getBoolean("SaveDroppedItem", false); EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD = General.getBoolean("EmptyDroppedItemTableAfterLoad", false); SAVE_DROPPED_ITEM_INTERVAL = General.getInt("SaveDroppedItemInterval", 60) * 60000; diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java index c6e20c8de4..f48efc3a6d 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java @@ -125,7 +125,7 @@ public final class RequestDestroyItem implements IClientIncomingPacket final int itemId = itemToRemove.getId(); - if ((!activeChar.canOverrideCond(PcCondOverride.DESTROY_ALL_ITEMS) && !itemToRemove.isDestroyable()) || CursedWeaponsManager.getInstance().isCursed(itemId)) + if (!Config.DESTROY_ALL_ITEMS && ((!activeChar.canOverrideCond(PcCondOverride.DESTROY_ALL_ITEMS) && !itemToRemove.isDestroyable()) || CursedWeaponsManager.getInstance().isCursed(itemId))) { if (itemToRemove.isHeroItem()) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/General.ini b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/General.ini index f14f090ade..832fb08b17 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/General.ini +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/General.ini @@ -196,6 +196,10 @@ DestroyPlayerDroppedItem = False # Default: False DestroyEquipableItem = False +# Make all items destroyable. +# If enabled players can destroy all items!!! +DestroyAllItems = False + # Save dropped items into the database for restoring after restart. # Default: False SaveDroppedItem = False diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java index 7a19978a7a..debf1609c0 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java @@ -445,6 +445,7 @@ public final class Config public static boolean UPDATE_ITEMS_ON_CHAR_STORE; public static boolean DESTROY_DROPPED_PLAYER_ITEM; public static boolean DESTROY_EQUIPABLE_PLAYER_ITEM; + public static boolean DESTROY_ALL_ITEMS; public static boolean SAVE_DROPPED_ITEM; public static boolean EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD; public static int SAVE_DROPPED_ITEM_INTERVAL; @@ -1842,6 +1843,7 @@ public final class Config UPDATE_ITEMS_ON_CHAR_STORE = General.getBoolean("UpdateItemsOnCharStore", false); DESTROY_DROPPED_PLAYER_ITEM = General.getBoolean("DestroyPlayerDroppedItem", false); DESTROY_EQUIPABLE_PLAYER_ITEM = General.getBoolean("DestroyEquipableItem", false); + DESTROY_ALL_ITEMS = General.getBoolean("DestroyAllItems", false); SAVE_DROPPED_ITEM = General.getBoolean("SaveDroppedItem", false); EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD = General.getBoolean("EmptyDroppedItemTableAfterLoad", false); SAVE_DROPPED_ITEM_INTERVAL = General.getInt("SaveDroppedItemInterval", 60) * 60000; diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java index c6e20c8de4..f48efc3a6d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java @@ -125,7 +125,7 @@ public final class RequestDestroyItem implements IClientIncomingPacket final int itemId = itemToRemove.getId(); - if ((!activeChar.canOverrideCond(PcCondOverride.DESTROY_ALL_ITEMS) && !itemToRemove.isDestroyable()) || CursedWeaponsManager.getInstance().isCursed(itemId)) + if (!Config.DESTROY_ALL_ITEMS && ((!activeChar.canOverrideCond(PcCondOverride.DESTROY_ALL_ITEMS) && !itemToRemove.isDestroyable()) || CursedWeaponsManager.getInstance().isCursed(itemId))) { if (itemToRemove.isHeroItem()) { diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/config/General.ini b/L2J_Mobius_CT_2.6_HighFive/dist/game/config/General.ini index b310b41bcb..f6d9bd16ae 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/config/General.ini +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/config/General.ini @@ -303,6 +303,10 @@ DestroyPlayerDroppedItem = False # Default: False DestroyEquipableItem = False +# Make all items destroyable. +# If enabled players can destroy all items!!! +DestroyAllItems = False + # Save dropped items into the database for restoring after restart. # Default: False SaveDroppedItem = False diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/Config.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/Config.java index 3288212abe..0784ffff87 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/Config.java @@ -490,6 +490,7 @@ public final class Config public static boolean UPDATE_ITEMS_ON_CHAR_STORE; public static boolean DESTROY_DROPPED_PLAYER_ITEM; public static boolean DESTROY_EQUIPABLE_PLAYER_ITEM; + public static boolean DESTROY_ALL_ITEMS; public static boolean SAVE_DROPPED_ITEM; public static boolean EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD; public static int SAVE_DROPPED_ITEM_INTERVAL; @@ -1877,6 +1878,7 @@ public final class Config UPDATE_ITEMS_ON_CHAR_STORE = General.getBoolean("UpdateItemsOnCharStore", false); DESTROY_DROPPED_PLAYER_ITEM = General.getBoolean("DestroyPlayerDroppedItem", false); DESTROY_EQUIPABLE_PLAYER_ITEM = General.getBoolean("DestroyEquipableItem", false); + DESTROY_ALL_ITEMS = General.getBoolean("DestroyAllItems", false); SAVE_DROPPED_ITEM = General.getBoolean("SaveDroppedItem", false); EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD = General.getBoolean("EmptyDroppedItemTableAfterLoad", false); SAVE_DROPPED_ITEM_INTERVAL = General.getInt("SaveDroppedItemInterval", 60) * 60000; diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java index e825577fb2..a34f85adf3 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java @@ -114,7 +114,7 @@ public final class RequestDestroyItem extends L2GameClientPacket final int itemId = itemToRemove.getId(); - if ((!activeChar.canOverrideCond(PcCondOverride.DESTROY_ALL_ITEMS) && !itemToRemove.isDestroyable()) || CursedWeaponsManager.getInstance().isCursed(itemId)) + if (!Config.DESTROY_ALL_ITEMS && ((!activeChar.canOverrideCond(PcCondOverride.DESTROY_ALL_ITEMS) && !itemToRemove.isDestroyable()) || CursedWeaponsManager.getInstance().isCursed(itemId))) { if (itemToRemove.isHeroItem()) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/General.ini b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/General.ini index d35c9e7b97..80d6358861 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/General.ini +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/General.ini @@ -196,6 +196,10 @@ DestroyPlayerDroppedItem = False # Default: False DestroyEquipableItem = False +# Make all items destroyable. +# If enabled players can destroy all items!!! +DestroyAllItems = False + # Save dropped items into the database for restoring after restart. # Default: False SaveDroppedItem = False diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/Config.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/Config.java index bd5aad9399..853cad6e13 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/Config.java @@ -445,6 +445,7 @@ public final class Config public static boolean UPDATE_ITEMS_ON_CHAR_STORE; public static boolean DESTROY_DROPPED_PLAYER_ITEM; public static boolean DESTROY_EQUIPABLE_PLAYER_ITEM; + public static boolean DESTROY_ALL_ITEMS; public static boolean SAVE_DROPPED_ITEM; public static boolean EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD; public static int SAVE_DROPPED_ITEM_INTERVAL; @@ -1768,6 +1769,7 @@ public final class Config UPDATE_ITEMS_ON_CHAR_STORE = General.getBoolean("UpdateItemsOnCharStore", false); DESTROY_DROPPED_PLAYER_ITEM = General.getBoolean("DestroyPlayerDroppedItem", false); DESTROY_EQUIPABLE_PLAYER_ITEM = General.getBoolean("DestroyEquipableItem", false); + DESTROY_ALL_ITEMS = General.getBoolean("DestroyAllItems", false); SAVE_DROPPED_ITEM = General.getBoolean("SaveDroppedItem", false); EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD = General.getBoolean("EmptyDroppedItemTableAfterLoad", false); SAVE_DROPPED_ITEM_INTERVAL = General.getInt("SaveDroppedItemInterval", 60) * 60000; diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java index c6e20c8de4..f48efc3a6d 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java @@ -125,7 +125,7 @@ public final class RequestDestroyItem implements IClientIncomingPacket final int itemId = itemToRemove.getId(); - if ((!activeChar.canOverrideCond(PcCondOverride.DESTROY_ALL_ITEMS) && !itemToRemove.isDestroyable()) || CursedWeaponsManager.getInstance().isCursed(itemId)) + if (!Config.DESTROY_ALL_ITEMS && ((!activeChar.canOverrideCond(PcCondOverride.DESTROY_ALL_ITEMS) && !itemToRemove.isDestroyable()) || CursedWeaponsManager.getInstance().isCursed(itemId))) { if (itemToRemove.isHeroItem()) {