Increased spawn z values by a fixed value (64) to fix spawn zone issues.
This commit is contained in:
@@ -408,7 +408,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -408,7 +408,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -408,7 +408,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -408,7 +408,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -408,7 +408,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -408,7 +408,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -408,7 +408,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -408,7 +408,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -408,7 +408,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -408,7 +408,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -445,7 +445,7 @@ public class Spawn
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -445,7 +445,7 @@ public class Spawn
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -402,7 +402,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -402,7 +402,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -408,7 +408,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -408,7 +408,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -408,7 +408,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -408,7 +408,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -408,7 +408,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -408,7 +408,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -408,7 +408,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -408,7 +408,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
@@ -408,7 +408,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (npc.isMonster() && !npc.isFlying())
|
if (npc.isMonster() && !npc.isFlying())
|
||||||
{
|
{
|
||||||
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz) + 64;
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user