Beispiel #1
0
 private void HandleAbortedTrade(PokeTradeDetail <PB8> detail, PokeRoutineType type, uint priority, PokeTradeResult result)
 {
     detail.IsProcessing = false;
     if (result.ShouldAttemptRetry() && detail.Type != PokeTradeType.Random && !detail.IsRetry)
     {
         detail.IsRetry = true;
         Hub.Queues.Enqueue(type, detail, Math.Min(priority, PokeTradePriorities.Tier2));
         detail.SendNotification(this, "Oops! Something happened. I'll requeue you for another attempt.");
     }
     else
     {
         detail.SendNotification(this, $"Oops! Something happened. Canceling the trade: {result}.");
         detail.TradeCanceled(this, result);
     }
 }