mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-10-09 00:12:57 -04:00
Fixed issue caused from a lair NPC starting combat with itself.
This commit is contained in:
@@ -83,28 +83,25 @@ public class npc_lair_ai extends script.theme_park.poi.base
|
||||
switch (job)
|
||||
{
|
||||
case JOB_DEFEND:
|
||||
obj_id target = params.getObjId("target");
|
||||
respondToScoutAlarm(mobile, target);
|
||||
return;
|
||||
obj_id target = params.getObjId("target");
|
||||
respondToScoutAlarm(mobile, target);
|
||||
break;
|
||||
case JOB_HEAL:
|
||||
if (!ai_lib.isMonster(mobile))
|
||||
{
|
||||
return;
|
||||
}
|
||||
obj_id myTarget = getTarget(mobile);
|
||||
if (!isIdValid(myTarget))
|
||||
{
|
||||
doLairHealing(mobile, params);
|
||||
}
|
||||
else if (getTarget(myTarget) != mobile)
|
||||
{
|
||||
doLairHealing(mobile, params);
|
||||
}
|
||||
if (!ai_lib.isMonster(mobile))
|
||||
{
|
||||
return;
|
||||
}
|
||||
obj_id myTarget = getTarget(mobile);
|
||||
if (!isIdValid(myTarget) || getTarget(myTarget) != mobile)
|
||||
{
|
||||
doLairHealing(mobile, params);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
public void respondToScoutAlarm(obj_id mobile, obj_id target) throws InterruptedException
|
||||
{
|
||||
if (!isIdValid(target) || ai_lib.isAiDead(target))
|
||||
if (!isIdValid(target) || ai_lib.isAiDead(target) || mobile.equals(target))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user