Removal of unused isReturningToSpawnPoint.

This commit is contained in:
MobiusDevelopment
2022-09-06 10:23:21 +00:00
parent bd684746ba
commit fc918dba65
150 changed files with 29 additions and 702 deletions

View File

@@ -691,11 +691,7 @@ public class AttackableAI extends CreatureAI
int x1 = npc.getSpawn().getX();
int y1 = npc.getSpawn().getY();
int z1 = npc.getSpawn().getZ();
if (!npc.isInsideRadius2D(x1, y1, 0, Config.MAX_DRIFT_RANGE))
{
npc.setReturningToSpawnPoint(true);
}
else
if (npc.isInsideRadius2D(x1, y1, 0, Config.MAX_DRIFT_RANGE))
{
final int deltaX = Rnd.get(Config.MAX_DRIFT_RANGE * 2); // x
int deltaY = Rnd.get(deltaX, Config.MAX_DRIFT_RANGE * 2); // distance

View File

@@ -685,10 +685,6 @@ public class CreatureAI extends AbstractAI
return;
}
if (_actor.isAttackable())
{
((Attackable) _actor).setReturningToSpawnPoint(false);
}
clientStoppedMoving();
if (_actor.isNpc())

View File

@@ -81,7 +81,6 @@ public class Attackable extends Npc
//
private boolean _champion = false;
private final Map<Creature, AggroInfo> _aggroList = new ConcurrentHashMap<>();
private boolean _isReturningToSpawnPoint = false;
private boolean _canReturnToSpawnPoint = true;
private boolean _seeThroughSilentMove = false;
// Manor
@@ -142,16 +141,6 @@ public class Attackable extends Npc
return _aggroList;
}
public boolean isReturningToSpawnPoint()
{
return _isReturningToSpawnPoint;
}
public void setReturningToSpawnPoint(boolean value)
{
_isReturningToSpawnPoint = value;
}
public boolean canReturnToSpawnPoint()
{
return _canReturnToSpawnPoint;
@@ -1691,7 +1680,6 @@ public class Attackable extends Npc
if (hasAI() && (getSpawn() != null))
{
setReturningToSpawnPoint(true);
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, getSpawn().getLocation());
}
}

View File

@@ -106,7 +106,6 @@ public class Defender extends Attackable
}
if (!isInsideRadius2D(getSpawn(), 40))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())