Exemple #1
0
        public override bool Deserialize()
        {
            A = new IntPropertyValue(Data, PCC);
            if (!A.Deserialize())
            {
                return(false);
            }
            B = new IntPropertyValue(Data, PCC);
            if (!B.Deserialize())
            {
                return(false);
            }
            C = new IntPropertyValue(Data, PCC);
            if (!C.Deserialize())
            {
                return(false);
            }
            D = new IntPropertyValue(Data, PCC);
            if (!D.Deserialize())
            {
                return(false);
            }

            return(true);
        }
        public override bool Deserialize()
        {
            ActorIndex = new IntPropertyValue(Data, PCC);
            if (!ActorIndex.Deserialize())
                return false;
            ActorGUID = new GUIDPropertyValue(Data, PCC);
            if (!ActorGUID.Deserialize())
                return false;

            return true;
        }
        public override bool Deserialize()
        {
            X = new IntPropertyValue(Data, PCC);
            if (!X.Deserialize())
                return false;
            Y = new IntPropertyValue(Data, PCC);
            if (!Y.Deserialize())
                return false;

            return true;
        }
        public override bool Deserialize()
        {
            CoverLinkIndex = new IntPropertyValue(Data, PCC);
            if (!CoverLinkIndex.Deserialize())
                return false;
            SlotIndex = new IntPropertyValue(Data, PCC);
            if (!SlotIndex.Deserialize())
                return false;

            return true;
        }
        public override bool Deserialize()
        {
            NavPointIndex = new IntPropertyValue(Data, PCC);
            if (!NavPointIndex.Deserialize())
                return false;
            NavPointGUID = new GUIDPropertyValue(Data, PCC);
            if (!NavPointGUID.Deserialize())
                return false;

            return true;
        }
        public override bool Deserialize()
        {
            Actor = new ActorReferencePropertyValue(Data, PCC);
            if (!Actor.Deserialize())
                return false;
            PolyID = new IntPropertyValue(Data, PCC);
            if (!PolyID.Deserialize())
                return false;

            return true;
        }
        public override bool Deserialize()
        {
            base.Deserialize();

            SlotIndex = new IntPropertyValue(Data, PCC);
            if (!SlotIndex.Deserialize())
                return false;
            Direction = new IntPropertyValue(Data, PCC);
            if (!Direction.Deserialize())
                return false;

            return true;
        }
        public override bool Deserialize()
        {
            Pitch = new IntPropertyValue(Data, PCC);
            if (!Pitch.Deserialize())
                return false;
            Yaw = new IntPropertyValue(Data, PCC);
            if (!Yaw.Deserialize())
                return false;
            Roll = new IntPropertyValue(Data, PCC);
            if (!Roll.Deserialize())
                return false;

            return true;
        }
Exemple #9
0
        public override bool Deserialize()
        {
            X = new IntPropertyValue(Data, PCC);
            if (!X.Deserialize())
            {
                return(false);
            }
            Y = new IntPropertyValue(Data, PCC);
            if (!Y.Deserialize())
            {
                return(false);
            }

            return(true);
        }
Exemple #10
0
        public override bool Deserialize()
        {
            NavPointIndex = new IntPropertyValue(Data, PCC);
            if (!NavPointIndex.Deserialize())
            {
                return(false);
            }
            NavPointGUID = new GUIDPropertyValue(Data, PCC);
            if (!NavPointGUID.Deserialize())
            {
                return(false);
            }

            return(true);
        }
        public override bool Deserialize()
        {
            CoverLinkIndex = new IntPropertyValue(Data, PCC);
            if (!CoverLinkIndex.Deserialize())
            {
                return(false);
            }
            SlotIndex = new IntPropertyValue(Data, PCC);
            if (!SlotIndex.Deserialize())
            {
                return(false);
            }

            return(true);
        }
        public override bool Deserialize()
        {
            Actor = new ActorReferencePropertyValue(Data, PCC);
            if (!Actor.Deserialize())
            {
                return(false);
            }
            PolyID = new IntPropertyValue(Data, PCC);
            if (!PolyID.Deserialize())
            {
                return(false);
            }

            return(true);
        }
        public override bool Deserialize()
        {
            ActorIndex = new IntPropertyValue(Data, PCC);
            if (!ActorIndex.Deserialize())
            {
                return(false);
            }
            ActorGUID = new GUIDPropertyValue(Data, PCC);
            if (!ActorGUID.Deserialize())
            {
                return(false);
            }

            return(true);
        }
