Ejemplo n.º 1
0
        public static DeclareGmMainFunction Create(string in_branchFunction, int in_icon, int in_id, string in_name)
        {
            DeclareGmMainFunction tmp = new DeclareGmMainFunction();

            tmp._branchFunction = in_branchFunction;
            tmp._icon           = in_icon;
            tmp._id             = in_id;
            tmp._name           = in_name;

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

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareGmMainFunction>(29);
                    foreach (var item in dic)
                    {
                        DeclareGmMainFunction tmp = new DeclareGmMainFunction();
                        tmp.BranchFunction = CfgStringLua.Get(item.Value[0]);
                        tmp.Icon           = item.Value[1];
                        tmp.Id             = item.Value[2];
                        tmp.Name           = CfgStringLua.Get(item.Value[3]);

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "GmMainFunction");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclareGmMainFunction>(29);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "GmMainFunction");
                }
            }
        }
Ejemplo n.º 3
0
 public static void Convert(Dictionary <int, DeclareGmMainFunction> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareGmMainFunction.Create(StringDefines.Key_58280, 1, 1, StringDefines.Key_42779));
     data.Add(2, DeclareGmMainFunction.Create(StringDefines.Key_58281, 3, 2, StringDefines.Key_43232));
     data.Add(3, DeclareGmMainFunction.Create(StringDefines.Key_19990, 5, 3, StringDefines.Key_18687));
     data.Add(4, DeclareGmMainFunction.Create(StringDefines.Key_58282, 7, 4, StringDefines.Key_58283));
     data.Add(5, DeclareGmMainFunction.Create(StringDefines.Key_58284, 9, 5, StringDefines.Key_14863));
     data.Add(6, DeclareGmMainFunction.Create(StringDefines.Key_58285, 1, 6, StringDefines.Key_15154));
     data.Add(7, DeclareGmMainFunction.Create(StringDefines.Key_58286, 3, 7, StringDefines.Key_44062));
     data.Add(8, DeclareGmMainFunction.Create(StringDefines.Key_58287, 5, 8, StringDefines.Key_42954));
     data.Add(9, DeclareGmMainFunction.Create(StringDefines.Key_58288, 7, 9, StringDefines.Key_18128));
     data.Add(10, DeclareGmMainFunction.Create(StringDefines.Key_58289, 9, 10, StringDefines.Key_58290));
     data.Add(11, DeclareGmMainFunction.Create(StringDefines.Key_58291, 1, 11, StringDefines.Key_4296));
     data.Add(12, DeclareGmMainFunction.Create(StringDefines.Key_58292, 3, 12, StringDefines.Key_14865));
     data.Add(13, DeclareGmMainFunction.Create(StringDefines.Key_58293, 5, 13, StringDefines.Key_58294));
     data.Add(14, DeclareGmMainFunction.Create(StringDefines.Key_58295, 7, 14, StringDefines.Key_2894));
     data.Add(15, DeclareGmMainFunction.Create(StringDefines.Key_58296, 9, 15, StringDefines.Key_13588));
     data.Add(16, DeclareGmMainFunction.Create(StringDefines.Key_58297, 1, 16, StringDefines.Key_58298));
     data.Add(17, DeclareGmMainFunction.Create(StringDefines.Key_58299, 3, 17, StringDefines.Key_15096));
     data.Add(18, DeclareGmMainFunction.Create(StringDefines.Key_58300, 5, 18, StringDefines.Key_58301));
     data.Add(19, DeclareGmMainFunction.Create(StringDefines.Key_58302, 7, 19, StringDefines.Key_14990));
     data.Add(20, DeclareGmMainFunction.Create(StringDefines.Key_58303, 9, 20, StringDefines.Key_58304));
     data.Add(21, DeclareGmMainFunction.Create(StringDefines.Key_58305, 1, 21, StringDefines.Key_42543));
     data.Add(22, DeclareGmMainFunction.Create(StringDefines.Key_58306, 3, 22, StringDefines.Key_14913));
     data.Add(23, DeclareGmMainFunction.Create(StringDefines.Key_58307, 5, 23, StringDefines.Key_14979));
     data.Add(24, DeclareGmMainFunction.Create(StringDefines.Key_58308, 7, 24, StringDefines.Key_58309));
     data.Add(25, DeclareGmMainFunction.Create(StringDefines.Key_58310, 9, 25, StringDefines.Key_58311));
     data.Add(26, DeclareGmMainFunction.Create(StringDefines.Key_58312, 1, 26, StringDefines.Key_15081));
     data.Add(27, DeclareGmMainFunction.Create(StringDefines.Key_58313, 3, 27, StringDefines.Key_1229));
     data.Add(28, DeclareGmMainFunction.Create(StringDefines.Key_58314, 5, 28, StringDefines.Key_14977));
     data.Add(29, DeclareGmMainFunction.Create(StringDefines.Key_58315, 7, 29, StringDefines.Key_43211));
 }