Пример #1
0
        public static DeclareTaskGuide Create(int in_branchId, int in_changejob, int in_conditions_map, int in_conditions_npc, int in_gain_conditions, string in_goal_npc, int in_level_max, int in_level_min, string in_name, int in_over_map, int in_over_npc, int in_professional, int in_statue_ID, int in_task_talk_over, int in_task_talk_start, int in_task_type, int in_type, string in_type_name)
        {
            DeclareTaskGuide tmp = new DeclareTaskGuide();

            tmp._branchId        = in_branchId;
            tmp._changejob       = in_changejob;
            tmp._conditions_map  = in_conditions_map;
            tmp._conditions_npc  = in_conditions_npc;
            tmp._gain_conditions = in_gain_conditions;
            tmp._goal_npc        = in_goal_npc;
            tmp._level_max       = in_level_max;
            tmp._level_min       = in_level_min;
            tmp._name            = in_name;
            tmp._over_map        = in_over_map;
            tmp._over_npc        = in_over_npc;
            tmp._professional    = in_professional;
            tmp._statue_ID       = in_statue_ID;
            tmp._task_talk_over  = in_task_talk_over;
            tmp._task_talk_start = in_task_talk_start;
            tmp._task_type       = in_task_type;
            tmp._type            = in_type;
            tmp._type_name       = in_type_name;

            return(tmp);
        }
