From 58a85d05f5c0d5d694755843d349d44be75ee2e5 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Wed, 11 Mar 2020 00:05:59 +0000 Subject: [PATCH] Fixed Frintezza onKill monster list NPE. --- .../ai/bosses/Frintezza/LastImperialTomb.java | 12 ++++++++++-- .../ai/bosses/Frintezza/LastImperialTomb.java | 12 ++++++++++-- .../ai/bosses/Frintezza/LastImperialTomb.java | 12 ++++++++++-- .../ai/bosses/Frintezza/LastImperialTomb.java | 12 ++++++++++-- .../ai/bosses/Frintezza/LastImperialTomb.java | 12 ++++++++++-- .../ai/bosses/Frintezza/LastImperialTomb.java | 12 ++++++++++-- .../ai/bosses/Frintezza/LastImperialTomb.java | 12 ++++++++++-- .../ai/bosses/Frintezza/LastImperialTomb.java | 12 ++++++++++-- .../instances/LastImperialTomb/LastImperialTomb.java | 12 ++++++++++-- .../instances/LastImperialTomb/LastImperialTomb.java | 12 ++++++++++-- .../ai/bosses/Frintezza/LastImperialTomb.java | 12 ++++++++++-- 11 files changed, 110 insertions(+), 22 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java index 27b786511e..b839e0abe6 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java @@ -754,12 +754,20 @@ public class LastImperialTomb extends AbstractInstance else if (CommonUtil.contains(DEMONS, npc.getId())) { final List demons = world.getParameters().getList("demons", Npc.class); - demons.remove(npc); + if (demons != null) + { + demons.remove(npc); + world.setParameter("demons", demons); + } } else if (CommonUtil.contains(PORTRAITS, npc.getId())) { final Map portraits = world.getParameters().getMap("portraits", Npc.class, Integer.class); - portraits.remove(npc); + if (portraits != null) + { + portraits.remove(npc); + world.setParameter("portraits", portraits); + } } else { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java index 27b786511e..b839e0abe6 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java @@ -754,12 +754,20 @@ public class LastImperialTomb extends AbstractInstance else if (CommonUtil.contains(DEMONS, npc.getId())) { final List demons = world.getParameters().getList("demons", Npc.class); - demons.remove(npc); + if (demons != null) + { + demons.remove(npc); + world.setParameter("demons", demons); + } } else if (CommonUtil.contains(PORTRAITS, npc.getId())) { final Map portraits = world.getParameters().getMap("portraits", Npc.class, Integer.class); - portraits.remove(npc); + if (portraits != null) + { + portraits.remove(npc); + world.setParameter("portraits", portraits); + } } else { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java index 27b786511e..b839e0abe6 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java @@ -754,12 +754,20 @@ public class LastImperialTomb extends AbstractInstance else if (CommonUtil.contains(DEMONS, npc.getId())) { final List demons = world.getParameters().getList("demons", Npc.class); - demons.remove(npc); + if (demons != null) + { + demons.remove(npc); + world.setParameter("demons", demons); + } } else if (CommonUtil.contains(PORTRAITS, npc.getId())) { final Map portraits = world.getParameters().getMap("portraits", Npc.class, Integer.class); - portraits.remove(npc); + if (portraits != null) + { + portraits.remove(npc); + world.setParameter("portraits", portraits); + } } else { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java index 27b786511e..b839e0abe6 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java @@ -754,12 +754,20 @@ public class LastImperialTomb extends AbstractInstance else if (CommonUtil.contains(DEMONS, npc.getId())) { final List demons = world.getParameters().getList("demons", Npc.class); - demons.remove(npc); + if (demons != null) + { + demons.remove(npc); + world.setParameter("demons", demons); + } } else if (CommonUtil.contains(PORTRAITS, npc.getId())) { final Map portraits = world.getParameters().getMap("portraits", Npc.class, Integer.class); - portraits.remove(npc); + if (portraits != null) + { + portraits.remove(npc); + world.setParameter("portraits", portraits); + } } else { diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java index 27b786511e..b839e0abe6 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java @@ -754,12 +754,20 @@ public class LastImperialTomb extends AbstractInstance else if (CommonUtil.contains(DEMONS, npc.getId())) { final List demons = world.getParameters().getList("demons", Npc.class); - demons.remove(npc); + if (demons != null) + { + demons.remove(npc); + world.setParameter("demons", demons); + } } else if (CommonUtil.contains(PORTRAITS, npc.getId())) { final Map portraits = world.getParameters().getMap("portraits", Npc.class, Integer.class); - portraits.remove(npc); + if (portraits != null) + { + portraits.remove(npc); + world.setParameter("portraits", portraits); + } } else { diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java index 3f471abcfc..6140589ccd 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java @@ -754,12 +754,20 @@ public class LastImperialTomb extends AbstractInstance else if (CommonUtil.contains(DEMONS, npc.getId())) { final List demons = world.getParameters().getList("demons", Npc.class); - demons.remove(npc); + if (demons != null) + { + demons.remove(npc); + world.setParameter("demons", demons); + } } else if (CommonUtil.contains(PORTRAITS, npc.getId())) { final Map portraits = world.getParameters().getMap("portraits", Npc.class, Integer.class); - portraits.remove(npc); + if (portraits != null) + { + portraits.remove(npc); + world.setParameter("portraits", portraits); + } } else { diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java index 3f471abcfc..6140589ccd 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java @@ -754,12 +754,20 @@ public class LastImperialTomb extends AbstractInstance else if (CommonUtil.contains(DEMONS, npc.getId())) { final List demons = world.getParameters().getList("demons", Npc.class); - demons.remove(npc); + if (demons != null) + { + demons.remove(npc); + world.setParameter("demons", demons); + } } else if (CommonUtil.contains(PORTRAITS, npc.getId())) { final Map portraits = world.getParameters().getMap("portraits", Npc.class, Integer.class); - portraits.remove(npc); + if (portraits != null) + { + portraits.remove(npc); + world.setParameter("portraits", portraits); + } } else { diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java index 27b786511e..b839e0abe6 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java @@ -754,12 +754,20 @@ public class LastImperialTomb extends AbstractInstance else if (CommonUtil.contains(DEMONS, npc.getId())) { final List demons = world.getParameters().getList("demons", Npc.class); - demons.remove(npc); + if (demons != null) + { + demons.remove(npc); + world.setParameter("demons", demons); + } } else if (CommonUtil.contains(PORTRAITS, npc.getId())) { final Map portraits = world.getParameters().getMap("portraits", Npc.class, Integer.class); - portraits.remove(npc); + if (portraits != null) + { + portraits.remove(npc); + world.setParameter("portraits", portraits); + } } else { diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/instances/LastImperialTomb/LastImperialTomb.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/instances/LastImperialTomb/LastImperialTomb.java index b026817b8e..45f5b4d477 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/instances/LastImperialTomb/LastImperialTomb.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/instances/LastImperialTomb/LastImperialTomb.java @@ -756,12 +756,20 @@ public class LastImperialTomb extends AbstractInstance else if (CommonUtil.contains(DEMONS, npc.getId())) { final List demons = world.getParameters().getList("demons", Npc.class); - demons.remove(npc); + if (demons != null) + { + demons.remove(npc); + world.setParameter("demons", demons); + } } else if (CommonUtil.contains(PORTRAITS, npc.getId())) { final Map portraits = world.getParameters().getMap("portraits", Npc.class, Integer.class); - portraits.remove(npc); + if (portraits != null) + { + portraits.remove(npc); + world.setParameter("portraits", portraits); + } } else { diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/instances/LastImperialTomb/LastImperialTomb.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/instances/LastImperialTomb/LastImperialTomb.java index b026817b8e..45f5b4d477 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/instances/LastImperialTomb/LastImperialTomb.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/instances/LastImperialTomb/LastImperialTomb.java @@ -756,12 +756,20 @@ public class LastImperialTomb extends AbstractInstance else if (CommonUtil.contains(DEMONS, npc.getId())) { final List demons = world.getParameters().getList("demons", Npc.class); - demons.remove(npc); + if (demons != null) + { + demons.remove(npc); + world.setParameter("demons", demons); + } } else if (CommonUtil.contains(PORTRAITS, npc.getId())) { final Map portraits = world.getParameters().getMap("portraits", Npc.class, Integer.class); - portraits.remove(npc); + if (portraits != null) + { + portraits.remove(npc); + world.setParameter("portraits", portraits); + } } else { diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java index 27b786511e..b839e0abe6 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java @@ -754,12 +754,20 @@ public class LastImperialTomb extends AbstractInstance else if (CommonUtil.contains(DEMONS, npc.getId())) { final List demons = world.getParameters().getList("demons", Npc.class); - demons.remove(npc); + if (demons != null) + { + demons.remove(npc); + world.setParameter("demons", demons); + } } else if (CommonUtil.contains(PORTRAITS, npc.getId())) { final Map portraits = world.getParameters().getMap("portraits", Npc.class, Integer.class); - portraits.remove(npc); + if (portraits != null) + { + portraits.remove(npc); + world.setParameter("portraits", portraits); + } } else {