Ejemplo n.º 1
0
 public async Task SetBoxPokemon(PK8 pkm, int box, int slot, CancellationToken token, SAV8?sav = null)
 {
     if (sav != null)
     {
         // Update PKM to the current save's handler data
         DateTime Date = DateTime.Now;
         pkm.Trade(sav, Date.Day, Date.Month, Date.Year);
         pkm.RefreshChecksum();
     }
     var ofs = GetBoxSlotOffset(box, slot);
     await Connection.WriteBytesAsync(pkm.EncryptedPartyData, ofs, token).ConfigureAwait(false);
 }