From c0b724cb1786eb1d407454818d2c86f6e5487d66 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Thu, 5 Apr 2018 03:45:54 +0000 Subject: [PATCH] Option to force delete spawned minions upon master death. --- .../dist/game/config/NPC.ini | 5 +++ .../java/com/l2jmobius/Config.java | 2 ++ .../l2jmobius/gameserver/util/MinionList.java | 36 ++++++++----------- .../dist/game/config/NPC.ini | 5 +++ .../java/com/l2jmobius/Config.java | 2 ++ .../l2jmobius/gameserver/util/MinionList.java | 36 ++++++++----------- .../dist/game/config/NPC.ini | 5 +++ .../java/com/l2jmobius/Config.java | 2 ++ .../l2jmobius/gameserver/util/MinionList.java | 36 ++++++++----------- .../dist/game/config/NPC.ini | 5 +++ .../java/com/l2jmobius/Config.java | 2 ++ .../l2jmobius/gameserver/util/MinionList.java | 36 ++++++++----------- .../dist/game/config/NPC.ini | 5 +++ .../java/com/l2jmobius/Config.java | 2 ++ .../l2jmobius/gameserver/util/MinionList.java | 36 ++++++++----------- .../dist/game/config/NPC.ini | 5 +++ .../java/com/l2jmobius/Config.java | 2 ++ .../l2jmobius/gameserver/util/MinionList.java | 36 ++++++++----------- .../dist/game/config/NPC.ini | 5 +++ .../java/com/l2jmobius/Config.java | 2 ++ .../l2jmobius/gameserver/util/MinionList.java | 36 ++++++++----------- 21 files changed, 147 insertions(+), 154 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/config/NPC.ini b/L2J_Mobius_1.0_Ertheia/dist/game/config/NPC.ini index 5c2ab8c731..fa9875331e 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/config/NPC.ini +++ b/L2J_Mobius_1.0_Ertheia/dist/game/config/NPC.ini @@ -161,6 +161,11 @@ RaidMinionRespawnTime = 300000 # Format: minionId1,timeInSec1;minionId2,timeInSec2 CustomMinionsRespawnTime = 22450,30;22371,120;22543,0;25545,0;22424,30;22425,30;22426,30;22427,30;22428,30;22429,30;22430,30;22432,30;22433,30;22434,30;22435,30;22436,30;22437,30;22438,30;25596,30;25605,0;25606,0;25607,0;25608,0 +# Force delete spawned minions upon master death. +# By default minions are deleted only for raidbosses. +# Default: False +ForceDeleteMinions = False + # Disable Raid Curse if raid more than 8 levels lower. # Caution: drop will be reduced or even absent if DeepBlue drop rules enabled. # Default: 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 15d590ff1f..a9a4ce69f5 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java @@ -644,6 +644,7 @@ public final class Config public static float RAID_MIN_RESPAWN_MULTIPLIER; public static float RAID_MAX_RESPAWN_MULTIPLIER; public static boolean RAID_DISABLE_CURSE; + public static boolean FORCE_DELETE_MINIONS; public static int RAID_CHAOS_TIME; public static int GRAND_CHAOS_TIME; public static int MINION_CHAOS_TIME; @@ -2039,6 +2040,7 @@ public final class Config } } } + FORCE_DELETE_MINIONS = NPC.getBoolean("ForceDeleteMinions", false); RAID_DISABLE_CURSE = NPC.getBoolean("DisableRaidCurse", false); RAID_CHAOS_TIME = NPC.getInt("RaidChaosTime", 10); diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/MinionList.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/MinionList.java index 271b3ea3d9..0fb26521a3 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/MinionList.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/MinionList.java @@ -88,25 +88,6 @@ public class MinionList } } - /** - * Delete all spawned minions and try to reuse them. - */ - public void deleteSpawnedMinions() - { - if (!_spawnedMinions.isEmpty()) - { - for (L2MonsterInstance minion : _spawnedMinions) - { - if (minion != null) - { - minion.setLeader(null); - minion.deleteMe(); - } - } - _spawnedMinions.clear(); - } - } - /** * Called on the minion spawn and added them in the list of the spawned minions. * @param minion @@ -118,13 +99,24 @@ public class MinionList /** * Called on the master death/delete. - * @param force if true - force delete of the spawned minions By default minions deleted only for raidbosses + * @param force - When true, force delete of the spawned minions. By default minions are deleted only for raidbosses. */ public void onMasterDie(boolean force) { - if (_master.isRaid() || force) + if (_master.isRaid() || force || Config.FORCE_DELETE_MINIONS) { - deleteSpawnedMinions(); + if (!_spawnedMinions.isEmpty()) + { + for (L2MonsterInstance minion : _spawnedMinions) + { + if (minion != null) + { + minion.setLeader(null); + minion.deleteMe(); + } + } + _spawnedMinions.clear(); + } } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/config/NPC.ini b/L2J_Mobius_2.5_Underground/dist/game/config/NPC.ini index 5c2ab8c731..fa9875331e 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/config/NPC.ini +++ b/L2J_Mobius_2.5_Underground/dist/game/config/NPC.ini @@ -161,6 +161,11 @@ RaidMinionRespawnTime = 300000 # Format: minionId1,timeInSec1;minionId2,timeInSec2 CustomMinionsRespawnTime = 22450,30;22371,120;22543,0;25545,0;22424,30;22425,30;22426,30;22427,30;22428,30;22429,30;22430,30;22432,30;22433,30;22434,30;22435,30;22436,30;22437,30;22438,30;25596,30;25605,0;25606,0;25607,0;25608,0 +# Force delete spawned minions upon master death. +# By default minions are deleted only for raidbosses. +# Default: False +ForceDeleteMinions = False + # Disable Raid Curse if raid more than 8 levels lower. # Caution: drop will be reduced or even absent if DeepBlue drop rules enabled. # Default: 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 3b877e6b65..be0bc3ab3e 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java @@ -651,6 +651,7 @@ public final class Config public static float RAID_MIN_RESPAWN_MULTIPLIER; public static float RAID_MAX_RESPAWN_MULTIPLIER; public static boolean RAID_DISABLE_CURSE; + public static boolean FORCE_DELETE_MINIONS; public static int RAID_CHAOS_TIME; public static int GRAND_CHAOS_TIME; public static int MINION_CHAOS_TIME; @@ -2055,6 +2056,7 @@ public final class Config } } } + FORCE_DELETE_MINIONS = NPC.getBoolean("ForceDeleteMinions", false); RAID_DISABLE_CURSE = NPC.getBoolean("DisableRaidCurse", false); RAID_CHAOS_TIME = NPC.getInt("RaidChaosTime", 10); diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/MinionList.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/MinionList.java index 271b3ea3d9..0fb26521a3 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/MinionList.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/MinionList.java @@ -88,25 +88,6 @@ public class MinionList } } - /** - * Delete all spawned minions and try to reuse them. - */ - public void deleteSpawnedMinions() - { - if (!_spawnedMinions.isEmpty()) - { - for (L2MonsterInstance minion : _spawnedMinions) - { - if (minion != null) - { - minion.setLeader(null); - minion.deleteMe(); - } - } - _spawnedMinions.clear(); - } - } - /** * Called on the minion spawn and added them in the list of the spawned minions. * @param minion @@ -118,13 +99,24 @@ public class MinionList /** * Called on the master death/delete. - * @param force if true - force delete of the spawned minions By default minions deleted only for raidbosses + * @param force - When true, force delete of the spawned minions. By default minions are deleted only for raidbosses. */ public void onMasterDie(boolean force) { - if (_master.isRaid() || force) + if (_master.isRaid() || force || Config.FORCE_DELETE_MINIONS) { - deleteSpawnedMinions(); + if (!_spawnedMinions.isEmpty()) + { + for (L2MonsterInstance minion : _spawnedMinions) + { + if (minion != null) + { + minion.setLeader(null); + minion.deleteMe(); + } + } + _spawnedMinions.clear(); + } } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/config/NPC.ini b/L2J_Mobius_3.0_Helios/dist/game/config/NPC.ini index 5c2ab8c731..fa9875331e 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/config/NPC.ini +++ b/L2J_Mobius_3.0_Helios/dist/game/config/NPC.ini @@ -161,6 +161,11 @@ RaidMinionRespawnTime = 300000 # Format: minionId1,timeInSec1;minionId2,timeInSec2 CustomMinionsRespawnTime = 22450,30;22371,120;22543,0;25545,0;22424,30;22425,30;22426,30;22427,30;22428,30;22429,30;22430,30;22432,30;22433,30;22434,30;22435,30;22436,30;22437,30;22438,30;25596,30;25605,0;25606,0;25607,0;25608,0 +# Force delete spawned minions upon master death. +# By default minions are deleted only for raidbosses. +# Default: False +ForceDeleteMinions = False + # Disable Raid Curse if raid more than 8 levels lower. # Caution: drop will be reduced or even absent if DeepBlue drop rules enabled. # Default: 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 6122e5c46e..9bcec43843 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java @@ -651,6 +651,7 @@ public final class Config public static float RAID_MIN_RESPAWN_MULTIPLIER; public static float RAID_MAX_RESPAWN_MULTIPLIER; public static boolean RAID_DISABLE_CURSE; + public static boolean FORCE_DELETE_MINIONS; public static int RAID_CHAOS_TIME; public static int GRAND_CHAOS_TIME; public static int MINION_CHAOS_TIME; @@ -2063,6 +2064,7 @@ public final class Config } } } + FORCE_DELETE_MINIONS = NPC.getBoolean("ForceDeleteMinions", false); RAID_DISABLE_CURSE = NPC.getBoolean("DisableRaidCurse", false); RAID_CHAOS_TIME = NPC.getInt("RaidChaosTime", 10); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/MinionList.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/MinionList.java index 271b3ea3d9..0fb26521a3 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/MinionList.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/MinionList.java @@ -88,25 +88,6 @@ public class MinionList } } - /** - * Delete all spawned minions and try to reuse them. - */ - public void deleteSpawnedMinions() - { - if (!_spawnedMinions.isEmpty()) - { - for (L2MonsterInstance minion : _spawnedMinions) - { - if (minion != null) - { - minion.setLeader(null); - minion.deleteMe(); - } - } - _spawnedMinions.clear(); - } - } - /** * Called on the minion spawn and added them in the list of the spawned minions. * @param minion @@ -118,13 +99,24 @@ public class MinionList /** * Called on the master death/delete. - * @param force if true - force delete of the spawned minions By default minions deleted only for raidbosses + * @param force - When true, force delete of the spawned minions. By default minions are deleted only for raidbosses. */ public void onMasterDie(boolean force) { - if (_master.isRaid() || force) + if (_master.isRaid() || force || Config.FORCE_DELETE_MINIONS) { - deleteSpawnedMinions(); + if (!_spawnedMinions.isEmpty()) + { + for (L2MonsterInstance minion : _spawnedMinions) + { + if (minion != null) + { + minion.setLeader(null); + minion.deleteMe(); + } + } + _spawnedMinions.clear(); + } } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/NPC.ini b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/NPC.ini index 5c2ab8c731..fa9875331e 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/NPC.ini +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/NPC.ini @@ -161,6 +161,11 @@ RaidMinionRespawnTime = 300000 # Format: minionId1,timeInSec1;minionId2,timeInSec2 CustomMinionsRespawnTime = 22450,30;22371,120;22543,0;25545,0;22424,30;22425,30;22426,30;22427,30;22428,30;22429,30;22430,30;22432,30;22433,30;22434,30;22435,30;22436,30;22437,30;22438,30;25596,30;25605,0;25606,0;25607,0;25608,0 +# Force delete spawned minions upon master death. +# By default minions are deleted only for raidbosses. +# Default: False +ForceDeleteMinions = False + # Disable Raid Curse if raid more than 8 levels lower. # Caution: drop will be reduced or even absent if DeepBlue drop rules enabled. # Default: 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 a9f7cd7f33..a88a75bb5a 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java @@ -650,6 +650,7 @@ public final class Config public static float RAID_MIN_RESPAWN_MULTIPLIER; public static float RAID_MAX_RESPAWN_MULTIPLIER; public static boolean RAID_DISABLE_CURSE; + public static boolean FORCE_DELETE_MINIONS; public static int RAID_CHAOS_TIME; public static int GRAND_CHAOS_TIME; public static int MINION_CHAOS_TIME; @@ -2061,6 +2062,7 @@ public final class Config } } } + FORCE_DELETE_MINIONS = NPC.getBoolean("ForceDeleteMinions", false); RAID_DISABLE_CURSE = NPC.getBoolean("DisableRaidCurse", false); RAID_CHAOS_TIME = NPC.getInt("RaidChaosTime", 10); diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/MinionList.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/MinionList.java index 271b3ea3d9..0fb26521a3 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/MinionList.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/MinionList.java @@ -88,25 +88,6 @@ public class MinionList } } - /** - * Delete all spawned minions and try to reuse them. - */ - public void deleteSpawnedMinions() - { - if (!_spawnedMinions.isEmpty()) - { - for (L2MonsterInstance minion : _spawnedMinions) - { - if (minion != null) - { - minion.setLeader(null); - minion.deleteMe(); - } - } - _spawnedMinions.clear(); - } - } - /** * Called on the minion spawn and added them in the list of the spawned minions. * @param minion @@ -118,13 +99,24 @@ public class MinionList /** * Called on the master death/delete. - * @param force if true - force delete of the spawned minions By default minions deleted only for raidbosses + * @param force - When true, force delete of the spawned minions. By default minions are deleted only for raidbosses. */ public void onMasterDie(boolean force) { - if (_master.isRaid() || force) + if (_master.isRaid() || force || Config.FORCE_DELETE_MINIONS) { - deleteSpawnedMinions(); + if (!_spawnedMinions.isEmpty()) + { + for (L2MonsterInstance minion : _spawnedMinions) + { + if (minion != null) + { + minion.setLeader(null); + minion.deleteMe(); + } + } + _spawnedMinions.clear(); + } } } diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/config/NPC.ini b/L2J_Mobius_CT_2.6_HighFive/dist/game/config/NPC.ini index 78d9cfb7a2..cdec46f855 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/config/NPC.ini +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/config/NPC.ini @@ -176,6 +176,11 @@ RaidMinionRespawnTime = 300000 # Format: minionId1,timeInSec1;minionId2,timeInSec2 CustomMinionsRespawnTime = 22450,30;22371,120;22543,0;25545,0;22424,30;22425,30;22426,30;22427,30;22428,30;22429,30;22430,30;22432,30;22433,30;22434,30;22435,30;22436,30;22437,30;22438,30;25596,30;25605,0;25606,0;25607,0;25608,0 +# Force delete spawned minions upon master death. +# By default minions are deleted only for raidbosses. +# Default: False +ForceDeleteMinions = False + # Disable Raid Curse if raid more than 8 levels lower. # Caution: drop will be reduced or even absent if DeepBlue drop rules enabled. # Default: 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 fd3aa9783a..855ace0ef5 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 @@ -892,6 +892,7 @@ public final class Config public static float RAID_MIN_RESPAWN_MULTIPLIER; public static float RAID_MAX_RESPAWN_MULTIPLIER; public static boolean RAID_DISABLE_CURSE; + public static boolean FORCE_DELETE_MINIONS; public static int RAID_CHAOS_TIME; public static int GRAND_CHAOS_TIME; public static int MINION_CHAOS_TIME; @@ -2129,6 +2130,7 @@ public final class Config } } } + FORCE_DELETE_MINIONS = NPC.getBoolean("ForceDeleteMinions", false); RAID_DISABLE_CURSE = NPC.getBoolean("DisableRaidCurse", false); RAID_CHAOS_TIME = NPC.getInt("RaidChaosTime", 10); diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/util/MinionList.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/util/MinionList.java index ae0fe74350..453e2bb0ff 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/util/MinionList.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/util/MinionList.java @@ -88,25 +88,6 @@ public class MinionList } } - /** - * Delete all spawned minions and try to reuse them. - */ - public void deleteSpawnedMinions() - { - if (!_spawnedMinions.isEmpty()) - { - for (L2MonsterInstance minion : _spawnedMinions) - { - if (minion != null) - { - minion.setLeader(null); - minion.deleteMe(); - } - } - _spawnedMinions.clear(); - } - } - /** * Called on the minion spawn and added them in the list of the spawned minions. * @param minion @@ -118,13 +99,24 @@ public class MinionList /** * Called on the master death/delete. - * @param force if true - force delete of the spawned minions By default minions deleted only for raidbosses + * @param force - When true, force delete of the spawned minions. By default minions are deleted only for raidbosses. */ public void onMasterDie(boolean force) { - if (_master.isRaid() || force) + if (_master.isRaid() || force || Config.FORCE_DELETE_MINIONS) { - deleteSpawnedMinions(); + if (!_spawnedMinions.isEmpty()) + { + for (L2MonsterInstance minion : _spawnedMinions) + { + if (minion != null) + { + minion.setLeader(null); + minion.deleteMe(); + } + } + _spawnedMinions.clear(); + } } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/NPC.ini b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/NPC.ini index 5c2ab8c731..fa9875331e 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/NPC.ini +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/NPC.ini @@ -161,6 +161,11 @@ RaidMinionRespawnTime = 300000 # Format: minionId1,timeInSec1;minionId2,timeInSec2 CustomMinionsRespawnTime = 22450,30;22371,120;22543,0;25545,0;22424,30;22425,30;22426,30;22427,30;22428,30;22429,30;22430,30;22432,30;22433,30;22434,30;22435,30;22436,30;22437,30;22438,30;25596,30;25605,0;25606,0;25607,0;25608,0 +# Force delete spawned minions upon master death. +# By default minions are deleted only for raidbosses. +# Default: False +ForceDeleteMinions = False + # Disable Raid Curse if raid more than 8 levels lower. # Caution: drop will be reduced or even absent if DeepBlue drop rules enabled. # Default: 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 a818167263..90ec255fdb 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 @@ -650,6 +650,7 @@ public final class Config public static float RAID_MIN_RESPAWN_MULTIPLIER; public static float RAID_MAX_RESPAWN_MULTIPLIER; public static boolean RAID_DISABLE_CURSE; + public static boolean FORCE_DELETE_MINIONS; public static int RAID_CHAOS_TIME; public static int GRAND_CHAOS_TIME; public static int MINION_CHAOS_TIME; @@ -1986,6 +1987,7 @@ public final class Config } } } + FORCE_DELETE_MINIONS = NPC.getBoolean("ForceDeleteMinions", false); RAID_DISABLE_CURSE = NPC.getBoolean("DisableRaidCurse", false); RAID_CHAOS_TIME = NPC.getInt("RaidChaosTime", 10); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/MinionList.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/MinionList.java index 271b3ea3d9..0fb26521a3 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/MinionList.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/MinionList.java @@ -88,25 +88,6 @@ public class MinionList } } - /** - * Delete all spawned minions and try to reuse them. - */ - public void deleteSpawnedMinions() - { - if (!_spawnedMinions.isEmpty()) - { - for (L2MonsterInstance minion : _spawnedMinions) - { - if (minion != null) - { - minion.setLeader(null); - minion.deleteMe(); - } - } - _spawnedMinions.clear(); - } - } - /** * Called on the minion spawn and added them in the list of the spawned minions. * @param minion @@ -118,13 +99,24 @@ public class MinionList /** * Called on the master death/delete. - * @param force if true - force delete of the spawned minions By default minions deleted only for raidbosses + * @param force - When true, force delete of the spawned minions. By default minions are deleted only for raidbosses. */ public void onMasterDie(boolean force) { - if (_master.isRaid() || force) + if (_master.isRaid() || force || Config.FORCE_DELETE_MINIONS) { - deleteSpawnedMinions(); + if (!_spawnedMinions.isEmpty()) + { + for (L2MonsterInstance minion : _spawnedMinions) + { + if (minion != null) + { + minion.setLeader(null); + minion.deleteMe(); + } + } + _spawnedMinions.clear(); + } } } diff --git a/L2J_Mobius_Classic_2.0_Zaken/dist/game/config/NPC.ini b/L2J_Mobius_Classic_2.0_Zaken/dist/game/config/NPC.ini index 5c2ab8c731..fa9875331e 100644 --- a/L2J_Mobius_Classic_2.0_Zaken/dist/game/config/NPC.ini +++ b/L2J_Mobius_Classic_2.0_Zaken/dist/game/config/NPC.ini @@ -161,6 +161,11 @@ RaidMinionRespawnTime = 300000 # Format: minionId1,timeInSec1;minionId2,timeInSec2 CustomMinionsRespawnTime = 22450,30;22371,120;22543,0;25545,0;22424,30;22425,30;22426,30;22427,30;22428,30;22429,30;22430,30;22432,30;22433,30;22434,30;22435,30;22436,30;22437,30;22438,30;25596,30;25605,0;25606,0;25607,0;25608,0 +# Force delete spawned minions upon master death. +# By default minions are deleted only for raidbosses. +# Default: False +ForceDeleteMinions = False + # Disable Raid Curse if raid more than 8 levels lower. # Caution: drop will be reduced or even absent if DeepBlue drop rules enabled. # Default: False diff --git a/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/Config.java b/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/Config.java index ef1ac2d4d5..2f2795b545 100644 --- a/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/Config.java @@ -650,6 +650,7 @@ public final class Config public static float RAID_MIN_RESPAWN_MULTIPLIER; public static float RAID_MAX_RESPAWN_MULTIPLIER; public static boolean RAID_DISABLE_CURSE; + public static boolean FORCE_DELETE_MINIONS; public static int RAID_CHAOS_TIME; public static int GRAND_CHAOS_TIME; public static int MINION_CHAOS_TIME; @@ -1990,6 +1991,7 @@ public final class Config } } } + FORCE_DELETE_MINIONS = NPC.getBoolean("ForceDeleteMinions", false); RAID_DISABLE_CURSE = NPC.getBoolean("DisableRaidCurse", false); RAID_CHAOS_TIME = NPC.getInt("RaidChaosTime", 10); diff --git a/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/util/MinionList.java b/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/util/MinionList.java index 271b3ea3d9..0fb26521a3 100644 --- a/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/util/MinionList.java +++ b/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/util/MinionList.java @@ -88,25 +88,6 @@ public class MinionList } } - /** - * Delete all spawned minions and try to reuse them. - */ - public void deleteSpawnedMinions() - { - if (!_spawnedMinions.isEmpty()) - { - for (L2MonsterInstance minion : _spawnedMinions) - { - if (minion != null) - { - minion.setLeader(null); - minion.deleteMe(); - } - } - _spawnedMinions.clear(); - } - } - /** * Called on the minion spawn and added them in the list of the spawned minions. * @param minion @@ -118,13 +99,24 @@ public class MinionList /** * Called on the master death/delete. - * @param force if true - force delete of the spawned minions By default minions deleted only for raidbosses + * @param force - When true, force delete of the spawned minions. By default minions are deleted only for raidbosses. */ public void onMasterDie(boolean force) { - if (_master.isRaid() || force) + if (_master.isRaid() || force || Config.FORCE_DELETE_MINIONS) { - deleteSpawnedMinions(); + if (!_spawnedMinions.isEmpty()) + { + for (L2MonsterInstance minion : _spawnedMinions) + { + if (minion != null) + { + minion.setLeader(null); + minion.deleteMe(); + } + } + _spawnedMinions.clear(); + } } }