@@ -79,27 +79,19 @@ public override async Task<PB7> ReadBoxPokemon(int box, int slot, CancellationTo
79
79
public async Task < PB7 ? > ReadWild ( CancellationToken token ) => await ReadUntilPresent ( WildPokeData , 2_000 , 0_200 , token ) . ConfigureAwait ( false ) ;
80
80
public async Task < PB7 ? > ReadGoEntity ( CancellationToken token ) => await ReadUntilPresent ( GoPokeData , 2_000 , 0_200 , token ) . ConfigureAwait ( false ) ;
81
81
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
+
91
84
public async Task < PB7 ? > ReadGiftOrFossil ( CancellationToken token )
92
85
{
93
86
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 ) ;
96
88
return pk ;
97
89
}
90
+
98
91
public async Task < PB7 ? > ReadWildOrGo ( CancellationToken token )
99
92
{
100
93
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 ) ;
103
95
return pk ;
104
96
}
105
97
0 commit comments