Exemplo n.º 1
0
        public static DeclareFunctionAlert Create(int in_do_function_id, string in_icon, int in_id, int in_level_max, int in_level_min, int in_priority_level)
        {
            DeclareFunctionAlert tmp = new DeclareFunctionAlert();

            tmp._do_function_id = in_do_function_id;
            tmp._icon           = in_icon;
            tmp._id             = in_id;
            tmp._level_max      = in_level_max;
            tmp._level_min      = in_level_min;
            tmp._priority_level = in_priority_level;

            return(tmp);
        }
Exemplo n.º 2
0
 public static void Convert(Dictionary <int, DeclareFunctionAlert> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareFunctionAlert.Create(2042000, StringDefines.Key_58174, 1, 0, 0, 1));
     data.Add(2, DeclareFunctionAlert.Create(0, StringDefines.Key_58175, 2, 0, 0, 2));
     data.Add(3, DeclareFunctionAlert.Create(2041000, StringDefines.Key_58176, 3, 0, 0, 3));
     data.Add(4, DeclareFunctionAlert.Create(2080000, StringDefines.Key_58177, 4, 0, 0, 4));
     data.Add(5, DeclareFunctionAlert.Create(2240000, StringDefines.Key_58178, 5, 0, 0, 5));
     data.Add(6, DeclareFunctionAlert.Create(71000, StringDefines.Key_58179, 6, 0, 0, 6));
     data.Add(7, DeclareFunctionAlert.Create(50000, StringDefines.Key_58180, 7, 0, 0, 7));
     data.Add(8, DeclareFunctionAlert.Create(2190000, StringDefines.Key_58177, 8, 0, 0, 8));
     data.Add(9, DeclareFunctionAlert.Create(56000, StringDefines.Key_58180, 9, 0, 0, 9));
     data.Add(10, DeclareFunctionAlert.Create(2220000, StringDefines.Key_58181, 10, 0, 0, 10));
     data.Add(11, DeclareFunctionAlert.Create(72000, StringDefines.Key_58179, 11, 0, 0, 11));
     data.Add(12, DeclareFunctionAlert.Create(70000, StringDefines.Key_58179, 12, 0, 0, 12));
     data.Add(13, DeclareFunctionAlert.Create(101000, StringDefines.Key_58182, 13, 0, 0, 13));
     data.Add(14, DeclareFunctionAlert.Create(10000, StringDefines.Key_58183, 14, 0, 0, 14));
     data.Add(15, DeclareFunctionAlert.Create(2002000, StringDefines.Key_58184, 15, 0, 0, 15));
     data.Add(16, DeclareFunctionAlert.Create(30000, StringDefines.Key_58185, 16, 0, 0, 16));
     data.Add(17, DeclareFunctionAlert.Create(32000, StringDefines.Key_58185, 17, 0, 0, 17));
     data.Add(18, DeclareFunctionAlert.Create(33000, StringDefines.Key_58185, 18, 0, 0, 18));
     data.Add(19, DeclareFunctionAlert.Create(81100, StringDefines.Key_58186, 19, 0, 0, 19));
     data.Add(20, DeclareFunctionAlert.Create(81200, StringDefines.Key_58186, 20, 0, 0, 20));
     data.Add(21, DeclareFunctionAlert.Create(83000, StringDefines.Key_58186, 21, 0, 0, 21));
     data.Add(22, DeclareFunctionAlert.Create(2102000, StringDefines.Key_58187, 22, 0, 0, 22));
     data.Add(23, DeclareFunctionAlert.Create(42000, StringDefines.Key_58188, 23, 0, 0, 23));
     data.Add(24, DeclareFunctionAlert.Create(2001200, StringDefines.Key_58188, 24, 0, 0, 24));
     data.Add(25, DeclareFunctionAlert.Create(41000, StringDefines.Key_58189, 25, 0, 0, 25));
     data.Add(26, DeclareFunctionAlert.Create(2001100, StringDefines.Key_58189, 26, 0, 0, 26));
     data.Add(27, DeclareFunctionAlert.Create(60000, StringDefines.Key_58181, 27, 0, 0, 27));
     data.Add(28, DeclareFunctionAlert.Create(63000, StringDefines.Key_58181, 28, 0, 0, 28));
     data.Add(29, DeclareFunctionAlert.Create(64000, StringDefines.Key_58181, 29, 0, 0, 29));
     data.Add(30, DeclareFunctionAlert.Create(65000, StringDefines.Key_58181, 30, 0, 0, 30));
     data.Add(31, DeclareFunctionAlert.Create(73000, StringDefines.Key_58179, 31, 999, 999, 31));
     data.Add(32, DeclareFunctionAlert.Create(74000, StringDefines.Key_58179, 32, 0, 0, 32));
     data.Add(33, DeclareFunctionAlert.Create(102000, StringDefines.Key_58182, 33, 0, 0, 33));
     data.Add(34, DeclareFunctionAlert.Create(2001400, StringDefines.Key_58190, 34, 0, 0, 34));
     data.Add(35, DeclareFunctionAlert.Create(2001300, StringDefines.Key_58183, 35, 0, 0, 35));
     data.Add(36, DeclareFunctionAlert.Create(43000, StringDefines.Key_58183, 36, 0, 0, 36));
     data.Add(37, DeclareFunctionAlert.Create(20000, StringDefines.Key_58182, 37, 0, 0, 37));
     data.Add(38, DeclareFunctionAlert.Create(34000, StringDefines.Key_58190, 38, 0, 0, 38));
     data.Add(39, DeclareFunctionAlert.Create(2001400, StringDefines.Key_58190, 39, 0, 0, 39));
     data.Add(40, DeclareFunctionAlert.Create(2410000, StringDefines.Key_58179, 40, 0, 0, 40));
     data.Add(41, DeclareFunctionAlert.Create(2420000, StringDefines.Key_58179, 41, 0, 0, 41));
 }
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[]> >("DataFunctionAlert");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataFunctionAlert = require 'Lua/Config/DataFunctionAlert'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataFunctionAlert");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareFunctionAlert>(41);
                    foreach (var item in dic)
                    {
                        DeclareFunctionAlert tmp = new DeclareFunctionAlert();
                        tmp.DoFunctionId  = item.Value[0];
                        tmp.Icon          = CfgStringLua.Get(item.Value[1]);
                        tmp.Id            = item.Value[2];
                        tmp.LevelMax      = item.Value[3];
                        tmp.LevelMin      = item.Value[4];
                        tmp.PriorityLevel = item.Value[5];

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