Geodata Z correction for monsters only.
This commit is contained in:
@@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not correct z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (!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);
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
|
@@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not correct z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (!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);
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
|
@@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not correct z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (!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);
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
|
@@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not correct z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (!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);
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
|
@@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not correct z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (!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);
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
|
@@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not correct z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (!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);
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
|
@@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not correct z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (!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);
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
|
@@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not correct z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (!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);
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
|
@@ -378,7 +378,6 @@ public class Spawn
|
|||||||
if (_template.getType().equalsIgnoreCase("Pet") || _template.getType().equalsIgnoreCase("Minion"))
|
if (_template.getType().equalsIgnoreCase("Pet") || _template.getType().equalsIgnoreCase("Minion"))
|
||||||
{
|
{
|
||||||
_currentCount++;
|
_currentCount++;
|
||||||
|
|
||||||
return npc;
|
return npc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -412,10 +411,6 @@ public class Spawn
|
|||||||
return npc;
|
return npc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param npc
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private NpcInstance initializeNpcInstance(NpcInstance npc)
|
private NpcInstance initializeNpcInstance(NpcInstance npc)
|
||||||
{
|
{
|
||||||
int newlocx;
|
int newlocx;
|
||||||
@@ -446,8 +441,8 @@ public class Spawn
|
|||||||
newlocz = _locZ;
|
newlocz = _locZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not correct z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (!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);
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
|
@@ -398,8 +398,8 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not correct z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (!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);
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
|
@@ -398,8 +398,8 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not correct z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (!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);
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
|
@@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not correct z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (!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);
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
|
@@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not correct z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (!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);
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
|
@@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not correct z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (!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);
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
|
@@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not correct z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (!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);
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
|
@@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not correct z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (!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);
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
|
@@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not correct z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (!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);
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
|
@@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not correct z of flying NPCs.
|
// Correct Z of monsters. Do not correct Z of flying NPCs.
|
||||||
if (!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);
|
||||||
// Do not correct Z distances greater than 300.
|
// Do not correct Z distances greater than 300.
|
||||||
|
Reference in New Issue
Block a user