diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Character.java index e03f21d8f2..9f970980fb 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -75,7 +75,6 @@ import com.l2jmobius.gameserver.model.Location; import com.l2jmobius.gameserver.model.PcCondOverride; import com.l2jmobius.gameserver.model.TeleportWhereType; import com.l2jmobius.gameserver.model.TimeStamp; -import com.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.stat.CharStat; @@ -3477,7 +3476,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe m.onGeodataPathIndex = -1; // Initialize not on geodata path m.disregardingGeodata = false; - if (!isFlying() && !isInsideZone(ZoneId.WATER) && !isWalker() && !isVehicle()) + if (!isFlying() && !isInsideZone(ZoneId.WATER) && !isVehicle()) { final boolean isInVehicle = isPlayer() && (getActingPlayer().getVehicle() != null); if (isInVehicle) @@ -3526,14 +3525,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe dy = y - curY; dz = z - curZ; distance = verticalMovementOnly ? Math.pow(dz, 2) : Math.hypot(dx, dy); - } - - // Pathfinding checks. - if (Config.PATHFINDING && ((originalDistance - distance) > 30) && !isControlBlocked() && !isInVehicle) - { - // Path calculation -- overrides previous movement check - if (isPlayable() || isMinion() || isInCombat() || (this instanceof FriendlyNpcInstance)) + + // Pathfinding checks. + if (((originalDistance - distance) > 30) && !isControlBlocked() && !isInVehicle) { + // Path calculation -- overrides previous movement check m.geoPath = GeoEngine.getInstance().findPath(curX, curY, curZ, originalX, originalY, originalZ, getInstanceWorld()); if ((m.geoPath == null) || (m.geoPath.size() < 2)) // No path found { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java index ef8792b970..6a2a831efa 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -76,7 +76,6 @@ import com.l2jmobius.gameserver.model.Location; import com.l2jmobius.gameserver.model.PcCondOverride; import com.l2jmobius.gameserver.model.TeleportWhereType; import com.l2jmobius.gameserver.model.TimeStamp; -import com.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.stat.CharStat; @@ -3481,7 +3480,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe m.onGeodataPathIndex = -1; // Initialize not on geodata path m.disregardingGeodata = false; - if (!isFlying() && !isInsideZone(ZoneId.WATER) && !isWalker() && !isVehicle()) + if (!isFlying() && !isInsideZone(ZoneId.WATER) && !isVehicle()) { final boolean isInVehicle = isPlayer() && (getActingPlayer().getVehicle() != null); if (isInVehicle) @@ -3530,14 +3529,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe dy = y - curY; dz = z - curZ; distance = verticalMovementOnly ? Math.pow(dz, 2) : Math.hypot(dx, dy); - } - - // Pathfinding checks. - if (Config.PATHFINDING && ((originalDistance - distance) > 30) && !isControlBlocked() && !isInVehicle) - { - // Path calculation -- overrides previous movement check - if (isPlayable() || isMinion() || isInCombat() || (this instanceof FriendlyNpcInstance)) + + // Pathfinding checks. + if (((originalDistance - distance) > 30) && !isControlBlocked() && !isInVehicle) { + // Path calculation -- overrides previous movement check m.geoPath = GeoEngine.getInstance().findPath(curX, curY, curZ, originalX, originalY, originalZ, getInstanceWorld()); if ((m.geoPath == null) || (m.geoPath.size() < 2)) // No path found { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Character.java index ef8792b970..6a2a831efa 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -76,7 +76,6 @@ import com.l2jmobius.gameserver.model.Location; import com.l2jmobius.gameserver.model.PcCondOverride; import com.l2jmobius.gameserver.model.TeleportWhereType; import com.l2jmobius.gameserver.model.TimeStamp; -import com.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.stat.CharStat; @@ -3481,7 +3480,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe m.onGeodataPathIndex = -1; // Initialize not on geodata path m.disregardingGeodata = false; - if (!isFlying() && !isInsideZone(ZoneId.WATER) && !isWalker() && !isVehicle()) + if (!isFlying() && !isInsideZone(ZoneId.WATER) && !isVehicle()) { final boolean isInVehicle = isPlayer() && (getActingPlayer().getVehicle() != null); if (isInVehicle) @@ -3530,14 +3529,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe dy = y - curY; dz = z - curZ; distance = verticalMovementOnly ? Math.pow(dz, 2) : Math.hypot(dx, dy); - } - - // Pathfinding checks. - if (Config.PATHFINDING && ((originalDistance - distance) > 30) && !isControlBlocked() && !isInVehicle) - { - // Path calculation -- overrides previous movement check - if (isPlayable() || isMinion() || isInCombat() || (this instanceof FriendlyNpcInstance)) + + // Pathfinding checks. + if (((originalDistance - distance) > 30) && !isControlBlocked() && !isInVehicle) { + // Path calculation -- overrides previous movement check m.geoPath = GeoEngine.getInstance().findPath(curX, curY, curZ, originalX, originalY, originalZ, getInstanceWorld()); if ((m.geoPath == null) || (m.geoPath.size() < 2)) // No path found { diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/L2Character.java index a790930a8a..329e37ba9c 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -66,8 +66,6 @@ import com.l2jmobius.gameserver.model.TeleportWhereType; import com.l2jmobius.gameserver.model.TimeStamp; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance; -import com.l2jmobius.gameserver.model.actor.instance.L2QuestGuardInstance; -import com.l2jmobius.gameserver.model.actor.instance.L2RiftInvaderInstance; import com.l2jmobius.gameserver.model.actor.knownlist.CharKnownList; import com.l2jmobius.gameserver.model.actor.stat.CharStat; import com.l2jmobius.gameserver.model.actor.status.CharStatus; @@ -4391,9 +4389,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe m.onGeodataPathIndex = -1; // Initialize not on geodata path m.disregardingGeodata = false; - if (!isFlying() // flying chars not checked - && (!isInsideZone(ZoneId.WATER) || isInsideZone(ZoneId.SIEGE)) // swimming not checked unless in siege zone - && !isWalker() && !isVehicle()) // walkers and vehicles also not checked + if (!isFlying() && !isInsideZone(ZoneId.WATER) && !isVehicle()) { final boolean isInVehicle = isPlayer() && (getActingPlayer().getVehicle() != null); if (isInVehicle) @@ -4442,14 +4438,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe dy = y - curY; dz = z - curZ; distance = verticalMovementOnly ? Math.pow(dz, 2) : Math.hypot(dx, dy); - } - - // Pathfinding checks. - if (Config.PATHFINDING && ((originalDistance - distance) > 30) && !isInVehicle) - { - // Path calculation -- overrides previous movement check - if (isPlayable() || isMinion() || isInCombat() || (this instanceof L2QuestGuardInstance)) + + // Pathfinding checks. + if (((originalDistance - distance) > 30) && !isAfraid() && !isInVehicle) { + // Path calculation -- overrides previous movement check m.geoPath = GeoEngine.getInstance().findPath(curX, curY, curZ, originalX, originalY, originalZ, getInstanceId()); if ((m.geoPath == null) || (m.geoPath.size() < 2)) // No path found { @@ -4492,7 +4485,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe } // If no distance to go through, the movement is canceled - if ((distance < 1) && (Config.PATHFINDING || isPlayable() || (this instanceof L2RiftInvaderInstance) || isAfraid())) + if ((distance < 1) && (Config.PATHFINDING || isPlayable())) { if (isSummon()) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Character.java index ef8792b970..6a2a831efa 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -76,7 +76,6 @@ import com.l2jmobius.gameserver.model.Location; import com.l2jmobius.gameserver.model.PcCondOverride; import com.l2jmobius.gameserver.model.TeleportWhereType; import com.l2jmobius.gameserver.model.TimeStamp; -import com.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.stat.CharStat; @@ -3481,7 +3480,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe m.onGeodataPathIndex = -1; // Initialize not on geodata path m.disregardingGeodata = false; - if (!isFlying() && !isInsideZone(ZoneId.WATER) && !isWalker() && !isVehicle()) + if (!isFlying() && !isInsideZone(ZoneId.WATER) && !isVehicle()) { final boolean isInVehicle = isPlayer() && (getActingPlayer().getVehicle() != null); if (isInVehicle) @@ -3530,14 +3529,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe dy = y - curY; dz = z - curZ; distance = verticalMovementOnly ? Math.pow(dz, 2) : Math.hypot(dx, dy); - } - - // Pathfinding checks. - if (Config.PATHFINDING && ((originalDistance - distance) > 30) && !isControlBlocked() && !isInVehicle) - { - // Path calculation -- overrides previous movement check - if (isPlayable() || isMinion() || isInCombat() || (this instanceof FriendlyNpcInstance)) + + // Pathfinding checks. + if (((originalDistance - distance) > 30) && !isControlBlocked() && !isInVehicle) { + // Path calculation -- overrides previous movement check m.geoPath = GeoEngine.getInstance().findPath(curX, curY, curZ, originalX, originalY, originalZ, getInstanceWorld()); if ((m.geoPath == null) || (m.geoPath.size() < 2)) // No path found {