Static spawns should not have random heading.
This commit is contained in:
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
newlocy = loc.getY();
|
newlocy = loc.getY();
|
||||||
newlocz = loc.getZ();
|
newlocz = loc.getZ();
|
||||||
setLocation(loc);
|
setLocation(loc);
|
||||||
setHeading(-1);
|
|
||||||
}
|
}
|
||||||
else if ((getX() == 0) && (getY() == 0))
|
else if ((getX() == 0) && (getY() == 0))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,13 +289,13 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.warning("Couldn't match location by chance turning first..");
|
LOGGER.warning("Couldn't match location by chance turning first...");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (_zone != null)
|
else if (_zone != null)
|
||||||
{
|
{
|
||||||
final Location loc = _zone.getRandomPoint();
|
final Location loc = _zone.getRandomPoint();
|
||||||
loc.setHeading(Rnd.get(65535));
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
else if (!_group.getTerritories().isEmpty())
|
else if (!_group.getTerritories().isEmpty())
|
||||||
@@ -306,6 +306,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_group.getBannedTerritories().isEmpty() || _group.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatSet>
|
|||||||
final Location loc = territory.getRandomPoint();
|
final Location loc = territory.getRandomPoint();
|
||||||
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
if (_spawnTemplate.getBannedTerritories().isEmpty() || _spawnTemplate.getBannedTerritories().stream().allMatch(bannedTerritory -> !bannedTerritory.isInsideZone(loc.getX(), loc.getY(), loc.getZ())))
|
||||||
{
|
{
|
||||||
|
loc.setHeading(-1);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user