Static spawns should not have random heading.
This commit is contained in:
parent
08f69599a9
commit
ad8a96d8d7
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user