Sync with L2jServer HighFive May 4th 2015.
This commit is contained in:
@ -636,7 +636,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
}
|
||||
|
||||
// If NPC with random fixed coord, don't move (unless needs to return to spawnpoint)
|
||||
if ((TerritoryTable.getInstance().getProcMax(npc.getSpawn().getLocationId()) > 0) && !npc.isReturningToSpawnPoint())
|
||||
if (!npc.isReturningToSpawnPoint() && (TerritoryTable.getInstance().getProcMax(npc.getSpawn().getLocationId()) > 0))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -24,12 +24,14 @@ import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.GeoData;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.pathfinding.PathFinding;
|
||||
import com.l2jserver.util.Rnd;
|
||||
|
||||
public class L2SummonAI extends L2PlayableAI implements Runnable
|
||||
@ -48,6 +50,17 @@ public class L2SummonAI extends L2PlayableAI implements Runnable
|
||||
super(creature);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onIntentionAttack(L2Character target)
|
||||
{
|
||||
if ((Config.PATHFINDING > 0) && (PathFinding.getInstance().findPath(_actor.getX(), _actor.getY(), _actor.getZ(), target.getX(), target.getY(), target.getZ(), _actor.getInstanceId(), true) == null))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
super.onIntentionAttack(target);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onIntentionIdle()
|
||||
{
|
||||
|
Reference in New Issue
Block a user