Proper naming for GameTimeTaskManager in comments.
This commit is contained in:
parent
92c522c3d5
commit
03857d87ee
@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -526,7 +526,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -247,7 +247,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
// _actor.moveToLocation(pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
final Location loc = new Location(pawn.getX() + Rnd.get(-offset, offset), pawn.getY() + Rnd.get(-offset, offset), pawn.getZ());
|
||||
_actor.moveToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||
|
@ -3283,13 +3283,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -3297,7 +3297,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -3558,8 +3558,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3567,7 +3567,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -3637,8 +3637,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3648,7 +3648,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -98,8 +98,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -112,11 +112,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -526,7 +526,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -247,7 +247,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
// _actor.moveToLocation(pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
final Location loc = new Location(pawn.getX() + Rnd.get(-offset, offset), pawn.getY() + Rnd.get(-offset, offset), pawn.getZ());
|
||||
_actor.moveToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||
|
@ -3283,13 +3283,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -3297,7 +3297,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -3558,8 +3558,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3567,7 +3567,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -3637,8 +3637,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3648,7 +3648,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -98,8 +98,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -112,11 +112,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -526,7 +526,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -247,7 +247,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
// _actor.moveToLocation(pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
final Location loc = new Location(pawn.getX() + Rnd.get(-offset, offset), pawn.getY() + Rnd.get(-offset, offset), pawn.getZ());
|
||||
_actor.moveToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||
|
@ -3283,13 +3283,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -3297,7 +3297,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -3558,8 +3558,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3567,7 +3567,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -3637,8 +3637,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3648,7 +3648,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -98,8 +98,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -112,11 +112,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -526,7 +526,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -247,7 +247,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
// _actor.moveToLocation(pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
final Location loc = new Location(pawn.getX() + Rnd.get(-offset, offset), pawn.getY() + Rnd.get(-offset, offset), pawn.getZ());
|
||||
_actor.moveToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||
|
@ -3283,13 +3283,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -3297,7 +3297,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -3558,8 +3558,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3567,7 +3567,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -3637,8 +3637,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3648,7 +3648,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -98,8 +98,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -112,11 +112,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -526,7 +526,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -247,7 +247,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
// _actor.moveToLocation(pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
final Location loc = new Location(pawn.getX() + Rnd.get(-offset, offset), pawn.getY() + Rnd.get(-offset, offset), pawn.getZ());
|
||||
_actor.moveToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||
|
@ -3283,13 +3283,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -3297,7 +3297,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -3558,8 +3558,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3567,7 +3567,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -3637,8 +3637,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3648,7 +3648,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -98,8 +98,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -112,11 +112,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -526,7 +526,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -247,7 +247,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
// _actor.moveToLocation(pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
final Location loc = new Location(pawn.getX() + Rnd.get(-offset, offset), pawn.getY() + Rnd.get(-offset, offset), pawn.getZ());
|
||||
_actor.moveToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||
|
@ -3283,13 +3283,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -3297,7 +3297,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -3558,8 +3558,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3567,7 +3567,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -3637,8 +3637,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3648,7 +3648,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -98,8 +98,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -112,11 +112,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -526,7 +526,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -247,7 +247,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
// _actor.moveToLocation(pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
final Location loc = new Location(pawn.getX() + Rnd.get(-offset, offset), pawn.getY() + Rnd.get(-offset, offset), pawn.getZ());
|
||||
_actor.moveToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||
|
@ -3283,13 +3283,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -3297,7 +3297,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -3558,8 +3558,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3567,7 +3567,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -3637,8 +3637,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3648,7 +3648,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -98,8 +98,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -112,11 +112,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -526,7 +526,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -247,7 +247,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
// _actor.moveToLocation(pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
final Location loc = new Location(pawn.getX() + Rnd.get(-offset, offset), pawn.getY() + Rnd.get(-offset, offset), pawn.getZ());
|
||||
_actor.moveToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||
|
@ -3282,13 +3282,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -3296,7 +3296,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -3557,8 +3557,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3566,7 +3566,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -3636,8 +3636,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3647,7 +3647,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -98,8 +98,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -112,11 +112,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -526,7 +526,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -247,7 +247,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
// _actor.moveToLocation(pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
final Location loc = new Location(pawn.getX() + Rnd.get(-offset, offset), pawn.getY() + Rnd.get(-offset, offset), pawn.getZ());
|
||||
_actor.moveToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||
|
@ -3282,13 +3282,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -3296,7 +3296,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -3557,8 +3557,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3566,7 +3566,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -3636,8 +3636,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3647,7 +3647,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -98,8 +98,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -112,11 +112,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -526,7 +526,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -247,7 +247,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
// _actor.moveToLocation(pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
final Location loc = new Location(pawn.getX() + Rnd.get(-offset, offset), pawn.getY() + Rnd.get(-offset, offset), pawn.getZ());
|
||||
_actor.moveToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||
|
@ -3282,13 +3282,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -3296,7 +3296,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -3557,8 +3557,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3566,7 +3566,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -3636,8 +3636,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3647,7 +3647,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -98,8 +98,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -112,11 +112,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -81,7 +81,7 @@ public class GameServer extends Thread
|
||||
protected final IdManager _idFactory;
|
||||
protected final SpawnTable _spawnTable;
|
||||
protected final CharNameTable _charNametable;
|
||||
protected final GameTimeTaskManager _gameTimeController;
|
||||
protected final GameTimeTaskManager _GameTimeTaskManager;
|
||||
protected final Announcements _announcements;
|
||||
protected final MapRegionTable _mapRegions;
|
||||
protected final PriceListTable _pricelist;
|
||||
@ -176,7 +176,7 @@ public class GameServer extends Thread
|
||||
_modifiers = CharStatTable.getInstance();
|
||||
_world = World.getInstance();
|
||||
_spawnTable = SpawnTable.getInstance();
|
||||
_gameTimeController = GameTimeTaskManager.getInstance();
|
||||
_GameTimeTaskManager = GameTimeTaskManager.getInstance();
|
||||
_announcements = Announcements.getInstance();
|
||||
_mapRegions = MapRegionTable.getInstance();
|
||||
_pricelist = PriceListTable.getInstance();
|
||||
|
@ -473,7 +473,7 @@ abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_accessor.moveTo(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -527,7 +527,7 @@ abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -5261,19 +5261,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature. The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Get current position of the Creature</li>
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li><br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation </b></font><br>
|
||||
* <br>
|
||||
@ -5581,8 +5581,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -5591,7 +5591,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
ThreadPool.schedule(new NotifyAITask(CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
/**
|
||||
@ -5661,8 +5661,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -5671,7 +5671,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
ThreadPool.schedule(new NotifyAITask(CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// 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
|
||||
broadcastMoveToLocation();
|
||||
|
@ -97,8 +97,8 @@ public class BoatInstance extends Creature
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
}
|
||||
|
||||
|
@ -78,12 +78,12 @@ public class GameTimeTaskManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.<br>
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -96,11 +96,11 @@ public class GameTimeTaskManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Update the position of each Creature</li>
|
||||
@ -150,7 +150,7 @@ public class GameTimeTaskManager
|
||||
|
||||
public TimerThread()
|
||||
{
|
||||
super("GameTimeController");
|
||||
super("GameTimeTaskManager");
|
||||
setDaemon(true);
|
||||
setPriority(MAX_PRIORITY);
|
||||
}
|
||||
|
@ -473,7 +473,7 @@ abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_accessor.moveTo(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -527,7 +527,7 @@ abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -5307,19 +5307,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature. The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Get current position of the Creature</li>
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li><br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation </b></font><br>
|
||||
* <br>
|
||||
@ -5627,8 +5627,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -5637,7 +5637,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
ThreadPool.schedule(new NotifyAITask(CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
/**
|
||||
@ -5707,8 +5707,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -5717,7 +5717,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
ThreadPool.schedule(new NotifyAITask(CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// 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
|
||||
broadcastMoveToLocation();
|
||||
|
@ -97,8 +97,8 @@ public class BoatInstance extends Creature
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
}
|
||||
|
||||
|
@ -78,12 +78,12 @@ public class GameTimeTaskManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.<br>
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -96,11 +96,11 @@ public class GameTimeTaskManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Update the position of each Creature</li>
|
||||
@ -150,7 +150,7 @@ public class GameTimeTaskManager
|
||||
|
||||
public TimerThread()
|
||||
{
|
||||
super("GameTimeController");
|
||||
super("GameTimeTaskManager");
|
||||
setDaemon(true);
|
||||
setPriority(MAX_PRIORITY);
|
||||
}
|
||||
|
@ -542,7 +542,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -601,7 +601,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -4203,13 +4203,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -4217,7 +4217,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -4478,8 +4478,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -4487,7 +4487,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -4557,8 +4557,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -4568,7 +4568,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -92,8 +92,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -106,11 +106,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -542,7 +542,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -601,7 +601,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -4205,13 +4205,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -4219,7 +4219,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -4480,8 +4480,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -4489,7 +4489,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -4559,8 +4559,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -4570,7 +4570,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -92,8 +92,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -106,11 +106,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -526,7 +526,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -247,7 +247,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
// _actor.moveToLocation(pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
final Location loc = new Location(pawn.getX() + Rnd.get(-offset, offset), pawn.getY() + Rnd.get(-offset, offset), pawn.getZ());
|
||||
_actor.moveToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||
|
@ -3283,13 +3283,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -3297,7 +3297,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -3558,8 +3558,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3567,7 +3567,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -3637,8 +3637,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3648,7 +3648,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -98,8 +98,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -112,11 +112,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -526,7 +526,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -247,7 +247,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
// _actor.moveToLocation(pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
final Location loc = new Location(pawn.getX() + Rnd.get(-offset, offset), pawn.getY() + Rnd.get(-offset, offset), pawn.getZ());
|
||||
_actor.moveToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||
|
@ -3283,13 +3283,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -3297,7 +3297,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -3558,8 +3558,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3567,7 +3567,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -3637,8 +3637,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3648,7 +3648,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -98,8 +98,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -112,11 +112,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -526,7 +526,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -247,7 +247,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
// _actor.moveToLocation(pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
final Location loc = new Location(pawn.getX() + Rnd.get(-offset, offset), pawn.getY() + Rnd.get(-offset, offset), pawn.getZ());
|
||||
_actor.moveToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||
|
@ -3283,13 +3283,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -3297,7 +3297,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -3558,8 +3558,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3567,7 +3567,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -3637,8 +3637,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3648,7 +3648,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -98,8 +98,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -112,11 +112,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -526,7 +526,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -247,7 +247,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
// _actor.moveToLocation(pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
final Location loc = new Location(pawn.getX() + Rnd.get(-offset, offset), pawn.getY() + Rnd.get(-offset, offset), pawn.getZ());
|
||||
_actor.moveToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||
|
@ -3296,13 +3296,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -3310,7 +3310,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -3571,8 +3571,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3580,7 +3580,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -3650,8 +3650,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3661,7 +3661,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -98,8 +98,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -112,11 +112,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -526,7 +526,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -247,7 +247,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
// _actor.moveToLocation(pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
final Location loc = new Location(pawn.getX() + Rnd.get(-offset, offset), pawn.getY() + Rnd.get(-offset, offset), pawn.getZ());
|
||||
_actor.moveToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||
|
@ -3296,13 +3296,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -3310,7 +3310,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -3571,8 +3571,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3580,7 +3580,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -3650,8 +3650,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3661,7 +3661,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -98,8 +98,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -112,11 +112,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -526,7 +526,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -247,7 +247,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
// _actor.moveToLocation(pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
final Location loc = new Location(pawn.getX() + Rnd.get(-offset, offset), pawn.getY() + Rnd.get(-offset, offset), pawn.getZ());
|
||||
_actor.moveToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||
|
@ -3295,13 +3295,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -3309,7 +3309,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -3570,8 +3570,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3579,7 +3579,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -3649,8 +3649,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3660,7 +3660,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -98,8 +98,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -112,11 +112,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -526,7 +526,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -247,7 +247,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
// _actor.moveToLocation(pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
final Location loc = new Location(pawn.getX() + Rnd.get(-offset, offset), pawn.getY() + Rnd.get(-offset, offset), pawn.getZ());
|
||||
_actor.moveToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||
|
@ -3283,13 +3283,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -3297,7 +3297,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -3558,8 +3558,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3567,7 +3567,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -3637,8 +3637,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3648,7 +3648,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -98,8 +98,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -112,11 +112,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -526,7 +526,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -247,7 +247,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
// _actor.moveToLocation(pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
final Location loc = new Location(pawn.getX() + Rnd.get(-offset, offset), pawn.getY() + Rnd.get(-offset, offset), pawn.getZ());
|
||||
_actor.moveToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||
|
@ -3298,13 +3298,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -3312,7 +3312,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -3573,8 +3573,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3582,7 +3582,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -3652,8 +3652,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3663,7 +3663,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -98,8 +98,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -112,11 +112,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -526,7 +526,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -247,7 +247,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
// _actor.moveToLocation(pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
final Location loc = new Location(pawn.getX() + Rnd.get(-offset, offset), pawn.getY() + Rnd.get(-offset, offset), pawn.getZ());
|
||||
_actor.moveToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||
|
@ -3305,13 +3305,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -3319,7 +3319,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -3580,8 +3580,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3589,7 +3589,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -3659,8 +3659,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3670,7 +3670,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -98,8 +98,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -112,11 +112,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
|
||||
// May result to make monsters stop moving.
|
||||
@ -526,7 +526,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_clientMoving = true;
|
||||
_clientMovingToPawnOffset = 0;
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// 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
|
||||
|
@ -247,7 +247,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
|
||||
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
|
||||
// _actor.moveToLocation(pawn.getX(), pawn.getY(), pawn.getZ(), offset);
|
||||
final Location loc = new Location(pawn.getX() + Rnd.get(-offset, offset), pawn.getY() + Rnd.get(-offset, offset), pawn.getZ());
|
||||
_actor.moveToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||
|
@ -3305,13 +3305,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
|
||||
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
|
||||
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b>
|
||||
* <ul>
|
||||
@ -3319,7 +3319,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
|
||||
* <li>Create and Init a MoveData object</li>
|
||||
* <li>Set the Creature _move object to MoveData object</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeController</li>
|
||||
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
|
||||
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
|
||||
* </ul>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
|
||||
@ -3580,8 +3580,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3589,7 +3589,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
|
||||
}
|
||||
|
||||
public boolean moveToNextRoutePoint()
|
||||
@ -3659,8 +3659,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
// Add the Creature to movingObjects of the GameTimeTaskManager
|
||||
// The GameTimeTaskManager manage objects movement
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
@ -3670,7 +3670,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 GameTimeController
|
||||
// to destination by GameTimeTaskManager
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastMoveToLocation();
|
||||
|
@ -98,8 +98,8 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
* Add a Creature to movingObjects of GameTimeTaskManager.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
|
||||
*/
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
@ -112,11 +112,11 @@ public class GameTimeTaskManager extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <ul>
|
||||
|
Loading…
Reference in New Issue
Block a user