Removal of unused isReturningToSpawnPoint.
This commit is contained in:
@ -566,15 +566,10 @@ public class AttackableAI extends CreatureAI
|
||||
final double distance2 = _actor.calculateDistanceSq2D(x1, y1, z1);
|
||||
if (distance2 > (Config.MAX_DRIFT_RANGE * Config.MAX_DRIFT_RANGE))
|
||||
{
|
||||
npc.setReturningToSpawnPoint(true);
|
||||
final double delay = Math.sqrt(distance2) / Config.MAX_DRIFT_RANGE;
|
||||
x1 = _actor.getX() + (int) ((x1 - _actor.getX()) / delay);
|
||||
y1 = _actor.getY() + (int) ((y1 - _actor.getY()) / delay);
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setReturningToSpawnPoint(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -609,7 +604,7 @@ public class AttackableAI extends CreatureAI
|
||||
if (Config.AGGRO_DISTANCE_CHECK_ENABLED && _actor.isMonster() && !(_actor instanceof NpcWalker) && !(_actor instanceof GrandBoss))
|
||||
{
|
||||
final Spawn spawn = ((Npc) _actor).getSpawn();
|
||||
if ((spawn != null) && !_actor.isInsideRadius3D(spawn.getX(), spawn.getY(), spawn.getZ(), (_actor.isRaid() ? Config.AGGRO_DISTANCE_CHECK_RAID_RANGE : Config.AGGRO_DISTANCE_CHECK_RANGE)))
|
||||
if ((spawn != null) && !_actor.isInsideRadius2D(spawn.getX(), spawn.getY(), spawn.getZ(), (_actor.isRaid() ? Config.AGGRO_DISTANCE_CHECK_RAID_RANGE : Config.AGGRO_DISTANCE_CHECK_RANGE)))
|
||||
{
|
||||
if ((Config.AGGRO_DISTANCE_CHECK_RAIDS || !_actor.isRaid()) && (Config.AGGRO_DISTANCE_CHECK_INSTANCES || (_actor.getInstanceId() == 0)))
|
||||
{
|
||||
|
@ -31,7 +31,6 @@ import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
@ -742,10 +741,6 @@ public class CreatureAI extends AbstractAI
|
||||
return;
|
||||
}
|
||||
|
||||
if (_actor.isNpc() && _actor.isAttackable())
|
||||
{
|
||||
((Attackable) _actor).setReturningToSpawnPoint(false);
|
||||
}
|
||||
clientStoppedMoving();
|
||||
|
||||
// If the Intention was AI_INTENTION_MOVE_TO, set the Intention to AI_INTENTION_ACTIVE
|
||||
|
@ -160,7 +160,6 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
public void changeIntention(CtrlIntention newIntention, Object arg0, Object arg1)
|
||||
{
|
||||
CtrlIntention intention = newIntention;
|
||||
((Attackable) _actor).setReturningToSpawnPoint(false);
|
||||
if (intention == AI_INTENTION_IDLE /* || intention == AI_INTENTION_ACTIVE */) // active becomes idle if only a summon is present
|
||||
{
|
||||
// Check if actor is not dead
|
||||
|
@ -251,18 +251,6 @@ public class Attackable extends Npc
|
||||
return _aggroList;
|
||||
}
|
||||
|
||||
private boolean _isReturningToSpawnPoint = false;
|
||||
|
||||
public boolean isReturningToSpawnPoint()
|
||||
{
|
||||
return _isReturningToSpawnPoint;
|
||||
}
|
||||
|
||||
public void setReturningToSpawnPoint(boolean value)
|
||||
{
|
||||
_isReturningToSpawnPoint = value;
|
||||
}
|
||||
|
||||
private boolean _canReturnToSpawnPoint = true;
|
||||
|
||||
public boolean canReturnToSpawnPoint()
|
||||
@ -2695,7 +2683,6 @@ public class Attackable extends Npc
|
||||
|
||||
if (hasAI() && (getSpawn() != null))
|
||||
{
|
||||
setReturningToSpawnPoint(true);
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(getSpawn().getX(), getSpawn().getY(), getSpawn().getZ()));
|
||||
}
|
||||
}
|
||||
|
@ -115,7 +115,6 @@ public class Commander extends Attackable
|
||||
{
|
||||
if (!isInsideRadius2D(_homeX, _homeY, _homeZ, 40))
|
||||
{
|
||||
setReturningToSpawnPoint(true);
|
||||
clearAggroList();
|
||||
|
||||
if (hasAI())
|
||||
|
@ -110,7 +110,6 @@ public class FortSiegeGuard extends Attackable
|
||||
|
||||
if (!isInsideRadius2D(getSpawn().getX(), getSpawn().getY(), getSpawn().getZ(), 40))
|
||||
{
|
||||
setReturningToSpawnPoint(true);
|
||||
clearAggroList();
|
||||
|
||||
if (hasAI())
|
||||
|
@ -124,7 +124,6 @@ public class Guard extends Attackable
|
||||
if (!isInsideRadius2D(_homeX, _homeY, _homeZ, 150))
|
||||
{
|
||||
clearAggroList();
|
||||
setReturningToSpawnPoint(true);
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(_homeX, _homeY, _homeZ, 0));
|
||||
}
|
||||
}
|
||||
|
@ -114,7 +114,6 @@ public class SiegeGuard extends Attackable
|
||||
{
|
||||
if (!isInsideRadius2D(_homeX, _homeY, _homeZ, 40))
|
||||
{
|
||||
setReturningToSpawnPoint(true);
|
||||
clearAggroList();
|
||||
|
||||
if (hasAI())
|
||||
|
Reference in New Issue
Block a user