Exemplo n.º 1
0
        protected internal override void DeserializeProperty(UnrealBinaryReader reader)
        {
            Dictionary <UProperty, UProperty> values = new Dictionary <UProperty, UProperty>();

            NumKeysToRemove = reader.ReadInt32();
            int numEntries = reader.ReadInt32();

            for (int i = 0; i < NumKeysToRemove; i++)
            {
                UProperty propertyKey = UnrealTypes.GetPropertyByName(_innerType);
                propertyKey.DeserializeProperty(reader);
            }

            for (int i = 0; i < numEntries; i++)
            {
                UProperty propertyKey = UnrealTypes.GetPropertyByName(_innerType);
                propertyKey.DeserializeProperty(reader);

                UProperty propertyValue = UnrealTypes.GetPropertyByName(_valueType);

                propertyValue.DeserializeProperty(reader);

                values.Add(propertyKey, propertyValue);
            }

            Value = values;
        }
Exemplo n.º 2
0
        protected internal override void DeserializeProperty(UnrealBinaryReader reader)
        {
            Value      = reader.ReadGuid();
            ActorState = (EFortBuildingPersistentState)reader.ReadByte();
            ActorPath  = reader.ReadFString();

            Rotation.DeserializeProperty(reader);
            Location.DeserializeProperty(reader);
            Scale.DeserializeProperty(reader);

            SpawnedActor = reader.ReadInt32() == 1;

            PropertyByteSize = reader.ReadInt32();

            long currentPosition = reader.BaseStream.Position;

            if (PropertyByteSize > 0)
            {
                ActorData = reader.ReadProperties();
                reader.ReadInt32(); //?
            }

            long remainingBytes = PropertyByteSize - (reader.BaseStream.Position - currentPosition);

            if (remainingBytes > 0)
            {
                UnknownExtraBytes = reader.ReadBytes((int)remainingBytes);
            }
        }
Exemplo n.º 3
0
        protected internal virtual void DeserializeTypeInfo(UnrealBinaryReader reader)
        {
            Size       = reader.ReadInt32();
            ArrayIndex = reader.ReadInt32();

            PreDeserializeProperty(reader);

            HasPropertyGuid = reader.ReadBoolean();

            if (HasPropertyGuid)
            {
                Guid = reader.ReadGuid();
            }
        }
        protected internal override void DeserializeProperty(UnrealBinaryReader reader)
        {
            List <UProperty> items = new List <UProperty>();

            NumKeysToRemove = reader.ReadInt32();

            int count = reader.ReadInt32();

            for (int i = 0; i < NumKeysToRemove; i++)
            {
                UProperty property = UnrealTypes.GetPropertyByName(_innerType);
                property.DeserializeProperty(reader);
            }

            for (int i = 0; i < count; i++)
            {
                UProperty property = UnrealTypes.GetPropertyByName(_innerType);
                property.DeserializeProperty(reader);

                items.Add(property);
            }

            Value = items;
        }
Exemplo n.º 5
0
        protected internal override void DeserializeProperty(UnrealBinaryReader reader)
        {
            List <UProperty> items = new List <UProperty>();

            int count = reader.ReadInt32();

            string innerTypeName = null;

            if (_innerType == "StructProperty")
            {
                string settingName = reader.ReadFString();
                string typeName    = reader.ReadFString();

                UProperty property = UnrealTypes.GetPropertyByName(_innerType);
                property.DeserializeTypeInfo(reader);

                innerTypeName = property.TypeName;

                if (property is FStructProperty structProperty)
                {
                    if (UnrealTypes.HasPropertyName(structProperty._structName))
                    {
                        innerTypeName = structProperty._structName;
                    }
                }
            }

            for (int i = 0; i < count; i++)
            {
                UProperty arrayType = UnrealTypes.GetPropertyByName(innerTypeName ?? _innerType);

                arrayType.DeserializeProperty(reader);
                arrayType.ArrayIndex = i;

                items.Add(arrayType);
            }

            Value = items;
        }
 protected internal override void DeserializeProperty(UnrealBinaryReader reader)
 {
     Value = reader.ReadInt32();
 }