public static void Write(TradeAge.Server.Entity.Character.SceneSprite obj, PacketWriter pw) { pw.Write(obj.Id); pw.Write((byte)obj.SpriteType); pw.WriteUTF8Null(obj.Name); Vector3WriteProxy.Write(obj.Postion, pw); QuaternionWriteProxy.Write(obj.Rotation, pw); pw.Write(obj.Speed); }
public static void Write(TradeAge.Server.Entity.Character.SimplePlayer obj, PacketWriter pw) { pw.WriteUTF8Null(obj.Name); Vector3WriteProxy.Write(obj.Postion, pw); QuaternionWriteProxy.Write(obj.Rotation, pw); pw.Write(obj.Speed); pw.Write(obj.Id); pw.Write(obj.AccountId); pw.Write((byte)obj.Sex); }
/// <summary> /// /// </summary> /// <param name="time"></param> /// <param name="postion"></param> /// <param name="rotation"></param> /// <param name="speed"></param> /// <param name="rotationRate"></param> /// <param name="speedUpType"></param> public void Move(DateTime time, DogSE.Library.Maths.Vector3 postion, DogSE.Library.Maths.Quaternion rotation, float speed, float rotationRate, TradeAge.Client.Entity.Ship.SpeedUpTypes speedUpType) { var pw = PacketWriter.AcquireContent(1100); pw.Write(time.Ticks); Vector3WriteProxy.Write(postion, pw); QuaternionWriteProxy.Write(rotation, pw); pw.Write(speed); pw.Write(rotationRate); pw.Write((byte)speedUpType); NetState.Send(pw); PacketWriter.ReleaseContent(pw); }
public void SpriteMove(NetState netstate, int spriteId, DateTime time, DogSE.Library.Maths.Vector3 postion, DogSE.Library.Maths.Quaternion rotation, float speed, float rotationRate, TradeAge.Server.Entity.Ship.SpeedUpTypes speedUpType) { var pw = PacketWriter.AcquireContent(1103); PacketProfile packetProfile = PacketProfile.GetOutgoingProfile(1103); if (packetProfile != null) { packetProfile.RegConstruct(); } pw.Write(spriteId); pw.Write(time.Ticks); Vector3WriteProxy.Write(postion, pw); QuaternionWriteProxy.Write(rotation, pw); pw.Write(speed); pw.Write(rotationRate); pw.Write((byte)speedUpType); netstate.Send(pw); if (packetProfile != null) { packetProfile.Record(pw.Length); } PacketWriter.ReleaseContent(pw); }