Fixed Fear issues.

This commit is contained in:
MobiusDev 2017-09-14 22:47:17 +00:00
parent ccf50bece2
commit 42dbc62f68
2 changed files with 8 additions and 5 deletions

View File

@ -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;
}
}
}

View File

@ -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)