Beispiel #1
0
 public async Task ProfileSpinBet(RequestContext <SpinArgs> requestContext)
 {
     if (requestContext.UserGameKey.IsFunPlay)
     {
         return;
     }
     using (var db = databaseManager.GetWritableDatabase())
     {
         var sbp = new SpinBetProfile
         {
             GameTransactionId = requestContext.GameTransaction.Id,
             LineBet           = requestContext.Parameters.LineBet,
             Lines             = requestContext.Parameters.BettingLines,
             Multiplier        = requestContext.Parameters.Multiplier,
             TotalBet          = requestContext.Parameters.TotalBet,
             IsAutoSpin        = requestContext.Parameters.IsAutoSpin,
             IsSideBet         = requestContext.Parameters.SideBet
         };
         db.SpinBetProfiles.Add(sbp);
         await db.SaveChangesAsync();
     }
 }
        public MemberHistoryResult(
            GamePayoutEngine gamePayoutEngine,
            PaylineRepository paylineRepository,
            GameInfoRepository gameInfoRepository,
            GameHistory gameHistory,
            HistoryDecoderFactory historyDecoderFactory,
            SpinBetProfile spinBetProfile)
            : this(gamePayoutEngine, paylineRepository, gameInfoRepository, historyDecoderFactory)
        {
            this.gameHistory    = gameHistory;
            this.spinBetProfile = spinBetProfile;

            RoundId       = gameHistory.RoundId;
            TransactionId = GetTransactionId(this.gameHistory);
            TotalBet      = GetTotalBet();

            GameId         = gameHistory.Game.Id;
            Game           = gameHistory.Game.Name;
            TotalWin       = gameHistory.Win;
            GameResultType = gameHistory.GameResultType;
            XmlType        = gameHistory.XmlType;
            DateTimeUtc    = gameHistory.CreatedOnUtc;
            DateTime       = gameHistory.CreatedOnUtc.ToLocalTime();
            IsSideBet      = spinBetProfile?.IsSideBet == true;

            var historyXmlDecoder = historyDecoderFactory.Resolve((GameIdEnum)GameId);

            if (historyXmlDecoder != null)
            {
                historyXmlDecoder.AmendSpinHistory(this, gameHistory);
            }
            else
            {
                SetResultData();
            }
        }