mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-10-01 17:12:57 -04:00
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).
This commit is contained in:
Regular → Executable
+6
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user