Ejemplo n.º 1
0
        public static DeclareTimelimitgift Create(int in_gold, int in_id, string in_info, string in_name, string in_title)
        {
            DeclareTimelimitgift tmp = new DeclareTimelimitgift();

            tmp._gold  = in_gold;
            tmp._id    = in_id;
            tmp._info  = in_info;
            tmp._name  = in_name;
            tmp._title = in_title;

            return(tmp);
        }
Ejemplo n.º 2
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[]> >("DataTimelimitgift");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataTimelimitgift = require 'Lua/Config/DataTimelimitgift'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataTimelimitgift");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareTimelimitgift>(14);
                    foreach (var item in dic)
                    {
                        DeclareTimelimitgift tmp = new DeclareTimelimitgift();
                        tmp.Gold  = item.Value[0];
                        tmp.Id    = item.Value[1];
                        tmp.Info  = CfgStringLua.Get(item.Value[2]);
                        tmp.Name  = CfgStringLua.Get(item.Value[3]);
                        tmp.Title = CfgStringLua.Get(item.Value[4]);

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "Timelimitgift");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclareTimelimitgift>(14);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "Timelimitgift");
                }
            }
        }
Ejemplo n.º 3
0
 public static void Convert(Dictionary <int, DeclareTimelimitgift> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareTimelimitgift.Create(60, 1, StringDefines.Key_20005, StringDefines.Key_20006, StringDefines.Key_20007));
     data.Add(2, DeclareTimelimitgift.Create(66, 2, StringDefines.Key_20008, StringDefines.Key_20009, StringDefines.Key_20007));
     data.Add(3, DeclareTimelimitgift.Create(120, 3, StringDefines.Key_20010, StringDefines.Key_20011, StringDefines.Key_20007));
     data.Add(4, DeclareTimelimitgift.Create(180, 4, StringDefines.Key_20012, StringDefines.Key_20013, StringDefines.Key_20007));
     data.Add(5, DeclareTimelimitgift.Create(214, 5, StringDefines.Key_20014, StringDefines.Key_20015, StringDefines.Key_20016));
     data.Add(6, DeclareTimelimitgift.Create(360, 6, StringDefines.Key_20017, StringDefines.Key_20018, StringDefines.Key_20007));
     data.Add(7, DeclareTimelimitgift.Create(520, 7, StringDefines.Key_20019, StringDefines.Key_20020, StringDefines.Key_20016));
     data.Add(8, DeclareTimelimitgift.Create(600, 8, StringDefines.Key_20021, StringDefines.Key_20022, StringDefines.Key_20007));
     data.Add(9, DeclareTimelimitgift.Create(666, 9, StringDefines.Key_20023, StringDefines.Key_20024, StringDefines.Key_20007));
     data.Add(10, DeclareTimelimitgift.Create(777, 10, StringDefines.Key_20025, StringDefines.Key_20026, StringDefines.Key_20007));
     data.Add(11, DeclareTimelimitgift.Create(888, 11, StringDefines.Key_20027, StringDefines.Key_20028, StringDefines.Key_20029));
     data.Add(12, DeclareTimelimitgift.Create(1111, 12, StringDefines.Key_20030, StringDefines.Key_20031, StringDefines.Key_20032));
     data.Add(13, DeclareTimelimitgift.Create(1212, 13, StringDefines.Key_20033, StringDefines.Key_20034, StringDefines.Key_20032));
     data.Add(14, DeclareTimelimitgift.Create(1314, 14, StringDefines.Key_20035, StringDefines.Key_20036, StringDefines.Key_20037));
 }