From 11a8af106cc31079e008cffee4e7286edff5a3e6 Mon Sep 17 00:00:00 2001
From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Sun, 14 Mar 2021 23:52:44 +0000
Subject: [PATCH] Dropped WarpedSpaceManager class.
---
.../ai/others/GravitoryCore/GravityCore.java | 83 -------------------
.../game/data/stats/skills/30500-30599.xml | 23 ++++-
.../gameserver/geoengine/GeoEngine.java | 9 --
.../instancemanager/WarpedSpaceManager.java | 83 -------------------
.../ai/others/GravitoryCore/GravityCore.java | 83 -------------------
.../gameserver/geoengine/GeoEngine.java | 9 --
.../instancemanager/WarpedSpaceManager.java | 83 -------------------
.../ai/others/GravitoryCore/GravityCore.java | 83 -------------------
.../gameserver/geoengine/GeoEngine.java | 9 --
.../instancemanager/WarpedSpaceManager.java | 83 -------------------
.../ai/others/GravitoryCore/GravityCore.java | 83 -------------------
.../gameserver/geoengine/GeoEngine.java | 9 --
.../instancemanager/WarpedSpaceManager.java | 83 -------------------
.../ai/others/GravitoryCore/GravityCore.java | 83 -------------------
.../gameserver/geoengine/GeoEngine.java | 9 --
.../instancemanager/WarpedSpaceManager.java | 83 -------------------
.../ai/others/GravitoryCore/GravityCore.java | 83 -------------------
.../gameserver/geoengine/GeoEngine.java | 9 --
.../instancemanager/WarpedSpaceManager.java | 83 -------------------
.../ai/others/GravitoryCore/GravityCore.java | 83 -------------------
.../gameserver/geoengine/GeoEngine.java | 9 --
.../instancemanager/WarpedSpaceManager.java | 83 -------------------
.../ai/others/GravitoryCore/GravityCore.java | 83 -------------------
.../gameserver/geoengine/GeoEngine.java | 9 --
.../instancemanager/WarpedSpaceManager.java | 83 -------------------
.../ai/others/GravitoryCore/GravityCore.java | 83 -------------------
.../gameserver/geoengine/GeoEngine.java | 9 --
.../instancemanager/WarpedSpaceManager.java | 83 -------------------
.../ai/others/GravitoryCore/GravityCore.java | 83 -------------------
.../gameserver/geoengine/GeoEngine.java | 9 --
.../instancemanager/WarpedSpaceManager.java | 83 -------------------
.../gameserver/geoengine/GeoEngine.java | 9 --
.../instancemanager/WarpedSpaceManager.java | 83 -------------------
.../gameserver/geoengine/GeoEngine.java | 9 --
.../instancemanager/WarpedSpaceManager.java | 83 -------------------
.../gameserver/geoengine/GeoEngine.java | 9 --
.../instancemanager/WarpedSpaceManager.java | 83 -------------------
.../gameserver/geoengine/GeoEngine.java | 9 --
.../instancemanager/WarpedSpaceManager.java | 83 -------------------
.../gameserver/geoengine/GeoEngine.java | 9 --
.../instancemanager/WarpedSpaceManager.java | 83 -------------------
.../gameserver/geoengine/GeoEngine.java | 9 --
.../instancemanager/WarpedSpaceManager.java | 83 -------------------
.../gameserver/geoengine/GeoEngine.java | 9 --
.../instancemanager/WarpedSpaceManager.java | 83 -------------------
.../gameserver/geoengine/GeoEngine.java | 9 --
.../instancemanager/WarpedSpaceManager.java | 83 -------------------
.../gameserver/geoengine/GeoEngine.java | 9 --
.../instancemanager/WarpedSpaceManager.java | 83 -------------------
49 files changed, 19 insertions(+), 2582 deletions(-)
delete mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
delete mode 100644 L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
delete mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
delete mode 100644 L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
delete mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
delete mode 100644 L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
delete mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
delete mode 100644 L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
delete mode 100644 L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
delete mode 100644 L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
delete mode 100644 L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
delete mode 100644 L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
delete mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
delete mode 100644 L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
delete mode 100644 L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
delete mode 100644 L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
delete mode 100644 L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
delete mode 100644 L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
delete mode 100644 L2J_Mobius_9.0_ReturnOfTheQueenAnt/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
delete mode 100644 L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
delete mode 100644 L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
delete mode 100644 L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
delete mode 100644 L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
delete mode 100644 L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
delete mode 100644 L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
delete mode 100644 L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
delete mode 100644 L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
delete mode 100644 L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
delete mode 100644 L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
deleted file mode 100644
index b32e35aebc..0000000000
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package ai.others.GravitoryCore;
-
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.actor.Npc;
-import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import org.l2jmobius.gameserver.model.holders.SkillHolder;
-
-import ai.AbstractNpcAI;
-
-/**
- * @author Sdw
- */
-public class GravityCore extends AbstractNpcAI
-{
- // NPCs
- private static final int GRAVITY_CORE = 13432; // Gravity Core
-
- private GravityCore()
- {
- addSpawnId(GRAVITY_CORE);
- addDespawnId(GRAVITY_CORE);
- }
-
- @Override
- public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- {
- if (event.equals("DELETE_ME") && (npc != null))
- {
- npc.deleteMe();
- }
- return super.onAdvEvent(event, npc, player);
- }
-
- @Override
- public String onSpawn(Npc npc)
- {
- final Creature summoner = npc.getSummoner();
- if ((summoner != null) && summoner.isPlayer())
- {
- final PlayerInstance player = summoner.getActingPlayer();
- final SkillHolder skill = npc.getParameters().getSkillHolder("skill");
- if (skill != null)
- {
- npc.doCast(skill.getSkill());
- }
-
- final int despawnTime = npc.getTemplate().getParameters().getInt("i_despawn_time", 30000);
- startQuestTimer("DELETE_ME", despawnTime, npc, player);
-
- WarpedSpaceManager.getInstance().addWarpedSpace(npc, 100);
- }
-
- return super.onSpawn(npc);
- }
-
- @Override
- public void onNpcDespawn(Npc npc)
- {
- WarpedSpaceManager.getInstance().removeWarpedSpace(npc);
- }
-
- public static void main(String[] args)
- {
- new GravityCore();
- }
-}
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/30500-30599.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/30500-30599.xml
index 26e47ecbe3..4a9fe65050 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/30500-30599.xml
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/30500-30599.xml
@@ -1219,12 +1219,27 @@
icon.skill30519
- A1
+ 1
+ 10
+ ROOT_PHYSICALLY
+ ROOT
+ 80
+ MAGIC
+ 10-10
+ 150
+ true
+ A2
+ 98
772
2500
500
-707
600000
+ 5
+ HOLD
+ SELF
+ POINT_BLANK
+ NOT_FRIEND
@@ -1233,9 +1248,9 @@
-
- 13432
- 1
+
+
+ 100
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 c51fcd92f0..9f4604a29f 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
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.geoengine.geodata.Cell;
import org.l2jmobius.gameserver.geoengine.geodata.IRegion;
import org.l2jmobius.gameserver.geoengine.geodata.NullRegion;
import org.l2jmobius.gameserver.geoengine.geodata.Region;
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -634,10 +633,6 @@ public class GeoEngine
{
return new Location(x, y, getHeight(x, y, z));
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(x, y, z, tx, ty, tz, instance))
- {
- return new Location(x, y, getHeight(x, y, z));
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
@@ -704,10 +699,6 @@ public class GeoEngine
{
return false;
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(fromX, fromY, fromZ, toX, toY, toZ, instance))
- {
- return false;
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
deleted file mode 100644
index 94d2416925..0000000000
--- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.instancemanager;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.holders.WarpedSpaceHolder;
-import org.l2jmobius.gameserver.model.instancezone.Instance;
-import org.l2jmobius.gameserver.util.Util;
-
-/**
- * @author Sdw
- */
-public class WarpedSpaceManager
-{
- private Map _warpedSpace = null;
-
- public void addWarpedSpace(Creature creature, int radius)
- {
- if (_warpedSpace == null)
- {
- synchronized (this)
- {
- if (_warpedSpace == null)
- {
- _warpedSpace = new ConcurrentHashMap<>();
- }
- }
- }
- _warpedSpace.put(creature, new WarpedSpaceHolder(creature, radius));
- }
-
- public void removeWarpedSpace(Creature creature)
- {
- _warpedSpace.remove(creature);
- }
-
- public boolean checkForWarpedSpace(int originX, int originY, int originZ, int destinationX, int destinationY, int destinationZ, Instance instance)
- {
- if (_warpedSpace != null)
- {
- for (WarpedSpaceHolder holder : _warpedSpace.values())
- {
- final Creature creature = holder.getCreature();
- if (creature.getInstanceWorld() != instance)
- {
- continue;
- }
- final int radius = creature.getTemplate().getCollisionRadius();
- final boolean originInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), originX, originY, originZ, false, false) <= (holder.getRange() + radius);
- final boolean destinationInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), destinationX, destinationY, destinationZ, false, false) <= (holder.getRange() + radius);
- return destinationInRange ? !originInRange : originInRange;
- }
- }
- return false;
- }
-
- public static WarpedSpaceManager getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final WarpedSpaceManager INSTANCE = new WarpedSpaceManager();
- }
-}
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
deleted file mode 100644
index b32e35aebc..0000000000
--- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package ai.others.GravitoryCore;
-
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.actor.Npc;
-import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import org.l2jmobius.gameserver.model.holders.SkillHolder;
-
-import ai.AbstractNpcAI;
-
-/**
- * @author Sdw
- */
-public class GravityCore extends AbstractNpcAI
-{
- // NPCs
- private static final int GRAVITY_CORE = 13432; // Gravity Core
-
- private GravityCore()
- {
- addSpawnId(GRAVITY_CORE);
- addDespawnId(GRAVITY_CORE);
- }
-
- @Override
- public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- {
- if (event.equals("DELETE_ME") && (npc != null))
- {
- npc.deleteMe();
- }
- return super.onAdvEvent(event, npc, player);
- }
-
- @Override
- public String onSpawn(Npc npc)
- {
- final Creature summoner = npc.getSummoner();
- if ((summoner != null) && summoner.isPlayer())
- {
- final PlayerInstance player = summoner.getActingPlayer();
- final SkillHolder skill = npc.getParameters().getSkillHolder("skill");
- if (skill != null)
- {
- npc.doCast(skill.getSkill());
- }
-
- final int despawnTime = npc.getTemplate().getParameters().getInt("i_despawn_time", 30000);
- startQuestTimer("DELETE_ME", despawnTime, npc, player);
-
- WarpedSpaceManager.getInstance().addWarpedSpace(npc, 100);
- }
-
- return super.onSpawn(npc);
- }
-
- @Override
- public void onNpcDespawn(Npc npc)
- {
- WarpedSpaceManager.getInstance().removeWarpedSpace(npc);
- }
-
- public static void main(String[] args)
- {
- new GravityCore();
- }
-}
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 c51fcd92f0..9f4604a29f 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
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.geoengine.geodata.Cell;
import org.l2jmobius.gameserver.geoengine.geodata.IRegion;
import org.l2jmobius.gameserver.geoengine.geodata.NullRegion;
import org.l2jmobius.gameserver.geoengine.geodata.Region;
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -634,10 +633,6 @@ public class GeoEngine
{
return new Location(x, y, getHeight(x, y, z));
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(x, y, z, tx, ty, tz, instance))
- {
- return new Location(x, y, getHeight(x, y, z));
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
@@ -704,10 +699,6 @@ public class GeoEngine
{
return false;
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(fromX, fromY, fromZ, toX, toY, toZ, instance))
- {
- return false;
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
deleted file mode 100644
index 94d2416925..0000000000
--- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.instancemanager;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.holders.WarpedSpaceHolder;
-import org.l2jmobius.gameserver.model.instancezone.Instance;
-import org.l2jmobius.gameserver.util.Util;
-
-/**
- * @author Sdw
- */
-public class WarpedSpaceManager
-{
- private Map _warpedSpace = null;
-
- public void addWarpedSpace(Creature creature, int radius)
- {
- if (_warpedSpace == null)
- {
- synchronized (this)
- {
- if (_warpedSpace == null)
- {
- _warpedSpace = new ConcurrentHashMap<>();
- }
- }
- }
- _warpedSpace.put(creature, new WarpedSpaceHolder(creature, radius));
- }
-
- public void removeWarpedSpace(Creature creature)
- {
- _warpedSpace.remove(creature);
- }
-
- public boolean checkForWarpedSpace(int originX, int originY, int originZ, int destinationX, int destinationY, int destinationZ, Instance instance)
- {
- if (_warpedSpace != null)
- {
- for (WarpedSpaceHolder holder : _warpedSpace.values())
- {
- final Creature creature = holder.getCreature();
- if (creature.getInstanceWorld() != instance)
- {
- continue;
- }
- final int radius = creature.getTemplate().getCollisionRadius();
- final boolean originInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), originX, originY, originZ, false, false) <= (holder.getRange() + radius);
- final boolean destinationInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), destinationX, destinationY, destinationZ, false, false) <= (holder.getRange() + radius);
- return destinationInRange ? !originInRange : originInRange;
- }
- }
- return false;
- }
-
- public static WarpedSpaceManager getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final WarpedSpaceManager INSTANCE = new WarpedSpaceManager();
- }
-}
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
deleted file mode 100644
index b32e35aebc..0000000000
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package ai.others.GravitoryCore;
-
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.actor.Npc;
-import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import org.l2jmobius.gameserver.model.holders.SkillHolder;
-
-import ai.AbstractNpcAI;
-
-/**
- * @author Sdw
- */
-public class GravityCore extends AbstractNpcAI
-{
- // NPCs
- private static final int GRAVITY_CORE = 13432; // Gravity Core
-
- private GravityCore()
- {
- addSpawnId(GRAVITY_CORE);
- addDespawnId(GRAVITY_CORE);
- }
-
- @Override
- public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- {
- if (event.equals("DELETE_ME") && (npc != null))
- {
- npc.deleteMe();
- }
- return super.onAdvEvent(event, npc, player);
- }
-
- @Override
- public String onSpawn(Npc npc)
- {
- final Creature summoner = npc.getSummoner();
- if ((summoner != null) && summoner.isPlayer())
- {
- final PlayerInstance player = summoner.getActingPlayer();
- final SkillHolder skill = npc.getParameters().getSkillHolder("skill");
- if (skill != null)
- {
- npc.doCast(skill.getSkill());
- }
-
- final int despawnTime = npc.getTemplate().getParameters().getInt("i_despawn_time", 30000);
- startQuestTimer("DELETE_ME", despawnTime, npc, player);
-
- WarpedSpaceManager.getInstance().addWarpedSpace(npc, 100);
- }
-
- return super.onSpawn(npc);
- }
-
- @Override
- public void onNpcDespawn(Npc npc)
- {
- WarpedSpaceManager.getInstance().removeWarpedSpace(npc);
- }
-
- public static void main(String[] args)
- {
- new GravityCore();
- }
-}
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 c51fcd92f0..9f4604a29f 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
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.geoengine.geodata.Cell;
import org.l2jmobius.gameserver.geoengine.geodata.IRegion;
import org.l2jmobius.gameserver.geoengine.geodata.NullRegion;
import org.l2jmobius.gameserver.geoengine.geodata.Region;
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -634,10 +633,6 @@ public class GeoEngine
{
return new Location(x, y, getHeight(x, y, z));
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(x, y, z, tx, ty, tz, instance))
- {
- return new Location(x, y, getHeight(x, y, z));
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
@@ -704,10 +699,6 @@ public class GeoEngine
{
return false;
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(fromX, fromY, fromZ, toX, toY, toZ, instance))
- {
- return false;
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
deleted file mode 100644
index 94d2416925..0000000000
--- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.instancemanager;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.holders.WarpedSpaceHolder;
-import org.l2jmobius.gameserver.model.instancezone.Instance;
-import org.l2jmobius.gameserver.util.Util;
-
-/**
- * @author Sdw
- */
-public class WarpedSpaceManager
-{
- private Map _warpedSpace = null;
-
- public void addWarpedSpace(Creature creature, int radius)
- {
- if (_warpedSpace == null)
- {
- synchronized (this)
- {
- if (_warpedSpace == null)
- {
- _warpedSpace = new ConcurrentHashMap<>();
- }
- }
- }
- _warpedSpace.put(creature, new WarpedSpaceHolder(creature, radius));
- }
-
- public void removeWarpedSpace(Creature creature)
- {
- _warpedSpace.remove(creature);
- }
-
- public boolean checkForWarpedSpace(int originX, int originY, int originZ, int destinationX, int destinationY, int destinationZ, Instance instance)
- {
- if (_warpedSpace != null)
- {
- for (WarpedSpaceHolder holder : _warpedSpace.values())
- {
- final Creature creature = holder.getCreature();
- if (creature.getInstanceWorld() != instance)
- {
- continue;
- }
- final int radius = creature.getTemplate().getCollisionRadius();
- final boolean originInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), originX, originY, originZ, false, false) <= (holder.getRange() + radius);
- final boolean destinationInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), destinationX, destinationY, destinationZ, false, false) <= (holder.getRange() + radius);
- return destinationInRange ? !originInRange : originInRange;
- }
- }
- return false;
- }
-
- public static WarpedSpaceManager getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final WarpedSpaceManager INSTANCE = new WarpedSpaceManager();
- }
-}
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
deleted file mode 100644
index b32e35aebc..0000000000
--- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package ai.others.GravitoryCore;
-
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.actor.Npc;
-import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import org.l2jmobius.gameserver.model.holders.SkillHolder;
-
-import ai.AbstractNpcAI;
-
-/**
- * @author Sdw
- */
-public class GravityCore extends AbstractNpcAI
-{
- // NPCs
- private static final int GRAVITY_CORE = 13432; // Gravity Core
-
- private GravityCore()
- {
- addSpawnId(GRAVITY_CORE);
- addDespawnId(GRAVITY_CORE);
- }
-
- @Override
- public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- {
- if (event.equals("DELETE_ME") && (npc != null))
- {
- npc.deleteMe();
- }
- return super.onAdvEvent(event, npc, player);
- }
-
- @Override
- public String onSpawn(Npc npc)
- {
- final Creature summoner = npc.getSummoner();
- if ((summoner != null) && summoner.isPlayer())
- {
- final PlayerInstance player = summoner.getActingPlayer();
- final SkillHolder skill = npc.getParameters().getSkillHolder("skill");
- if (skill != null)
- {
- npc.doCast(skill.getSkill());
- }
-
- final int despawnTime = npc.getTemplate().getParameters().getInt("i_despawn_time", 30000);
- startQuestTimer("DELETE_ME", despawnTime, npc, player);
-
- WarpedSpaceManager.getInstance().addWarpedSpace(npc, 100);
- }
-
- return super.onSpawn(npc);
- }
-
- @Override
- public void onNpcDespawn(Npc npc)
- {
- WarpedSpaceManager.getInstance().removeWarpedSpace(npc);
- }
-
- public static void main(String[] args)
- {
- new GravityCore();
- }
-}
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 c51fcd92f0..9f4604a29f 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
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.geoengine.geodata.Cell;
import org.l2jmobius.gameserver.geoengine.geodata.IRegion;
import org.l2jmobius.gameserver.geoengine.geodata.NullRegion;
import org.l2jmobius.gameserver.geoengine.geodata.Region;
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -634,10 +633,6 @@ public class GeoEngine
{
return new Location(x, y, getHeight(x, y, z));
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(x, y, z, tx, ty, tz, instance))
- {
- return new Location(x, y, getHeight(x, y, z));
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
@@ -704,10 +699,6 @@ public class GeoEngine
{
return false;
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(fromX, fromY, fromZ, toX, toY, toZ, instance))
- {
- return false;
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
deleted file mode 100644
index 94d2416925..0000000000
--- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.instancemanager;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.holders.WarpedSpaceHolder;
-import org.l2jmobius.gameserver.model.instancezone.Instance;
-import org.l2jmobius.gameserver.util.Util;
-
-/**
- * @author Sdw
- */
-public class WarpedSpaceManager
-{
- private Map _warpedSpace = null;
-
- public void addWarpedSpace(Creature creature, int radius)
- {
- if (_warpedSpace == null)
- {
- synchronized (this)
- {
- if (_warpedSpace == null)
- {
- _warpedSpace = new ConcurrentHashMap<>();
- }
- }
- }
- _warpedSpace.put(creature, new WarpedSpaceHolder(creature, radius));
- }
-
- public void removeWarpedSpace(Creature creature)
- {
- _warpedSpace.remove(creature);
- }
-
- public boolean checkForWarpedSpace(int originX, int originY, int originZ, int destinationX, int destinationY, int destinationZ, Instance instance)
- {
- if (_warpedSpace != null)
- {
- for (WarpedSpaceHolder holder : _warpedSpace.values())
- {
- final Creature creature = holder.getCreature();
- if (creature.getInstanceWorld() != instance)
- {
- continue;
- }
- final int radius = creature.getTemplate().getCollisionRadius();
- final boolean originInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), originX, originY, originZ, false, false) <= (holder.getRange() + radius);
- final boolean destinationInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), destinationX, destinationY, destinationZ, false, false) <= (holder.getRange() + radius);
- return destinationInRange ? !originInRange : originInRange;
- }
- }
- return false;
- }
-
- public static WarpedSpaceManager getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final WarpedSpaceManager INSTANCE = new WarpedSpaceManager();
- }
-}
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
deleted file mode 100644
index b32e35aebc..0000000000
--- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package ai.others.GravitoryCore;
-
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.actor.Npc;
-import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import org.l2jmobius.gameserver.model.holders.SkillHolder;
-
-import ai.AbstractNpcAI;
-
-/**
- * @author Sdw
- */
-public class GravityCore extends AbstractNpcAI
-{
- // NPCs
- private static final int GRAVITY_CORE = 13432; // Gravity Core
-
- private GravityCore()
- {
- addSpawnId(GRAVITY_CORE);
- addDespawnId(GRAVITY_CORE);
- }
-
- @Override
- public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- {
- if (event.equals("DELETE_ME") && (npc != null))
- {
- npc.deleteMe();
- }
- return super.onAdvEvent(event, npc, player);
- }
-
- @Override
- public String onSpawn(Npc npc)
- {
- final Creature summoner = npc.getSummoner();
- if ((summoner != null) && summoner.isPlayer())
- {
- final PlayerInstance player = summoner.getActingPlayer();
- final SkillHolder skill = npc.getParameters().getSkillHolder("skill");
- if (skill != null)
- {
- npc.doCast(skill.getSkill());
- }
-
- final int despawnTime = npc.getTemplate().getParameters().getInt("i_despawn_time", 30000);
- startQuestTimer("DELETE_ME", despawnTime, npc, player);
-
- WarpedSpaceManager.getInstance().addWarpedSpace(npc, 100);
- }
-
- return super.onSpawn(npc);
- }
-
- @Override
- public void onNpcDespawn(Npc npc)
- {
- WarpedSpaceManager.getInstance().removeWarpedSpace(npc);
- }
-
- public static void main(String[] args)
- {
- new GravityCore();
- }
-}
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 c51fcd92f0..9f4604a29f 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
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.geoengine.geodata.Cell;
import org.l2jmobius.gameserver.geoengine.geodata.IRegion;
import org.l2jmobius.gameserver.geoengine.geodata.NullRegion;
import org.l2jmobius.gameserver.geoengine.geodata.Region;
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -634,10 +633,6 @@ public class GeoEngine
{
return new Location(x, y, getHeight(x, y, z));
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(x, y, z, tx, ty, tz, instance))
- {
- return new Location(x, y, getHeight(x, y, z));
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
@@ -704,10 +699,6 @@ public class GeoEngine
{
return false;
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(fromX, fromY, fromZ, toX, toY, toZ, instance))
- {
- return false;
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
deleted file mode 100644
index 94d2416925..0000000000
--- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.instancemanager;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.holders.WarpedSpaceHolder;
-import org.l2jmobius.gameserver.model.instancezone.Instance;
-import org.l2jmobius.gameserver.util.Util;
-
-/**
- * @author Sdw
- */
-public class WarpedSpaceManager
-{
- private Map _warpedSpace = null;
-
- public void addWarpedSpace(Creature creature, int radius)
- {
- if (_warpedSpace == null)
- {
- synchronized (this)
- {
- if (_warpedSpace == null)
- {
- _warpedSpace = new ConcurrentHashMap<>();
- }
- }
- }
- _warpedSpace.put(creature, new WarpedSpaceHolder(creature, radius));
- }
-
- public void removeWarpedSpace(Creature creature)
- {
- _warpedSpace.remove(creature);
- }
-
- public boolean checkForWarpedSpace(int originX, int originY, int originZ, int destinationX, int destinationY, int destinationZ, Instance instance)
- {
- if (_warpedSpace != null)
- {
- for (WarpedSpaceHolder holder : _warpedSpace.values())
- {
- final Creature creature = holder.getCreature();
- if (creature.getInstanceWorld() != instance)
- {
- continue;
- }
- final int radius = creature.getTemplate().getCollisionRadius();
- final boolean originInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), originX, originY, originZ, false, false) <= (holder.getRange() + radius);
- final boolean destinationInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), destinationX, destinationY, destinationZ, false, false) <= (holder.getRange() + radius);
- return destinationInRange ? !originInRange : originInRange;
- }
- }
- return false;
- }
-
- public static WarpedSpaceManager getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final WarpedSpaceManager INSTANCE = new WarpedSpaceManager();
- }
-}
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
deleted file mode 100644
index b32e35aebc..0000000000
--- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package ai.others.GravitoryCore;
-
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.actor.Npc;
-import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import org.l2jmobius.gameserver.model.holders.SkillHolder;
-
-import ai.AbstractNpcAI;
-
-/**
- * @author Sdw
- */
-public class GravityCore extends AbstractNpcAI
-{
- // NPCs
- private static final int GRAVITY_CORE = 13432; // Gravity Core
-
- private GravityCore()
- {
- addSpawnId(GRAVITY_CORE);
- addDespawnId(GRAVITY_CORE);
- }
-
- @Override
- public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- {
- if (event.equals("DELETE_ME") && (npc != null))
- {
- npc.deleteMe();
- }
- return super.onAdvEvent(event, npc, player);
- }
-
- @Override
- public String onSpawn(Npc npc)
- {
- final Creature summoner = npc.getSummoner();
- if ((summoner != null) && summoner.isPlayer())
- {
- final PlayerInstance player = summoner.getActingPlayer();
- final SkillHolder skill = npc.getParameters().getSkillHolder("skill");
- if (skill != null)
- {
- npc.doCast(skill.getSkill());
- }
-
- final int despawnTime = npc.getTemplate().getParameters().getInt("i_despawn_time", 30000);
- startQuestTimer("DELETE_ME", despawnTime, npc, player);
-
- WarpedSpaceManager.getInstance().addWarpedSpace(npc, 100);
- }
-
- return super.onSpawn(npc);
- }
-
- @Override
- public void onNpcDespawn(Npc npc)
- {
- WarpedSpaceManager.getInstance().removeWarpedSpace(npc);
- }
-
- public static void main(String[] args)
- {
- new GravityCore();
- }
-}
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 c51fcd92f0..9f4604a29f 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
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.geoengine.geodata.Cell;
import org.l2jmobius.gameserver.geoengine.geodata.IRegion;
import org.l2jmobius.gameserver.geoengine.geodata.NullRegion;
import org.l2jmobius.gameserver.geoengine.geodata.Region;
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -634,10 +633,6 @@ public class GeoEngine
{
return new Location(x, y, getHeight(x, y, z));
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(x, y, z, tx, ty, tz, instance))
- {
- return new Location(x, y, getHeight(x, y, z));
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
@@ -704,10 +699,6 @@ public class GeoEngine
{
return false;
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(fromX, fromY, fromZ, toX, toY, toZ, instance))
- {
- return false;
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
deleted file mode 100644
index 94d2416925..0000000000
--- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.instancemanager;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.holders.WarpedSpaceHolder;
-import org.l2jmobius.gameserver.model.instancezone.Instance;
-import org.l2jmobius.gameserver.util.Util;
-
-/**
- * @author Sdw
- */
-public class WarpedSpaceManager
-{
- private Map _warpedSpace = null;
-
- public void addWarpedSpace(Creature creature, int radius)
- {
- if (_warpedSpace == null)
- {
- synchronized (this)
- {
- if (_warpedSpace == null)
- {
- _warpedSpace = new ConcurrentHashMap<>();
- }
- }
- }
- _warpedSpace.put(creature, new WarpedSpaceHolder(creature, radius));
- }
-
- public void removeWarpedSpace(Creature creature)
- {
- _warpedSpace.remove(creature);
- }
-
- public boolean checkForWarpedSpace(int originX, int originY, int originZ, int destinationX, int destinationY, int destinationZ, Instance instance)
- {
- if (_warpedSpace != null)
- {
- for (WarpedSpaceHolder holder : _warpedSpace.values())
- {
- final Creature creature = holder.getCreature();
- if (creature.getInstanceWorld() != instance)
- {
- continue;
- }
- final int radius = creature.getTemplate().getCollisionRadius();
- final boolean originInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), originX, originY, originZ, false, false) <= (holder.getRange() + radius);
- final boolean destinationInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), destinationX, destinationY, destinationZ, false, false) <= (holder.getRange() + radius);
- return destinationInRange ? !originInRange : originInRange;
- }
- }
- return false;
- }
-
- public static WarpedSpaceManager getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final WarpedSpaceManager INSTANCE = new WarpedSpaceManager();
- }
-}
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
deleted file mode 100644
index b32e35aebc..0000000000
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package ai.others.GravitoryCore;
-
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.actor.Npc;
-import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import org.l2jmobius.gameserver.model.holders.SkillHolder;
-
-import ai.AbstractNpcAI;
-
-/**
- * @author Sdw
- */
-public class GravityCore extends AbstractNpcAI
-{
- // NPCs
- private static final int GRAVITY_CORE = 13432; // Gravity Core
-
- private GravityCore()
- {
- addSpawnId(GRAVITY_CORE);
- addDespawnId(GRAVITY_CORE);
- }
-
- @Override
- public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- {
- if (event.equals("DELETE_ME") && (npc != null))
- {
- npc.deleteMe();
- }
- return super.onAdvEvent(event, npc, player);
- }
-
- @Override
- public String onSpawn(Npc npc)
- {
- final Creature summoner = npc.getSummoner();
- if ((summoner != null) && summoner.isPlayer())
- {
- final PlayerInstance player = summoner.getActingPlayer();
- final SkillHolder skill = npc.getParameters().getSkillHolder("skill");
- if (skill != null)
- {
- npc.doCast(skill.getSkill());
- }
-
- final int despawnTime = npc.getTemplate().getParameters().getInt("i_despawn_time", 30000);
- startQuestTimer("DELETE_ME", despawnTime, npc, player);
-
- WarpedSpaceManager.getInstance().addWarpedSpace(npc, 100);
- }
-
- return super.onSpawn(npc);
- }
-
- @Override
- public void onNpcDespawn(Npc npc)
- {
- WarpedSpaceManager.getInstance().removeWarpedSpace(npc);
- }
-
- public static void main(String[] args)
- {
- new GravityCore();
- }
-}
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 c51fcd92f0..9f4604a29f 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
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.geoengine.geodata.Cell;
import org.l2jmobius.gameserver.geoengine.geodata.IRegion;
import org.l2jmobius.gameserver.geoengine.geodata.NullRegion;
import org.l2jmobius.gameserver.geoengine.geodata.Region;
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -634,10 +633,6 @@ public class GeoEngine
{
return new Location(x, y, getHeight(x, y, z));
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(x, y, z, tx, ty, tz, instance))
- {
- return new Location(x, y, getHeight(x, y, z));
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
@@ -704,10 +699,6 @@ public class GeoEngine
{
return false;
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(fromX, fromY, fromZ, toX, toY, toZ, instance))
- {
- return false;
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
deleted file mode 100644
index 94d2416925..0000000000
--- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.instancemanager;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.holders.WarpedSpaceHolder;
-import org.l2jmobius.gameserver.model.instancezone.Instance;
-import org.l2jmobius.gameserver.util.Util;
-
-/**
- * @author Sdw
- */
-public class WarpedSpaceManager
-{
- private Map _warpedSpace = null;
-
- public void addWarpedSpace(Creature creature, int radius)
- {
- if (_warpedSpace == null)
- {
- synchronized (this)
- {
- if (_warpedSpace == null)
- {
- _warpedSpace = new ConcurrentHashMap<>();
- }
- }
- }
- _warpedSpace.put(creature, new WarpedSpaceHolder(creature, radius));
- }
-
- public void removeWarpedSpace(Creature creature)
- {
- _warpedSpace.remove(creature);
- }
-
- public boolean checkForWarpedSpace(int originX, int originY, int originZ, int destinationX, int destinationY, int destinationZ, Instance instance)
- {
- if (_warpedSpace != null)
- {
- for (WarpedSpaceHolder holder : _warpedSpace.values())
- {
- final Creature creature = holder.getCreature();
- if (creature.getInstanceWorld() != instance)
- {
- continue;
- }
- final int radius = creature.getTemplate().getCollisionRadius();
- final boolean originInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), originX, originY, originZ, false, false) <= (holder.getRange() + radius);
- final boolean destinationInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), destinationX, destinationY, destinationZ, false, false) <= (holder.getRange() + radius);
- return destinationInRange ? !originInRange : originInRange;
- }
- }
- return false;
- }
-
- public static WarpedSpaceManager getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final WarpedSpaceManager INSTANCE = new WarpedSpaceManager();
- }
-}
diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
deleted file mode 100644
index b32e35aebc..0000000000
--- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package ai.others.GravitoryCore;
-
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.actor.Npc;
-import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import org.l2jmobius.gameserver.model.holders.SkillHolder;
-
-import ai.AbstractNpcAI;
-
-/**
- * @author Sdw
- */
-public class GravityCore extends AbstractNpcAI
-{
- // NPCs
- private static final int GRAVITY_CORE = 13432; // Gravity Core
-
- private GravityCore()
- {
- addSpawnId(GRAVITY_CORE);
- addDespawnId(GRAVITY_CORE);
- }
-
- @Override
- public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- {
- if (event.equals("DELETE_ME") && (npc != null))
- {
- npc.deleteMe();
- }
- return super.onAdvEvent(event, npc, player);
- }
-
- @Override
- public String onSpawn(Npc npc)
- {
- final Creature summoner = npc.getSummoner();
- if ((summoner != null) && summoner.isPlayer())
- {
- final PlayerInstance player = summoner.getActingPlayer();
- final SkillHolder skill = npc.getParameters().getSkillHolder("skill");
- if (skill != null)
- {
- npc.doCast(skill.getSkill());
- }
-
- final int despawnTime = npc.getTemplate().getParameters().getInt("i_despawn_time", 30000);
- startQuestTimer("DELETE_ME", despawnTime, npc, player);
-
- WarpedSpaceManager.getInstance().addWarpedSpace(npc, 100);
- }
-
- return super.onSpawn(npc);
- }
-
- @Override
- public void onNpcDespawn(Npc npc)
- {
- WarpedSpaceManager.getInstance().removeWarpedSpace(npc);
- }
-
- public static void main(String[] args)
- {
- new GravityCore();
- }
-}
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 c51fcd92f0..9f4604a29f 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
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.geoengine.geodata.Cell;
import org.l2jmobius.gameserver.geoengine.geodata.IRegion;
import org.l2jmobius.gameserver.geoengine.geodata.NullRegion;
import org.l2jmobius.gameserver.geoengine.geodata.Region;
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -634,10 +633,6 @@ public class GeoEngine
{
return new Location(x, y, getHeight(x, y, z));
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(x, y, z, tx, ty, tz, instance))
- {
- return new Location(x, y, getHeight(x, y, z));
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
@@ -704,10 +699,6 @@ public class GeoEngine
{
return false;
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(fromX, fromY, fromZ, toX, toY, toZ, instance))
- {
- return false;
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
deleted file mode 100644
index 94d2416925..0000000000
--- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.instancemanager;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.holders.WarpedSpaceHolder;
-import org.l2jmobius.gameserver.model.instancezone.Instance;
-import org.l2jmobius.gameserver.util.Util;
-
-/**
- * @author Sdw
- */
-public class WarpedSpaceManager
-{
- private Map _warpedSpace = null;
-
- public void addWarpedSpace(Creature creature, int radius)
- {
- if (_warpedSpace == null)
- {
- synchronized (this)
- {
- if (_warpedSpace == null)
- {
- _warpedSpace = new ConcurrentHashMap<>();
- }
- }
- }
- _warpedSpace.put(creature, new WarpedSpaceHolder(creature, radius));
- }
-
- public void removeWarpedSpace(Creature creature)
- {
- _warpedSpace.remove(creature);
- }
-
- public boolean checkForWarpedSpace(int originX, int originY, int originZ, int destinationX, int destinationY, int destinationZ, Instance instance)
- {
- if (_warpedSpace != null)
- {
- for (WarpedSpaceHolder holder : _warpedSpace.values())
- {
- final Creature creature = holder.getCreature();
- if (creature.getInstanceWorld() != instance)
- {
- continue;
- }
- final int radius = creature.getTemplate().getCollisionRadius();
- final boolean originInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), originX, originY, originZ, false, false) <= (holder.getRange() + radius);
- final boolean destinationInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), destinationX, destinationY, destinationZ, false, false) <= (holder.getRange() + radius);
- return destinationInRange ? !originInRange : originInRange;
- }
- }
- return false;
- }
-
- public static WarpedSpaceManager getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final WarpedSpaceManager INSTANCE = new WarpedSpaceManager();
- }
-}
diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
deleted file mode 100644
index b32e35aebc..0000000000
--- a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package ai.others.GravitoryCore;
-
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.actor.Npc;
-import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import org.l2jmobius.gameserver.model.holders.SkillHolder;
-
-import ai.AbstractNpcAI;
-
-/**
- * @author Sdw
- */
-public class GravityCore extends AbstractNpcAI
-{
- // NPCs
- private static final int GRAVITY_CORE = 13432; // Gravity Core
-
- private GravityCore()
- {
- addSpawnId(GRAVITY_CORE);
- addDespawnId(GRAVITY_CORE);
- }
-
- @Override
- public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- {
- if (event.equals("DELETE_ME") && (npc != null))
- {
- npc.deleteMe();
- }
- return super.onAdvEvent(event, npc, player);
- }
-
- @Override
- public String onSpawn(Npc npc)
- {
- final Creature summoner = npc.getSummoner();
- if ((summoner != null) && summoner.isPlayer())
- {
- final PlayerInstance player = summoner.getActingPlayer();
- final SkillHolder skill = npc.getParameters().getSkillHolder("skill");
- if (skill != null)
- {
- npc.doCast(skill.getSkill());
- }
-
- final int despawnTime = npc.getTemplate().getParameters().getInt("i_despawn_time", 30000);
- startQuestTimer("DELETE_ME", despawnTime, npc, player);
-
- WarpedSpaceManager.getInstance().addWarpedSpace(npc, 100);
- }
-
- return super.onSpawn(npc);
- }
-
- @Override
- public void onNpcDespawn(Npc npc)
- {
- WarpedSpaceManager.getInstance().removeWarpedSpace(npc);
- }
-
- public static void main(String[] args)
- {
- new GravityCore();
- }
-}
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 c51fcd92f0..9f4604a29f 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
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.geoengine.geodata.Cell;
import org.l2jmobius.gameserver.geoengine.geodata.IRegion;
import org.l2jmobius.gameserver.geoengine.geodata.NullRegion;
import org.l2jmobius.gameserver.geoengine.geodata.Region;
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -634,10 +633,6 @@ public class GeoEngine
{
return new Location(x, y, getHeight(x, y, z));
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(x, y, z, tx, ty, tz, instance))
- {
- return new Location(x, y, getHeight(x, y, z));
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
@@ -704,10 +699,6 @@ public class GeoEngine
{
return false;
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(fromX, fromY, fromZ, toX, toY, toZ, instance))
- {
- return false;
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
diff --git a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
deleted file mode 100644
index 94d2416925..0000000000
--- a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.instancemanager;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.holders.WarpedSpaceHolder;
-import org.l2jmobius.gameserver.model.instancezone.Instance;
-import org.l2jmobius.gameserver.util.Util;
-
-/**
- * @author Sdw
- */
-public class WarpedSpaceManager
-{
- private Map _warpedSpace = null;
-
- public void addWarpedSpace(Creature creature, int radius)
- {
- if (_warpedSpace == null)
- {
- synchronized (this)
- {
- if (_warpedSpace == null)
- {
- _warpedSpace = new ConcurrentHashMap<>();
- }
- }
- }
- _warpedSpace.put(creature, new WarpedSpaceHolder(creature, radius));
- }
-
- public void removeWarpedSpace(Creature creature)
- {
- _warpedSpace.remove(creature);
- }
-
- public boolean checkForWarpedSpace(int originX, int originY, int originZ, int destinationX, int destinationY, int destinationZ, Instance instance)
- {
- if (_warpedSpace != null)
- {
- for (WarpedSpaceHolder holder : _warpedSpace.values())
- {
- final Creature creature = holder.getCreature();
- if (creature.getInstanceWorld() != instance)
- {
- continue;
- }
- final int radius = creature.getTemplate().getCollisionRadius();
- final boolean originInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), originX, originY, originZ, false, false) <= (holder.getRange() + radius);
- final boolean destinationInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), destinationX, destinationY, destinationZ, false, false) <= (holder.getRange() + radius);
- return destinationInRange ? !originInRange : originInRange;
- }
- }
- return false;
- }
-
- public static WarpedSpaceManager getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final WarpedSpaceManager INSTANCE = new WarpedSpaceManager();
- }
-}
diff --git a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java b/L2J_Mobius_9.0_ReturnOfTheQueenAnt/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
deleted file mode 100644
index b32e35aebc..0000000000
--- a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/dist/game/data/scripts/ai/others/GravitoryCore/GravityCore.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package ai.others.GravitoryCore;
-
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.actor.Npc;
-import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import org.l2jmobius.gameserver.model.holders.SkillHolder;
-
-import ai.AbstractNpcAI;
-
-/**
- * @author Sdw
- */
-public class GravityCore extends AbstractNpcAI
-{
- // NPCs
- private static final int GRAVITY_CORE = 13432; // Gravity Core
-
- private GravityCore()
- {
- addSpawnId(GRAVITY_CORE);
- addDespawnId(GRAVITY_CORE);
- }
-
- @Override
- public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- {
- if (event.equals("DELETE_ME") && (npc != null))
- {
- npc.deleteMe();
- }
- return super.onAdvEvent(event, npc, player);
- }
-
- @Override
- public String onSpawn(Npc npc)
- {
- final Creature summoner = npc.getSummoner();
- if ((summoner != null) && summoner.isPlayer())
- {
- final PlayerInstance player = summoner.getActingPlayer();
- final SkillHolder skill = npc.getParameters().getSkillHolder("skill");
- if (skill != null)
- {
- npc.doCast(skill.getSkill());
- }
-
- final int despawnTime = npc.getTemplate().getParameters().getInt("i_despawn_time", 30000);
- startQuestTimer("DELETE_ME", despawnTime, npc, player);
-
- WarpedSpaceManager.getInstance().addWarpedSpace(npc, 100);
- }
-
- return super.onSpawn(npc);
- }
-
- @Override
- public void onNpcDespawn(Npc npc)
- {
- WarpedSpaceManager.getInstance().removeWarpedSpace(npc);
- }
-
- public static void main(String[] args)
- {
- new GravityCore();
- }
-}
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 c51fcd92f0..9f4604a29f 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
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.geoengine.geodata.Cell;
import org.l2jmobius.gameserver.geoengine.geodata.IRegion;
import org.l2jmobius.gameserver.geoengine.geodata.NullRegion;
import org.l2jmobius.gameserver.geoengine.geodata.Region;
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -634,10 +633,6 @@ public class GeoEngine
{
return new Location(x, y, getHeight(x, y, z));
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(x, y, z, tx, ty, tz, instance))
- {
- return new Location(x, y, getHeight(x, y, z));
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
@@ -704,10 +699,6 @@ public class GeoEngine
{
return false;
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(fromX, fromY, fromZ, toX, toY, toZ, instance))
- {
- return false;
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
diff --git a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java b/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
deleted file mode 100644
index 94d2416925..0000000000
--- a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.instancemanager;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.holders.WarpedSpaceHolder;
-import org.l2jmobius.gameserver.model.instancezone.Instance;
-import org.l2jmobius.gameserver.util.Util;
-
-/**
- * @author Sdw
- */
-public class WarpedSpaceManager
-{
- private Map _warpedSpace = null;
-
- public void addWarpedSpace(Creature creature, int radius)
- {
- if (_warpedSpace == null)
- {
- synchronized (this)
- {
- if (_warpedSpace == null)
- {
- _warpedSpace = new ConcurrentHashMap<>();
- }
- }
- }
- _warpedSpace.put(creature, new WarpedSpaceHolder(creature, radius));
- }
-
- public void removeWarpedSpace(Creature creature)
- {
- _warpedSpace.remove(creature);
- }
-
- public boolean checkForWarpedSpace(int originX, int originY, int originZ, int destinationX, int destinationY, int destinationZ, Instance instance)
- {
- if (_warpedSpace != null)
- {
- for (WarpedSpaceHolder holder : _warpedSpace.values())
- {
- final Creature creature = holder.getCreature();
- if (creature.getInstanceWorld() != instance)
- {
- continue;
- }
- final int radius = creature.getTemplate().getCollisionRadius();
- final boolean originInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), originX, originY, originZ, false, false) <= (holder.getRange() + radius);
- final boolean destinationInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), destinationX, destinationY, destinationZ, false, false) <= (holder.getRange() + radius);
- return destinationInRange ? !originInRange : originInRange;
- }
- }
- return false;
- }
-
- public static WarpedSpaceManager getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final WarpedSpaceManager INSTANCE = new WarpedSpaceManager();
- }
-}
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 c51fcd92f0..9f4604a29f 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
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.geoengine.geodata.Cell;
import org.l2jmobius.gameserver.geoengine.geodata.IRegion;
import org.l2jmobius.gameserver.geoengine.geodata.NullRegion;
import org.l2jmobius.gameserver.geoengine.geodata.Region;
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -634,10 +633,6 @@ public class GeoEngine
{
return new Location(x, y, getHeight(x, y, z));
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(x, y, z, tx, ty, tz, instance))
- {
- return new Location(x, y, getHeight(x, y, z));
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
@@ -704,10 +699,6 @@ public class GeoEngine
{
return false;
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(fromX, fromY, fromZ, toX, toY, toZ, instance))
- {
- return false;
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
deleted file mode 100644
index 94d2416925..0000000000
--- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.instancemanager;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.holders.WarpedSpaceHolder;
-import org.l2jmobius.gameserver.model.instancezone.Instance;
-import org.l2jmobius.gameserver.util.Util;
-
-/**
- * @author Sdw
- */
-public class WarpedSpaceManager
-{
- private Map _warpedSpace = null;
-
- public void addWarpedSpace(Creature creature, int radius)
- {
- if (_warpedSpace == null)
- {
- synchronized (this)
- {
- if (_warpedSpace == null)
- {
- _warpedSpace = new ConcurrentHashMap<>();
- }
- }
- }
- _warpedSpace.put(creature, new WarpedSpaceHolder(creature, radius));
- }
-
- public void removeWarpedSpace(Creature creature)
- {
- _warpedSpace.remove(creature);
- }
-
- public boolean checkForWarpedSpace(int originX, int originY, int originZ, int destinationX, int destinationY, int destinationZ, Instance instance)
- {
- if (_warpedSpace != null)
- {
- for (WarpedSpaceHolder holder : _warpedSpace.values())
- {
- final Creature creature = holder.getCreature();
- if (creature.getInstanceWorld() != instance)
- {
- continue;
- }
- final int radius = creature.getTemplate().getCollisionRadius();
- final boolean originInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), originX, originY, originZ, false, false) <= (holder.getRange() + radius);
- final boolean destinationInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), destinationX, destinationY, destinationZ, false, false) <= (holder.getRange() + radius);
- return destinationInRange ? !originInRange : originInRange;
- }
- }
- return false;
- }
-
- public static WarpedSpaceManager getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final WarpedSpaceManager INSTANCE = new WarpedSpaceManager();
- }
-}
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 c51fcd92f0..9f4604a29f 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
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.geoengine.geodata.Cell;
import org.l2jmobius.gameserver.geoengine.geodata.IRegion;
import org.l2jmobius.gameserver.geoengine.geodata.NullRegion;
import org.l2jmobius.gameserver.geoengine.geodata.Region;
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -634,10 +633,6 @@ public class GeoEngine
{
return new Location(x, y, getHeight(x, y, z));
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(x, y, z, tx, ty, tz, instance))
- {
- return new Location(x, y, getHeight(x, y, z));
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
@@ -704,10 +699,6 @@ public class GeoEngine
{
return false;
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(fromX, fromY, fromZ, toX, toY, toZ, instance))
- {
- return false;
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
deleted file mode 100644
index 94d2416925..0000000000
--- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.instancemanager;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.holders.WarpedSpaceHolder;
-import org.l2jmobius.gameserver.model.instancezone.Instance;
-import org.l2jmobius.gameserver.util.Util;
-
-/**
- * @author Sdw
- */
-public class WarpedSpaceManager
-{
- private Map _warpedSpace = null;
-
- public void addWarpedSpace(Creature creature, int radius)
- {
- if (_warpedSpace == null)
- {
- synchronized (this)
- {
- if (_warpedSpace == null)
- {
- _warpedSpace = new ConcurrentHashMap<>();
- }
- }
- }
- _warpedSpace.put(creature, new WarpedSpaceHolder(creature, radius));
- }
-
- public void removeWarpedSpace(Creature creature)
- {
- _warpedSpace.remove(creature);
- }
-
- public boolean checkForWarpedSpace(int originX, int originY, int originZ, int destinationX, int destinationY, int destinationZ, Instance instance)
- {
- if (_warpedSpace != null)
- {
- for (WarpedSpaceHolder holder : _warpedSpace.values())
- {
- final Creature creature = holder.getCreature();
- if (creature.getInstanceWorld() != instance)
- {
- continue;
- }
- final int radius = creature.getTemplate().getCollisionRadius();
- final boolean originInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), originX, originY, originZ, false, false) <= (holder.getRange() + radius);
- final boolean destinationInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), destinationX, destinationY, destinationZ, false, false) <= (holder.getRange() + radius);
- return destinationInRange ? !originInRange : originInRange;
- }
- }
- return false;
- }
-
- public static WarpedSpaceManager getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final WarpedSpaceManager INSTANCE = new WarpedSpaceManager();
- }
-}
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 c51fcd92f0..9f4604a29f 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
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.geoengine.geodata.Cell;
import org.l2jmobius.gameserver.geoengine.geodata.IRegion;
import org.l2jmobius.gameserver.geoengine.geodata.NullRegion;
import org.l2jmobius.gameserver.geoengine.geodata.Region;
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -634,10 +633,6 @@ public class GeoEngine
{
return new Location(x, y, getHeight(x, y, z));
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(x, y, z, tx, ty, tz, instance))
- {
- return new Location(x, y, getHeight(x, y, z));
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
@@ -704,10 +699,6 @@ public class GeoEngine
{
return false;
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(fromX, fromY, fromZ, toX, toY, toZ, instance))
- {
- return false;
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
deleted file mode 100644
index 94d2416925..0000000000
--- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.instancemanager;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.holders.WarpedSpaceHolder;
-import org.l2jmobius.gameserver.model.instancezone.Instance;
-import org.l2jmobius.gameserver.util.Util;
-
-/**
- * @author Sdw
- */
-public class WarpedSpaceManager
-{
- private Map _warpedSpace = null;
-
- public void addWarpedSpace(Creature creature, int radius)
- {
- if (_warpedSpace == null)
- {
- synchronized (this)
- {
- if (_warpedSpace == null)
- {
- _warpedSpace = new ConcurrentHashMap<>();
- }
- }
- }
- _warpedSpace.put(creature, new WarpedSpaceHolder(creature, radius));
- }
-
- public void removeWarpedSpace(Creature creature)
- {
- _warpedSpace.remove(creature);
- }
-
- public boolean checkForWarpedSpace(int originX, int originY, int originZ, int destinationX, int destinationY, int destinationZ, Instance instance)
- {
- if (_warpedSpace != null)
- {
- for (WarpedSpaceHolder holder : _warpedSpace.values())
- {
- final Creature creature = holder.getCreature();
- if (creature.getInstanceWorld() != instance)
- {
- continue;
- }
- final int radius = creature.getTemplate().getCollisionRadius();
- final boolean originInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), originX, originY, originZ, false, false) <= (holder.getRange() + radius);
- final boolean destinationInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), destinationX, destinationY, destinationZ, false, false) <= (holder.getRange() + radius);
- return destinationInRange ? !originInRange : originInRange;
- }
- }
- return false;
- }
-
- public static WarpedSpaceManager getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final WarpedSpaceManager INSTANCE = new WarpedSpaceManager();
- }
-}
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 c51fcd92f0..9f4604a29f 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
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.geoengine.geodata.Cell;
import org.l2jmobius.gameserver.geoengine.geodata.IRegion;
import org.l2jmobius.gameserver.geoengine.geodata.NullRegion;
import org.l2jmobius.gameserver.geoengine.geodata.Region;
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -634,10 +633,6 @@ public class GeoEngine
{
return new Location(x, y, getHeight(x, y, z));
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(x, y, z, tx, ty, tz, instance))
- {
- return new Location(x, y, getHeight(x, y, z));
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
@@ -704,10 +699,6 @@ public class GeoEngine
{
return false;
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(fromX, fromY, fromZ, toX, toY, toZ, instance))
- {
- return false;
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
deleted file mode 100644
index 94d2416925..0000000000
--- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.instancemanager;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.holders.WarpedSpaceHolder;
-import org.l2jmobius.gameserver.model.instancezone.Instance;
-import org.l2jmobius.gameserver.util.Util;
-
-/**
- * @author Sdw
- */
-public class WarpedSpaceManager
-{
- private Map _warpedSpace = null;
-
- public void addWarpedSpace(Creature creature, int radius)
- {
- if (_warpedSpace == null)
- {
- synchronized (this)
- {
- if (_warpedSpace == null)
- {
- _warpedSpace = new ConcurrentHashMap<>();
- }
- }
- }
- _warpedSpace.put(creature, new WarpedSpaceHolder(creature, radius));
- }
-
- public void removeWarpedSpace(Creature creature)
- {
- _warpedSpace.remove(creature);
- }
-
- public boolean checkForWarpedSpace(int originX, int originY, int originZ, int destinationX, int destinationY, int destinationZ, Instance instance)
- {
- if (_warpedSpace != null)
- {
- for (WarpedSpaceHolder holder : _warpedSpace.values())
- {
- final Creature creature = holder.getCreature();
- if (creature.getInstanceWorld() != instance)
- {
- continue;
- }
- final int radius = creature.getTemplate().getCollisionRadius();
- final boolean originInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), originX, originY, originZ, false, false) <= (holder.getRange() + radius);
- final boolean destinationInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), destinationX, destinationY, destinationZ, false, false) <= (holder.getRange() + radius);
- return destinationInRange ? !originInRange : originInRange;
- }
- }
- return false;
- }
-
- public static WarpedSpaceManager getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final WarpedSpaceManager INSTANCE = new WarpedSpaceManager();
- }
-}
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 c51fcd92f0..9f4604a29f 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
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.geoengine.geodata.Cell;
import org.l2jmobius.gameserver.geoengine.geodata.IRegion;
import org.l2jmobius.gameserver.geoengine.geodata.NullRegion;
import org.l2jmobius.gameserver.geoengine.geodata.Region;
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -634,10 +633,6 @@ public class GeoEngine
{
return new Location(x, y, getHeight(x, y, z));
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(x, y, z, tx, ty, tz, instance))
- {
- return new Location(x, y, getHeight(x, y, z));
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
@@ -704,10 +699,6 @@ public class GeoEngine
{
return false;
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(fromX, fromY, fromZ, toX, toY, toZ, instance))
- {
- return false;
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
deleted file mode 100644
index 94d2416925..0000000000
--- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.instancemanager;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.holders.WarpedSpaceHolder;
-import org.l2jmobius.gameserver.model.instancezone.Instance;
-import org.l2jmobius.gameserver.util.Util;
-
-/**
- * @author Sdw
- */
-public class WarpedSpaceManager
-{
- private Map _warpedSpace = null;
-
- public void addWarpedSpace(Creature creature, int radius)
- {
- if (_warpedSpace == null)
- {
- synchronized (this)
- {
- if (_warpedSpace == null)
- {
- _warpedSpace = new ConcurrentHashMap<>();
- }
- }
- }
- _warpedSpace.put(creature, new WarpedSpaceHolder(creature, radius));
- }
-
- public void removeWarpedSpace(Creature creature)
- {
- _warpedSpace.remove(creature);
- }
-
- public boolean checkForWarpedSpace(int originX, int originY, int originZ, int destinationX, int destinationY, int destinationZ, Instance instance)
- {
- if (_warpedSpace != null)
- {
- for (WarpedSpaceHolder holder : _warpedSpace.values())
- {
- final Creature creature = holder.getCreature();
- if (creature.getInstanceWorld() != instance)
- {
- continue;
- }
- final int radius = creature.getTemplate().getCollisionRadius();
- final boolean originInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), originX, originY, originZ, false, false) <= (holder.getRange() + radius);
- final boolean destinationInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), destinationX, destinationY, destinationZ, false, false) <= (holder.getRange() + radius);
- return destinationInRange ? !originInRange : originInRange;
- }
- }
- return false;
- }
-
- public static WarpedSpaceManager getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final WarpedSpaceManager INSTANCE = new WarpedSpaceManager();
- }
-}
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 c51fcd92f0..9f4604a29f 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
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.geoengine.geodata.Cell;
import org.l2jmobius.gameserver.geoengine.geodata.IRegion;
import org.l2jmobius.gameserver.geoengine.geodata.NullRegion;
import org.l2jmobius.gameserver.geoengine.geodata.Region;
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -634,10 +633,6 @@ public class GeoEngine
{
return new Location(x, y, getHeight(x, y, z));
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(x, y, z, tx, ty, tz, instance))
- {
- return new Location(x, y, getHeight(x, y, z));
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
@@ -704,10 +699,6 @@ public class GeoEngine
{
return false;
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(fromX, fromY, fromZ, toX, toY, toZ, instance))
- {
- return false;
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
deleted file mode 100644
index 94d2416925..0000000000
--- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.instancemanager;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.holders.WarpedSpaceHolder;
-import org.l2jmobius.gameserver.model.instancezone.Instance;
-import org.l2jmobius.gameserver.util.Util;
-
-/**
- * @author Sdw
- */
-public class WarpedSpaceManager
-{
- private Map _warpedSpace = null;
-
- public void addWarpedSpace(Creature creature, int radius)
- {
- if (_warpedSpace == null)
- {
- synchronized (this)
- {
- if (_warpedSpace == null)
- {
- _warpedSpace = new ConcurrentHashMap<>();
- }
- }
- }
- _warpedSpace.put(creature, new WarpedSpaceHolder(creature, radius));
- }
-
- public void removeWarpedSpace(Creature creature)
- {
- _warpedSpace.remove(creature);
- }
-
- public boolean checkForWarpedSpace(int originX, int originY, int originZ, int destinationX, int destinationY, int destinationZ, Instance instance)
- {
- if (_warpedSpace != null)
- {
- for (WarpedSpaceHolder holder : _warpedSpace.values())
- {
- final Creature creature = holder.getCreature();
- if (creature.getInstanceWorld() != instance)
- {
- continue;
- }
- final int radius = creature.getTemplate().getCollisionRadius();
- final boolean originInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), originX, originY, originZ, false, false) <= (holder.getRange() + radius);
- final boolean destinationInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), destinationX, destinationY, destinationZ, false, false) <= (holder.getRange() + radius);
- return destinationInRange ? !originInRange : originInRange;
- }
- }
- return false;
- }
-
- public static WarpedSpaceManager getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final WarpedSpaceManager INSTANCE = new WarpedSpaceManager();
- }
-}
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 c51fcd92f0..9f4604a29f 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
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.geoengine.geodata.Cell;
import org.l2jmobius.gameserver.geoengine.geodata.IRegion;
import org.l2jmobius.gameserver.geoengine.geodata.NullRegion;
import org.l2jmobius.gameserver.geoengine.geodata.Region;
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -634,10 +633,6 @@ public class GeoEngine
{
return new Location(x, y, getHeight(x, y, z));
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(x, y, z, tx, ty, tz, instance))
- {
- return new Location(x, y, getHeight(x, y, z));
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
@@ -704,10 +699,6 @@ public class GeoEngine
{
return false;
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(fromX, fromY, fromZ, toX, toY, toZ, instance))
- {
- return false;
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
deleted file mode 100644
index 94d2416925..0000000000
--- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.instancemanager;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.holders.WarpedSpaceHolder;
-import org.l2jmobius.gameserver.model.instancezone.Instance;
-import org.l2jmobius.gameserver.util.Util;
-
-/**
- * @author Sdw
- */
-public class WarpedSpaceManager
-{
- private Map _warpedSpace = null;
-
- public void addWarpedSpace(Creature creature, int radius)
- {
- if (_warpedSpace == null)
- {
- synchronized (this)
- {
- if (_warpedSpace == null)
- {
- _warpedSpace = new ConcurrentHashMap<>();
- }
- }
- }
- _warpedSpace.put(creature, new WarpedSpaceHolder(creature, radius));
- }
-
- public void removeWarpedSpace(Creature creature)
- {
- _warpedSpace.remove(creature);
- }
-
- public boolean checkForWarpedSpace(int originX, int originY, int originZ, int destinationX, int destinationY, int destinationZ, Instance instance)
- {
- if (_warpedSpace != null)
- {
- for (WarpedSpaceHolder holder : _warpedSpace.values())
- {
- final Creature creature = holder.getCreature();
- if (creature.getInstanceWorld() != instance)
- {
- continue;
- }
- final int radius = creature.getTemplate().getCollisionRadius();
- final boolean originInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), originX, originY, originZ, false, false) <= (holder.getRange() + radius);
- final boolean destinationInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), destinationX, destinationY, destinationZ, false, false) <= (holder.getRange() + radius);
- return destinationInRange ? !originInRange : originInRange;
- }
- }
- return false;
- }
-
- public static WarpedSpaceManager getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final WarpedSpaceManager INSTANCE = new WarpedSpaceManager();
- }
-}
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 c51fcd92f0..9f4604a29f 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
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.geoengine.geodata.Cell;
import org.l2jmobius.gameserver.geoengine.geodata.IRegion;
import org.l2jmobius.gameserver.geoengine.geodata.NullRegion;
import org.l2jmobius.gameserver.geoengine.geodata.Region;
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -634,10 +633,6 @@ public class GeoEngine
{
return new Location(x, y, getHeight(x, y, z));
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(x, y, z, tx, ty, tz, instance))
- {
- return new Location(x, y, getHeight(x, y, z));
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
@@ -704,10 +699,6 @@ public class GeoEngine
{
return false;
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(fromX, fromY, fromZ, toX, toY, toZ, instance))
- {
- return false;
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
deleted file mode 100644
index 94d2416925..0000000000
--- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.instancemanager;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.holders.WarpedSpaceHolder;
-import org.l2jmobius.gameserver.model.instancezone.Instance;
-import org.l2jmobius.gameserver.util.Util;
-
-/**
- * @author Sdw
- */
-public class WarpedSpaceManager
-{
- private Map _warpedSpace = null;
-
- public void addWarpedSpace(Creature creature, int radius)
- {
- if (_warpedSpace == null)
- {
- synchronized (this)
- {
- if (_warpedSpace == null)
- {
- _warpedSpace = new ConcurrentHashMap<>();
- }
- }
- }
- _warpedSpace.put(creature, new WarpedSpaceHolder(creature, radius));
- }
-
- public void removeWarpedSpace(Creature creature)
- {
- _warpedSpace.remove(creature);
- }
-
- public boolean checkForWarpedSpace(int originX, int originY, int originZ, int destinationX, int destinationY, int destinationZ, Instance instance)
- {
- if (_warpedSpace != null)
- {
- for (WarpedSpaceHolder holder : _warpedSpace.values())
- {
- final Creature creature = holder.getCreature();
- if (creature.getInstanceWorld() != instance)
- {
- continue;
- }
- final int radius = creature.getTemplate().getCollisionRadius();
- final boolean originInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), originX, originY, originZ, false, false) <= (holder.getRange() + radius);
- final boolean destinationInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), destinationX, destinationY, destinationZ, false, false) <= (holder.getRange() + radius);
- return destinationInRange ? !originInRange : originInRange;
- }
- }
- return false;
- }
-
- public static WarpedSpaceManager getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final WarpedSpaceManager INSTANCE = new WarpedSpaceManager();
- }
-}
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 c51fcd92f0..9f4604a29f 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
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.geoengine.geodata.Cell;
import org.l2jmobius.gameserver.geoengine.geodata.IRegion;
import org.l2jmobius.gameserver.geoengine.geodata.NullRegion;
import org.l2jmobius.gameserver.geoengine.geodata.Region;
-import org.l2jmobius.gameserver.instancemanager.WarpedSpaceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -634,10 +633,6 @@ public class GeoEngine
{
return new Location(x, y, getHeight(x, y, z));
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(x, y, z, tx, ty, tz, instance))
- {
- return new Location(x, y, getHeight(x, y, z));
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
@@ -704,10 +699,6 @@ public class GeoEngine
{
return false;
}
- if (WarpedSpaceManager.getInstance().checkForWarpedSpace(fromX, fromY, fromZ, toX, toY, toZ, instance))
- {
- return false;
- }
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// First point is guaranteed to be available.
diff --git a/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java b/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
deleted file mode 100644
index 94d2416925..0000000000
--- a/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/instancemanager/WarpedSpaceManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.instancemanager;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.l2jmobius.gameserver.model.actor.Creature;
-import org.l2jmobius.gameserver.model.holders.WarpedSpaceHolder;
-import org.l2jmobius.gameserver.model.instancezone.Instance;
-import org.l2jmobius.gameserver.util.Util;
-
-/**
- * @author Sdw
- */
-public class WarpedSpaceManager
-{
- private Map _warpedSpace = null;
-
- public void addWarpedSpace(Creature creature, int radius)
- {
- if (_warpedSpace == null)
- {
- synchronized (this)
- {
- if (_warpedSpace == null)
- {
- _warpedSpace = new ConcurrentHashMap<>();
- }
- }
- }
- _warpedSpace.put(creature, new WarpedSpaceHolder(creature, radius));
- }
-
- public void removeWarpedSpace(Creature creature)
- {
- _warpedSpace.remove(creature);
- }
-
- public boolean checkForWarpedSpace(int originX, int originY, int originZ, int destinationX, int destinationY, int destinationZ, Instance instance)
- {
- if (_warpedSpace != null)
- {
- for (WarpedSpaceHolder holder : _warpedSpace.values())
- {
- final Creature creature = holder.getCreature();
- if (creature.getInstanceWorld() != instance)
- {
- continue;
- }
- final int radius = creature.getTemplate().getCollisionRadius();
- final boolean originInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), originX, originY, originZ, false, false) <= (holder.getRange() + radius);
- final boolean destinationInRange = Util.calculateDistance(creature.getX(), creature.getY(), creature.getZ(), destinationX, destinationY, destinationZ, false, false) <= (holder.getRange() + radius);
- return destinationInRange ? !originInRange : originInRange;
- }
- }
- return false;
- }
-
- public static WarpedSpaceManager getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final WarpedSpaceManager INSTANCE = new WarpedSpaceManager();
- }
-}