From 4cc0015d3cafe29814c14a680a5d3bd49165e268 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Mon, 18 Feb 2019 09:51:14 +0000 Subject: [PATCH] Improved movement while flying. --- .../java/com/l2jmobius/gameserver/ai/L2AttackableAI.java | 2 +- .../java/com/l2jmobius/gameserver/geoengine/GeoEngine.java | 2 +- .../com/l2jmobius/gameserver/model/actor/L2Character.java | 4 ++-- .../com/l2jmobius/gameserver/model/skills/SkillCaster.java | 2 +- .../java/com/l2jmobius/gameserver/ai/L2AttackableAI.java | 2 +- .../java/com/l2jmobius/gameserver/geoengine/GeoEngine.java | 2 +- .../com/l2jmobius/gameserver/model/actor/L2Character.java | 4 ++-- .../com/l2jmobius/gameserver/model/skills/SkillCaster.java | 2 +- .../java/com/l2jmobius/gameserver/ai/L2AttackableAI.java | 2 +- .../java/com/l2jmobius/gameserver/geoengine/GeoEngine.java | 2 +- .../com/l2jmobius/gameserver/model/actor/L2Character.java | 4 ++-- .../com/l2jmobius/gameserver/model/skills/SkillCaster.java | 2 +- .../java/com/l2jmobius/gameserver/ai/L2AttackableAI.java | 2 +- .../java/com/l2jmobius/gameserver/geoengine/GeoEngine.java | 2 +- .../com/l2jmobius/gameserver/model/actor/L2Character.java | 4 ++-- .../com/l2jmobius/gameserver/model/skills/SkillCaster.java | 2 +- .../java/com/l2jmobius/gameserver/ai/L2AttackableAI.java | 2 +- .../java/com/l2jmobius/gameserver/geoengine/GeoEngine.java | 2 +- .../com/l2jmobius/gameserver/model/actor/L2Character.java | 4 ++-- .../com/l2jmobius/gameserver/model/skills/SkillCaster.java | 2 +- .../java/com/l2jmobius/gameserver/ai/L2AttackableAI.java | 2 +- .../java/com/l2jmobius/gameserver/geoengine/GeoEngine.java | 2 +- .../com/l2jmobius/gameserver/model/actor/L2Character.java | 4 ++-- .../com/l2jmobius/gameserver/model/skills/SkillCaster.java | 2 +- .../java/com/l2jmobius/gameserver/ai/L2AttackableAI.java | 2 +- .../java/com/l2jmobius/gameserver/geoengine/GeoEngine.java | 2 +- .../com/l2jmobius/gameserver/model/actor/L2Character.java | 4 ++-- .../java/com/l2jmobius/gameserver/ai/L2AttackableAI.java | 2 +- .../java/com/l2jmobius/gameserver/geoengine/GeoEngine.java | 2 +- .../com/l2jmobius/gameserver/model/actor/L2Character.java | 4 ++-- .../com/l2jmobius/gameserver/model/skills/SkillCaster.java | 2 +- .../java/com/l2jmobius/gameserver/ai/L2AttackableAI.java | 2 +- .../java/com/l2jmobius/gameserver/geoengine/GeoEngine.java | 2 +- .../com/l2jmobius/gameserver/model/actor/L2Character.java | 4 ++-- .../com/l2jmobius/gameserver/model/skills/SkillCaster.java | 2 +- .../java/com/l2jmobius/gameserver/ai/L2AttackableAI.java | 2 +- .../java/com/l2jmobius/gameserver/geoengine/GeoEngine.java | 2 +- .../com/l2jmobius/gameserver/model/actor/L2Character.java | 4 ++-- .../com/l2jmobius/gameserver/model/skills/SkillCaster.java | 2 +- .../java/com/l2jmobius/gameserver/ai/L2AttackableAI.java | 2 +- .../java/com/l2jmobius/gameserver/geoengine/GeoEngine.java | 2 +- .../com/l2jmobius/gameserver/model/actor/L2Character.java | 4 ++-- .../com/l2jmobius/gameserver/model/skills/SkillCaster.java | 2 +- 43 files changed, 54 insertions(+), 54 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 363199be74..9b21af1ba1 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -619,7 +619,7 @@ public class L2AttackableAI extends L2CharacterAI } // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast) - final Location moveLoc = GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld()); + final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld()); moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ()); } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java index ec33f3abb4..1c2a71766c 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -361,7 +361,7 @@ public class GeoEngine */ public final boolean canSeeTarget(L2Object origin, L2Object target) { - if (target.isDoor()) + if (target.isDoor() || (target.isCharacter() && ((L2Character) target).isFlying())) { return true; } 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 eb864ffb29..ea93445217 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 @@ -1863,7 +1863,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe */ public boolean isAttackingDisabled() { - return _isFlying || hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled; + return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled; } public final boolean isConfused() @@ -2950,7 +2950,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe // Z coordinate will follow client values dz = m._zDestination - zPrev; - if (isPlayer()) + if (isPlayer() && !_isFlying) { final double distance = Math.hypot(dx, dy); if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles. diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java index 4d962e1337..ab08303556 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java @@ -1152,7 +1152,7 @@ public class SkillCaster implements Runnable } } - final Location destination = GeoEngine.getInstance().canMoveToTargetLoc(creature.getX(), creature.getY(), creature.getZ(), x, y, z, creature.getInstanceWorld()); + final Location destination = creature.isFlying() ? new Location(x, y, z) : GeoEngine.getInstance().canMoveToTargetLoc(creature.getX(), creature.getY(), creature.getZ(), x, y, z, creature.getInstanceWorld()); creature.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); creature.broadcastPacket(new FlyToLocation(creature, destination, flyType, 0, 0, 333)); diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 363199be74..9b21af1ba1 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -619,7 +619,7 @@ public class L2AttackableAI extends L2CharacterAI } // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast) - final Location moveLoc = GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld()); + final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld()); moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ()); } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java index ec33f3abb4..1c2a71766c 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -361,7 +361,7 @@ public class GeoEngine */ public final boolean canSeeTarget(L2Object origin, L2Object target) { - if (target.isDoor()) + if (target.isDoor() || (target.isCharacter() && ((L2Character) target).isFlying())) { return true; } 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 eb864ffb29..ea93445217 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 @@ -1863,7 +1863,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe */ public boolean isAttackingDisabled() { - return _isFlying || hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled; + return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled; } public final boolean isConfused() @@ -2950,7 +2950,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe // Z coordinate will follow client values dz = m._zDestination - zPrev; - if (isPlayer()) + if (isPlayer() && !_isFlying) { final double distance = Math.hypot(dx, dy); if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles. diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java index 4d962e1337..ab08303556 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java @@ -1152,7 +1152,7 @@ public class SkillCaster implements Runnable } } - final Location destination = GeoEngine.getInstance().canMoveToTargetLoc(creature.getX(), creature.getY(), creature.getZ(), x, y, z, creature.getInstanceWorld()); + final Location destination = creature.isFlying() ? new Location(x, y, z) : GeoEngine.getInstance().canMoveToTargetLoc(creature.getX(), creature.getY(), creature.getZ(), x, y, z, creature.getInstanceWorld()); creature.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); creature.broadcastPacket(new FlyToLocation(creature, destination, flyType, 0, 0, 333)); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 363199be74..9b21af1ba1 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -619,7 +619,7 @@ public class L2AttackableAI extends L2CharacterAI } // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast) - final Location moveLoc = GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld()); + final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld()); moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ()); } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java index ec33f3abb4..1c2a71766c 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -361,7 +361,7 @@ public class GeoEngine */ public final boolean canSeeTarget(L2Object origin, L2Object target) { - if (target.isDoor()) + if (target.isDoor() || (target.isCharacter() && ((L2Character) target).isFlying())) { return true; } 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 eb864ffb29..ea93445217 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 @@ -1863,7 +1863,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe */ public boolean isAttackingDisabled() { - return _isFlying || hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled; + return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled; } public final boolean isConfused() @@ -2950,7 +2950,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe // Z coordinate will follow client values dz = m._zDestination - zPrev; - if (isPlayer()) + if (isPlayer() && !_isFlying) { final double distance = Math.hypot(dx, dy); if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles. diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java index 4d962e1337..ab08303556 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java @@ -1152,7 +1152,7 @@ public class SkillCaster implements Runnable } } - final Location destination = GeoEngine.getInstance().canMoveToTargetLoc(creature.getX(), creature.getY(), creature.getZ(), x, y, z, creature.getInstanceWorld()); + final Location destination = creature.isFlying() ? new Location(x, y, z) : GeoEngine.getInstance().canMoveToTargetLoc(creature.getX(), creature.getY(), creature.getZ(), x, y, z, creature.getInstanceWorld()); creature.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); creature.broadcastPacket(new FlyToLocation(creature, destination, flyType, 0, 0, 333)); diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 363199be74..9b21af1ba1 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -619,7 +619,7 @@ public class L2AttackableAI extends L2CharacterAI } // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast) - final Location moveLoc = GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld()); + final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld()); moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ()); } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java index ec33f3abb4..1c2a71766c 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -361,7 +361,7 @@ public class GeoEngine */ public final boolean canSeeTarget(L2Object origin, L2Object target) { - if (target.isDoor()) + if (target.isDoor() || (target.isCharacter() && ((L2Character) target).isFlying())) { return true; } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Character.java index eb864ffb29..ea93445217 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -1863,7 +1863,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe */ public boolean isAttackingDisabled() { - return _isFlying || hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled; + return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled; } public final boolean isConfused() @@ -2950,7 +2950,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe // Z coordinate will follow client values dz = m._zDestination - zPrev; - if (isPlayer()) + if (isPlayer() && !_isFlying) { final double distance = Math.hypot(dx, dy); if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles. diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java index 4d962e1337..ab08303556 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java @@ -1152,7 +1152,7 @@ public class SkillCaster implements Runnable } } - final Location destination = GeoEngine.getInstance().canMoveToTargetLoc(creature.getX(), creature.getY(), creature.getZ(), x, y, z, creature.getInstanceWorld()); + final Location destination = creature.isFlying() ? new Location(x, y, z) : GeoEngine.getInstance().canMoveToTargetLoc(creature.getX(), creature.getY(), creature.getZ(), x, y, z, creature.getInstanceWorld()); creature.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); creature.broadcastPacket(new FlyToLocation(creature, destination, flyType, 0, 0, 333)); diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 363199be74..9b21af1ba1 100644 --- a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -619,7 +619,7 @@ public class L2AttackableAI extends L2CharacterAI } // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast) - final Location moveLoc = GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld()); + final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld()); moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ()); } diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java index ec33f3abb4..1c2a71766c 100644 --- a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -361,7 +361,7 @@ public class GeoEngine */ public final boolean canSeeTarget(L2Object origin, L2Object target) { - if (target.isDoor()) + if (target.isDoor() || (target.isCharacter() && ((L2Character) target).isFlying())) { return true; } diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/actor/L2Character.java index eb864ffb29..ea93445217 100644 --- a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -1863,7 +1863,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe */ public boolean isAttackingDisabled() { - return _isFlying || hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled; + return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled; } public final boolean isConfused() @@ -2950,7 +2950,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe // Z coordinate will follow client values dz = m._zDestination - zPrev; - if (isPlayer()) + if (isPlayer() && !_isFlying) { final double distance = Math.hypot(dx, dy); if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles. diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java index 1dd7486a10..3957145823 100644 --- a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java +++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java @@ -1152,7 +1152,7 @@ public class SkillCaster implements Runnable } } - final Location destination = GeoEngine.getInstance().canMoveToTargetLoc(creature.getX(), creature.getY(), creature.getZ(), x, y, z, creature.getInstanceWorld()); + final Location destination = creature.isFlying() ? new Location(x, y, z) : GeoEngine.getInstance().canMoveToTargetLoc(creature.getX(), creature.getY(), creature.getZ(), x, y, z, creature.getInstanceWorld()); creature.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); creature.broadcastPacket(new FlyToLocation(creature, destination, flyType, 0, 0, 333)); diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 363199be74..9b21af1ba1 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -619,7 +619,7 @@ public class L2AttackableAI extends L2CharacterAI } // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast) - final Location moveLoc = GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld()); + final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld()); moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ()); } diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java index ec33f3abb4..1c2a71766c 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -361,7 +361,7 @@ public class GeoEngine */ public final boolean canSeeTarget(L2Object origin, L2Object target) { - if (target.isDoor()) + if (target.isDoor() || (target.isCharacter() && ((L2Character) target).isFlying())) { return true; } diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/actor/L2Character.java index eb864ffb29..ea93445217 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -1863,7 +1863,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe */ public boolean isAttackingDisabled() { - return _isFlying || hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled; + return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled; } public final boolean isConfused() @@ -2950,7 +2950,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe // Z coordinate will follow client values dz = m._zDestination - zPrev; - if (isPlayer()) + if (isPlayer() && !_isFlying) { final double distance = Math.hypot(dx, dy); if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles. diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java index 1dd7486a10..3957145823 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java +++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java @@ -1152,7 +1152,7 @@ public class SkillCaster implements Runnable } } - final Location destination = GeoEngine.getInstance().canMoveToTargetLoc(creature.getX(), creature.getY(), creature.getZ(), x, y, z, creature.getInstanceWorld()); + final Location destination = creature.isFlying() ? new Location(x, y, z) : GeoEngine.getInstance().canMoveToTargetLoc(creature.getX(), creature.getY(), creature.getZ(), x, y, z, creature.getInstanceWorld()); creature.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); creature.broadcastPacket(new FlyToLocation(creature, destination, flyType, 0, 0, 333)); diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index a74ef36d3e..884d5eefbd 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -740,7 +740,7 @@ public class L2AttackableAI extends L2CharacterAI } // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast) - final Location moveLoc = GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceId()); + final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceId()); moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ()); } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java index b34a8ecd43..06f36ee1b1 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -359,7 +359,7 @@ public class GeoEngine */ public final boolean canSeeTarget(L2Object origin, L2Object target) { - if (target.isDoor()) + if (target.isDoor() || (target.isCharacter() && ((L2Character) target).isFlying())) { return true; } 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 bf903d96b3..c6f88c937b 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 @@ -2631,7 +2631,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe */ public boolean isAttackingDisabled() { - return _isFlying || isStunned() || isSleeping() || isAttackingNow() || isAlikeDead() || isParalyzed() || isPhysicalAttackMuted() || _AIdisabled; + return isStunned() || isSleeping() || isAttackingNow() || isAlikeDead() || isParalyzed() || isPhysicalAttackMuted() || _AIdisabled; } public final Calculator[] getCalculators() @@ -3931,7 +3931,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe // Z coordinate will follow client values dz = m._zDestination - zPrev; - if (isPlayer()) + if (isPlayer() && !_isFlying) { final double distance = Math.hypot(dx, dy); if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles. diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 363199be74..9b21af1ba1 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -619,7 +619,7 @@ public class L2AttackableAI extends L2CharacterAI } // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast) - final Location moveLoc = GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld()); + final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld()); moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ()); } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java index ec33f3abb4..1c2a71766c 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -361,7 +361,7 @@ public class GeoEngine */ public final boolean canSeeTarget(L2Object origin, L2Object target) { - if (target.isDoor()) + if (target.isDoor() || (target.isCharacter() && ((L2Character) target).isFlying())) { return true; } 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 a8415d676a..cce9814d36 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 @@ -1863,7 +1863,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe */ public boolean isAttackingDisabled() { - return _isFlying || hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled; + return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled; } public final boolean isConfused() @@ -2950,7 +2950,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe // Z coordinate will follow client values dz = m._zDestination - zPrev; - if (isPlayer()) + if (isPlayer() && !_isFlying) { final double distance = Math.hypot(dx, dy); if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles. diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java index 1bc9249b05..e1d580d0d4 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java @@ -1152,7 +1152,7 @@ public class SkillCaster implements Runnable } } - final Location destination = GeoEngine.getInstance().canMoveToTargetLoc(creature.getX(), creature.getY(), creature.getZ(), x, y, z, creature.getInstanceWorld()); + final Location destination = creature.isFlying() ? new Location(x, y, z) : GeoEngine.getInstance().canMoveToTargetLoc(creature.getX(), creature.getY(), creature.getZ(), x, y, z, creature.getInstanceWorld()); creature.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); creature.broadcastPacket(new FlyToLocation(creature, destination, flyType, 0, 0, 333)); diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 363199be74..9b21af1ba1 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -619,7 +619,7 @@ public class L2AttackableAI extends L2CharacterAI } // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast) - final Location moveLoc = GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld()); + final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld()); moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ()); } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java index ec33f3abb4..1c2a71766c 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -361,7 +361,7 @@ public class GeoEngine */ public final boolean canSeeTarget(L2Object origin, L2Object target) { - if (target.isDoor()) + if (target.isDoor() || (target.isCharacter() && ((L2Character) target).isFlying())) { return true; } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/L2Character.java index a8415d676a..cce9814d36 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -1863,7 +1863,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe */ public boolean isAttackingDisabled() { - return _isFlying || hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled; + return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled; } public final boolean isConfused() @@ -2950,7 +2950,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe // Z coordinate will follow client values dz = m._zDestination - zPrev; - if (isPlayer()) + if (isPlayer() && !_isFlying) { final double distance = Math.hypot(dx, dy); if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles. diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java index 1bc9249b05..e1d580d0d4 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java @@ -1152,7 +1152,7 @@ public class SkillCaster implements Runnable } } - final Location destination = GeoEngine.getInstance().canMoveToTargetLoc(creature.getX(), creature.getY(), creature.getZ(), x, y, z, creature.getInstanceWorld()); + final Location destination = creature.isFlying() ? new Location(x, y, z) : GeoEngine.getInstance().canMoveToTargetLoc(creature.getX(), creature.getY(), creature.getZ(), x, y, z, creature.getInstanceWorld()); creature.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); creature.broadcastPacket(new FlyToLocation(creature, destination, flyType, 0, 0, 333)); diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 363199be74..9b21af1ba1 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -619,7 +619,7 @@ public class L2AttackableAI extends L2CharacterAI } // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast) - final Location moveLoc = GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld()); + final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld()); moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ()); } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java index ec33f3abb4..1c2a71766c 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -361,7 +361,7 @@ public class GeoEngine */ public final boolean canSeeTarget(L2Object origin, L2Object target) { - if (target.isDoor()) + if (target.isDoor() || (target.isCharacter() && ((L2Character) target).isFlying())) { return true; } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/L2Character.java index a8415d676a..cce9814d36 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -1863,7 +1863,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe */ public boolean isAttackingDisabled() { - return _isFlying || hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled; + return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled; } public final boolean isConfused() @@ -2950,7 +2950,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe // Z coordinate will follow client values dz = m._zDestination - zPrev; - if (isPlayer()) + if (isPlayer() && !_isFlying) { final double distance = Math.hypot(dx, dy); if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles. diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java index 1bc9249b05..e1d580d0d4 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java @@ -1152,7 +1152,7 @@ public class SkillCaster implements Runnable } } - final Location destination = GeoEngine.getInstance().canMoveToTargetLoc(creature.getX(), creature.getY(), creature.getZ(), x, y, z, creature.getInstanceWorld()); + final Location destination = creature.isFlying() ? new Location(x, y, z) : GeoEngine.getInstance().canMoveToTargetLoc(creature.getX(), creature.getY(), creature.getZ(), x, y, z, creature.getInstanceWorld()); creature.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); creature.broadcastPacket(new FlyToLocation(creature, destination, flyType, 0, 0, 333)); diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 363199be74..9b21af1ba1 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -619,7 +619,7 @@ public class L2AttackableAI extends L2CharacterAI } // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast) - final Location moveLoc = GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld()); + final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld()); moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ()); } diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java index ec33f3abb4..1c2a71766c 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -361,7 +361,7 @@ public class GeoEngine */ public final boolean canSeeTarget(L2Object origin, L2Object target) { - if (target.isDoor()) + if (target.isDoor() || (target.isCharacter() && ((L2Character) target).isFlying())) { return true; } diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/actor/L2Character.java index a8415d676a..cce9814d36 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -1863,7 +1863,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe */ public boolean isAttackingDisabled() { - return _isFlying || hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled; + return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled; } public final boolean isConfused() @@ -2950,7 +2950,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe // Z coordinate will follow client values dz = m._zDestination - zPrev; - if (isPlayer()) + if (isPlayer() && !_isFlying) { final double distance = Math.hypot(dx, dy); if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles. diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java index 1bc9249b05..e1d580d0d4 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java @@ -1152,7 +1152,7 @@ public class SkillCaster implements Runnable } } - final Location destination = GeoEngine.getInstance().canMoveToTargetLoc(creature.getX(), creature.getY(), creature.getZ(), x, y, z, creature.getInstanceWorld()); + final Location destination = creature.isFlying() ? new Location(x, y, z) : GeoEngine.getInstance().canMoveToTargetLoc(creature.getX(), creature.getY(), creature.getZ(), x, y, z, creature.getInstanceWorld()); creature.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); creature.broadcastPacket(new FlyToLocation(creature, destination, flyType, 0, 0, 333));