Пример #1
0
        public SaveFile( Stream inputstream, string name )
        {
            FileName = name;

            try
            {
                A = new GameSave( inputstream );

                B = new GameSave( inputstream );

                _tail = GrabTail( inputstream );
            }
            finally
            {
                inputstream.Close();
            }
            Latest.PropertyChanged += ( a, e ) =>
                {
                    InvokePropertyChanged( "Latest" );
                    if( e.PropertyName == "IsDirty" )
                        InvokePropertyChanged( "IsDirty" );
                };
        }
Пример #2
0
 public DexEntry( int index, GameSave save )
 {
     _save = save;
     Index = index;
     Name = DexNames.Get( (uint) index );
 }
Пример #3
0
 public void Setup()
 {
     using( var fs = File.OpenRead( "p2.sav" ) )
     {
         _saveA = new GameSave( fs );
     }
 }
Пример #4
0
 public void MakeOwn( GameSave save )
 {
     OriginalTrainerId = save.TrainerId;
     OriginalTrainerGender = save.Gender;
     OriginalTrainerName = save.Name;
     GameOfOrigin = (uint) save.GameTypeGuess;
 }
Пример #5
0
        public void Merge( GameSave external )
        {
            var ml = Team.Concat( PcBuffer ).ToList();
            var externallist = external.Team.Concat( external.PcBuffer ).ToList();
            var toadd = externallist.Where( e => !( ml.Any( m => m.MonsterId == e.MonsterId ) ) ).ToList();

            var l = LastEmptyIndex( PcBuffer.Count - 1 );
            foreach( var entry in toadd )
            {
                if( l == -1 )
                    break;
                PcBuffer[l].RawData = entry.RawData;
                l = LastEmptyIndex( l );
            }
        }