Пример #1
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[]> >("DataTaskBranch");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataTaskBranch = require 'Lua/Config/DataTaskBranch'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataTaskBranch");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareTaskBranch>(34);
                    foreach (var item in dic)
                    {
                        DeclareTaskBranch tmp = new DeclareTaskBranch();
                        tmp.BackGroupId        = item.Value[0];
                        tmp.BranchId           = item.Value[1];
                        tmp.ConditionsDescribe = CfgStringLua.Get(item.Value[2]);
                        tmp.ConditionsType     = item.Value[3];
                        tmp.ConditionsValue    = CfgStringLua.Get(item.Value[4]);
                        tmp.DemandValue        = CfgStringLua.Get(item.Value[5]);
                        tmp.GainConditions     = item.Value[6];
                        tmp.ItemID             = item.Value[7];
                        tmp.Name         = CfgStringLua.Get(item.Value[8]);
                        tmp.OpenPanel    = item.Value[9];
                        tmp.TaskReward   = CfgStringLua.Get(item.Value[10]);
                        tmp.TsakDescribe = CfgStringLua.Get(item.Value[11]);
                        tmp.TypeName     = CfgStringLua.Get(item.Value[12]);

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "TaskBranch");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclareTaskBranch>(34);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "TaskBranch");
                }
            }
        }
