Ejemplo n.º 1
0
 public void Serialize(Unreal.ISerializer stream)
 {
     stream.Serialize(ref this._BoolVariables);
     stream.Serialize(ref this._IntVariables);
     stream.Serialize(ref this._FloatVariables);
 }
        public void Serialize(Unreal.ISerializer stream)
        {
            stream.Serialize(ref this._DebugName);
            stream.Serialize(ref this._SecondsPlayed);
            stream.Serialize(ref this._Disc);
            stream.Serialize(ref this._BaseLevelName);
            stream.Serialize(ref this._BaseLevelNameDisplayOverrideAsRead, s => s.Version < 36, () => "None");
            stream.SerializeEnum(ref this._Difficulty);

            if (stream.Version >= 43 && stream.Version <= 46)
            {
                byte unknown = 0;
                stream.Serialize(ref unknown);
            }

            stream.SerializeEnum(ref this._EndGameState);
            stream.Serialize(ref this._TimeStamp);
            stream.Serialize(ref this._Location);
            stream.Serialize(ref this._Rotation);
            stream.Serialize(ref this._CurrentLoadingTip);
            stream.Serialize(ref this._Levels);
            stream.Serialize(ref this._StreamingRecords);
            stream.Serialize(ref this._KismetRecords);
            stream.Serialize(ref this._Doors);
            stream.Serialize(ref this._Placeables, s => s.Version < 46, () => new List<Placeable>());
            stream.Serialize(ref this._Pawns);
            stream.Serialize(ref this._Player);
            stream.Serialize(ref this._Henchmen);
            stream.Serialize(ref this._Plot);
            stream.Serialize(ref this._Me1Plot);
            stream.Serialize(ref this._PlayerVariables, s => s.Version < 34, () => new List<PlayerVariable>());
            stream.Serialize(ref this._GalaxyMap);
            stream.Serialize(ref this._DependentDLC);
            stream.Serialize(ref this._Treasures, s => s.Version < 35, () => new List<LevelTreasure>());
            stream.Serialize(ref this._UseModules, s => s.Version < 39, () => new List<Guid>());
            stream.SerializeEnum(ref this._ConversationMode,
                                 s => s.Version < 49,
                                 () => AutoReplyModeOptions.AllDecisions);
            stream.Serialize(ref this._ObjectiveMarkers, s => s.Version < 52, () => new List<ObjectiveMarker>());
            stream.Serialize(ref this._SavedObjectiveText, s => s.Version < 52, () => 0);
        }
Ejemplo n.º 3
0
 public void Serialize(Unreal.ISerializer stream)
 {
     stream.Serialize(ref this._Page);
     stream.Serialize(ref this._IsNew);
 }
Ejemplo n.º 4
0
 public void Serialize(Unreal.ISerializer stream)
 {
     stream.Serialize(ref this._Pages);
 }
Ejemplo n.º 5
0
 public void Serialize(Unreal.ISerializer stream)
 {
     stream.Serialize(ref this._QuestCounter);
     stream.Serialize(ref this._QuestUpdated);
     stream.Serialize(ref this._ActiveGoal, s => s.Version < 57, () => 0);
     stream.Serialize(ref this._History);
 }
Ejemplo n.º 6
0
 public void Serialize(Unreal.ISerializer stream)
 {
     stream.Serialize(ref this._Index);
     stream.Serialize(ref this._Value);
 }
Ejemplo n.º 7
0
        public void Serialize(Unreal.ISerializer stream)
        {
            stream.Serialize(ref this._BoolVariables);

            if (stream.Version >= 56)
            {
                stream.Serialize(ref this._IntVariables);
                stream.Serialize(ref this._FloatVariables);
            }
            else
            {
                if (stream.Mode == Unreal.SerializeMode.Reading)
                {
                    var oldIntVariables = new List<int>();
                    stream.Serialize(ref oldIntVariables);
                    this._IntVariables = new List<IntVariablePair>();
                    for (int i = 0; i < oldIntVariables.Count; i++)
                    {
                        if (oldIntVariables[i] == 0)
                        {
                            continue;
                        }

                        this._IntVariables.Add(new IntVariablePair()
                        {
                            Index = i,
                            Value = oldIntVariables[i],
                        });
                    }

                    var oldFloatVariables = new List<float>();
                    stream.Serialize(ref oldFloatVariables);
                    this._FloatVariables = new List<FloatVariablePair>();
                    for (int i = 0; i < oldFloatVariables.Count; i++)
                    {
                        if (Equals(oldFloatVariables[i], 0.0f) == true)
                        {
                            continue;
                        }

                        this._FloatVariables.Add(new FloatVariablePair()
                        {
                            Index = i,
                            Value = oldFloatVariables[i],
                        });
                    }
                }
                else if (stream.Mode == Unreal.SerializeMode.Writing)
                {
                    var oldIntVariables = new List<int>();
                    if (this._IntVariables != null)
                    {
                        foreach (var intVariable in this._IntVariables)
                        {
                            oldIntVariables[intVariable.Index] = intVariable.Value;
                        }
                    }
                    stream.Serialize(ref oldIntVariables);

                    var oldFloatVariables = new List<float>();
                    if (this._FloatVariables != null)
                    {
                        foreach (var floatVariable in this._FloatVariables)
                        {
                            oldFloatVariables[floatVariable.Index] = floatVariable.Value;
                        }
                    }
                    stream.Serialize(ref oldFloatVariables);
                }
                else
                {
                    throw new NotSupportedException();
                }
            }

            stream.Serialize(ref this._QuestProgressCounter);
            stream.Serialize(ref this._QuestProgress);
            stream.Serialize(ref this._QuestIDs);
            stream.Serialize(ref this._CodexEntries);
            stream.Serialize(ref this._CodexIDs);
        }