Пример #2
0
 public static void Convert(Dictionary <int, DeclareTaskGuide> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(10000000, DeclareTaskGuide.Create(10000000, 1, 101, 10111, 1, StringDefines.Key_49963, 800, 1, StringDefines.Key_49964, 101, 10111, 0, 100, 10300, 0, 0, 1, StringDefines.Key_24));
     data.Add(10000001, DeclareTaskGuide.Create(10000001, 1, 101, 10112, 1, StringDefines.Key_49965, 800, 1, StringDefines.Key_49964, 101, 10112, 1, 101, 10310, 0, 0, 1, StringDefines.Key_24));
     data.Add(10000002, DeclareTaskGuide.Create(10000002, 1, 101, 10113, 1, StringDefines.Key_49966, 800, 1, StringDefines.Key_49964, 101, 10113, 2, 102, 10320, 0, 0, 1, StringDefines.Key_24));
     data.Add(10000003, DeclareTaskGuide.Create(10000003, 1, 101, 10114, 1, StringDefines.Key_49967, 800, 1, StringDefines.Key_49964, 101, 10114, 3, 103, 10330, 0, 0, 1, StringDefines.Key_24));
     data.Add(10000004, DeclareTaskGuide.Create(10000004, 1, 101, 10115, 1, StringDefines.Key_49968, 800, 1, StringDefines.Key_49964, 101, 10115, 4, 104, 10340, 0, 0, 1, StringDefines.Key_24));
     data.Add(10000005, DeclareTaskGuide.Create(10000005, 1, 101, 10116, 1, StringDefines.Key_49969, 800, 1, StringDefines.Key_49964, 101, 10116, 5, 105, 10350, 0, 0, 1, StringDefines.Key_24));
     data.Add(10001000, DeclareTaskGuide.Create(10001000, 2, 101, 10111, 1, StringDefines.Key_49963, 800, 1, StringDefines.Key_49964, 101, 10111, 0, 100, 10300, 0, 0, 1, StringDefines.Key_24));
     data.Add(10001001, DeclareTaskGuide.Create(10001001, 2, 101, 10112, 1, StringDefines.Key_49965, 800, 1, StringDefines.Key_49964, 101, 10112, 1, 101, 10310, 0, 0, 1, StringDefines.Key_24));
     data.Add(10001002, DeclareTaskGuide.Create(10001002, 2, 101, 10113, 1, StringDefines.Key_49966, 800, 1, StringDefines.Key_49964, 101, 10113, 2, 102, 10320, 0, 0, 1, StringDefines.Key_24));
     data.Add(10001003, DeclareTaskGuide.Create(10001003, 2, 101, 10114, 1, StringDefines.Key_49967, 800, 1, StringDefines.Key_49964, 101, 10114, 3, 103, 10330, 0, 0, 1, StringDefines.Key_24));
     data.Add(10001004, DeclareTaskGuide.Create(10001004, 2, 101, 10115, 1, StringDefines.Key_49968, 800, 1, StringDefines.Key_49964, 101, 10115, 4, 104, 10340, 0, 0, 1, StringDefines.Key_24));
     data.Add(10001005, DeclareTaskGuide.Create(10001005, 2, 101, 10116, 1, StringDefines.Key_49969, 800, 1, StringDefines.Key_49964, 101, 10116, 5, 105, 10350, 0, 0, 1, StringDefines.Key_24));
     data.Add(20000000, DeclareTaskGuide.Create(20000000, 1, 900, 33100, 1, StringDefines.Key_39329, 1000, 1, StringDefines.Key_39332, 900, 33100, 0, 900, 30001, 30000, 0, 2, StringDefines.Key_39331));
     data.Add(20000001, DeclareTaskGuide.Create(20000001, 1, 900, 33100, 1, StringDefines.Key_39329, 1000, 1, StringDefines.Key_39332, 900, 33100, 1, 900, 30001, 30000, 0, 2, StringDefines.Key_39331));
     data.Add(20000002, DeclareTaskGuide.Create(20000002, 1, 900, 33100, 1, StringDefines.Key_39329, 1000, 1, StringDefines.Key_39332, 900, 33100, 2, 900, 30001, 30000, 0, 2, StringDefines.Key_39331));
     data.Add(20000003, DeclareTaskGuide.Create(20000003, 1, 900, 33100, 1, StringDefines.Key_39329, 1000, 1, StringDefines.Key_39332, 900, 33100, 3, 900, 30001, 30000, 0, 2, StringDefines.Key_39331));
     data.Add(20000004, DeclareTaskGuide.Create(20000004, 1, 900, 33100, 1, StringDefines.Key_39329, 1000, 1, StringDefines.Key_39332, 900, 33100, 4, 900, 30001, 30000, 0, 2, StringDefines.Key_39331));
     data.Add(20000005, DeclareTaskGuide.Create(20000005, 1, 900, 33100, 1, StringDefines.Key_39329, 1000, 1, StringDefines.Key_39332, 900, 33100, 5, 900, 30001, 30000, 0, 2, StringDefines.Key_39331));
     data.Add(20000010, DeclareTaskGuide.Create(20000010, 2, 900, 33100, 1, StringDefines.Key_39329, 1000, 1, StringDefines.Key_39332, 900, 33100, 0, 900, 30001, 30000, 0, 2, StringDefines.Key_39331));
     data.Add(20000011, DeclareTaskGuide.Create(20000011, 2, 900, 33100, 1, StringDefines.Key_39329, 1000, 1, StringDefines.Key_39332, 900, 33100, 1, 900, 30001, 30000, 0, 2, StringDefines.Key_39331));
     data.Add(20000012, DeclareTaskGuide.Create(20000012, 2, 900, 33100, 1, StringDefines.Key_39329, 1000, 1, StringDefines.Key_39332, 900, 33100, 2, 900, 30001, 30000, 0, 2, StringDefines.Key_39331));
     data.Add(20000013, DeclareTaskGuide.Create(20000013, 2, 900, 33100, 1, StringDefines.Key_39329, 1000, 1, StringDefines.Key_39332, 900, 33100, 3, 900, 30001, 30000, 0, 2, StringDefines.Key_39331));
     data.Add(20000014, DeclareTaskGuide.Create(20000014, 2, 900, 33100, 1, StringDefines.Key_39329, 1000, 1, StringDefines.Key_39332, 900, 33100, 4, 900, 30001, 30000, 0, 2, StringDefines.Key_39331));
     data.Add(20000015, DeclareTaskGuide.Create(20000015, 2, 900, 33100, 1, StringDefines.Key_39329, 1000, 1, StringDefines.Key_39332, 900, 33100, 5, 900, 30001, 30000, 0, 2, StringDefines.Key_39331));
 }
Пример #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[]> >("DataTaskGuide");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataTaskGuide = require 'Lua/Config/DataTaskGuide'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataTaskGuide");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareTaskGuide>(24);
                    foreach (var item in dic)
                    {
                        DeclareTaskGuide tmp = new DeclareTaskGuide();
                        tmp.BranchId       = item.Value[0];
                        tmp.Changejob      = item.Value[1];
                        tmp.ConditionsMap  = item.Value[2];
                        tmp.ConditionsNpc  = item.Value[3];
                        tmp.GainConditions = item.Value[4];
                        tmp.GoalNpc        = CfgStringLua.Get(item.Value[5]);
                        tmp.LevelMax       = item.Value[6];
                        tmp.LevelMin       = item.Value[7];
                        tmp.Name           = CfgStringLua.Get(item.Value[8]);
                        tmp.OverMap        = item.Value[9];
                        tmp.OverNpc        = item.Value[10];
                        tmp.Professional   = item.Value[11];
                        tmp.StatueID       = item.Value[12];
                        tmp.TaskTalkOver   = item.Value[13];
                        tmp.TaskTalkStart  = item.Value[14];
                        tmp.TaskType       = item.Value[15];
                        tmp.Type           = item.Value[16];
                        tmp.TypeName       = CfgStringLua.Get(item.Value[17]);

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