From 178f692d474b9b41427fb0044b11ebf305047cc6 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Thu, 30 Jan 2020 12:16:02 +0000 Subject: [PATCH] Fixed Chamber of Prophecies grail NPE. --- .../instances/ChamberOfProphecies/ChamberOfProphecies.java | 5 +++-- .../instances/ChamberOfProphecies/ChamberOfProphecies.java | 5 +++-- .../instances/ChamberOfProphecies/ChamberOfProphecies.java | 5 +++-- .../instances/ChamberOfProphecies/ChamberOfProphecies.java | 5 +++-- .../instances/ChamberOfProphecies/ChamberOfProphecies.java | 5 +++-- .../instances/ChamberOfProphecies/ChamberOfProphecies.java | 5 +++-- .../instances/ChamberOfProphecies/ChamberOfProphecies.java | 5 +++-- .../instances/ChamberOfProphecies/ChamberOfProphecies.java | 5 +++-- 8 files changed, 24 insertions(+), 16 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java index e65aa7b7f3..abdbab1a4a 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java @@ -352,12 +352,13 @@ public class ChamberOfProphecies extends AbstractInstance world.openCloseDoor(DOOR_4, true); cancelQuestTimers("ATTACK2"); npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE, player); - startQuestTimer("CLOSE", 15000, world.getNpc(GRAIL), player); + startQuestTimer("CLOSE", 15000, null, player); break; } case "CLOSE": { - if (player.calculateDistance2D(world.getNpc(GRAIL)) < 390) + final Npc grail = world.getNpc(GRAIL); + if ((grail != null) && (player.calculateDistance2D(grail) < 390)) { world.openCloseDoor(DOOR_4, false); world.despawnGroup("q10753_16_instance_halter_1_1"); diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java index e65aa7b7f3..abdbab1a4a 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java @@ -352,12 +352,13 @@ public class ChamberOfProphecies extends AbstractInstance world.openCloseDoor(DOOR_4, true); cancelQuestTimers("ATTACK2"); npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE, player); - startQuestTimer("CLOSE", 15000, world.getNpc(GRAIL), player); + startQuestTimer("CLOSE", 15000, null, player); break; } case "CLOSE": { - if (player.calculateDistance2D(world.getNpc(GRAIL)) < 390) + final Npc grail = world.getNpc(GRAIL); + if ((grail != null) && (player.calculateDistance2D(grail) < 390)) { world.openCloseDoor(DOOR_4, false); world.despawnGroup("q10753_16_instance_halter_1_1"); diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java index e65aa7b7f3..abdbab1a4a 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java @@ -352,12 +352,13 @@ public class ChamberOfProphecies extends AbstractInstance world.openCloseDoor(DOOR_4, true); cancelQuestTimers("ATTACK2"); npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE, player); - startQuestTimer("CLOSE", 15000, world.getNpc(GRAIL), player); + startQuestTimer("CLOSE", 15000, null, player); break; } case "CLOSE": { - if (player.calculateDistance2D(world.getNpc(GRAIL)) < 390) + final Npc grail = world.getNpc(GRAIL); + if ((grail != null) && (player.calculateDistance2D(grail) < 390)) { world.openCloseDoor(DOOR_4, false); world.despawnGroup("q10753_16_instance_halter_1_1"); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java index e65aa7b7f3..abdbab1a4a 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java @@ -352,12 +352,13 @@ public class ChamberOfProphecies extends AbstractInstance world.openCloseDoor(DOOR_4, true); cancelQuestTimers("ATTACK2"); npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE, player); - startQuestTimer("CLOSE", 15000, world.getNpc(GRAIL), player); + startQuestTimer("CLOSE", 15000, null, player); break; } case "CLOSE": { - if (player.calculateDistance2D(world.getNpc(GRAIL)) < 390) + final Npc grail = world.getNpc(GRAIL); + if ((grail != null) && (player.calculateDistance2D(grail) < 390)) { world.openCloseDoor(DOOR_4, false); world.despawnGroup("q10753_16_instance_halter_1_1"); diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java index 21138389b7..268f7de700 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java @@ -352,12 +352,13 @@ public class ChamberOfProphecies extends AbstractInstance world.openCloseDoor(DOOR_4, true); cancelQuestTimers("ATTACK2"); npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE, player); - startQuestTimer("CLOSE", 15000, world.getNpc(GRAIL), player); + startQuestTimer("CLOSE", 15000, null, player); break; } case "CLOSE": { - if (player.calculateDistance2D(world.getNpc(GRAIL)) < 390) + final Npc grail = world.getNpc(GRAIL); + if ((grail != null) && (player.calculateDistance2D(grail) < 390)) { world.openCloseDoor(DOOR_4, false); world.despawnGroup("q10753_16_instance_halter_1_1"); diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java index e65aa7b7f3..abdbab1a4a 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java @@ -352,12 +352,13 @@ public class ChamberOfProphecies extends AbstractInstance world.openCloseDoor(DOOR_4, true); cancelQuestTimers("ATTACK2"); npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE, player); - startQuestTimer("CLOSE", 15000, world.getNpc(GRAIL), player); + startQuestTimer("CLOSE", 15000, null, player); break; } case "CLOSE": { - if (player.calculateDistance2D(world.getNpc(GRAIL)) < 390) + final Npc grail = world.getNpc(GRAIL); + if ((grail != null) && (player.calculateDistance2D(grail) < 390)) { world.openCloseDoor(DOOR_4, false); world.despawnGroup("q10753_16_instance_halter_1_1"); diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java index e65aa7b7f3..abdbab1a4a 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java @@ -352,12 +352,13 @@ public class ChamberOfProphecies extends AbstractInstance world.openCloseDoor(DOOR_4, true); cancelQuestTimers("ATTACK2"); npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE, player); - startQuestTimer("CLOSE", 15000, world.getNpc(GRAIL), player); + startQuestTimer("CLOSE", 15000, null, player); break; } case "CLOSE": { - if (player.calculateDistance2D(world.getNpc(GRAIL)) < 390) + final Npc grail = world.getNpc(GRAIL); + if ((grail != null) && (player.calculateDistance2D(grail) < 390)) { world.openCloseDoor(DOOR_4, false); world.despawnGroup("q10753_16_instance_halter_1_1"); diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java index 46b9eddceb..6b457269c7 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java @@ -352,12 +352,13 @@ public class ChamberOfProphecies extends AbstractInstance world.openCloseDoor(DOOR_4, true); cancelQuestTimers("ATTACK2"); npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE, player); - startQuestTimer("CLOSE", 15000, world.getNpc(GRAIL), player); + startQuestTimer("CLOSE", 15000, null, player); break; } case "CLOSE": { - if (player.calculateDistance2D(world.getNpc(GRAIL)) < 390) + final Npc grail = world.getNpc(GRAIL); + if ((grail != null) && (player.calculateDistance2D(grail) < 390)) { world.openCloseDoor(DOOR_4, false); world.despawnGroup("q10753_16_instance_halter_1_1");