Пример #1
0
        public static DeclareDiamondinvest Create(int in_day, int in_level_1, int in_level_2, int in_level_3)
        {
            DeclareDiamondinvest tmp = new DeclareDiamondinvest();

            tmp._day     = in_day;
            tmp._level_1 = in_level_1;
            tmp._level_2 = in_level_2;
            tmp._level_3 = in_level_3;

            return(tmp);
        }
Пример #2
0
 public static void Convert(Dictionary <int, DeclareDiamondinvest> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareDiamondinvest.Create(1, 680, 1280, 1880));
     data.Add(2, DeclareDiamondinvest.Create(2, 136, 256, 376));
     data.Add(3, DeclareDiamondinvest.Create(3, 204, 384, 564));
     data.Add(4, DeclareDiamondinvest.Create(4, 272, 512, 752));
     data.Add(5, DeclareDiamondinvest.Create(5, 340, 640, 940));
     data.Add(6, DeclareDiamondinvest.Create(6, 408, 768, 1128));
     data.Add(7, DeclareDiamondinvest.Create(7, 476, 896, 1316));
     data.Add(8, DeclareDiamondinvest.Create(8, 544, 1024, 1504));
     data.Add(9, DeclareDiamondinvest.Create(9, 612, 1152, 1692));
     data.Add(10, DeclareDiamondinvest.Create(10, 612, 1152, 1692));
     data.Add(11, DeclareDiamondinvest.Create(11, 612, 1152, 1692));
     data.Add(12, DeclareDiamondinvest.Create(12, 612, 1152, 1692));
     data.Add(13, DeclareDiamondinvest.Create(13, 612, 1152, 1692));
     data.Add(14, DeclareDiamondinvest.Create(14, 680, 1280, 1880));
 }
Пример #3
0
        public static void SetData()
        {
            if (_dataCaches == null && LuaEnv.isLoadLuaCfg)
            {
                long startTime = DateTime.Now.Ticks;
                Dictionary <int, int[]> dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataDiamondinvest");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataDiamondinvest = require 'Lua/Config/DataDiamondinvest'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataDiamondinvest");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareDiamondinvest>(14);
                    foreach (var item in dic)
                    {
                        DeclareDiamondinvest tmp = new DeclareDiamondinvest();
                        tmp.Day    = item.Value[0];
                        tmp.Level1 = item.Value[1];
                        tmp.Level2 = item.Value[2];
                        tmp.Level3 = item.Value[3];

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "Diamondinvest");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclareDiamondinvest>(14);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "Diamondinvest");
                }
            }
        }