From a7d1caa17e5350ed3d8ad57d8ce1505b371e27d6 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Mon, 11 May 2020 13:02:33 +0000 Subject: [PATCH] Geodata Z correction for monsters only. --- .../java/org/l2jmobius/gameserver/model/Spawn.java | 4 ++-- .../java/org/l2jmobius/gameserver/model/Spawn.java | 4 ++-- .../java/org/l2jmobius/gameserver/model/Spawn.java | 4 ++-- .../java/org/l2jmobius/gameserver/model/Spawn.java | 4 ++-- .../java/org/l2jmobius/gameserver/model/Spawn.java | 4 ++-- .../java/org/l2jmobius/gameserver/model/Spawn.java | 4 ++-- .../java/org/l2jmobius/gameserver/model/Spawn.java | 4 ++-- .../java/org/l2jmobius/gameserver/model/Spawn.java | 4 ++-- .../java/org/l2jmobius/gameserver/model/spawn/Spawn.java | 9 ++------- .../java/org/l2jmobius/gameserver/model/Spawn.java | 4 ++-- .../java/org/l2jmobius/gameserver/model/Spawn.java | 4 ++-- .../java/org/l2jmobius/gameserver/model/Spawn.java | 4 ++-- .../java/org/l2jmobius/gameserver/model/Spawn.java | 4 ++-- .../java/org/l2jmobius/gameserver/model/Spawn.java | 4 ++-- .../java/org/l2jmobius/gameserver/model/Spawn.java | 4 ++-- .../java/org/l2jmobius/gameserver/model/Spawn.java | 4 ++-- .../java/org/l2jmobius/gameserver/model/Spawn.java | 4 ++-- .../java/org/l2jmobius/gameserver/model/Spawn.java | 4 ++-- 18 files changed, 36 insertions(+), 41 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/Spawn.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/Spawn.java index 9f8d6a075f..283abf8747 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/Spawn.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/Spawn.java @@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable } } - // Do not correct z of flying NPCs. - if (!npc.isFlying()) + // Correct Z of monsters. Do not correct Z of flying NPCs. + if (npc.isMonster() && !npc.isFlying()) { final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); // Do not correct Z distances greater than 300. diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/Spawn.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/Spawn.java index 9f8d6a075f..283abf8747 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/Spawn.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/Spawn.java @@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable } } - // Do not correct z of flying NPCs. - if (!npc.isFlying()) + // Correct Z of monsters. Do not correct Z of flying NPCs. + if (npc.isMonster() && !npc.isFlying()) { final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); // Do not correct Z distances greater than 300. diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/Spawn.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/Spawn.java index 9f8d6a075f..283abf8747 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/Spawn.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/Spawn.java @@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable } } - // Do not correct z of flying NPCs. - if (!npc.isFlying()) + // Correct Z of monsters. Do not correct Z of flying NPCs. + if (npc.isMonster() && !npc.isFlying()) { final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); // Do not correct Z distances greater than 300. diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/Spawn.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/Spawn.java index 9f8d6a075f..283abf8747 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/Spawn.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/Spawn.java @@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable } } - // Do not correct z of flying NPCs. - if (!npc.isFlying()) + // Correct Z of monsters. Do not correct Z of flying NPCs. + if (npc.isMonster() && !npc.isFlying()) { final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); // Do not correct Z distances greater than 300. diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/Spawn.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/Spawn.java index 9f8d6a075f..283abf8747 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/Spawn.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/Spawn.java @@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable } } - // Do not correct z of flying NPCs. - if (!npc.isFlying()) + // Correct Z of monsters. Do not correct Z of flying NPCs. + if (npc.isMonster() && !npc.isFlying()) { final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); // Do not correct Z distances greater than 300. diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/Spawn.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/Spawn.java index 9f8d6a075f..283abf8747 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/Spawn.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/Spawn.java @@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable } } - // Do not correct z of flying NPCs. - if (!npc.isFlying()) + // Correct Z of monsters. Do not correct Z of flying NPCs. + if (npc.isMonster() && !npc.isFlying()) { final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); // Do not correct Z distances greater than 300. diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/Spawn.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/Spawn.java index 9f8d6a075f..283abf8747 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/Spawn.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/Spawn.java @@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable } } - // Do not correct z of flying NPCs. - if (!npc.isFlying()) + // Correct Z of monsters. Do not correct Z of flying NPCs. + if (npc.isMonster() && !npc.isFlying()) { final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); // Do not correct Z distances greater than 300. diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/Spawn.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/Spawn.java index 9f8d6a075f..283abf8747 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/Spawn.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/Spawn.java @@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable } } - // Do not correct z of flying NPCs. - if (!npc.isFlying()) + // Correct Z of monsters. Do not correct Z of flying NPCs. + if (npc.isMonster() && !npc.isFlying()) { final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); // Do not correct Z distances greater than 300. diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/spawn/Spawn.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/spawn/Spawn.java index d7a2aeca7e..561f51e011 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/spawn/Spawn.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/spawn/Spawn.java @@ -378,7 +378,6 @@ public class Spawn if (_template.getType().equalsIgnoreCase("Pet") || _template.getType().equalsIgnoreCase("Minion")) { _currentCount++; - return npc; } @@ -412,10 +411,6 @@ public class Spawn return npc; } - /** - * @param npc - * @return - */ private NpcInstance initializeNpcInstance(NpcInstance npc) { int newlocx; @@ -446,8 +441,8 @@ public class Spawn newlocz = _locZ; } - // Do not correct z of flying NPCs. - if (!npc.isFlying()) + // Correct Z of monsters. Do not correct Z of flying NPCs. + if (npc.isMonster() && !npc.isFlying()) { final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); // Do not correct Z distances greater than 300. diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/Spawn.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/Spawn.java index 3c13ccf7bf..3d2f8cf516 100644 --- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/Spawn.java +++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/Spawn.java @@ -398,8 +398,8 @@ public class Spawn extends Location implements IIdentifiable, INamable } } - // Do not correct z of flying NPCs. - if (!npc.isFlying()) + // Correct Z of monsters. Do not correct Z of flying NPCs. + if (npc.isMonster() && !npc.isFlying()) { final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); // Do not correct Z distances greater than 300. diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/Spawn.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/Spawn.java index 183c3ae482..b4a9300fb7 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/Spawn.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/Spawn.java @@ -398,8 +398,8 @@ public class Spawn extends Location implements IIdentifiable, INamable } } - // Do not correct z of flying NPCs. - if (!npc.isFlying()) + // Correct Z of monsters. Do not correct Z of flying NPCs. + if (npc.isMonster() && !npc.isFlying()) { final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); // Do not correct Z distances greater than 300. diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/Spawn.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/Spawn.java index 9f8d6a075f..283abf8747 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/Spawn.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/Spawn.java @@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable } } - // Do not correct z of flying NPCs. - if (!npc.isFlying()) + // Correct Z of monsters. Do not correct Z of flying NPCs. + if (npc.isMonster() && !npc.isFlying()) { final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); // Do not correct Z distances greater than 300. diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/Spawn.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/Spawn.java index 9f8d6a075f..283abf8747 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/Spawn.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/Spawn.java @@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable } } - // Do not correct z of flying NPCs. - if (!npc.isFlying()) + // Correct Z of monsters. Do not correct Z of flying NPCs. + if (npc.isMonster() && !npc.isFlying()) { final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); // Do not correct Z distances greater than 300. diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/Spawn.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/Spawn.java index 9f8d6a075f..283abf8747 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/Spawn.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/Spawn.java @@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable } } - // Do not correct z of flying NPCs. - if (!npc.isFlying()) + // Correct Z of monsters. Do not correct Z of flying NPCs. + if (npc.isMonster() && !npc.isFlying()) { final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); // Do not correct Z distances greater than 300. diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/Spawn.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/Spawn.java index 9f8d6a075f..283abf8747 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/Spawn.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/Spawn.java @@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable } } - // Do not correct z of flying NPCs. - if (!npc.isFlying()) + // Correct Z of monsters. Do not correct Z of flying NPCs. + if (npc.isMonster() && !npc.isFlying()) { final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); // Do not correct Z distances greater than 300. diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/Spawn.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/Spawn.java index 9f8d6a075f..283abf8747 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/Spawn.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/Spawn.java @@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable } } - // Do not correct z of flying NPCs. - if (!npc.isFlying()) + // Correct Z of monsters. Do not correct Z of flying NPCs. + if (npc.isMonster() && !npc.isFlying()) { final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); // Do not correct Z distances greater than 300. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/Spawn.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/Spawn.java index 9f8d6a075f..283abf8747 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/Spawn.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/Spawn.java @@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable } } - // Do not correct z of flying NPCs. - if (!npc.isFlying()) + // Correct Z of monsters. Do not correct Z of flying NPCs. + if (npc.isMonster() && !npc.isFlying()) { final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); // Do not correct Z distances greater than 300. diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/Spawn.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/Spawn.java index 9f8d6a075f..283abf8747 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/Spawn.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/Spawn.java @@ -404,8 +404,8 @@ public class Spawn extends Location implements IIdentifiable, INamable } } - // Do not correct z of flying NPCs. - if (!npc.isFlying()) + // Correct Z of monsters. Do not correct Z of flying NPCs. + if (npc.isMonster() && !npc.isFlying()) { final int geoZ = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz); // Do not correct Z distances greater than 300.