diff --git a/L2J_DataPack/dist/game/data/scripts/ai/group_template/FleeMonsters.java b/L2J_DataPack/dist/game/data/scripts/ai/group_template/FleeMonsters.java index 6e51a588e5370bb6cb535fe83532070d1ba3a3ff..a94528e587cbf50da45d63295e231bca11b788ff 100644 --- a/L2J_DataPack/dist/game/data/scripts/ai/group_template/FleeMonsters.java +++ b/L2J_DataPack/dist/game/data/scripts/ai/group_template/FleeMonsters.java @@ -20,7 +20,6 @@ package ai.group_template; import ai.npc.AbstractNpcAI; -import com.l2jserver.Config; import com.l2jserver.gameserver.GeoData; import com.l2jserver.gameserver.ai.CtrlIntention; import com.l2jserver.gameserver.model.Location; @@ -74,15 +73,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; - if (Config.GEODATA > 0) - { - destination = GeoData.getInstance().moveCheck(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, attacker.getInstanceId()); - } - else - { - destination = new Location(posX, posY, posZ); - } + final Location destination = GeoData.getInstance().moveCheck(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, attacker.getInstanceId()); npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, destination); return super.onAttack(npc, attacker, damage, isSummon); } diff --git a/L2J_DataPack/dist/game/data/scripts/handlers/actionhandlers/L2PcInstanceAction.java b/L2J_DataPack/dist/game/data/scripts/handlers/actionhandlers/L2PcInstanceAction.java index 947546bfc13a6a4c9471480d20ba7bba3e5e1fa4..b89956755b4e8bbbdab49325257a193eaec21e8a 100644 --- a/L2J_DataPack/dist/game/data/scripts/handlers/actionhandlers/L2PcInstanceAction.java +++ b/L2J_DataPack/dist/game/data/scripts/handlers/actionhandlers/L2PcInstanceAction.java @@ -18,7 +18,6 @@ */ package handlers.actionhandlers; -import com.l2jserver.Config; import com.l2jserver.gameserver.GeoData; import com.l2jserver.gameserver.ai.CtrlIntention; import com.l2jserver.gameserver.enums.InstanceType; @@ -101,15 +100,7 @@ public class L2PcInstanceAction implements IActionHandler } else { - if (Config.GEODATA > 0) - { - if (GeoData.getInstance().canSeeTarget(activeChar, target)) - { - activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target); - activeChar.onActionRequest(); - } - } - else + if (GeoData.getInstance().canSeeTarget(activeChar, target)) { activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target); activeChar.onActionRequest(); @@ -120,14 +111,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 (Config.GEODATA > 0) - { - if (GeoData.getInstance().canSeeTarget(activeChar, target)) - { - activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, target); - } - } - else + if (GeoData.getInstance().canSeeTarget(activeChar, target)) { activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, target); } diff --git a/L2J_DataPack/dist/game/data/scripts/handlers/actionhandlers/L2PetInstanceAction.java b/L2J_DataPack/dist/game/data/scripts/handlers/actionhandlers/L2PetInstanceAction.java index b9247c8328c36185ba8ad8b7265cda4f572d5cf8..1a6895331efcf364fedc19f3c45bf11c5a2ad612 100644 --- a/L2J_DataPack/dist/game/data/scripts/handlers/actionhandlers/L2PetInstanceAction.java +++ b/L2J_DataPack/dist/game/data/scripts/handlers/actionhandlers/L2PetInstanceAction.java @@ -18,7 +18,6 @@ */ package handlers.actionhandlers; -import com.l2jserver.Config; import com.l2jserver.gameserver.GeoData; import com.l2jserver.gameserver.ai.CtrlIntention; import com.l2jserver.gameserver.enums.InstanceType; @@ -61,32 +60,16 @@ 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 (Config.GEODATA > 0) - { - if (GeoData.getInstance().canSeeTarget(activeChar, target)) - { - // Set the L2PcInstance Intention to AI_INTENTION_ATTACK - activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target); - activeChar.onActionRequest(); - } - } - else + if (GeoData.getInstance().canSeeTarget(activeChar, target)) { + // Set the L2PcInstance Intention to AI_INTENTION_ATTACK activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target); activeChar.onActionRequest(); } } else if (!((L2Character) target).isInsideRadius(activeChar, 150, false, false)) { - if (Config.GEODATA > 0) - { - if (GeoData.getInstance().canSeeTarget(activeChar, target)) - { - activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, target); - activeChar.onActionRequest(); - } - } - else + if (GeoData.getInstance().canSeeTarget(activeChar, target)) { activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, target); activeChar.onActionRequest(); diff --git a/L2J_DataPack/dist/game/data/scripts/handlers/actionhandlers/L2SummonAction.java b/L2J_DataPack/dist/game/data/scripts/handlers/actionhandlers/L2SummonAction.java index 962aebe58ff00720513f5dc944b19047fd9f2831..a2ad9f1a489d20ffb8655333fe4e0c9620d00dad 100644 --- a/L2J_DataPack/dist/game/data/scripts/handlers/actionhandlers/L2SummonAction.java +++ b/L2J_DataPack/dist/game/data/scripts/handlers/actionhandlers/L2SummonAction.java @@ -18,7 +18,6 @@ */ package handlers.actionhandlers; -import com.l2jserver.Config; import com.l2jserver.gameserver.GeoData; import com.l2jserver.gameserver.ai.CtrlIntention; import com.l2jserver.gameserver.enums.InstanceType; @@ -61,15 +60,7 @@ public class L2SummonAction implements IActionHandler { if (target.isAutoAttackable(activeChar)) { - if (Config.GEODATA > 0) - { - if (GeoData.getInstance().canSeeTarget(activeChar, target)) - { - activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target); - activeChar.onActionRequest(); - } - } - else + if (GeoData.getInstance().canSeeTarget(activeChar, target)) { activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target); activeChar.onActionRequest(); @@ -83,17 +74,13 @@ public class L2SummonAction implements IActionHandler { activeChar.updateNotMoveUntil(); } - else if (Config.GEODATA > 0) + else { if (GeoData.getInstance().canSeeTarget(activeChar, target)) { activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, target); } } - else - { - activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, target); - } } } return true; diff --git a/L2J_DataPack/dist/game/data/scripts/handlers/admincommandhandlers/AdminPathNode.java b/L2J_DataPack/dist/game/data/scripts/handlers/admincommandhandlers/AdminPathNode.java index 1ba87c85055940b2e2b4e45e342eea881b3594ee..c6c3dd2cdfd61e378eb80038cf103bcd60d62fef 100644 --- a/L2J_DataPack/dist/game/data/scripts/handlers/admincommandhandlers/AdminPathNode.java +++ b/L2J_DataPack/dist/game/data/scripts/handlers/admincommandhandlers/AdminPathNode.java @@ -69,9 +69,9 @@ public class AdminPathNode implements IAdminCommandHandler } else if (command.equals("admin_find_path")) { - if (Config.GEODATA < 2) + if (Config.PATHFINDING == 0) { - activeChar.sendMessage("PathFinding has not been enabled."); + activeChar.sendMessage("PathFinding is disabled."); return true; } if (activeChar.getTarget() != null) diff --git a/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/Blink.java b/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/Blink.java index f1dd6b7434ebe4fe9bf3b7d93036cf3d76e8cd16..40c32a246c746eb20fd62d4429b5a34c66732d07 100644 --- a/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/Blink.java +++ b/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/Blink.java @@ -18,7 +18,6 @@ */ package handlers.effecthandlers; -import com.l2jserver.Config; import com.l2jserver.gameserver.GeoData; import com.l2jserver.gameserver.ai.CtrlIntention; import com.l2jserver.gameserver.model.Location; @@ -72,17 +71,14 @@ public final class Blink extends AbstractEffect int x = effected.getX() + x1; int y = effected.getY() + y1; int z = effected.getZ(); - Location loc = new Location(x, y, z); - if (Config.GEODATA > 0) - { - loc = GeoData.getInstance().moveCheck(effected.getX(), effected.getY(), effected.getZ(), x, y, z, effected.getInstanceId()); - } + + final Location destination = GeoData.getInstance().moveCheck(effected.getX(), effected.getY(), effected.getZ(), x, y, z, effected.getInstanceId()); effected.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); - effected.broadcastPacket(new FlyToLocation(effected, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); + effected.broadcastPacket(new FlyToLocation(effected, destination, FlyType.DUMMY)); effected.abortAttack(); effected.abortCast(); - effected.setXYZ(loc); + effected.setXYZ(destination); effected.broadcastPacket(new ValidateLocation(effected)); } } diff --git a/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/EnemyCharge.java b/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/EnemyCharge.java index e8b849b5035db04868cc664919ea6e91789240be..f73665d50cdb9823e05870340d863b545bbd1b4a 100644 --- a/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/EnemyCharge.java +++ b/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/EnemyCharge.java @@ -18,7 +18,6 @@ */ package handlers.effecthandlers; -import com.l2jserver.Config; import com.l2jserver.gameserver.GeoData; import com.l2jserver.gameserver.model.Location; import com.l2jserver.gameserver.model.StatsSet; @@ -94,16 +93,12 @@ public final class EnemyCharge extends AbstractEffect int y = curY + (int) ((distance - offset) * sin); int z = info.getEffected().getZ(); - if (Config.GEODATA > 0) - { - Location destiny = GeoData.getInstance().moveCheck(info.getEffector().getX(), info.getEffector().getY(), info.getEffector().getZ(), x, y, z, info.getEffector().getInstanceId()); - x = destiny.getX(); - y = destiny.getY(); - } - info.getEffector().broadcastPacket(new FlyToLocation(info.getEffector(), x, y, z, FlyType.CHARGE)); + final Location destination = GeoData.getInstance().moveCheck(info.getEffector().getX(), info.getEffector().getY(), info.getEffector().getZ(), x, y, z, info.getEffector().getInstanceId()); + + info.getEffector().broadcastPacket(new FlyToLocation(info.getEffector(), destination, FlyType.CHARGE)); // maybe is need force set X,Y,Z - info.getEffector().setXYZ(x, y, z); + info.getEffector().setXYZ(destination); info.getEffector().broadcastPacket(new ValidateLocation(info.getEffector())); } } diff --git a/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/Fear.java b/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/Fear.java index dd5fe65f9eb8ff9d096fcade49b66e11aab2397c..1c07b35c016f038121a98a971bf3db07ba328faa 100644 --- a/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/Fear.java +++ b/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/Fear.java @@ -18,7 +18,6 @@ */ package handlers.effecthandlers; -import com.l2jserver.Config; import com.l2jserver.gameserver.GeoData; import com.l2jserver.gameserver.ai.CtrlEvent; import com.l2jserver.gameserver.ai.CtrlIntention; @@ -101,18 +100,12 @@ public final class Fear extends AbstractEffect int posY = (int) (info.getEffected().getY() + (FEAR_RANGE * Math.sin(radians))); int posZ = info.getEffected().getZ(); - if (Config.GEODATA > 0) - { - Location destiny = GeoData.getInstance().moveCheck(info.getEffected().getX(), info.getEffected().getY(), info.getEffected().getZ(), posX, posY, posZ, info.getEffected().getInstanceId()); - posX = destiny.getX(); - posY = destiny.getY(); - } - if (!info.getEffected().isPet()) { info.getEffected().setRunning(); } - info.getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(posX, posY, posZ)); + final Location destination = GeoData.getInstance().moveCheck(info.getEffected().getX(), info.getEffected().getY(), info.getEffected().getZ(), posX, posY, posZ, info.getEffected().getInstanceId()); + info.getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, destination); } } diff --git a/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/TeleportToTarget.java b/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/TeleportToTarget.java index 284a5255fae330f36581c23a93316f6f50990641..c5c5799fc7f0129eef61c8895bf12f740f7ce87c 100644 --- a/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/TeleportToTarget.java +++ b/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/TeleportToTarget.java @@ -18,7 +18,6 @@ */ package handlers.effecthandlers; -import com.l2jserver.Config; import com.l2jserver.gameserver.GeoData; import com.l2jserver.gameserver.ai.CtrlIntention; import com.l2jserver.gameserver.model.Location; @@ -80,11 +79,8 @@ public final class TeleportToTarget extends AbstractEffect int x = (int) (px + (25 * Math.cos(ph))); int y = (int) (py + (25 * Math.sin(ph))); int z = target.getZ(); - Location loc = new Location(x, y, z); - if (Config.GEODATA > 0) - { - loc = GeoData.getInstance().moveCheck(activeChar.getX(), activeChar.getY(), activeChar.getZ(), x, y, z, activeChar.getInstanceId()); - } + + final Location loc = GeoData.getInstance().moveCheck(activeChar.getX(), activeChar.getY(), activeChar.getZ(), x, y, z, activeChar.getInstanceId()); activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); activeChar.broadcastPacket(new FlyToLocation(activeChar, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); diff --git a/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/ThrowUp.java b/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/ThrowUp.java index e71f399d27557b2dcc708c0a12cff78651c71b84..0552d4f33119e4d608c74253e34efa67525a450d 100644 --- a/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/ThrowUp.java +++ b/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/ThrowUp.java @@ -18,7 +18,6 @@ */ package handlers.effecthandlers; -import com.l2jserver.Config; import com.l2jserver.gameserver.GeoData; import com.l2jserver.gameserver.model.Location; import com.l2jserver.gameserver.model.StatsSet; @@ -98,16 +97,11 @@ public final class ThrowUp extends AbstractEffect int y = info.getEffector().getY() - (int) (offset * sin); int z = info.getEffected().getZ(); - if (Config.GEODATA > 0) - { - Location destiny = GeoData.getInstance().moveCheck(info.getEffected().getX(), info.getEffected().getY(), info.getEffected().getZ(), x, y, z, info.getEffected().getInstanceId()); - x = destiny.getX(); - y = destiny.getY(); - } + final Location destination = GeoData.getInstance().moveCheck(info.getEffected().getX(), info.getEffected().getY(), info.getEffected().getZ(), x, y, z, info.getEffected().getInstanceId()); - info.getEffected().broadcastPacket(new FlyToLocation(info.getEffected(), x, y, z, FlyType.THROW_UP)); + info.getEffected().broadcastPacket(new FlyToLocation(info.getEffected(), destination, FlyType.THROW_UP)); // TODO: Review. - info.getEffected().setXYZ(x, y, z); + info.getEffected().setXYZ(destination); info.getEffected().broadcastPacket(new ValidateLocation(info.getEffected())); } } diff --git a/L2J_DataPack/dist/game/data/scripts/handlers/targethandlers/AreaFriendly.java b/L2J_DataPack/dist/game/data/scripts/handlers/targethandlers/AreaFriendly.java index 9062953661dbf6ccc80b1b821594665430b519f2..11fdb7bc23d654904e7259fa370231a481f903c1 100644 --- a/L2J_DataPack/dist/game/data/scripts/handlers/targethandlers/AreaFriendly.java +++ b/L2J_DataPack/dist/game/data/scripts/handlers/targethandlers/AreaFriendly.java @@ -24,7 +24,6 @@ import java.util.Collections; import java.util.Comparator; import java.util.List; -import com.l2jserver.Config; import com.l2jserver.gameserver.GeoData; import com.l2jserver.gameserver.handler.ITargetTypeHandler; import com.l2jserver.gameserver.model.L2Object; @@ -99,7 +98,7 @@ public class AreaFriendly implements ITargetTypeHandler private boolean checkTarget(L2Character activeChar, L2Character target) { - if ((Config.GEODATA > 0) && !GeoData.getInstance().canSeeTarget(activeChar, target)) + if (!GeoData.getInstance().canSeeTarget(activeChar, target)) { return false; } diff --git a/L2J_DataPack/dist/game/data/scripts/instances/CrystalCaverns/CrystalCaverns.java b/L2J_DataPack/dist/game/data/scripts/instances/CrystalCaverns/CrystalCaverns.java index 4b8c5eadd7208a3a517a6887a1ec7020e8b50fff..a73a95869b0916c3af375e6fb790997ca5311a15 100644 --- a/L2J_DataPack/dist/game/data/scripts/instances/CrystalCaverns/CrystalCaverns.java +++ b/L2J_DataPack/dist/game/data/scripts/instances/CrystalCaverns/CrystalCaverns.java @@ -1642,16 +1642,12 @@ public final class CrystalCaverns extends Quest int _y = effector.getY() - (int) (offset * sin); int _z = effected.getZ(); - if (Config.GEODATA > 0) - { - Location destiny = GeoData.getInstance().moveCheck(effected.getX(), effected.getY(), effected.getZ(), _x, _y, _z, effected.getInstanceId()); - _x = destiny.getX(); - _y = destiny.getY(); - } - effected.broadcastPacket(new FlyToLocation(effected, _x, _y, _z, FlyType.THROW_UP)); + Location destination = GeoData.getInstance().moveCheck(effected.getX(), effected.getY(), effected.getZ(), _x, _y, _z, effected.getInstanceId()); + + effected.broadcastPacket(new FlyToLocation(effected, destination, FlyType.THROW_UP)); // maybe is need force set X,Y,Z - effected.setXYZ(_x, _y, _z); + effected.setXYZ(destination); effected.broadcastPacket(new ValidateLocation(effected)); }