コード例 #1
0
 public override void Write()
 {
     MovementExtensions.WriteMovementInfo(_worldPacket, Status);
 }
コード例 #2
0
        public override void Write()
        {
            MovementExtensions.WriteMovementInfo(_worldPacket, Status);

            _worldPacket.WriteInt32(MovementForces != null ? MovementForces.Count : 0);
            _worldPacket.WriteBit(WalkSpeed.HasValue);
            _worldPacket.WriteBit(RunSpeed.HasValue);
            _worldPacket.WriteBit(RunBackSpeed.HasValue);
            _worldPacket.WriteBit(SwimSpeed.HasValue);
            _worldPacket.WriteBit(SwimBackSpeed.HasValue);
            _worldPacket.WriteBit(FlightSpeed.HasValue);
            _worldPacket.WriteBit(FlightBackSpeed.HasValue);
            _worldPacket.WriteBit(TurnRate.HasValue);
            _worldPacket.WriteBit(PitchRate.HasValue);
            _worldPacket.FlushBits();

            if (MovementForces != null)
            {
                foreach (MovementForce force in MovementForces)
                {
                    force.Write(_worldPacket);
                }
            }

            if (WalkSpeed.HasValue)
            {
                _worldPacket.WriteFloat(WalkSpeed.Value);
            }

            if (RunSpeed.HasValue)
            {
                _worldPacket.WriteFloat(RunSpeed.Value);
            }

            if (RunBackSpeed.HasValue)
            {
                _worldPacket.WriteFloat(RunBackSpeed.Value);
            }

            if (SwimSpeed.HasValue)
            {
                _worldPacket.WriteFloat(SwimSpeed.Value);
            }

            if (SwimBackSpeed.HasValue)
            {
                _worldPacket.WriteFloat(SwimBackSpeed.Value);
            }

            if (FlightSpeed.HasValue)
            {
                _worldPacket.WriteFloat(FlightSpeed.Value);
            }

            if (FlightBackSpeed.HasValue)
            {
                _worldPacket.WriteFloat(FlightBackSpeed.Value);
            }

            if (TurnRate.HasValue)
            {
                _worldPacket.WriteFloat(TurnRate.Value);
            }

            if (PitchRate.HasValue)
            {
                _worldPacket.WriteFloat(PitchRate.Value);
            }
        }
コード例 #3
0
 public override void Write()
 {
     MovementExtensions.WriteMovementInfo(_worldPacket, Status);
     _worldPacket.WritePackedGuid(TriggerGUID);
 }
コード例 #4
0
 public override void Read()
 {
     Status = MovementExtensions.ReadMovementInfo(_worldPacket);
 }
コード例 #5
0
 public void Read(WorldPacket data)
 {
     Status   = MovementExtensions.ReadMovementInfo(data);
     AckIndex = data.ReadInt32();
 }
コード例 #6
0
 public override void Read()
 {
     Status   = MovementExtensions.ReadMovementInfo(_worldPacket);
     SplineID = _worldPacket.ReadInt32();
 }
コード例 #7
0
 public override void Write()
 {
     MovementExtensions.WriteMovementInfo(_worldPacket, Status);
     _worldPacket.WriteFloat(Height);
     _worldPacket.WriteFloat(Scale);
 }
コード例 #8
0
 public override void Read()
 {
     Status       = MovementExtensions.ReadMovementInfo(_worldPacket);
     DstVehicle   = _worldPacket.ReadPackedGuid();
     DstSeatIndex = _worldPacket.ReadUInt8();
 }