Пример #1
0
        public static DeclareChangejobStr Create(int in_iD, string in_language)
        {
            DeclareChangejobStr tmp = new DeclareChangejobStr();

            tmp._iD       = in_iD;
            tmp._language = in_language;

            return(tmp);
        }
Пример #2
0
 public static void Convert(Dictionary <int, DeclareChangejobStr> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(186, DeclareChangejobStr.Create(186, StringDefines.Key_20392));
     data.Add(187, DeclareChangejobStr.Create(187, StringDefines.Key_20393));
     data.Add(188, DeclareChangejobStr.Create(188, StringDefines.Key_20394));
     data.Add(189, DeclareChangejobStr.Create(189, StringDefines.Key_20395));
     data.Add(190, DeclareChangejobStr.Create(190, StringDefines.Key_20396));
     data.Add(191, DeclareChangejobStr.Create(191, StringDefines.Key_20397));
     data.Add(197, DeclareChangejobStr.Create(197, StringDefines.Key_20398));
     data.Add(198, DeclareChangejobStr.Create(198, StringDefines.Key_20399));
     data.Add(199, DeclareChangejobStr.Create(199, StringDefines.Key_20400));
     data.Add(200, DeclareChangejobStr.Create(200, StringDefines.Key_20401));
     data.Add(1, DeclareChangejobStr.Create(1, StringDefines.Key_20402));
     data.Add(202, DeclareChangejobStr.Create(202, StringDefines.Key_20403));
 }
Пример #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[]> >("DataChangejobStr");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataChangejobStr = require 'Lua/Config/DataChangejobStr'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataChangejobStr");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareChangejobStr>(12);
                    foreach (var item in dic)
                    {
                        DeclareChangejobStr tmp = new DeclareChangejobStr();
                        tmp.ID       = item.Value[0];
                        tmp.Language = CfgStringLua.Get(item.Value[1]);

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