AuctionDiscount5.cs 635 B

12345678910111213141516171819
  1. using System.Collections.Generic;
  2. using System.Threading.Tasks;
  3. using CardCollector.DataBase.Entity;
  4. using CardCollector.DataBase.EntityDao;
  5. namespace CardCollector.StickerEffects
  6. {
  7. public static class AuctionDiscount5
  8. {
  9. public static async Task<bool> IsApplied(Dictionary<string, UserStickerRelationEntity> stickers)
  10. {
  11. return await stickers.AnyAsync(async item =>
  12. {
  13. var stickerInfo = await StickerDao.GetById(item.Value.StickerId);
  14. return stickerInfo.Effect == (int) Effect.AuctionDiscount5 && item.Value.Count != 0;
  15. });
  16. }
  17. }
  18. }