From 2137c08bbe2cf245536f2dbf66ee0e46a02bd13c Mon Sep 17 00:00:00 2001 From: Cekis Date: Thu, 19 Jan 2017 15:35:45 +0000 Subject: [PATCH] Fixed issue with non-conversable creature from NPC lair throwing an exception because their location could not be identified (they were probably dead or despawned). --- .../compiled/game/script/systems/npc_lair/npc_lair_ai.java | 6 ++++++ 1 file changed, 6 insertions(+) mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/systems/npc_lair/npc_lair_ai.java diff --git a/sku.0/sys.server/compiled/game/script/systems/npc_lair/npc_lair_ai.java b/sku.0/sys.server/compiled/game/script/systems/npc_lair/npc_lair_ai.java old mode 100644 new mode 100755 index 1220f2c38..ab4553552 --- a/sku.0/sys.server/compiled/game/script/systems/npc_lair/npc_lair_ai.java +++ b/sku.0/sys.server/compiled/game/script/systems/npc_lair/npc_lair_ai.java @@ -735,6 +735,9 @@ public class npc_lair_ai extends script.theme_park.poi.base } public int handleRequestToConverse(obj_id self, dictionary params) throws InterruptedException { + if(!isValidId(self) || isIncapacitated(self) || isDead(self) || !exists(self)){ + return SCRIPT_CONTINUE; + } obj_id partner = params.getObjId("converseWith"); if (!isIdValid(partner) || !exists(partner)) { @@ -744,6 +747,9 @@ public class npc_lair_ai extends script.theme_park.poi.base utils.setScriptVar(self, "npc_lair.pathingToConverse", true); location destLoc = new location(getLocation(partner)); location myLoc = getLocation(self); + if(myLoc == null || !isValidLocation(myLoc, 1f)){ + return SCRIPT_CONTINUE; + } if (myLoc.x < destLoc.x) { destLoc.x -= 1;