ace/Source/ACE.Server/Network/Motion/MoveToObject.cs
gmriggs 7622d272fd
Fixing jump in multiplayer, refactoring movement and animation systems for network and game layers (#1070)
* Fixing jump in multiplayer, refactoring movement and animation systems for network and game layers

* Fixing stamina dropping to 0 while running

* Fixing some monsters getting stuck if they wakeup during idle emote

* Reverting position

* Fixing magic aftercast speed
2018-10-23 00:16:53 -04:00

33 lines
1 KiB
C#

using System.IO;
using ACE.Entity;
using ACE.Server.Entity;
namespace ACE.Server.Network.Structure
{
public class MoveToObject
{
public ObjectGuid Target; // target guid to move to
public Origin Origin; // the location of the target
public MoveToParameters MoveToParams; // set of movement parameters
public float RunRate; // run speed of the moving object
public MoveToObject(Motion motion)
{
Target = motion.TargetGuid;
Origin = new Origin(motion.Position);
MoveToParams = motion.MoveToParameters;
RunRate = motion.RunRate;
}
}
public static class MoveToObjectExtensions
{
public static void Write(this BinaryWriter writer, MoveToObject moveTo)
{
writer.WriteGuid(moveTo.Target);
writer.Write(moveTo.Origin);
writer.Write(moveTo.MoveToParams);
writer.Write(moveTo.RunRate);
}
}
}