From a04a0f244bdeff09bfa28fffa780e70b2fa15f2a Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Fri, 2 Apr 2021 07:32:46 +0000 Subject: [PATCH] Get nearest index for LoS calculation. --- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- .../java/org/l2jmobius/gameserver/geoengine/GeoEngine.java | 4 ++-- 23 files changed, 46 insertions(+), 46 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 8f1ac1137f..8172174c8f 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -566,7 +566,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -574,7 +574,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 8f1ac1137f..8172174c8f 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -566,7 +566,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -574,7 +574,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 8f1ac1137f..8172174c8f 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -566,7 +566,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -574,7 +574,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 8f1ac1137f..8172174c8f 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -566,7 +566,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -574,7 +574,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 8f1ac1137f..8172174c8f 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -566,7 +566,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -574,7 +574,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 8f1ac1137f..8172174c8f 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -566,7 +566,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -574,7 +574,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 8f1ac1137f..8172174c8f 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -566,7 +566,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -574,7 +574,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 8f1ac1137f..8172174c8f 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -566,7 +566,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -574,7 +574,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 8f1ac1137f..8172174c8f 100644 --- a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -566,7 +566,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -574,7 +574,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 8f1ac1137f..8172174c8f 100644 --- a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -566,7 +566,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -574,7 +574,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 9e0c814ede..fafa5acac3 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -565,7 +565,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -573,7 +573,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 9e0c814ede..fafa5acac3 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -565,7 +565,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -573,7 +573,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 0f96649876..5a950f8ad1 100644 --- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -565,7 +565,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -573,7 +573,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 0f96649876..5a950f8ad1 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -565,7 +565,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -573,7 +573,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 8f1ac1137f..8172174c8f 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -566,7 +566,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -574,7 +574,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 8f1ac1137f..8172174c8f 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -566,7 +566,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -574,7 +574,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 8f1ac1137f..8172174c8f 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -566,7 +566,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -574,7 +574,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 8f1ac1137f..8172174c8f 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -566,7 +566,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -574,7 +574,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 8f1ac1137f..8172174c8f 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -566,7 +566,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -574,7 +574,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 8f1ac1137f..8172174c8f 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -566,7 +566,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -574,7 +574,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 8f1ac1137f..8172174c8f 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -566,7 +566,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -574,7 +574,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 8f1ac1137f..8172174c8f 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -566,7 +566,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -574,7 +574,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag. diff --git a/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java index 8f1ac1137f..8172174c8f 100644 --- a/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -566,7 +566,7 @@ public class GeoEngine // Check being on same cell and layer (index). // Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self. - int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT); + int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow if (index < 0) { return false; @@ -574,7 +574,7 @@ public class GeoEngine if ((gox == gtx) && (goy == gty)) { - return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT); + return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow } // Get ground and nswe flag.