Beispiel #1
0
 public static void PustTurnTableRecord(TurntableReward record, int big)
 {
     nList.Add(record);
     if (nList.Count > 20)
     {
         nList.RemoveAt(0);
     }
     if (big == 1)
     {
         bList.Add(record);
         if (bList.Count > 20)
         {
             bList.RemoveAt(0);
         }
     }
 }
Beispiel #2
0
        public static void CreatTurnTableDate()
        {
            IList <TurntableConfig> list = aidePlatformFacade.GetTurntableConfigs();
            int pp        = new Random().Next(100);
            int turnIndex = 0;

            if (pp > list[3].MenuVaule && pp < list[8].MenuVaule)
            {
                turnIndex = 1;
            }
            else if (pp > list[8].MenuVaule)
            {
                turnIndex = 2;
            }
            TurntableConfig broad   = list[5 * turnIndex + 2];
            TurntableConfig money   = list[5 * turnIndex];
            AccountsInfo    android = aideAccountsFacade.RandomAndroid();
            int             index   = StartTurntable(list[5 * turnIndex + 3]);
            TurntableReward record  = new TurntableReward();

            record.money = (decimal)(money.GetType().GetProperty("Value" + index).GetValue(money, null));
            record.time  = DateTime.Now;
            string tName = "";

            switch (turnIndex)
            {
            case 0:
                tName = "白银转盘";
                break;

            case 1:
                tName = "黄金转盘";
                break;

            default:
                tName = "钻石转盘";
                break;
            }
            record.turnName = tName;
            record.nickName = android.NickName;
            int mm = (int)((decimal)(broad.GetType().GetProperty("Value" + index).GetValue(broad, null)));

            PustTurnTableRecord(record, mm);
        }