Diagonal movement GeoEngine.
This commit is contained in:
@@ -1,11 +1,41 @@
|
||||
#####################################################
|
||||
# L2J GeoData #
|
||||
#####################################################
|
||||
# #
|
||||
# GeoData files should be unpacked inside: #
|
||||
# gameserver/data/geodata/ #
|
||||
# #
|
||||
# More Info at: #
|
||||
# http://www.l2jserver.com/forum/viewforum.php?f=89 #
|
||||
# #
|
||||
#####################################################
|
||||
##############################################
|
||||
GEODATA COMPENDIUM
|
||||
##############################################
|
||||
|
||||
Comprehensive guide for geodata, by Tryskell and Hasha.
|
||||
|
||||
I - How to configure it
|
||||
a - Prerequisites
|
||||
b - Make it work
|
||||
c - L2D format
|
||||
II - Addendum
|
||||
|
||||
##############################################
|
||||
I - How to configure it
|
||||
##############################################
|
||||
|
||||
----------------------------------------------
|
||||
a - Prerequisites
|
||||
----------------------------------------------
|
||||
|
||||
* A 64bits Windows/Java JDK is a must-have to run server with geodata. Linux servers don't have the issue.
|
||||
* The server can start (hardly) with -Xmx3000m. -Xmx4g is recommended.
|
||||
|
||||
----------------------------------------------
|
||||
b - Make it work
|
||||
----------------------------------------------
|
||||
|
||||
To make geodata working:
|
||||
* unpack your geodata files into "/data/geodata" folder
|
||||
* open "/config/GeoEngine.ini" with your favorite text editor and then edit following config:
|
||||
- CoordSynchronize = 2
|
||||
* If you do not use any geodata files, the server will automatically change this setting to -1.
|
||||
|
||||
----------------------------------------------
|
||||
c - L2D format
|
||||
----------------------------------------------
|
||||
|
||||
* L2D is a new geodata file format. It holds diagonal movement informations, in addition to regular NSWE flags.
|
||||
* Heavier file weight (+30%), but the pathfinding algorithms are processed way faster (-35% calculation times).
|
||||
* L2D files can be converted from L2OFF/L2J formats without losing any information. Converter is part of the gameserver.
|
||||
* Keep in mind to convert new geodata files, once you update your L2OFF/L2J ones.
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
#####################################################
|
||||
# L2J PathNode #
|
||||
#####################################################
|
||||
# #
|
||||
# PathNode files should be unpacked inside: #
|
||||
# gameserver/data/pathnode/ #
|
||||
# #
|
||||
# More Info at: #
|
||||
# http://www.l2jserver.com/forum/viewforum.php?f=89 #
|
||||
# #
|
||||
#####################################################
|
||||
@@ -17,7 +17,7 @@
|
||||
package ai.others;
|
||||
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||
@@ -60,7 +60,7 @@ public final class FleeMonsters extends AbstractNpcAI
|
||||
final int posY = (int) (npc.getY() + (FLEE_DISTANCE * Math.sin(radians)));
|
||||
final int posZ = npc.getZ();
|
||||
|
||||
final Location destination = GeoData.getInstance().moveCheck(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, attacker.getInstanceWorld());
|
||||
final Location destination = GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, attacker.getInstanceWorld());
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, destination);
|
||||
return super.onAttack(npc, attacker, damage, isSummon);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
package ai.others;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
@@ -53,7 +54,8 @@ public class RandomWalkingGuards extends AbstractNpcAI
|
||||
{
|
||||
if (!npc.isInCombat())
|
||||
{
|
||||
addMoveToDesire(npc, GeoData.getInstance().moveCheck(npc.getLocation(), Util.getRandomPosition(npc.getSpawn().getLocation(), 0, Config.MAX_DRIFT_RANGE), npc.getInstanceWorld()), 23);
|
||||
final Location randomLoc = Util.getRandomPosition(npc.getSpawn().getLocation(), 0, Config.MAX_DRIFT_RANGE);
|
||||
addMoveToDesire(npc, GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), randomLoc.getX(), randomLoc.getY(), randomLoc.getZ(), npc.getInstanceWorld()), 23);
|
||||
}
|
||||
startQuestTimer("RANDOM_WALK", getRandom(MIN_WALK_DELAY, MAX_WALK_DELAY), npc, null);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ package handlers.actionhandlers;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||
import com.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.IActionHandler;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -93,7 +93,7 @@ public class L2PcInstanceAction implements IActionHandler
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GeoData.getInstance().canSeeTarget(activeChar, target))
|
||||
if (GeoEngine.getInstance().canSeeTarget(activeChar, target))
|
||||
{
|
||||
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||
activeChar.onActionRequest();
|
||||
@@ -104,7 +104,7 @@ public class L2PcInstanceAction implements IActionHandler
|
||||
{
|
||||
// This Action Failed packet avoids activeChar getting stuck when clicking three or more times
|
||||
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
if (GeoData.getInstance().canSeeTarget(activeChar, target))
|
||||
if (GeoEngine.getInstance().canSeeTarget(activeChar, target))
|
||||
{
|
||||
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, target);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ package handlers.actionhandlers;
|
||||
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.IActionHandler;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -58,7 +58,7 @@ public class L2PetInstanceAction implements IActionHandler
|
||||
// Check if the pet is attackable (without a forced attack) and isn't dead
|
||||
if (target.isAutoAttackable(activeChar) && !isOwner)
|
||||
{
|
||||
if (GeoData.getInstance().canSeeTarget(activeChar, target))
|
||||
if (GeoEngine.getInstance().canSeeTarget(activeChar, target))
|
||||
{
|
||||
// Set the L2PcInstance Intention to AI_INTENTION_ATTACK
|
||||
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||
@@ -67,7 +67,7 @@ public class L2PetInstanceAction implements IActionHandler
|
||||
}
|
||||
else if (!((L2Character) target).isInsideRadius(activeChar, 150, false, false))
|
||||
{
|
||||
if (GeoData.getInstance().canSeeTarget(activeChar, target))
|
||||
if (GeoEngine.getInstance().canSeeTarget(activeChar, target))
|
||||
{
|
||||
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, target);
|
||||
activeChar.onActionRequest();
|
||||
|
||||
@@ -18,7 +18,7 @@ package handlers.actionhandlers;
|
||||
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.IActionHandler;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||
@@ -58,7 +58,7 @@ public class L2SummonAction implements IActionHandler
|
||||
{
|
||||
if (target.isAutoAttackable(activeChar))
|
||||
{
|
||||
if (GeoData.getInstance().canSeeTarget(activeChar, target))
|
||||
if (GeoEngine.getInstance().canSeeTarget(activeChar, target))
|
||||
{
|
||||
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||
activeChar.onActionRequest();
|
||||
@@ -72,7 +72,7 @@ public class L2SummonAction implements IActionHandler
|
||||
{
|
||||
activeChar.updateNotMoveUntil();
|
||||
}
|
||||
else if (GeoData.getInstance().canSeeTarget(activeChar, target))
|
||||
else if (GeoEngine.getInstance().canSeeTarget(activeChar, target))
|
||||
{
|
||||
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, target);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ package handlers.admincommandhandlers;
|
||||
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
@@ -54,12 +54,12 @@ public class AdminGeodata implements IAdminCommandHandler
|
||||
final int worldX = activeChar.getX();
|
||||
final int worldY = activeChar.getY();
|
||||
final int worldZ = activeChar.getZ();
|
||||
final int geoX = GeoData.getInstance().getGeoX(worldX);
|
||||
final int geoY = GeoData.getInstance().getGeoY(worldY);
|
||||
final int geoX = GeoEngine.getInstance().getGeoX(worldX);
|
||||
final int geoY = GeoEngine.getInstance().getGeoY(worldY);
|
||||
|
||||
if (GeoData.getInstance().hasGeoPos(geoX, geoY))
|
||||
if (GeoEngine.getInstance().hasGeoPos(geoX, geoY))
|
||||
{
|
||||
activeChar.sendMessage("WorldX: " + worldX + ", WorldY: " + worldY + ", WorldZ: " + worldZ + ", GeoX: " + geoX + ", GeoY: " + geoY + ", GeoZ: " + GeoData.getInstance().getNearestZ(geoX, geoY, worldZ));
|
||||
activeChar.sendMessage("WorldX: " + worldX + ", WorldY: " + worldY + ", WorldZ: " + worldZ + ", GeoX: " + geoX + ", GeoY: " + geoY + ", GeoZ: " + GeoEngine.getInstance().getHeight(worldX, worldY, worldZ));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -72,12 +72,12 @@ public class AdminGeodata implements IAdminCommandHandler
|
||||
final int worldX = activeChar.getX();
|
||||
final int worldY = activeChar.getY();
|
||||
final int worldZ = activeChar.getZ();
|
||||
final int geoX = GeoData.getInstance().getGeoX(worldX);
|
||||
final int geoY = GeoData.getInstance().getGeoY(worldY);
|
||||
final int geoX = GeoEngine.getInstance().getGeoX(worldX);
|
||||
final int geoY = GeoEngine.getInstance().getGeoY(worldY);
|
||||
|
||||
if (GeoData.getInstance().hasGeoPos(geoX, geoY))
|
||||
if (GeoEngine.getInstance().hasGeoPos(geoX, geoY))
|
||||
{
|
||||
activeChar.sendMessage("WorldX: " + worldX + ", WorldY: " + worldY + ", WorldZ: " + worldZ + ", GeoX: " + geoX + ", GeoY: " + geoY + ", GeoZ: " + GeoData.getInstance().getSpawnHeight(worldX, worldY, worldZ));
|
||||
activeChar.sendMessage("WorldX: " + worldX + ", WorldY: " + worldY + ", WorldZ: " + worldZ + ", GeoX: " + geoX + ", GeoY: " + geoY + ", GeoZ: " + GeoEngine.getInstance().getHeight(worldX, worldY, worldZ));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -90,7 +90,7 @@ public class AdminGeodata implements IAdminCommandHandler
|
||||
final L2Object target = activeChar.getTarget();
|
||||
if (target != null)
|
||||
{
|
||||
if (GeoData.getInstance().canSeeTarget(activeChar, target))
|
||||
if (GeoEngine.getInstance().canSeeTarget(activeChar, target))
|
||||
{
|
||||
activeChar.sendMessage("Can move beeline.");
|
||||
}
|
||||
@@ -110,7 +110,7 @@ public class AdminGeodata implements IAdminCommandHandler
|
||||
final L2Object target = activeChar.getTarget();
|
||||
if (target != null)
|
||||
{
|
||||
if (GeoData.getInstance().canSeeTarget(activeChar, target))
|
||||
if (GeoEngine.getInstance().canSeeTarget(activeChar, target))
|
||||
{
|
||||
activeChar.sendMessage("Can see target.");
|
||||
}
|
||||
|
||||
@@ -18,78 +18,49 @@ package handlers.admincommandhandlers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.geodata.pathfinding.AbstractNodeLoc;
|
||||
import com.l2jmobius.gameserver.geodata.pathfinding.PathFinding;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
|
||||
public class AdminPathNode implements IAdminCommandHandler
|
||||
{
|
||||
private static final String[] ADMIN_COMMANDS =
|
||||
{
|
||||
"admin_pn_info",
|
||||
"admin_show_path",
|
||||
"admin_path_debug",
|
||||
"admin_show_pn",
|
||||
"admin_find_path",
|
||||
"admin_path_find",
|
||||
};
|
||||
|
||||
@Override
|
||||
public boolean useAdminCommand(String command, L2PcInstance activeChar)
|
||||
{
|
||||
if (command.equals("admin_pn_info"))
|
||||
if (command.equals("admin_path_find"))
|
||||
{
|
||||
final String[] info = PathFinding.getInstance().getStat();
|
||||
if (info == null)
|
||||
{
|
||||
activeChar.sendMessage("Not supported");
|
||||
}
|
||||
else
|
||||
{
|
||||
for (String msg : info)
|
||||
{
|
||||
activeChar.sendMessage(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (command.equals("admin_show_path"))
|
||||
{
|
||||
|
||||
}
|
||||
else if (command.equals("admin_path_debug"))
|
||||
{
|
||||
|
||||
}
|
||||
else if (command.equals("admin_show_pn"))
|
||||
{
|
||||
|
||||
}
|
||||
else if (command.equals("admin_find_path"))
|
||||
{
|
||||
if (Config.PATHFINDING == 0)
|
||||
{
|
||||
activeChar.sendMessage("PathFinding is disabled.");
|
||||
return true;
|
||||
}
|
||||
if (activeChar.getTarget() != null)
|
||||
{
|
||||
final List<AbstractNodeLoc> path = PathFinding.getInstance().findPath(activeChar.getX(), activeChar.getY(), (short) activeChar.getZ(), activeChar.getTarget().getX(), activeChar.getTarget().getY(), (short) activeChar.getTarget().getZ(), activeChar.getInstanceWorld(), true);
|
||||
List<Location> path = GeoEngine.getInstance().findPath(activeChar.getX(), activeChar.getY(), (short) activeChar.getZ(), activeChar.getTarget().getX(), activeChar.getTarget().getY(), (short) activeChar.getTarget().getZ(), activeChar.getInstanceWorld(), true);
|
||||
if (path == null)
|
||||
{
|
||||
activeChar.sendMessage("No Route!");
|
||||
return true;
|
||||
activeChar.sendMessage("No route found or pathfinding disabled.");
|
||||
}
|
||||
for (AbstractNodeLoc a : path)
|
||||
else
|
||||
{
|
||||
activeChar.sendMessage("x:" + a.getX() + " y:" + a.getY() + " z:" + a.getZ());
|
||||
for (Location point : path)
|
||||
{
|
||||
activeChar.sendMessage("x:" + point.getX() + " y:" + point.getY() + " z:" + point.getZ());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
activeChar.sendMessage("No Target!");
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public class AdminServerInfo implements IAdminCommandHandler
|
||||
html.replace("%slots%", getPlayersCount("ALL") + "/" + Config.MAXIMUM_ONLINE_USERS);
|
||||
html.replace("%gameTime%", GameTimeController.getInstance().getGameHour() + ":" + GameTimeController.getInstance().getGameMinute());
|
||||
html.replace("%dayNight%", GameTimeController.getInstance().isNight() ? "Night" : "Day");
|
||||
html.replace("%geodata%", Config.PATHFINDING > 0 ? "Enabled" : "Disabled");
|
||||
html.replace("%geodata%", Config.PATHFINDING ? "Enabled" : "Disabled");
|
||||
html.replace("%serverTime%", fmt.format(new Date(System.currentTimeMillis())));
|
||||
html.replace("%serverUpTime%", getServerUpTime());
|
||||
html.replace("%onlineAll%", getPlayersCount("ALL"));
|
||||
|
||||
@@ -29,7 +29,7 @@ import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.datatables.SpawnTable;
|
||||
import com.l2jmobius.gameserver.enums.AdminTeleportType;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||
import com.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.MapRegionManager;
|
||||
@@ -194,7 +194,7 @@ public class AdminTeleport implements IAdminCommandHandler
|
||||
st.nextToken();
|
||||
final int x = (int) Float.parseFloat(st.nextToken());
|
||||
final int y = (int) Float.parseFloat(st.nextToken());
|
||||
final int z = st.hasMoreTokens() ? ((int) Float.parseFloat(st.nextToken())) : GeoData.getInstance().getHeight(x, y, L2World.MAP_MAX_Z);
|
||||
final int z = st.hasMoreTokens() ? ((int) Float.parseFloat(st.nextToken())) : GeoEngine.getInstance().getHeight(x, y, L2World.MAP_MAX_Z);
|
||||
|
||||
activeChar.teleToLocation(x, y, z);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.util.CommonUtil;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.enums.PlayerAction;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
@@ -301,7 +301,7 @@ public class AdminZones extends AbstractNpcAI implements IAdminCommandHandler
|
||||
{
|
||||
final int x = zone.getX()[i];
|
||||
final int y = zone.getY()[i];
|
||||
holder.addNode(new Location(x, y, GeoData.getInstance().getSpawnHeight(x, y, Rnd.get(zone.getLowZ(), zone.getHighZ()))));
|
||||
holder.addNode(new Location(x, y, GeoEngine.getInstance().getHeight(x, y, Rnd.get(zone.getLowZ(), zone.getHighZ()))));
|
||||
}
|
||||
showPoints(activeChar);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package handlers.effecthandlers;
|
||||
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -89,7 +89,7 @@ public final class Blink extends AbstractEffect
|
||||
final int y = effected.getY() + y1;
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location destination = GeoData.getInstance().moveCheck(effected.getX(), effected.getY(), effected.getZ(), x, y, z, effected.getInstanceWorld());
|
||||
final Location destination = GeoEngine.getInstance().canMoveToTargetLoc(effected.getX(), effected.getY(), effected.getZ(), x, y, z, effected.getInstanceWorld());
|
||||
|
||||
effected.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effected.broadcastPacket(new FlyToLocation(effected, destination, _flyType, _flySpeed, _flyDelay, _animationSpeed));
|
||||
|
||||
@@ -19,7 +19,7 @@ package handlers.effecthandlers;
|
||||
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -90,7 +90,7 @@ public final class Fear extends AbstractEffect
|
||||
final int posY = (int) (effected.getY() + (FEAR_RANGE * Math.sin(radians)));
|
||||
final int posZ = effected.getZ();
|
||||
|
||||
final Location destination = GeoData.getInstance().moveCheck(effected.getX(), effected.getY(), effected.getZ(), posX, posY, posZ, effected.getInstanceWorld());
|
||||
final Location destination = GeoEngine.getInstance().canMoveToTargetLoc(effected.getX(), effected.getY(), effected.getZ(), posX, posY, posZ, effected.getInstanceWorld());
|
||||
effected.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, destination);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package handlers.effecthandlers;
|
||||
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -57,7 +57,7 @@ public final class FlyAway extends AbstractEffect
|
||||
final int y = (int) (effector.getY() - (nRadius * (dy / distance)));
|
||||
final int z = effector.getZ();
|
||||
|
||||
final Location destination = GeoData.getInstance().moveCheck(effected.getX(), effected.getY(), effected.getZ(), x, y, z, effected.getInstanceWorld());
|
||||
final Location destination = GeoEngine.getInstance().canMoveToTargetLoc(effected.getX(), effected.getY(), effected.getZ(), x, y, z, effected.getInstanceWorld());
|
||||
|
||||
effected.broadcastPacket(new FlyToLocation(effected, destination, FlyType.THROW_UP));
|
||||
effected.setXYZ(destination);
|
||||
|
||||
@@ -18,7 +18,7 @@ package handlers.effecthandlers;
|
||||
|
||||
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -107,7 +107,7 @@ public final class KnockBack extends AbstractEffect
|
||||
final int x = (int) (effected.getX() + (_distance * Math.cos(radians)));
|
||||
final int y = (int) (effected.getY() + (_distance * Math.sin(radians)));
|
||||
final int z = effected.getZ();
|
||||
final Location loc = GeoData.getInstance().moveCheck(effected.getX(), effected.getY(), effected.getZ(), x, y, z, effected.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().canMoveToTargetLoc(effected.getX(), effected.getY(), effected.getZ(), x, y, z, effected.getInstanceWorld());
|
||||
|
||||
effected.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effected.broadcastPacket(new FlyToLocation(effected, loc, _type, _speed, _delay, _animationSpeed));
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package handlers.effecthandlers;
|
||||
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||
@@ -62,7 +62,7 @@ public final class PullBack extends AbstractEffect
|
||||
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
// In retail, you get debuff, but you are not even moved if there is obstacle. You are still disabled from using skills and moving though.
|
||||
if (GeoData.getInstance().canMove(effected, effector))
|
||||
if (GeoEngine.getInstance().canMoveToTarget(effected.getX(), effected.getY(), effected.getZ(), effector.getX(), effector.getY(), effector.getZ(), effector.getInstanceWorld()))
|
||||
{
|
||||
effected.broadcastPacket(new FlyToLocation(effected, effector, _type, _speed, _delay, _animationSpeed));
|
||||
effected.setXYZ(effector);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package handlers.effecthandlers;
|
||||
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -88,7 +88,7 @@ public final class TeleportToSummon extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = summon.getZ();
|
||||
|
||||
final Location loc = GeoData.getInstance().moveCheck(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().canMoveToTargetLoc(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package handlers.effecthandlers;
|
||||
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -70,7 +70,7 @@ public final class TeleportToTarget extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location loc = GeoData.getInstance().moveCheck(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().canMoveToTargetLoc(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package handlers.skillconditionhandlers;
|
||||
|
||||
import com.l2jmobius.gameserver.enums.Position;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -70,6 +70,6 @@ public class OpBlinkSkillCondition implements ISkillCondition
|
||||
final int y = caster.getY() + y1;
|
||||
final int z = caster.getZ();
|
||||
|
||||
return GeoData.getInstance().canMove(caster.getX(), caster.getY(), caster.getZ(), x, y, z, caster.getInstanceWorld());
|
||||
return GeoEngine.getInstance().canMoveToTarget(caster.getX(), caster.getY(), caster.getZ(), x, y, z, caster.getInstanceWorld());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package handlers.targethandlers;
|
||||
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.ITargetTypeHandler;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -103,7 +103,7 @@ public class Enemy implements ITargetTypeHandler
|
||||
}
|
||||
|
||||
// Geodata check when character is within range.
|
||||
if (!GeoData.getInstance().canSeeTarget(activeChar, target))
|
||||
if (!GeoEngine.getInstance().canSeeTarget(activeChar, target))
|
||||
{
|
||||
if (sendMessage)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package handlers.targethandlers;
|
||||
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.ITargetTypeHandler;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -73,7 +73,7 @@ public class EnemyNot implements ITargetTypeHandler
|
||||
}
|
||||
}
|
||||
|
||||
if ((skill.isFlyType()) && !GeoData.getInstance().canMove(activeChar, target))
|
||||
if ((skill.isFlyType()) && !GeoEngine.getInstance().canMoveToTarget(activeChar.getX(), activeChar.getY(), activeChar.getZ(), target.getX(), target.getY(), target.getZ(), activeChar.getInstanceWorld()))
|
||||
{
|
||||
if (sendMessage)
|
||||
{
|
||||
@@ -83,7 +83,7 @@ public class EnemyNot implements ITargetTypeHandler
|
||||
}
|
||||
|
||||
// Geodata check when character is within range.
|
||||
if (!GeoData.getInstance().canSeeTarget(activeChar, target))
|
||||
if (!GeoEngine.getInstance().canSeeTarget(activeChar, target))
|
||||
{
|
||||
if (sendMessage)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package handlers.targethandlers;
|
||||
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.ITargetTypeHandler;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -103,7 +103,7 @@ public class EnemyOnly implements ITargetTypeHandler
|
||||
}
|
||||
|
||||
// Geodata check when character is within range.
|
||||
if (!GeoData.getInstance().canSeeTarget(activeChar, target))
|
||||
if (!GeoEngine.getInstance().canSeeTarget(activeChar, target))
|
||||
{
|
||||
if (sendMessage)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package handlers.targethandlers;
|
||||
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.ITargetTypeHandler;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
@@ -52,7 +52,7 @@ public class Ground implements ITargetTypeHandler
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!GeoData.getInstance().canSeeTarget(activeChar, worldPosition))
|
||||
if (!GeoEngine.getInstance().canSeeTarget(activeChar, worldPosition))
|
||||
{
|
||||
if (sendMessage)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package handlers.targethandlers;
|
||||
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.ITargetTypeHandler;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -80,7 +80,7 @@ public class NpcBody implements ITargetTypeHandler
|
||||
}
|
||||
|
||||
// Geodata check when character is within range.
|
||||
if (!GeoData.getInstance().canSeeTarget(activeChar, npc))
|
||||
if (!GeoEngine.getInstance().canSeeTarget(activeChar, npc))
|
||||
{
|
||||
if (sendMessage)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package handlers.targethandlers;
|
||||
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.ITargetTypeHandler;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -107,7 +107,7 @@ public class PcBody implements ITargetTypeHandler
|
||||
}
|
||||
|
||||
// Geodata check when character is within range.
|
||||
if (!GeoData.getInstance().canSeeTarget(activeChar, target))
|
||||
if (!GeoEngine.getInstance().canSeeTarget(activeChar, target))
|
||||
{
|
||||
if (sendMessage)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package handlers.targethandlers;
|
||||
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.ITargetTypeHandler;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -75,7 +75,7 @@ public class Target implements ITargetTypeHandler
|
||||
}
|
||||
}
|
||||
|
||||
if ((skill.isFlyType()) && !GeoData.getInstance().canMove(activeChar, target))
|
||||
if (skill.isFlyType() && !GeoEngine.getInstance().canMoveToTarget(activeChar.getX(), activeChar.getY(), activeChar.getZ(), target.getX(), target.getY(), target.getZ(), activeChar.getInstanceWorld()))
|
||||
{
|
||||
if (sendMessage)
|
||||
{
|
||||
@@ -85,7 +85,7 @@ public class Target implements ITargetTypeHandler
|
||||
}
|
||||
|
||||
// Geodata check when character is within range.
|
||||
if (!GeoData.getInstance().canSeeTarget(activeChar, target))
|
||||
if (!GeoEngine.getInstance().canSeeTarget(activeChar, target))
|
||||
{
|
||||
if (sendMessage)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.AffectObjectHandler;
|
||||
import com.l2jmobius.gameserver.handler.IAffectObjectHandler;
|
||||
import com.l2jmobius.gameserver.handler.IAffectScopeHandler;
|
||||
@@ -67,7 +67,7 @@ public class Fan implements IAffectScopeHandler
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!GeoData.getInstance().canSeeTarget(activeChar, c))
|
||||
if (!GeoEngine.getInstance().canSeeTarget(activeChar, c))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.AffectObjectHandler;
|
||||
import com.l2jmobius.gameserver.handler.IAffectObjectHandler;
|
||||
import com.l2jmobius.gameserver.handler.IAffectScopeHandler;
|
||||
@@ -68,7 +68,7 @@ public class FanPB implements IAffectScopeHandler
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!GeoData.getInstance().canSeeTarget(activeChar, c))
|
||||
if (!GeoEngine.getInstance().canSeeTarget(activeChar, c))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.AffectObjectHandler;
|
||||
import com.l2jmobius.gameserver.handler.IAffectObjectHandler;
|
||||
import com.l2jmobius.gameserver.handler.IAffectScopeHandler;
|
||||
@@ -59,7 +59,7 @@ public class PointBlank implements IAffectScopeHandler
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!GeoData.getInstance().canSeeTarget(target, c))
|
||||
if (!GeoEngine.getInstance().canSeeTarget(target, c))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.AffectObjectHandler;
|
||||
import com.l2jmobius.gameserver.handler.IAffectObjectHandler;
|
||||
import com.l2jmobius.gameserver.handler.IAffectScopeHandler;
|
||||
@@ -65,7 +65,7 @@ public class Range implements IAffectScopeHandler
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!GeoData.getInstance().canSeeTarget(target, c))
|
||||
if (!GeoEngine.getInstance().canSeeTarget(target, c))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.AffectObjectHandler;
|
||||
import com.l2jmobius.gameserver.handler.IAffectObjectHandler;
|
||||
import com.l2jmobius.gameserver.handler.IAffectScopeHandler;
|
||||
@@ -69,7 +69,7 @@ public class RingRange implements IAffectScopeHandler
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!GeoData.getInstance().canSeeTarget(target, c))
|
||||
if (!GeoEngine.getInstance().canSeeTarget(target, c))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.AffectObjectHandler;
|
||||
import com.l2jmobius.gameserver.handler.IAffectObjectHandler;
|
||||
import com.l2jmobius.gameserver.handler.IAffectScopeHandler;
|
||||
@@ -77,7 +77,7 @@ public class Square implements IAffectScopeHandler
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!GeoData.getInstance().canSeeTarget(activeChar, c))
|
||||
if (!GeoEngine.getInstance().canSeeTarget(activeChar, c))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.handler.AffectObjectHandler;
|
||||
import com.l2jmobius.gameserver.handler.IAffectObjectHandler;
|
||||
import com.l2jmobius.gameserver.handler.IAffectScopeHandler;
|
||||
@@ -77,7 +77,7 @@ public class SquarePB implements IAffectScopeHandler
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!GeoData.getInstance().canSeeTarget(activeChar, c))
|
||||
if (!GeoEngine.getInstance().canSeeTarget(activeChar, c))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user