Static spawns should not have random heading.

This commit is contained in:
MobiusDevelopment 2022-09-15 23:23:01 +00:00
parent 08f69599a9
commit ad8a96d8d7
48 changed files with 96 additions and 72 deletions

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}

View File

@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
newlocy = loc.getY();
newlocz = loc.getZ();
setLocation(loc);
setHeading(-1);
}
else if ((getX() == 0) && (getY() == 0))
{

View File

@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
return loc;
}
}
LOGGER.warning("Couldn't match location by chance turning first..");
LOGGER.warning("Couldn't match location by chance turning first...");
return null;
}
else if (_zone != null)
{
final Location loc = _zone.getRandomPoint();
loc.setHeading(Rnd.get(65535));
loc.setHeading(-1);
return loc;
}
else if (!_group.getTerritories().isEmpty())
@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}
@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
final Location loc = territory.getRandomPoint();
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
{
loc.setHeading(-1);
return loc;
}
}