diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index bac6414b95..4e4c1bfe39 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld());
moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ());
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index eb3310a5ef..26cdeebf6c 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 75d7d0ebcd..09ba7c317b 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3142,6 +3142,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3282,7 +3292,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* Add the Creature to movingObjects of the GameTimeTaskManager
* Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3630,7 +3640,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index bac6414b95..4e4c1bfe39 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld());
moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ());
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index eb3310a5ef..26cdeebf6c 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 75d7d0ebcd..09ba7c317b 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3142,6 +3142,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3282,7 +3292,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3630,7 +3640,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index bac6414b95..4e4c1bfe39 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld());
moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ());
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index eb3310a5ef..26cdeebf6c 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 6737c425e8..4a2d978f5b 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3142,6 +3142,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3282,7 +3292,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3630,7 +3640,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index bac6414b95..4e4c1bfe39 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld());
moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ());
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index eb3310a5ef..26cdeebf6c 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 6737c425e8..4a2d978f5b 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3142,6 +3142,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3282,7 +3292,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3630,7 +3640,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index bac6414b95..4e4c1bfe39 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld());
moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ());
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index eb3310a5ef..26cdeebf6c 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 7628f28d4d..0d8812bab7 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3142,6 +3142,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3282,7 +3292,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3630,7 +3640,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index bac6414b95..4e4c1bfe39 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld());
moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ());
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index eb3310a5ef..26cdeebf6c 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 7628f28d4d..0d8812bab7 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3142,6 +3142,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3282,7 +3292,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3630,7 +3640,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index bac6414b95..4e4c1bfe39 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld());
moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ());
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index eb3310a5ef..26cdeebf6c 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 7628f28d4d..0d8812bab7 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3142,6 +3142,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3282,7 +3292,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3630,7 +3640,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index bac6414b95..4e4c1bfe39 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld());
moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ());
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index eb3310a5ef..26cdeebf6c 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Creature.java
index cc60d33b5a..340ad0088c 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3141,6 +3141,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3281,7 +3291,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3629,7 +3639,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index bac6414b95..4e4c1bfe39 100644
--- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld());
moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ());
}
diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index eb3310a5ef..26cdeebf6c 100644
--- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 55bd079a6b..c5e86a86b6 100644
--- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3141,6 +3141,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3281,7 +3291,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3629,7 +3639,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index bac6414b95..4e4c1bfe39 100644
--- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld());
moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ());
}
diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index eb3310a5ef..26cdeebf6c 100644
--- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 55bd079a6b..c5e86a86b6 100644
--- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3141,6 +3141,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3281,7 +3291,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3629,7 +3639,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index bac6414b95..4e4c1bfe39 100644
--- a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld());
moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ());
}
diff --git a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index eb3310a5ef..26cdeebf6c 100644
--- a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 55bd079a6b..c5e86a86b6 100644
--- a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3141,6 +3141,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3281,7 +3291,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3629,7 +3639,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_C1_HarbingersOfWar/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_C1_HarbingersOfWar/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 5b63d6a8a8..0c37613fcb 100644
--- a/L2J_Mobius_C1_HarbingersOfWar/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_C1_HarbingersOfWar/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -33,7 +33,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
import org.l2jmobius.gameserver.network.serverpackets.Attack;
import org.l2jmobius.gameserver.network.serverpackets.AutoAttackStart;
import org.l2jmobius.gameserver.network.serverpackets.AutoAttackStop;
-import org.l2jmobius.gameserver.network.serverpackets.CharMoveToLocation;
+import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
import org.l2jmobius.gameserver.network.serverpackets.Die;
import org.l2jmobius.gameserver.network.serverpackets.FinishRotation;
import org.l2jmobius.gameserver.network.serverpackets.MoveToPawn;
@@ -845,7 +845,7 @@ public abstract class Creature extends WorldObject
setPawnTarget(null);
}
calculateMovement(x, y, z, distance);
- final CharMoveToLocation mov = new CharMoveToLocation(this);
+ final MoveToLocation mov = new MoveToLocation(this);
if (getCurrentState() == CreatureState.CASTING)
{
setCurrentState(CreatureState.IDLE);
diff --git a/L2J_Mobius_C1_HarbingersOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_C1_HarbingersOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
index 58355d2de7..3e0254d8d5 100644
--- a/L2J_Mobius_C1_HarbingersOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
+++ b/L2J_Mobius_C1_HarbingersOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
@@ -54,7 +54,7 @@ import org.l2jmobius.gameserver.network.Connection;
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
import org.l2jmobius.gameserver.network.serverpackets.ChangeWaitType;
import org.l2jmobius.gameserver.network.serverpackets.CharInfo;
-import org.l2jmobius.gameserver.network.serverpackets.CharMoveToLocation;
+import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
import org.l2jmobius.gameserver.network.serverpackets.DeleteObject;
import org.l2jmobius.gameserver.network.serverpackets.GetItem;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
@@ -1119,7 +1119,7 @@ public class PlayerInstance extends Creature
final Creature obj = (Creature) object;
if (obj.isMoving())
{
- sendPacket(new CharMoveToLocation(obj));
+ sendPacket(new MoveToLocation(obj));
}
else if (obj.isMovingToPawn())
{
diff --git a/L2J_Mobius_C1_HarbingersOfWar/java/org/l2jmobius/gameserver/network/serverpackets/CharMoveToLocation.java b/L2J_Mobius_C1_HarbingersOfWar/java/org/l2jmobius/gameserver/network/serverpackets/MoveToLocation.java
similarity index 89%
rename from L2J_Mobius_C1_HarbingersOfWar/java/org/l2jmobius/gameserver/network/serverpackets/CharMoveToLocation.java
rename to L2J_Mobius_C1_HarbingersOfWar/java/org/l2jmobius/gameserver/network/serverpackets/MoveToLocation.java
index 5aa3501289..f45fa90a9c 100644
--- a/L2J_Mobius_C1_HarbingersOfWar/java/org/l2jmobius/gameserver/network/serverpackets/CharMoveToLocation.java
+++ b/L2J_Mobius_C1_HarbingersOfWar/java/org/l2jmobius/gameserver/network/serverpackets/MoveToLocation.java
@@ -19,11 +19,11 @@ package org.l2jmobius.gameserver.network.serverpackets;
import org.l2jmobius.gameserver.model.actor.Creature;
-public class CharMoveToLocation extends ServerBasePacket
+public class MoveToLocation extends ServerBasePacket
{
private final Creature _cha;
- public CharMoveToLocation(Creature cha)
+ public MoveToLocation(Creature cha)
{
_cha = cha;
}
diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 549c129583..636a280592 100644
--- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -33,7 +33,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
import org.l2jmobius.gameserver.network.serverpackets.AutoAttackStart;
import org.l2jmobius.gameserver.network.serverpackets.AutoAttackStop;
-import org.l2jmobius.gameserver.network.serverpackets.CharMoveToLocation;
+import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
import org.l2jmobius.gameserver.network.serverpackets.Die;
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocationInVehicle;
import org.l2jmobius.gameserver.network.serverpackets.MoveToPawn;
@@ -483,7 +483,7 @@ abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn instanceof Creature)
{
if (_actor.isOnGeodataPath())
@@ -512,7 +512,7 @@ abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -530,7 +530,7 @@ abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_accessor.moveTo(x, y, z);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -544,8 +544,8 @@ abstract class AbstractAI implements Ctrl
// Chek if actor can move
if (!_actor.isMovementDisabled())
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
- // CharMoveToLocation msg = new CharMoveToLocation(_actor);
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // MoveToLocation msg = new MoveToLocation(_actor);
if (((PlayerInstance) _actor).getBoat() != null)
{
_actor.broadcastPacket(new MoveToLocationInVehicle(_actor, destination, origin));
@@ -687,7 +687,7 @@ abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -702,8 +702,8 @@ abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
- player.sendPacket(new CharMoveToLocation(_actor));
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ player.sendPacket(new MoveToLocation(_actor));
}
}
}
diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index e4ebd818eb..334b9faf57 100644
--- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -530,7 +530,7 @@ public class AttackableAI extends CreatureAI
x1 = (((MinionInstance) _actor).getLeader().getX() + Rnd.get((offset - 30) * 2)) - (offset - 30);
y1 = (((MinionInstance) _actor).getLeader().getY() + Rnd.get((offset - 30) * 2)) - (offset - 30);
z1 = ((MinionInstance) _actor).getLeader().getZ();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, z1);
}
}
diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index 12d746af05..73e206b5c1 100644
--- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -308,7 +308,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -355,7 +355,7 @@ public class CreatureAI extends AbstractAI
_actor.abortAttack();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(pos.getX(), pos.getY(), pos.getZ());
}
@@ -390,7 +390,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveToInABoat(destination, origin);
}
diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 8ec2e28123..2bf1e93f1c 100644
--- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -103,13 +103,13 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
import org.l2jmobius.gameserver.network.serverpackets.Attack;
import org.l2jmobius.gameserver.network.serverpackets.ChangeMoveType;
import org.l2jmobius.gameserver.network.serverpackets.ChangeWaitType;
-import org.l2jmobius.gameserver.network.serverpackets.CharMoveToLocation;
import org.l2jmobius.gameserver.network.serverpackets.ExOlympiadSpelledInfo;
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
import org.l2jmobius.gameserver.network.serverpackets.MagicEffectIcons;
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillCanceld;
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillLaunched;
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
+import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
import org.l2jmobius.gameserver.network.serverpackets.MyTargetSelected;
import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
import org.l2jmobius.gameserver.network.serverpackets.PartySpelled;
@@ -385,14 +385,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
{
if (isPlayable())
{
- broadcastPacket(new CharMoveToLocation(this));
+ broadcastPacket(new MoveToLocation(this));
}
else
{
final WorldRegion region = getWorldRegion();
if ((region != null) && region.areNeighborsActive())
{
- broadcastPacket(new CharMoveToLocation(this));
+ broadcastPacket(new MoveToLocation(this));
}
}
}
@@ -4989,6 +4989,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target.getLocation()) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
return distFraction > 1;
}
@@ -5157,7 +5168,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* - Set the Creature _move object to MoveData object
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation
*
* Example of use:
* - AI : onIntentionMoveTo(Location), onIntentionPickUp(WorldObject), onIntentionInteract(WorldObject)
@@ -5530,7 +5541,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/actor/knownlist/PlayerKnownList.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/actor/knownlist/PlayerKnownList.java
index b79a05a2be..04e85feb7c 100644
--- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/actor/knownlist/PlayerKnownList.java
+++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/actor/knownlist/PlayerKnownList.java
@@ -64,20 +64,20 @@ public class PlayerKnownList extends PlayableKnownList
*
* object is a DoorInstance:
* - Send Server-Client Packets DoorInfo and DoorStatusUpdate to the PlayerInstance
- * - Send Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ * - Send Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
*
* object is a NpcInstance:
* - Send Server-Client Packet NpcInfo to the PlayerInstance
- * - Send Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ * - Send Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
*
* object is a Summon:
* - Send Server-Client Packet NpcInfo/PetItemList (if the PlayerInstance is the owner) to the PlayerInstance
- * - Send Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ * - Send Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
*
* object is a PlayerInstance:
* - Send Server-Client Packet CharInfo to the PlayerInstance
* - If the object has a private store, Send Server-Client Packet PrivateStoreMsgSell to the PlayerInstance
- * - Send Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ * - Send Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
* @param object The WorldObject to add to _knownObjects and _knownPlayer
*/
@Override
@@ -225,7 +225,7 @@ public class PlayerKnownList extends PlayableKnownList
if (object.isCreature())
{
- // Update the state of the Creature object client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // Update the state of the Creature object client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature obj = (Creature) object;
final CreatureAI objAi = obj.getAI();
if (objAi != null)
diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index fe11ee9b85..6104af7cb6 100644
--- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -147,7 +147,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object instanceof Creature)
{
- // Update the state of the Creature object client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // Update the state of the Creature object client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature obj = (Creature) object;
if (obj.hasAI())
{
diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/serverpackets/CharMoveToLocation.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/serverpackets/MoveToLocation.java
similarity index 91%
rename from L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/serverpackets/CharMoveToLocation.java
rename to L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/serverpackets/MoveToLocation.java
index 2818d38e74..69e15f58d0 100644
--- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/serverpackets/CharMoveToLocation.java
+++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/serverpackets/MoveToLocation.java
@@ -24,7 +24,7 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
* 0000: 01 7a 73 10 4c b2 0b 00 00 a3 fc 00 00 e8 f1 ff .zs.L........... 0010: ff bd 0b 00 00 b3 fc 00 00 e8 f1 ff ff ............. ddddddd
* @version $Revision: 1.3.4.3 $ $Date: 2005/03/27 15:29:57 $
*/
-public class CharMoveToLocation implements IClientOutgoingPacket
+public class MoveToLocation implements IClientOutgoingPacket
{
private final int _objectId;
private final int _x;
@@ -34,7 +34,7 @@ public class CharMoveToLocation implements IClientOutgoingPacket
private final int _yDst;
private final int _zDst;
- public CharMoveToLocation(Creature creature)
+ public MoveToLocation(Creature creature)
{
_objectId = creature.getObjectId();
_x = creature.getX();
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 549c129583..636a280592 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -33,7 +33,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
import org.l2jmobius.gameserver.network.serverpackets.AutoAttackStart;
import org.l2jmobius.gameserver.network.serverpackets.AutoAttackStop;
-import org.l2jmobius.gameserver.network.serverpackets.CharMoveToLocation;
+import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
import org.l2jmobius.gameserver.network.serverpackets.Die;
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocationInVehicle;
import org.l2jmobius.gameserver.network.serverpackets.MoveToPawn;
@@ -483,7 +483,7 @@ abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn instanceof Creature)
{
if (_actor.isOnGeodataPath())
@@ -512,7 +512,7 @@ abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -530,7 +530,7 @@ abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_accessor.moveTo(x, y, z);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -544,8 +544,8 @@ abstract class AbstractAI implements Ctrl
// Chek if actor can move
if (!_actor.isMovementDisabled())
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
- // CharMoveToLocation msg = new CharMoveToLocation(_actor);
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // MoveToLocation msg = new MoveToLocation(_actor);
if (((PlayerInstance) _actor).getBoat() != null)
{
_actor.broadcastPacket(new MoveToLocationInVehicle(_actor, destination, origin));
@@ -687,7 +687,7 @@ abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -702,8 +702,8 @@ abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
- player.sendPacket(new CharMoveToLocation(_actor));
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ player.sendPacket(new MoveToLocation(_actor));
}
}
}
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index e4ebd818eb..334b9faf57 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -530,7 +530,7 @@ public class AttackableAI extends CreatureAI
x1 = (((MinionInstance) _actor).getLeader().getX() + Rnd.get((offset - 30) * 2)) - (offset - 30);
y1 = (((MinionInstance) _actor).getLeader().getY() + Rnd.get((offset - 30) * 2)) - (offset - 30);
z1 = ((MinionInstance) _actor).getLeader().getZ();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, z1);
}
}
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index 12d746af05..73e206b5c1 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -308,7 +308,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -355,7 +355,7 @@ public class CreatureAI extends AbstractAI
_actor.abortAttack();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(pos.getX(), pos.getY(), pos.getZ());
}
@@ -390,7 +390,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveToInABoat(destination, origin);
}
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java
index ab3cb70371..f9008d4588 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -105,13 +105,13 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
import org.l2jmobius.gameserver.network.serverpackets.Attack;
import org.l2jmobius.gameserver.network.serverpackets.ChangeMoveType;
import org.l2jmobius.gameserver.network.serverpackets.ChangeWaitType;
-import org.l2jmobius.gameserver.network.serverpackets.CharMoveToLocation;
import org.l2jmobius.gameserver.network.serverpackets.ExOlympiadSpelledInfo;
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
import org.l2jmobius.gameserver.network.serverpackets.MagicEffectIcons;
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillCanceld;
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillLaunched;
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
+import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
import org.l2jmobius.gameserver.network.serverpackets.MyTargetSelected;
import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
import org.l2jmobius.gameserver.network.serverpackets.PartySpelled;
@@ -387,14 +387,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
{
if (isPlayable())
{
- broadcastPacket(new CharMoveToLocation(this));
+ broadcastPacket(new MoveToLocation(this));
}
else
{
final WorldRegion region = getWorldRegion();
if ((region != null) && region.areNeighborsActive())
{
- broadcastPacket(new CharMoveToLocation(this));
+ broadcastPacket(new MoveToLocation(this));
}
}
}
@@ -5035,6 +5035,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target.getLocation()) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
return distFraction > 1;
}
@@ -5203,7 +5214,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* - Set the Creature _move object to MoveData object
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation
*
* Example of use:
* - AI : onIntentionMoveTo(Location), onIntentionPickUp(WorldObject), onIntentionInteract(WorldObject)
@@ -5576,7 +5587,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/knownlist/PlayerKnownList.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/knownlist/PlayerKnownList.java
index b79a05a2be..04e85feb7c 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/knownlist/PlayerKnownList.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/knownlist/PlayerKnownList.java
@@ -64,20 +64,20 @@ public class PlayerKnownList extends PlayableKnownList
*
* object is a DoorInstance:
* - Send Server-Client Packets DoorInfo and DoorStatusUpdate to the PlayerInstance
- * - Send Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ * - Send Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
*
* object is a NpcInstance:
* - Send Server-Client Packet NpcInfo to the PlayerInstance
- * - Send Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ * - Send Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
*
* object is a Summon:
* - Send Server-Client Packet NpcInfo/PetItemList (if the PlayerInstance is the owner) to the PlayerInstance
- * - Send Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ * - Send Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
*
* object is a PlayerInstance:
* - Send Server-Client Packet CharInfo to the PlayerInstance
* - If the object has a private store, Send Server-Client Packet PrivateStoreMsgSell to the PlayerInstance
- * - Send Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ * - Send Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
* @param object The WorldObject to add to _knownObjects and _knownPlayer
*/
@Override
@@ -225,7 +225,7 @@ public class PlayerKnownList extends PlayableKnownList
if (object.isCreature())
{
- // Update the state of the Creature object client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // Update the state of the Creature object client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature obj = (Creature) object;
final CreatureAI objAi = obj.getAI();
if (objAi != null)
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index fe11ee9b85..6104af7cb6 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -147,7 +147,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object instanceof Creature)
{
- // Update the state of the Creature object client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // Update the state of the Creature object client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature obj = (Creature) object;
if (obj.hasAI())
{
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/CharMoveToLocation.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/MoveToLocation.java
similarity index 91%
rename from L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/CharMoveToLocation.java
rename to L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/MoveToLocation.java
index 2818d38e74..69e15f58d0 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/CharMoveToLocation.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/MoveToLocation.java
@@ -24,7 +24,7 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
* 0000: 01 7a 73 10 4c b2 0b 00 00 a3 fc 00 00 e8 f1 ff .zs.L........... 0010: ff bd 0b 00 00 b3 fc 00 00 e8 f1 ff ff ............. ddddddd
* @version $Revision: 1.3.4.3 $ $Date: 2005/03/27 15:29:57 $
*/
-public class CharMoveToLocation implements IClientOutgoingPacket
+public class MoveToLocation implements IClientOutgoingPacket
{
private final int _objectId;
private final int _x;
@@ -34,7 +34,7 @@ public class CharMoveToLocation implements IClientOutgoingPacket
private final int _yDst;
private final int _zDst;
- public CharMoveToLocation(Creature creature)
+ public MoveToLocation(Creature creature)
{
_objectId = creature.getObjectId();
_x = creature.getX();
diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0225783388..169ae269a2 100644
--- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -527,7 +527,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -561,7 +561,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -579,7 +579,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -729,7 +729,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -744,7 +744,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index 3267772dd3..da3c6fcaa0 100644
--- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -663,7 +663,7 @@ public class AttackableAI extends CreatureAI
x1 = x1 > (offset + minRadius) ? (leader.getX() + x1) - offset : (leader.getX() - x1) + minRadius;
y1 = y1 > (offset + minRadius) ? (leader.getY() + y1) - offset : (leader.getY() - y1) + minRadius;
z1 = leader.getZ();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, z1);
return;
}
@@ -708,7 +708,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(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.4_Epilogue/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index 3ef46393ed..fc26587df5 100644
--- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -340,7 +340,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -362,7 +362,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 9984136ca2..51fedf3153 100644
--- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -193,7 +193,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -227,7 +227,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 5553fb85b8..79dec0ec21 100644
--- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -4100,6 +4100,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -4238,7 +4248,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -4586,7 +4596,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index 888f637500..8bd83b3ff7 100644
--- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -53,7 +53,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 6455c53795..c71d7ce4ac 100644
--- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -529,7 +529,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -563,7 +563,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -581,7 +581,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -731,7 +731,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -746,7 +746,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index 3267772dd3..da3c6fcaa0 100644
--- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -663,7 +663,7 @@ public class AttackableAI extends CreatureAI
x1 = x1 > (offset + minRadius) ? (leader.getX() + x1) - offset : (leader.getX() - x1) + minRadius;
y1 = y1 > (offset + minRadius) ? (leader.getY() + y1) - offset : (leader.getY() - y1) + minRadius;
z1 = leader.getZ();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, z1);
return;
}
@@ -708,7 +708,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(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/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index 3ef46393ed..fc26587df5 100644
--- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -340,7 +340,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -362,7 +362,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 9984136ca2..51fedf3153 100644
--- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -193,7 +193,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -227,7 +227,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 18b607066d..8639de001e 100644
--- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -4102,6 +4102,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -4240,7 +4250,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -4588,7 +4598,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index 888f637500..8bd83b3ff7 100644
--- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -53,7 +53,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index bac6414b95..4e4c1bfe39 100644
--- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(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/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index d8fe88e24c..2865737737 100644
--- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 40b6e74768..8d3381111d 100644
--- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3142,6 +3142,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3282,7 +3292,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3630,7 +3640,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index bac6414b95..4e4c1bfe39 100644
--- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(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/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index d8fe88e24c..2865737737 100644
--- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 40b6e74768..8d3381111d 100644
--- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3142,6 +3142,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3282,7 +3292,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3630,7 +3640,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index bac6414b95..4e4c1bfe39 100644
--- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(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/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index d8fe88e24c..2865737737 100644
--- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/Creature.java
index b445444a7b..2efe3a49a6 100644
--- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3142,6 +3142,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3282,7 +3292,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3630,7 +3640,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index bac6414b95..4e4c1bfe39 100644
--- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(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/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index d8fe88e24c..2865737737 100644
--- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/Creature.java
index e6099f275c..ee6bcd90a0 100644
--- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3155,6 +3155,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3295,7 +3305,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3643,7 +3653,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index bac6414b95..4e4c1bfe39 100644
--- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(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.4_SecretOfEmpire/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index d8fe88e24c..2865737737 100644
--- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/Creature.java
index e6099f275c..ee6bcd90a0 100644
--- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3155,6 +3155,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3295,7 +3305,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3643,7 +3653,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index bac6414b95..4e4c1bfe39 100644
--- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld());
moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ());
}
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index d8fe88e24c..2865737737 100644
--- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Creature.java
index bd17ff0e6b..1c034ad82f 100644
--- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3154,6 +3154,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3294,7 +3304,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3642,7 +3652,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index 86716d9d77..f01b989810 100644
--- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld());
moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ());
}
diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index d8fe88e24c..2865737737 100644
--- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 40b6e74768..8d3381111d 100644
--- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3142,6 +3142,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3282,7 +3292,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3630,7 +3640,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index bac6414b95..4e4c1bfe39 100644
--- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld());
moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ());
}
diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index d8fe88e24c..2865737737 100644
--- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 179b5e367b..53bee1ae4b 100644
--- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3157,6 +3157,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3297,7 +3307,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3645,7 +3655,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index bac6414b95..4e4c1bfe39 100644
--- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld());
moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ());
}
diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index d8fe88e24c..2865737737 100644
--- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 8429045d72..6efc5b1d96 100644
--- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3164,6 +3164,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3304,7 +3314,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3652,7 +3662,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{
diff --git a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/ai/AbstractAI.java
index 0dd2190689..86442bef40 100644
--- a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/ai/AbstractAI.java
+++ b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/ai/AbstractAI.java
@@ -480,7 +480,7 @@ public abstract class AbstractAI implements Ctrl
// return;
// }
- // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToPawn/MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
if (pawn.isCreature())
{
if (_actor.isOnGeodataPath())
@@ -514,7 +514,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast).
+ * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast).
* Caution: Low level function, used by AI subclasses
* @param x
* @param y
@@ -532,7 +532,7 @@ public abstract class AbstractAI implements Ctrl
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_actor.moveToLocation(x, y, z, 0);
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
_actor.broadcastMoveToLocation();
}
else
@@ -679,7 +679,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
- * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.
+ * Update the state of this actor client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance player.
* Caution: Low level function, used by AI subclasses
* @param player The PlayerIstance to notify with state of this Creature
*/
@@ -694,7 +694,7 @@ public abstract class AbstractAI implements Ctrl
}
else
{
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
player.sendPacket(new MoveToLocation(_actor));
}
}
diff --git a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/ai/AttackableAI.java b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/ai/AttackableAI.java
index bac6414b95..4e4c1bfe39 100644
--- a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/ai/AttackableAI.java
+++ b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/ai/AttackableAI.java
@@ -526,7 +526,7 @@ public class AttackableAI extends CreatureAI
y1 = (leader.getY() - y1) + minRadius;
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(x1, y1, leader.getZ());
}
else if (Rnd.get(RANDOM_WALK_RATE) == 0)
@@ -574,7 +574,7 @@ public class AttackableAI extends CreatureAI
z1 = npc.getZ();
}
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().getValidLocation(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceWorld());
moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ());
}
diff --git a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/ai/CreatureAI.java
index d8fe88e24c..2865737737 100644
--- a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/ai/CreatureAI.java
+++ b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/ai/CreatureAI.java
@@ -350,7 +350,7 @@ public class CreatureAI extends AbstractAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -379,7 +379,7 @@ public class CreatureAI extends AbstractAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/ai/PlayerAI.java b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/ai/PlayerAI.java
index 859a70cce4..9241b52a33 100644
--- a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/ai/PlayerAI.java
+++ b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/ai/PlayerAI.java
@@ -219,7 +219,7 @@ public class PlayerAI extends PlayableAI
*
* - Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)
* - Set the Intention of this AI to AI_INTENTION_MOVE_TO
- * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ * - Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
*
*/
@Override
@@ -248,7 +248,7 @@ public class PlayerAI extends PlayableAI
// Abort the attack of the Creature and send Server->Client ActionFailed packet
_actor.abortAttack();
- // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
+ // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet MoveToLocation (broadcast)
moveTo(loc.getX(), loc.getY(), loc.getZ());
}
diff --git a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 8429045d72..6efc5b1d96 100644
--- a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3164,6 +3164,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// Set the timer of last position update to now
m._moveTimestamp = gameTicks;
+ // Broadcast MoveToLocation when Playable tries to reach a Playable target (once per second).
+ if (isPlayable())
+ {
+ final WorldObject target = _target;
+ if ((target != null) && target.isPlayable() && ((gameTicks % 10) == 0) && (calculateDistance3D(target) > 150))
+ {
+ broadcastPacket(new MoveToLocation(this));
+ }
+ }
+
if (distFraction > 1)
{
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
@@ -3304,7 +3314,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* - Add the Creature to movingObjects of the GameTimeTaskManager
* - Create a task to notify the AI that Creature arrives at a check point of the movement
*
- * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
+ * Caution: This method DOESN'T send Server->Client packet MoveToPawn/MoveToLocation.
*
* Example of use:
*
@@ -3652,7 +3662,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
// to destination by GameTimeTaskManager
- // Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
+ // Send a Server->Client packet MoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();
return true;
}
diff --git a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
index a820f371ea..3105d664dd 100644
--- a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
+++ b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecordInfo.java
@@ -51,7 +51,7 @@ public class RequestRecordInfo implements IClientIncomingPacket
if (object.isCreature())
{
// Update the state of the Creature object client side by sending Server->Client packet
- // MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance
+ // MoveToPawn/MoveToLocation and AutoAttackStart to the PlayerInstance
final Creature creature = (Creature) object;
if (creature.hasAI())
{