Attackables should be able to see and move to target.
This commit is contained in:
@@ -470,11 +470,12 @@ public abstract class AbstractAI implements Ctrl
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
if (!_actor.isMoving())
|
||||
{
|
||||
clientActionFailed();
|
||||
return;
|
||||
}
|
||||
// May result to make monsters stop moving.
|
||||
// if (!_actor.isMoving())
|
||||
// {
|
||||
// clientActionFailed();
|
||||
// return;
|
||||
// }
|
||||
|
||||
// Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
if (pawn.isCreature())
|
||||
|
@@ -685,6 +685,13 @@ public class AttackableAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Actor should be able to see target.
|
||||
if (!GeoEngine.getInstance().canSeeTarget(_actor, target))
|
||||
{
|
||||
moveTo(target);
|
||||
return;
|
||||
}
|
||||
|
||||
final int collision = npc.getTemplate().getCollisionRadius();
|
||||
|
||||
// Handle all WorldObject of its Faction inside the Faction Range
|
||||
|
Reference in New Issue
Block a user