Hidistro.ControlPanel/ControlPanel/Promotions/GameHelper.cs

(开头部分) 9KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

namespace ControlPanel.Promotions
{
    using Hidistro.ControlPanel.Commodities;
    using Hidistro.ControlPanel.Members;
    using Hidistro.ControlPanel.Promotions;
    using Hidistro.Core;
    using Hidistro.Core.Entities;
    using Hidistro.Entities.Members;
    using Hidistro.Entities.Promotions;
    using Hidistro.Messages;
    using Hidistro.SqlDal.Promotions;
    using System;
    using System.Collections.Generic;
    using System.Data;
    using System.Linq;
    using System.Runtime.InteropServices;

    public static class GameHelper
    {
        private static Random Rnd = new Random();

        public static bool AddPrizeLog(PrizeResultInfo model)
        {
            if (model == null)
            {
                throw new ArgumentNullException("参数model不能不null");
            }
            return new PrizeResultDao().AddPrizeLog(model);
        }

        private static GamePrizeInfo ChouJiang(IList<GamePrizeInfo> prizeLists)
        {
            return (from x in Enumerable.Range(0, 0x2710)
                let prizeInfo0 = prizeLists[Rnd.Next(prizeLists.Count<GamePrizeInfo>())]
                let rnd = Rnd.Next(0, 100)
                where rnd < prizeInfo0.PrizeRate
                select prizeInfo0).First<GamePrizeInfo>();
        }

        public static bool Create(GameInfo model, out int gameId)
        {
            if (model == null)
            {
                throw new ArgumentNullException("model参数不能为null");
            }
            Globals.EntityCoding(model, true);
            bool flag = new GameDao().Create(model, out gameId);
            if (flag)
            {
            }
            return flag;
        }

        public static bool CreatePrize(GamePrizeInfo model)
        {
            if (model == null)
            {
                throw new ArgumentNullException("model参数不能为null");
            }
            bool flag = new GamePrizeDao().Create(model);
后面还有 239 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。