Do not correct spawn Z distances greater than 300.

This commit is contained in:
MobiusDevelopment
2019-08-05 12:05:25 +00:00
parent 27b0431162
commit 8561293f86
15 changed files with 105 additions and 15 deletions

View File

@@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.interfaces.INamable;
import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate; import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
import org.l2jmobius.gameserver.model.zone.ZoneId; import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager; import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager;
import org.l2jmobius.gameserver.util.Util;
/** /**
* This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br> * This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br>
@@ -401,7 +402,12 @@ public class Spawn extends Location implements IIdentifiable, INamable
// Do not correct z of flying NPCs. // Do not correct z of flying NPCs.
if (!npc.isFlying()) if (!npc.isFlying())
{ {
newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
// Do not correct Z distances greater than 300.
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
{
newlocz = geoZ;
}
} }
// Set is not random walk default value // Set is not random walk default value

View File

@@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.interfaces.INamable;
import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate; import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
import org.l2jmobius.gameserver.model.zone.ZoneId; import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager; import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager;
import org.l2jmobius.gameserver.util.Util;
/** /**
* This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br> * This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br>
@@ -401,7 +402,12 @@ public class Spawn extends Location implements IIdentifiable, INamable
// Do not correct z of flying NPCs. // Do not correct z of flying NPCs.
if (!npc.isFlying()) if (!npc.isFlying())
{ {
newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
// Do not correct Z distances greater than 300.
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
{
newlocz = geoZ;
}
} }
// Set is not random walk default value // Set is not random walk default value

View File

@@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.interfaces.INamable;
import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate; import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
import org.l2jmobius.gameserver.model.zone.ZoneId; import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager; import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager;
import org.l2jmobius.gameserver.util.Util;
/** /**
* This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br> * This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br>
@@ -401,7 +402,12 @@ public class Spawn extends Location implements IIdentifiable, INamable
// Do not correct z of flying NPCs. // Do not correct z of flying NPCs.
if (!npc.isFlying()) if (!npc.isFlying())
{ {
newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
// Do not correct Z distances greater than 300.
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
{
newlocz = geoZ;
}
} }
// Set is not random walk default value // Set is not random walk default value

View File

@@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.interfaces.INamable;
import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate; import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
import org.l2jmobius.gameserver.model.zone.ZoneId; import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager; import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager;
import org.l2jmobius.gameserver.util.Util;
/** /**
* This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br> * This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br>
@@ -401,7 +402,12 @@ public class Spawn extends Location implements IIdentifiable, INamable
// Do not correct z of flying NPCs. // Do not correct z of flying NPCs.
if (!npc.isFlying()) if (!npc.isFlying())
{ {
newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
// Do not correct Z distances greater than 300.
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
{
newlocz = geoZ;
}
} }
// Set is not random walk default value // Set is not random walk default value

View File

@@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.interfaces.INamable;
import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate; import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
import org.l2jmobius.gameserver.model.zone.ZoneId; import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager; import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager;
import org.l2jmobius.gameserver.util.Util;
/** /**
* This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br> * This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br>
@@ -401,7 +402,12 @@ public class Spawn extends Location implements IIdentifiable, INamable
// Do not correct z of flying NPCs. // Do not correct z of flying NPCs.
if (!npc.isFlying()) if (!npc.isFlying())
{ {
newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
// Do not correct Z distances greater than 300.
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
{
newlocz = geoZ;
}
} }
// Set is not random walk default value // Set is not random walk default value

View File

@@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.interfaces.INamable;
import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate; import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
import org.l2jmobius.gameserver.model.zone.ZoneId; import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager; import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager;
import org.l2jmobius.gameserver.util.Util;
/** /**
* This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br> * This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br>
@@ -401,7 +402,12 @@ public class Spawn extends Location implements IIdentifiable, INamable
// Do not correct z of flying NPCs. // Do not correct z of flying NPCs.
if (!npc.isFlying()) if (!npc.isFlying())
{ {
newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
// Do not correct Z distances greater than 300.
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
{
newlocz = geoZ;
}
} }
// Set is not random walk default value // Set is not random walk default value

View File

@@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.interfaces.INamable;
import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate; import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
import org.l2jmobius.gameserver.model.zone.ZoneId; import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager; import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager;
import org.l2jmobius.gameserver.util.Util;
/** /**
* This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br> * This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br>
@@ -401,7 +402,12 @@ public class Spawn extends Location implements IIdentifiable, INamable
// Do not correct z of flying NPCs. // Do not correct z of flying NPCs.
if (!npc.isFlying()) if (!npc.isFlying())
{ {
newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
// Do not correct Z distances greater than 300.
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
{
newlocz = geoZ;
}
} }
// Set is not random walk default value // Set is not random walk default value

View File

@@ -30,6 +30,7 @@ import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager; import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager;
import org.l2jmobius.gameserver.templates.creatures.NpcTemplate; import org.l2jmobius.gameserver.templates.creatures.NpcTemplate;
import org.l2jmobius.gameserver.util.Util;
/** /**
* This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type. <B><U> Concept</U> :</B><BR> * This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type. <B><U> Concept</U> :</B><BR>
@@ -504,7 +505,12 @@ public class Spawn
// Do not correct z of flying NPCs. // Do not correct z of flying NPCs.
if (!npc.isFlying()) if (!npc.isFlying())
{ {
newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
// Do not correct Z distances greater than 300.
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true) < 300)
{
newlocz = geoZ;
}
} }
npc.stopAllEffects(); npc.stopAllEffects();

View File

@@ -38,6 +38,7 @@ import org.l2jmobius.gameserver.model.interfaces.INamable;
import org.l2jmobius.gameserver.model.zone.ZoneId; import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.model.zone.type.NpcSpawnTerritory; import org.l2jmobius.gameserver.model.zone.type.NpcSpawnTerritory;
import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager; import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager;
import org.l2jmobius.gameserver.util.Util;
/** /**
* This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br> * This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br>
@@ -395,7 +396,12 @@ public class Spawn extends Location implements IIdentifiable, INamable
// Do not correct z of flying NPCs. // Do not correct z of flying NPCs.
if (!npc.isFlying()) if (!npc.isFlying())
{ {
newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
// Do not correct Z distances greater than 300.
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
{
newlocz = geoZ;
}
} }
npc.stopAllEffects(); npc.stopAllEffects();

View File

@@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.interfaces.INamable;
import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate; import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
import org.l2jmobius.gameserver.model.zone.ZoneId; import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager; import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager;
import org.l2jmobius.gameserver.util.Util;
/** /**
* This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br> * This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br>
@@ -401,7 +402,12 @@ public class Spawn extends Location implements IIdentifiable, INamable
// Do not correct z of flying NPCs. // Do not correct z of flying NPCs.
if (!npc.isFlying()) if (!npc.isFlying())
{ {
newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
// Do not correct Z distances greater than 300.
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
{
newlocz = geoZ;
}
} }
// Set is not random walk default value // Set is not random walk default value

View File

@@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.interfaces.INamable;
import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate; import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
import org.l2jmobius.gameserver.model.zone.ZoneId; import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager; import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager;
import org.l2jmobius.gameserver.util.Util;
/** /**
* This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br> * This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br>
@@ -401,7 +402,12 @@ public class Spawn extends Location implements IIdentifiable, INamable
// Do not correct z of flying NPCs. // Do not correct z of flying NPCs.
if (!npc.isFlying()) if (!npc.isFlying())
{ {
newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
// Do not correct Z distances greater than 300.
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
{
newlocz = geoZ;
}
} }
// Set is not random walk default value // Set is not random walk default value

View File

@@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.interfaces.INamable;
import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate; import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
import org.l2jmobius.gameserver.model.zone.ZoneId; import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager; import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager;
import org.l2jmobius.gameserver.util.Util;
/** /**
* This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br> * This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br>
@@ -401,7 +402,12 @@ public class Spawn extends Location implements IIdentifiable, INamable
// Do not correct z of flying NPCs. // Do not correct z of flying NPCs.
if (!npc.isFlying()) if (!npc.isFlying())
{ {
newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
// Do not correct Z distances greater than 300.
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
{
newlocz = geoZ;
}
} }
// Set is not random walk default value // Set is not random walk default value

View File

@@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.interfaces.INamable;
import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate; import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
import org.l2jmobius.gameserver.model.zone.ZoneId; import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager; import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager;
import org.l2jmobius.gameserver.util.Util;
/** /**
* This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br> * This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br>
@@ -401,7 +402,12 @@ public class Spawn extends Location implements IIdentifiable, INamable
// Do not correct z of flying NPCs. // Do not correct z of flying NPCs.
if (!npc.isFlying()) if (!npc.isFlying())
{ {
newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
// Do not correct Z distances greater than 300.
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
{
newlocz = geoZ;
}
} }
// Set is not random walk default value // Set is not random walk default value

View File

@@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.interfaces.INamable;
import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate; import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
import org.l2jmobius.gameserver.model.zone.ZoneId; import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager; import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager;
import org.l2jmobius.gameserver.util.Util;
/** /**
* This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br> * This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br>
@@ -401,7 +402,12 @@ public class Spawn extends Location implements IIdentifiable, INamable
// Do not correct z of flying NPCs. // Do not correct z of flying NPCs.
if (!npc.isFlying()) if (!npc.isFlying())
{ {
newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
// Do not correct Z distances greater than 300.
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
{
newlocz = geoZ;
}
} }
// Set is not random walk default value // Set is not random walk default value

View File

@@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.interfaces.INamable;
import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate; import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
import org.l2jmobius.gameserver.model.zone.ZoneId; import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager; import org.l2jmobius.gameserver.taskmanager.RespawnTaskManager;
import org.l2jmobius.gameserver.util.Util;
/** /**
* This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br> * This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br>
@@ -401,7 +402,12 @@ public class Spawn extends Location implements IIdentifiable, INamable
// Do not correct z of flying NPCs. // Do not correct z of flying NPCs.
if (!npc.isFlying()) if (!npc.isFlying())
{ {
newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
// Do not correct Z distances greater than 300.
if (Util.calculateDistance(newlocx, newlocy, newlocz, newlocx, newlocy, geoZ, true, false) < 300)
{
newlocz = geoZ;
}
} }
// Set is not random walk default value // Set is not random walk default value