Пример #2
0
 public static void Convert(Dictionary <int, DeclareTaskBranch> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(500, DeclareTaskBranch.Create(6666, 500, StringDefines.Key_55880, 6, StringDefines.Key_55881, StringDefines.Key_55882, 2, 0, StringDefines.Key_4009, 2030000, StringDefines.Key_55883, StringDefines.Key_55884, StringDefines.Key_44546));
     data.Add(501, DeclareTaskBranch.Create(0, 501, StringDefines.Key_55885, 6, StringDefines.Key_55886, StringDefines.Key_55887, 1, 0, StringDefines.Key_14325, 0, StringDefines.Key_55888, StringDefines.Key_55889, StringDefines.Key_44546));
     data.Add(502, DeclareTaskBranch.Create(0, 502, StringDefines.Key_55885, 6, StringDefines.Key_55886, StringDefines.Key_55890, 1, 0, StringDefines.Key_14325, 0, StringDefines.Key_55891, StringDefines.Key_55889, StringDefines.Key_44546));
     data.Add(503, DeclareTaskBranch.Create(0, 503, StringDefines.Key_55892, 6, StringDefines.Key_55886, StringDefines.Key_55893, 1, 0, StringDefines.Key_3685, 0, StringDefines.Key_55894, StringDefines.Key_55895, StringDefines.Key_44546));
     data.Add(504, DeclareTaskBranch.Create(0, 504, StringDefines.Key_55896, 6, StringDefines.Key_55886, StringDefines.Key_55897, 1, 0, StringDefines.Key_3706, 0, StringDefines.Key_55898, StringDefines.Key_55899, StringDefines.Key_44546));
     data.Add(505, DeclareTaskBranch.Create(0, 505, StringDefines.Key_55900, 6, StringDefines.Key_55886, StringDefines.Key_55901, 1, 0, StringDefines.Key_55902, 0, StringDefines.Key_20, StringDefines.Key_55903, StringDefines.Key_44546));
     data.Add(506, DeclareTaskBranch.Create(0, 506, StringDefines.Key_55904, 6, StringDefines.Key_55886, StringDefines.Key_55905, 1, 0, StringDefines.Key_55906, 0, StringDefines.Key_20, StringDefines.Key_55907, StringDefines.Key_44546));
     data.Add(507, DeclareTaskBranch.Create(0, 507, StringDefines.Key_55908, 6, StringDefines.Key_55909, StringDefines.Key_3967, 2, 0, StringDefines.Key_43104, 55000, StringDefines.Key_55883, StringDefines.Key_55910, StringDefines.Key_44546));
     data.Add(508, DeclareTaskBranch.Create(0, 508, StringDefines.Key_55911, 6, StringDefines.Key_55886, StringDefines.Key_55912, 1, 0, StringDefines.Key_42450, 0, StringDefines.Key_55894, StringDefines.Key_55913, StringDefines.Key_44546));
     data.Add(509, DeclareTaskBranch.Create(0, 509, StringDefines.Key_55914, 6, StringDefines.Key_18136, StringDefines.Key_55915, 2, 0, StringDefines.Key_3968, 1051000, StringDefines.Key_55883, StringDefines.Key_55916, StringDefines.Key_44546));
     data.Add(510, DeclareTaskBranch.Create(1000, 510, StringDefines.Key_55917, 6, StringDefines.Key_18157, StringDefines.Key_55918, 2, 0, StringDefines.Key_55919, 2030000, StringDefines.Key_55920, StringDefines.Key_55921, StringDefines.Key_44546));
     data.Add(511, DeclareTaskBranch.Create(0, 511, StringDefines.Key_55922, 6, StringDefines.Key_55886, StringDefines.Key_55923, 1, 0, StringDefines.Key_15005, 0, StringDefines.Key_55924, StringDefines.Key_55925, StringDefines.Key_44546));
     data.Add(512, DeclareTaskBranch.Create(0, 512, StringDefines.Key_55926, 6, StringDefines.Key_55886, StringDefines.Key_55927, 1, 0, StringDefines.Key_14959, 0, StringDefines.Key_55928, StringDefines.Key_55929, StringDefines.Key_44546));
     data.Add(513, DeclareTaskBranch.Create(0, 513, StringDefines.Key_55930, 6, StringDefines.Key_55886, StringDefines.Key_55931, 1, 0, StringDefines.Key_55932, 0, StringDefines.Key_55933, StringDefines.Key_55934, StringDefines.Key_44546));
     data.Add(514, DeclareTaskBranch.Create(5001, 514, StringDefines.Key_55935, 6, StringDefines.Key_55936, StringDefines.Key_55937, 2, 0, StringDefines.Key_3972, 2032000, StringDefines.Key_55938, StringDefines.Key_55939, StringDefines.Key_44546));
     data.Add(515, DeclareTaskBranch.Create(0, 515, StringDefines.Key_55940, 6, StringDefines.Key_55886, StringDefines.Key_55941, 1, 0, StringDefines.Key_30620, 0, StringDefines.Key_55942, StringDefines.Key_55943, StringDefines.Key_44546));
     data.Add(516, DeclareTaskBranch.Create(0, 516, StringDefines.Key_55944, 6, StringDefines.Key_55886, StringDefines.Key_55945, 1, 0, StringDefines.Key_55946, 0, StringDefines.Key_55947, StringDefines.Key_55948, StringDefines.Key_44546));
     data.Add(517, DeclareTaskBranch.Create(0, 517, StringDefines.Key_55949, 6, StringDefines.Key_55886, StringDefines.Key_55950, 1, 0, StringDefines.Key_55951, 0, StringDefines.Key_55952, StringDefines.Key_55953, StringDefines.Key_44546));
     data.Add(518, DeclareTaskBranch.Create(0, 518, StringDefines.Key_55954, 6, StringDefines.Key_55886, StringDefines.Key_30629, 1, 0, StringDefines.Key_55955, 0, StringDefines.Key_55956, StringDefines.Key_55957, StringDefines.Key_44546));
     data.Add(519, DeclareTaskBranch.Create(0, 519, StringDefines.Key_55958, 6, StringDefines.Key_55959, StringDefines.Key_55960, 1000, 0, StringDefines.Key_1677, 1080000, StringDefines.Key_55961, StringDefines.Key_55962, StringDefines.Key_44546));
     data.Add(520, DeclareTaskBranch.Create(0, 520, StringDefines.Key_55963, 6, StringDefines.Key_55886, StringDefines.Key_55964, 1, 1012, StringDefines.Key_1254, 0, StringDefines.Key_55965, StringDefines.Key_55966, StringDefines.Key_44546));
     data.Add(521, DeclareTaskBranch.Create(8, 521, StringDefines.Key_55967, 6, StringDefines.Key_55886, StringDefines.Key_55968, 1, 0, StringDefines.Key_55969, 0, StringDefines.Key_55894, StringDefines.Key_55970, StringDefines.Key_44546));
     data.Add(522, DeclareTaskBranch.Create(0, 522, StringDefines.Key_55971, 6, StringDefines.Key_2409, StringDefines.Key_55964, 1, 50059, StringDefines.Key_30739, 1022000, StringDefines.Key_55972, StringDefines.Key_55973, StringDefines.Key_44546));
     data.Add(523, DeclareTaskBranch.Create(0, 523, StringDefines.Key_55974, 20, StringDefines.Key_18164, StringDefines.Key_55975, 2, 0, StringDefines.Key_55976, 60000, StringDefines.Key_55977, StringDefines.Key_55978, StringDefines.Key_44546));
     data.Add(524, DeclareTaskBranch.Create(0, 524, StringDefines.Key_55979, 20, StringDefines.Key_55886, StringDefines.Key_55975, 1, 0, StringDefines.Key_14913, 70000, StringDefines.Key_55980, StringDefines.Key_55981, StringDefines.Key_44546));
     data.Add(525, DeclareTaskBranch.Create(0, 525, StringDefines.Key_55982, 6, StringDefines.Key_55886, StringDefines.Key_55983, 1, 0, StringDefines.Key_55984, 0, StringDefines.Key_9385, StringDefines.Key_55985, StringDefines.Key_44546));
     data.Add(526, DeclareTaskBranch.Create(0, 526, StringDefines.Key_55986, 6, StringDefines.Key_18140, StringDefines.Key_9743, 2, 0, StringDefines.Key_55987, 1040000, StringDefines.Key_55883, StringDefines.Key_55988, StringDefines.Key_44546));
     data.Add(527, DeclareTaskBranch.Create(0, 527, StringDefines.Key_55989, 20, StringDefines.Key_55886, StringDefines.Key_55975, 1, 0, StringDefines.Key_14936, 0, StringDefines.Key_55990, StringDefines.Key_55991, StringDefines.Key_44546));
     data.Add(528, DeclareTaskBranch.Create(0, 528, StringDefines.Key_55992, 20, StringDefines.Key_55886, StringDefines.Key_55975, 1, 0, StringDefines.Key_55993, 0, StringDefines.Key_55994, StringDefines.Key_55995, StringDefines.Key_44546));
     data.Add(529, DeclareTaskBranch.Create(0, 529, StringDefines.Key_55996, 6, StringDefines.Key_2217, StringDefines.Key_55997, 141, 0, StringDefines.Key_55998, 52000, StringDefines.Key_55999, StringDefines.Key_56000, StringDefines.Key_44546));
     data.Add(530, DeclareTaskBranch.Create(0, 530, StringDefines.Key_56001, 6, StringDefines.Key_55886, StringDefines.Key_56002, 1, 0, StringDefines.Key_56003, 10000, StringDefines.Key_55999, StringDefines.Key_56004, StringDefines.Key_44546));
     data.Add(531, DeclareTaskBranch.Create(0, 531, StringDefines.Key_56005, 6, StringDefines.Key_56006, StringDefines.Key_56007, 2, 0, StringDefines.Key_56008, 2100000, StringDefines.Key_18097, StringDefines.Key_56009, StringDefines.Key_44546));
     data.Add(532, DeclareTaskBranch.Create(0, 532, StringDefines.Key_56010, 20, StringDefines.Key_2468, StringDefines.Key_55975, 1, 0, StringDefines.Key_56011, 2000000, StringDefines.Key_18093, StringDefines.Key_56012, StringDefines.Key_44546));
     data.Add(533, DeclareTaskBranch.Create(0, 533, StringDefines.Key_56013, 25, StringDefines.Key_56014, StringDefines.Key_56015, 1001, 0, StringDefines.Key_56016, 2041000, StringDefines.Key_18093, StringDefines.Key_56017, StringDefines.Key_44546));
 }
Пример #3
0
        public static DeclareTaskBranch Create(int in_back_group_id, int in_branchId, string in_conditions_describe, int in_conditions_type, string in_conditions_value, string in_demand_value, int in_gain_conditions, int in_itemID, string in_name, int in_open_panel, string in_task_reward, string in_tsak_describe, string in_type_name)
        {
            DeclareTaskBranch tmp = new DeclareTaskBranch();

            tmp._back_group_id       = in_back_group_id;
            tmp._branchId            = in_branchId;
            tmp._conditions_describe = in_conditions_describe;
            tmp._conditions_type     = in_conditions_type;
            tmp._conditions_value    = in_conditions_value;
            tmp._demand_value        = in_demand_value;
            tmp._gain_conditions     = in_gain_conditions;
            tmp._itemID        = in_itemID;
            tmp._name          = in_name;
            tmp._open_panel    = in_open_panel;
            tmp._task_reward   = in_task_reward;
            tmp._tsak_describe = in_tsak_describe;
            tmp._type_name     = in_type_name;

            return(tmp);
        }