Fixed Fear issues.
This commit is contained in:
parent
ccf50bece2
commit
42dbc62f68
@ -88,10 +88,13 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
final int fearTimeLeft = _ai.getFearTime() - FEAR_TICKS;
|
||||
_ai.setFearTime(fearTimeLeft);
|
||||
_ai.onEvtAfraid(_effector, _start);
|
||||
_start = false;
|
||||
if (_effector != null)
|
||||
{
|
||||
final int fearTimeLeft = _ai.getFearTime() - FEAR_TICKS;
|
||||
_ai.setFearTime(fearTimeLeft);
|
||||
_ai.onEvtAfraid(_effector, _start);
|
||||
_start = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user