forked from MagicBane/Server
system enabled
This commit is contained in:
@@ -287,10 +287,10 @@ public class MobAI {
|
||||
|
||||
if (mob.agentType.equals(Enum.AIAgentType.GUARDMINION)) {
|
||||
Mob captain = (Mob) mob.guardCaptain;
|
||||
mob.destination = captain.destination.add(Formation.getOffset(2, mob.guardCaptain.minions.indexOf(mob.getObjectUUID()) + 3));
|
||||
mob.setDestination(captain.destination.add(Formation.getOffset(2, mob.guardCaptain.minions.indexOf(mob.getObjectUUID()) + 3)));
|
||||
mob.lastPatrolPointIndex = captain.lastPatrolPointIndex;
|
||||
} else {
|
||||
mob.destination = mob.patrolPoints.get(mob.lastPatrolPointIndex);
|
||||
mob.setDestination(mob.patrolPoints.get(mob.lastPatrolPointIndex));
|
||||
mob.lastPatrolPointIndex += 1;
|
||||
}
|
||||
|
||||
@@ -748,7 +748,7 @@ public class MobAI {
|
||||
if (CombatUtilities.inRange2D(mob, mob.guardCaptain, 6))
|
||||
return;
|
||||
|
||||
mob.destination = mob.guardCaptain.getLoc();
|
||||
mob.setDestination(mob.guardCaptain.getLoc());
|
||||
MovementUtilities.moveToLocation(mob, mob.destination, 5, false);
|
||||
} else
|
||||
chaseTarget(mob);
|
||||
@@ -904,7 +904,7 @@ public class MobAI {
|
||||
|
||||
if (CombatUtilities.inRange2D(mob, mob.getCombatTarget(), mob.getRange()) == false) {
|
||||
if (mob.getRange() > 15) {
|
||||
mob.destination = mob.getCombatTarget().getLoc();
|
||||
mob.setDestination(mob.getCombatTarget().getLoc());
|
||||
MovementUtilities.moveToLocation(mob, mob.destination, 0, false);
|
||||
} else {
|
||||
|
||||
@@ -913,11 +913,11 @@ public class MobAI {
|
||||
switch (mob.getCombatTarget().getObjectType()) {
|
||||
case PlayerCharacter:
|
||||
case Mob:
|
||||
mob.destination = MovementUtilities.GetDestinationToCharacter(mob, (AbstractCharacter) mob.getCombatTarget());
|
||||
mob.setDestination(MovementUtilities.GetDestinationToCharacter(mob, (AbstractCharacter) mob.getCombatTarget()));
|
||||
MovementUtilities.moveToLocation(mob, mob.destination, mob.getRange() + 1, false);
|
||||
break;
|
||||
case Building:
|
||||
mob.destination = mob.getCombatTarget().getLoc();
|
||||
mob.setDestination(mob.getCombatTarget().getLoc());
|
||||
MovementUtilities.moveToLocation(mob, mob.getCombatTarget().getLoc(), 0, false);
|
||||
break;
|
||||
}
|
||||
@@ -1240,7 +1240,7 @@ public class MobAI {
|
||||
float xPoint = ThreadLocalRandom.current().nextInt(400) - 200;
|
||||
float zPoint = ThreadLocalRandom.current().nextInt(400) - 200;
|
||||
Vector3fImmutable TreePos = mob.getGuild().getOwnedCity().getLoc();
|
||||
mob.destination = new Vector3fImmutable(TreePos.x + xPoint, TreePos.y, TreePos.z + zPoint);
|
||||
mob.setDestination(new Vector3fImmutable(TreePos.x + xPoint, TreePos.y, TreePos.z + zPoint));
|
||||
|
||||
MovementUtilities.aiMove(mob, mob.destination, true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user