Exemple #14
0
        public override bool Deserialize()
        {
            A = new IntPropertyValue(Data, PCC);
            if (!A.Deserialize())
                return false;
            B = new IntPropertyValue(Data, PCC);
            if (!B.Deserialize())
                return false;
            C = new IntPropertyValue(Data, PCC);
            if (!C.Deserialize())
                return false;
            D = new IntPropertyValue(Data, PCC);
            if (!D.Deserialize())
                return false;

            return true;
        }
        public override bool Deserialize()
        {
            base.Deserialize();

            SlotIndex = new IntPropertyValue(Data, PCC);
            if (!SlotIndex.Deserialize())
            {
                return(false);
            }
            Direction = new IntPropertyValue(Data, PCC);
            if (!Direction.Deserialize())
            {
                return(false);
            }

            return(true);
        }
        public override bool Deserialize()
        {
            Pitch = new IntPropertyValue(Data, PCC);
            if (!Pitch.Deserialize())
            {
                return(false);
            }
            Yaw = new IntPropertyValue(Data, PCC);
            if (!Yaw.Deserialize())
            {
                return(false);
            }
            Roll = new IntPropertyValue(Data, PCC);
            if (!Roll.Deserialize())
            {
                return(false);
            }

            return(true);
        }
Exemple #17
0
        public bool DeserializeValue(PropertyType type, out DefaultPropertyValue value, UInt32 size)
        {
            value = null;
            switch (type) // Adjust size for certain types:
            {
            case PropertyType.BoolProperty:
                value = new BoolPropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.ByteProperty:
                var enumName = PCC.GetName(Data.ReadNameRef());
                if (size == 8)     // if it's an enum-based byte value
                {
                    value = new EnumPropertyValue(Data, PCC, size, enumName);
                }
                else
                {
                    value = new BytePropertyValue(Data, PCC);
                }
                return(value.Deserialize());

            case PropertyType.IntProperty:
                value = new IntPropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.FloatProperty:
                value = new FloatPropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.StrProperty:
                value = new StrPropertyValue(Data, PCC, size);
                return(value.Deserialize());

            case PropertyType.StringRefProperty:
                value = new StringRefPropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.NameProperty:
                value = new NamePropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.ObjectProperty:
                value = new ObjectPropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.InterfaceProperty:
                value = new InterfacePropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.DelegateProperty:
                value = new DelegatePropertyValue(Data, PCC, Name);
                return(value.Deserialize());

            case PropertyType.StructProperty:
                var structName = PCC.GetName(Data.ReadNameRef());
                // If it's a hardcoded struct type, deserialize it as that.
                if (Enum.GetNames(typeof(PropertyType)).Skip(11).Contains(structName))
                {
                    return(DeserializeValue((PropertyType)Enum.Parse(typeof(PropertyType), structName), out value, size));
                }

                // otherwise use the deserialization of a user-defined struct:
                value = new StructPropertyValue(Data, PCC, size, structName);
                return(value.Deserialize());

            case PropertyType.ArrayProperty:
                value = new ArrayPropertyValue(Data, PCC, size);
                return(value.Deserialize());

                #region BioWare

            case PropertyType.BioMask4Property:
                value = new BioMask4PropertyValue(Data, PCC);
                return(value.Deserialize());

                #endregion


                #region Hardcoded Structs

                #region Standard
            case PropertyType.Vector:
                value = new VectorPropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.Color:
                value = new ColorPropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.LinearColor:
                value = new LinearColorPropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.TwoVectors:
                value = new TwoVectorsPropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.Vector4:
                value = new Vector4PropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.Vector2D:
                value = new Vector2DPropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.Rotator:
                value = new RotatorPropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.Guid:
                value = new GUIDPropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.Sphere:
                value = new SpherePropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.Plane:
                value = new PlanePropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.Scale:
                value = new ScalePropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.Box:
                value = new BoxPropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.Quat:
                value = new QuatPropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.Matrix:
                value = new MatrixPropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.IntPoint:
                value = new IntPointPropertyValue(Data, PCC);
                return(value.Deserialize());

                #endregion

                #region BioWare
            case PropertyType.BioRwBox:
                value = new BioRwBoxPropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.RwVector3:
                value = new RwVector3PropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.RwVector2:
                value = new RwVector2PropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.RwVector4:
                value = new RwVector4PropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.RwPlane:
                value = new RwPlanePropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.RwQuat:
                value = new RwQuatPropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.RwMatrix44:
                value = new RwMatrix44PropertyValue(Data, PCC);
                return(value.Deserialize());

                #endregion

                #region UE3Internals

            case PropertyType.ActorReference:
                value = new ActorReferencePropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.PolyReference:
                value = new PolyReferencePropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.AimTransform:
                value = new AimTransformPropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.NavReference:
                value = new NavReferencePropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.CoverReference:
                value = new CoverReferencePropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.CoverInfo:
                value = new CoverInfoPropertyValue(Data, PCC);
                return(value.Deserialize());

            case PropertyType.CoverSlot:
                value = new CoverSlotPropertyValue(Data, PCC, size);
                return(value.Deserialize());

                #endregion

                #endregion

            default:
                return(false);
            }
        }