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
@@ -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
@@ -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
@@ -87,7 +87,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
@@ -152,16 +151,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;
@@ -1749,7 +1738,6 @@ public class Attackable extends Npc
if (hasAI() && (getSpawn() != null))
{
setReturningToSpawnPoint(true);
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, getSpawn().getLocation());
}
}
@@ -100,7 +100,6 @@ public class Defender extends Attackable
}
if (!isInsideRadius2D(getSpawn(), 40))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -96,7 +96,6 @@ public class FortCommander extends Defender
{
if (!isInsideRadius2D(getSpawn(), 200))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -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
@@ -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
@@ -86,7 +86,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
@@ -148,16 +147,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;
@@ -1695,7 +1684,6 @@ public class Attackable extends Npc
if (hasAI() && (getSpawn() != null))
{
setReturningToSpawnPoint(true);
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, getSpawn().getLocation());
}
}
@@ -100,7 +100,6 @@ public class Defender extends Attackable
}
if (!isInsideRadius2D(getSpawn(), 40))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -96,7 +96,6 @@ public class FortCommander extends Defender
{
if (!isInsideRadius2D(getSpawn(), 200))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -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
@@ -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
@@ -86,7 +86,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
@@ -148,16 +147,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;
@@ -1695,7 +1684,6 @@ public class Attackable extends Npc
if (hasAI() && (getSpawn() != null))
{
setReturningToSpawnPoint(true);
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, getSpawn().getLocation());
}
}
@@ -100,7 +100,6 @@ public class Defender extends Attackable
}
if (!isInsideRadius2D(getSpawn(), 40))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -96,7 +96,6 @@ public class FortCommander extends Defender
{
if (!isInsideRadius2D(getSpawn(), 200))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -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
@@ -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
@@ -86,7 +86,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
@@ -148,16 +147,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;
@@ -1695,7 +1684,6 @@ public class Attackable extends Npc
if (hasAI() && (getSpawn() != null))
{
setReturningToSpawnPoint(true);
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, getSpawn().getLocation());
}
}
@@ -100,7 +100,6 @@ public class Defender extends Attackable
}
if (!isInsideRadius2D(getSpawn(), 40))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -96,7 +96,6 @@ public class FortCommander extends Defender
{
if (!isInsideRadius2D(getSpawn(), 200))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -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
@@ -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
@@ -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;
@@ -1683,7 +1672,6 @@ public class Attackable extends Npc
if (hasAI() && (getSpawn() != null))
{
setReturningToSpawnPoint(true);
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, getSpawn().getLocation());
}
}
@@ -100,7 +100,6 @@ public class Defender extends Attackable
}
if (!isInsideRadius2D(getSpawn(), 40))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -96,7 +96,6 @@ public class FortCommander extends Defender
{
if (!isInsideRadius2D(getSpawn(), 200))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -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
@@ -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
@@ -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;
@@ -1683,7 +1672,6 @@ public class Attackable extends Npc
if (hasAI() && (getSpawn() != null))
{
setReturningToSpawnPoint(true);
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, getSpawn().getLocation());
}
}
@@ -100,7 +100,6 @@ public class Defender extends Attackable
}
if (!isInsideRadius2D(getSpawn(), 40))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -96,7 +96,6 @@ public class FortCommander extends Defender
{
if (!isInsideRadius2D(getSpawn(), 200))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -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
@@ -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
@@ -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;
@@ -1683,7 +1672,6 @@ public class Attackable extends Npc
if (hasAI() && (getSpawn() != null))
{
setReturningToSpawnPoint(true);
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, getSpawn().getLocation());
}
}
@@ -100,7 +100,6 @@ public class Defender extends Attackable
}
if (!isInsideRadius2D(getSpawn(), 40))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -96,7 +96,6 @@ public class FortCommander extends Defender
{
if (!isInsideRadius2D(getSpawn(), 200))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -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
@@ -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
@@ -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());
}
}
@@ -100,7 +100,6 @@ public class Defender extends Attackable
}
if (!isInsideRadius2D(getSpawn(), 40))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -96,7 +96,6 @@ public class FortCommander extends Defender
{
if (!isInsideRadius2D(getSpawn(), 200))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -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
@@ -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
@@ -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());
}
}
@@ -100,7 +100,6 @@ public class Defender extends Attackable
}
if (!isInsideRadius2D(getSpawn(), 40))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -96,7 +96,6 @@ public class FortCommander extends Defender
{
if (!isInsideRadius2D(getSpawn(), 200))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -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
@@ -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
@@ -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());
}
}
@@ -100,7 +100,6 @@ public class Defender extends Attackable
}
if (!isInsideRadius2D(getSpawn(), 40))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -96,7 +96,6 @@ public class FortCommander extends Defender
{
if (!isInsideRadius2D(getSpawn(), 200))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -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
@@ -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
@@ -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());
}
}
@@ -100,7 +100,6 @@ public class Defender extends Attackable
}
if (!isInsideRadius2D(getSpawn(), 40))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -96,7 +96,6 @@ public class FortCommander extends Defender
{
if (!isInsideRadius2D(getSpawn(), 200))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -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())
@@ -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
@@ -252,18 +252,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()
@@ -3047,7 +3035,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())
@@ -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
@@ -685,10 +685,6 @@ public class CreatureAI extends AbstractAI
return;
}
if (_actor.isAttackable())
{
((Attackable) _actor).setReturningToSpawnPoint(false);
}
clientStoppedMoving();
if (_actor.isNpc())
@@ -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());
}
}
@@ -106,7 +106,6 @@ public class Defender extends Attackable
}
if (!isInsideRadius2D(getSpawn(), 40))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -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
@@ -687,10 +687,6 @@ public class CreatureAI extends AbstractAI
return;
}
if (_actor.isAttackable())
{
((Attackable) _actor).setReturningToSpawnPoint(false);
}
clientStoppedMoving();
if (_actor.isNpc())
@@ -82,7 +82,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
@@ -143,16 +142,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;
@@ -1692,7 +1681,6 @@ public class Attackable extends Npc
if (hasAI() && (getSpawn() != null))
{
setReturningToSpawnPoint(true);
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, getSpawn().getLocation());
}
}
@@ -115,7 +115,6 @@ public class Defender extends Attackable
}
if (!isInsideRadius2D(getSpawn(), 40))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -104,7 +104,6 @@ public class FortCommander extends Defender
{
if (!isInsideRadius2D(getSpawn(), 200))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -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
@@ -687,10 +687,6 @@ public class CreatureAI extends AbstractAI
return;
}
if (_actor.isAttackable())
{
((Attackable) _actor).setReturningToSpawnPoint(false);
}
clientStoppedMoving();
if (_actor.isNpc())
@@ -82,7 +82,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
@@ -143,16 +142,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;
@@ -1692,7 +1681,6 @@ public class Attackable extends Npc
if (hasAI() && (getSpawn() != null))
{
setReturningToSpawnPoint(true);
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, getSpawn().getLocation());
}
}
@@ -115,7 +115,6 @@ public class Defender extends Attackable
}
if (!isInsideRadius2D(getSpawn(), 40))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -104,7 +104,6 @@ public class FortCommander extends Defender
{
if (!isInsideRadius2D(getSpawn(), 200))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -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
@@ -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
@@ -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;
@@ -1673,7 +1662,6 @@ public class Attackable extends Npc
if (hasAI() && (getSpawn() != null))
{
setReturningToSpawnPoint(true);
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, getSpawn().getLocation());
}
}
@@ -100,7 +100,6 @@ public class Defender extends Attackable
}
if (!isInsideRadius2D(getSpawn(), 40))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -96,7 +96,6 @@ public class FortCommander extends Defender
{
if (!isInsideRadius2D(getSpawn(), 200))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -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
@@ -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
@@ -86,7 +86,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
@@ -148,16 +147,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;
@@ -1687,7 +1676,6 @@ public class Attackable extends Npc
if (hasAI() && (getSpawn() != null))
{
setReturningToSpawnPoint(true);
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, getSpawn().getLocation());
}
}
@@ -100,7 +100,6 @@ public class Defender extends Attackable
}
if (!isInsideRadius2D(getSpawn(), 40))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -96,7 +96,6 @@ public class FortCommander extends Defender
{
if (!isInsideRadius2D(getSpawn(), 200))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -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
@@ -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
@@ -86,7 +86,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
@@ -148,16 +147,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;
@@ -1687,7 +1676,6 @@ public class Attackable extends Npc
if (hasAI() && (getSpawn() != null))
{
setReturningToSpawnPoint(true);
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, getSpawn().getLocation());
}
}
@@ -100,7 +100,6 @@ public class Defender extends Attackable
}
if (!isInsideRadius2D(getSpawn(), 40))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -96,7 +96,6 @@ public class FortCommander extends Defender
{
if (!isInsideRadius2D(getSpawn(), 200))
{
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())

Some files were not shown because too many files have changed in this diff Show More