Fixed Fear issues.
This commit is contained in:
@@ -87,6 +87,8 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run()
|
public void run()
|
||||||
|
{
|
||||||
|
if (_effector != null)
|
||||||
{
|
{
|
||||||
final int fearTimeLeft = _ai.getFearTime() - FEAR_TICKS;
|
final int fearTimeLeft = _ai.getFearTime() - FEAR_TICKS;
|
||||||
_ai.setFearTime(fearTimeLeft);
|
_ai.setFearTime(fearTimeLeft);
|
||||||
@@ -94,6 +96,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
|||||||
_start = false;
|
_start = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected static final int FEAR_TICKS = 5;
|
protected static final int FEAR_TICKS = 5;
|
||||||
private static final int RANDOM_WALK_RATE = 30; // confirmed
|
private static final int RANDOM_WALK_RATE = 30; // confirmed
|
||||||
|
@@ -911,7 +911,7 @@ public class L2CharacterAI extends AbstractAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If pathfinding enabled the creature will go to the destination or it will go to the nearest obstacle.
|
// If pathfinding enabled the creature will go to the destination or it will go to the nearest obstacle.
|
||||||
setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, Config.PATHFINDING ? GeoEngine.getInstance().canMoveToTarget(_actor.getX(), _actor.getY(), _actor.getZ(), posX, posY, posZ, _actor.getInstanceId()) : new Location(posX, posY, posZ));
|
setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, Config.PATHFINDING ? GeoEngine.getInstance().canMoveToTargetLoc(_actor.getX(), _actor.getY(), _actor.getZ(), posX, posY, posZ, _actor.getInstanceId()) : new Location(posX, posY, posZ));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean maybeMoveToPosition(ILocational worldPosition, int offset)
|
protected boolean maybeMoveToPosition(ILocational worldPosition, int offset)
|
||||||
|
Reference in New Issue
Block a user