Exemplo n.º 1
0
        public static DeclareTips Create(int in_id, string in_tips)
        {
            DeclareTips tmp = new DeclareTips();

            tmp._id   = in_id;
            tmp._tips = in_tips;

            return(tmp);
        }
Exemplo n.º 2
0
 public static void Convert(Dictionary <int, DeclareTips> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareTips.Create(1, StringDefines.Key_11070));
     data.Add(2, DeclareTips.Create(2, StringDefines.Key_11072));
     data.Add(3, DeclareTips.Create(3, StringDefines.Key_11075));
     data.Add(4, DeclareTips.Create(4, StringDefines.Key_11077));
     data.Add(5, DeclareTips.Create(5, StringDefines.Key_11079));
     data.Add(6, DeclareTips.Create(6, StringDefines.Key_11082));
     data.Add(7, DeclareTips.Create(7, StringDefines.Key_11084));
     data.Add(8, DeclareTips.Create(8, StringDefines.Key_11086));
     data.Add(9, DeclareTips.Create(9, StringDefines.Key_11088));
     data.Add(10, DeclareTips.Create(10, StringDefines.Key_11090));
     data.Add(11, DeclareTips.Create(11, StringDefines.Key_11093));
     data.Add(12, DeclareTips.Create(12, StringDefines.Key_11096));
     data.Add(13, DeclareTips.Create(13, StringDefines.Key_19969));
 }
Exemplo n.º 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[]> >("DataTips");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataTips = require 'Lua/Config/DataTips'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataTips");
                }

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

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