Code improvements.

This commit is contained in:
MobiusDev
2016-04-24 16:30:15 +00:00
parent 8bd51aba1c
commit 2dd14bef9b
860 changed files with 8865 additions and 17041 deletions

View File

@@ -111,11 +111,7 @@ public final class FighterAI implements Runnable
// Out of combat follow logic.
if (!_guard.isInCombat())
{
final int moveToLocX = _player.getLocation().getX() + Rnd.get((_followRange * -1), _followRange);
final int moveToLocY = _player.getLocation().getY() + Rnd.get((_followRange * -1), _followRange);
final int moveToLocZ = _player.getLocation().getZ();
final Location moveToLocation = new Location(moveToLocX, moveToLocY, moveToLocZ);
_guard.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, moveToLocation);
_guard.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, (new Location((_player.getLocation().getX() + Rnd.get((_followRange * -1), _followRange)), (_player.getLocation().getY() + Rnd.get((_followRange * -1), _followRange)), _player.getLocation().getZ())));
}
}
}

View File

@@ -119,11 +119,7 @@ public final class HealerAI implements Runnable
// Out of combat follow logic.
if (!_guard.isInCombat())
{
final int moveToLocX = _player.getLocation().getX() + Rnd.get((_followRange * -1), _followRange);
final int moveToLocY = _player.getLocation().getY() + Rnd.get((_followRange * -1), _followRange);
final int moveToLocZ = _player.getLocation().getZ();
final Location moveToLocation = new Location(moveToLocX, moveToLocY, moveToLocZ);
_guard.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, moveToLocation);
_guard.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, (new Location((_player.getLocation().getX() + Rnd.get((_followRange * -1), _followRange)), (_player.getLocation().getY() + Rnd.get((_followRange * -1), _followRange)), _player.getLocation().getZ())));
}
}
}