public static DeclareKuafuStatueEvaluate Create(string in_content, int in_id)
        {
            DeclareKuafuStatueEvaluate tmp = new DeclareKuafuStatueEvaluate();

            tmp._content = in_content;
            tmp._id      = in_id;

            return(tmp);
        }
Пример #2
0
 public static void Convert(Dictionary <int, DeclareKuafuStatueEvaluate> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareKuafuStatueEvaluate.Create(StringDefines.Key_57601, 1));
     data.Add(2, DeclareKuafuStatueEvaluate.Create(StringDefines.Key_57602, 2));
     data.Add(3, DeclareKuafuStatueEvaluate.Create(StringDefines.Key_57603, 3));
     data.Add(4, DeclareKuafuStatueEvaluate.Create(StringDefines.Key_57604, 4));
     data.Add(5, DeclareKuafuStatueEvaluate.Create(StringDefines.Key_57605, 5));
 }
        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[]> >("DataKuafuStatueEvaluate");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataKuafuStatueEvaluate = require 'Lua/Config/DataKuafuStatueEvaluate'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataKuafuStatueEvaluate");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareKuafuStatueEvaluate>(5);
                    foreach (var item in dic)
                    {
                        DeclareKuafuStatueEvaluate tmp = new DeclareKuafuStatueEvaluate();
                        tmp.Content = CfgStringLua.Get(item.Value[0]);
                        tmp.Id      = item.Value[1];

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