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

@@ -571,11 +571,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

@@ -37,7 +37,6 @@ import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.instancemanager.WalkingManager;
import org.l2jmobius.gameserver.model.Location;
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.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
@@ -684,10 +683,6 @@ public class CreatureAI extends AbstractAI
return;
}
if (getActor().isAttackable())
{
((Attackable) getActor()).setReturningToSpawnPoint(false);
}
clientStoppedMoving();
// If the Intention was AI_INTENTION_MOVE_TO, set the Intention to AI_INTENTION_ACTIVE

View File

@@ -85,7 +85,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
@@ -147,16 +146,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;
@@ -1694,7 +1683,6 @@ public class Attackable extends Npc
if (hasAI() && (getSpawn() != null))
{
setReturningToSpawnPoint(true);
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, getSpawn().getLocation());
}
}

View File

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

View File

@@ -96,7 +96,6 @@ public class FortCommander extends Defender
{
if (!isInsideRadius2D(getSpawn(), 200))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())