Improved movement while flying.
This commit is contained in:
parent
5d04f7dd9f
commit
4cc0015d3c
@ -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());
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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));
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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));
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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));
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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));
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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));
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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));
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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));
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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));
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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));
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user