Example #1
0
 public void Read(PacketIn p)
 {
     Name = p.ReadCString();
     Race = p.ReadByte();
     Class = p.ReadByte();
     Gender = p.ReadByte();
     Skin = p.ReadByte();
     Face = p.ReadByte();
     HairStyle = p.ReadByte();
     HairColor = p.ReadByte();
     FacialHair = p.ReadByte();
     Outfit = p.ReadByte();
 }
Example #2
0
 public void Read(PacketIn p)
 {
     Name       = p.ReadCString();
     Race       = p.ReadByte();
     Class      = p.ReadByte();
     Gender     = p.ReadByte();
     Skin       = p.ReadByte();
     Face       = p.ReadByte();
     HairStyle  = p.ReadByte();
     HairColor  = p.ReadByte();
     FacialHair = p.ReadByte();
     Outfit     = p.ReadByte();
 }
Example #3
0
        public void Read(PacketIn p)
        {
            GUID = p.ReadPackedGUID();

            Flags  = (MovementFlags)p.ReadUInt32();
            Flags2 = (MovementFlags2)p.ReadUInt16();
            Time   = p.ReadUInt32();

            PositionX = p.ReadSingle();
            PositionY = p.ReadSingle();
            PositionZ = p.ReadSingle();
            PositionO = p.ReadSingle();

            if (Flags.HasFlag(MovementFlags.MOVEMENTFLAG_ONTRANSPORT))
            {
                if (MovementDataTransport == null)
                {
                    MovementDataTransport = new MovementDataTransport();
                }

                MovementDataTransport.TransportGuid = p.ReadPackedGUID();
                MovementDataTransport.TransportX    = p.ReadSingle();
                MovementDataTransport.TransportY    = p.ReadSingle();
                MovementDataTransport.TransportZ    = p.ReadSingle();
                MovementDataTransport.TransportO    = p.ReadSingle();
                MovementDataTransport.TransportTime = p.ReadUInt32();
                MovementDataTransport.TransportSeat = p.ReadByte();

                if (Flags2.HasFlag(MovementFlags2.MOVEMENTFLAG2_INTERPOLATED_MOVEMENT))
                {
                    MovementDataTransport.TransportTime2 = p.ReadUInt32();
                }
            }

            if (Flags.HasFlag(MovementFlags.MOVEMENTFLAG_SWIMMING | MovementFlags.MOVEMENTFLAG_FLYING) ||
                Flags2.HasFlag(MovementFlags2.MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING))
            {
                Pitch = p.ReadSingle();
            }

            FallTime = p.ReadUInt32();

            if (Flags.HasFlag(MovementFlags.MOVEMENTFLAG_FALLING))
            {
                FallVerticalSpeed = p.ReadSingle();
                FallSine          = p.ReadSingle();
                FallCosine        = p.ReadSingle();
                FallLateralSpeed  = p.ReadSingle();
            }

            if (Flags.HasFlag(MovementFlags.MOVEMENTFLAG_SPLINE_ELEVATION))
            {
                SplineElevation = p.ReadSingle();
            }
        }
Example #4
0
        public void Read(PacketIn p)
        {
            GUID = p.ReadPackedGUID();

            Flags = (MovementFlags)p.ReadUInt32();
            Flags2 = (MovementFlags2)p.ReadUInt16();
            Time = p.ReadUInt32();

            PositionX = p.ReadSingle();
            PositionY = p.ReadSingle();
            PositionZ = p.ReadSingle();
            PositionO = p.ReadSingle();

            if (Flags.HasFlag(MovementFlags.MOVEMENTFLAG_ONTRANSPORT))
            {
                if (MovementDataTransport == null)
                    MovementDataTransport = new MovementDataTransport();

                MovementDataTransport.TransportGuid = p.ReadPackedGUID();
                MovementDataTransport.TransportX = p.ReadSingle();
                MovementDataTransport.TransportY = p.ReadSingle();
                MovementDataTransport.TransportZ = p.ReadSingle();
                MovementDataTransport.TransportO = p.ReadSingle();
                MovementDataTransport.TransportTime = p.ReadUInt32();
                MovementDataTransport.TransportSeat = p.ReadByte();

                if (Flags2.HasFlag(MovementFlags2.MOVEMENTFLAG2_INTERPOLATED_MOVEMENT))
                    MovementDataTransport.TransportTime2 = p.ReadUInt32();
            }

            if (Flags.HasFlag(MovementFlags.MOVEMENTFLAG_SWIMMING | MovementFlags.MOVEMENTFLAG_FLYING) ||
                Flags2.HasFlag(MovementFlags2.MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING))
                Pitch = p.ReadSingle();

            FallTime = p.ReadUInt32();

            if (Flags.HasFlag(MovementFlags.MOVEMENTFLAG_FALLING))
            {
                FallVerticalSpeed = p.ReadSingle();
                FallSine = p.ReadSingle();
                FallCosine = p.ReadSingle();
                FallLateralSpeed = p.ReadSingle();
            }

            if (Flags.HasFlag(MovementFlags.MOVEMENTFLAG_SPLINE_ELEVATION))
                SplineElevation = p.ReadSingle();
        }