@@ -79,27 +79,19 @@ public override async Task<PB7> ReadBoxPokemon(int box, int slot, CancellationTo
7979 public async Task < PB7 ? > ReadWild ( CancellationToken token ) => await ReadUntilPresent ( WildPokeData , 2_000 , 0_200 , token ) . ConfigureAwait ( false ) ;
8080 public async Task < PB7 ? > ReadGoEntity ( CancellationToken token ) => await ReadUntilPresent ( GoPokeData , 2_000 , 0_200 , token ) . ConfigureAwait ( false ) ;
8181 public async Task < PB7 ? > ReadStationary ( CancellationToken token ) => await ReadUntilPresent ( StationaryPokeData , 2_000 , 0_200 , token ) . ConfigureAwait ( false ) ;
82- public async Task < PB7 ? > ReadFossil ( CancellationToken token )
83- {
84- var pk = await ReadUntilPresentPointer ( PokeDataPointers7B . FossilPokeData , 1_000 , 0_200 , BoxFormatSlotSize , token ) . ConfigureAwait ( false ) ;
85- //if (pk is null || (pk.Species != 138 && pk.Species != 140 && pk.Species != 142))
86- //pk = await ReadUntilPresent(FossilPokeData2, 1_000, 0_200, token).ConfigureAwait(false);
87- if ( pk is not null && pk . Species != 138 && pk . Species != 140 && pk . Species != 142 )
88- pk = null ;
89- return pk ;
90- }
82+ public async Task < PB7 ? > ReadFossil ( CancellationToken token ) => await ReadUntilPresentPointer ( PokeDataPointers7B . FossilPokeData , 1_000 , 0_200 , BoxFormatSlotSize , token ) . ConfigureAwait ( false ) ;
83+
9184 public async Task < PB7 ? > ReadGiftOrFossil ( CancellationToken token )
9285 {
9386 var pk = await ReadGift ( token ) . ConfigureAwait ( false ) ;
94- if ( pk is null )
95- pk = await ReadFossil ( token ) . ConfigureAwait ( false ) ;
87+ pk ??= await ReadFossil ( token ) . ConfigureAwait ( false ) ;
9688 return pk ;
9789 }
90+
9891 public async Task < PB7 ? > ReadWildOrGo ( CancellationToken token )
9992 {
10093 var pk = await ReadWild ( token ) . ConfigureAwait ( false ) ;
101- if ( pk is null )
102- pk = await ReadGoEntity ( token ) . ConfigureAwait ( false ) ;
94+ pk ??= await ReadGoEntity ( token ) . ConfigureAwait ( false ) ;
10395 return pk ;
10496 }
10597
0 commit comments