Esempio n. 1
0
        public static DeclareTaskGender Create(int in_camp, int in_canSkip, string in_chapter_desc, string in_chapter_name, string in_chapterprogr, string in_conditions_describe, int in_conditions_npc, string in_endpath, int in_gender, int in_genderClass, string in_goal_npc, int in_id, int in_level, int in_openUI, int in_pathMap, int in_post_task_id, string in_rewards, int in_sequence, int in_skipPrompt, string in_taksdesc, string in_tape_name, string in_task_name, int in_task_talk_end, int in_task_talk_start, int in_task_type, int in_trueDrop)
        {
            DeclareTaskGender tmp = new DeclareTaskGender();

            tmp._camp                = in_camp;
            tmp._canSkip             = in_canSkip;
            tmp._chapter_desc        = in_chapter_desc;
            tmp._chapter_name        = in_chapter_name;
            tmp._chapterprogr        = in_chapterprogr;
            tmp._conditions_describe = in_conditions_describe;
            tmp._conditions_npc      = in_conditions_npc;
            tmp._endpath             = in_endpath;
            tmp._gender              = in_gender;
            tmp._genderClass         = in_genderClass;
            tmp._goal_npc            = in_goal_npc;
            tmp._id              = in_id;
            tmp._level           = in_level;
            tmp._openUI          = in_openUI;
            tmp._pathMap         = in_pathMap;
            tmp._post_task_id    = in_post_task_id;
            tmp._rewards         = in_rewards;
            tmp._sequence        = in_sequence;
            tmp._skipPrompt      = in_skipPrompt;
            tmp._taksdesc        = in_taksdesc;
            tmp._tape_name       = in_tape_name;
            tmp._task_name       = in_task_name;
            tmp._task_talk_end   = in_task_talk_end;
            tmp._task_talk_start = in_task_talk_start;
            tmp._task_type       = in_task_type;
            tmp._trueDrop        = in_trueDrop;

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

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareTaskGender>(347);
                    foreach (var item in dic)
                    {
                        DeclareTaskGender tmp = new DeclareTaskGender();
                        tmp.Camp               = item.Value[0];
                        tmp.CanSkip            = item.Value[1];
                        tmp.ChapterDesc        = CfgStringLua.Get(item.Value[2]);
                        tmp.ChapterName        = CfgStringLua.Get(item.Value[3]);
                        tmp.Chapterprogr       = CfgStringLua.Get(item.Value[4]);
                        tmp.ConditionsDescribe = CfgStringLua.Get(item.Value[5]);
                        tmp.ConditionsNpc      = item.Value[6];
                        tmp.Endpath            = CfgStringLua.Get(item.Value[7]);
                        tmp.Gender             = item.Value[8];
                        tmp.GenderClass        = item.Value[9];
                        tmp.GoalNpc            = CfgStringLua.Get(item.Value[10]);
                        tmp.Id            = item.Value[11];
                        tmp.Level         = item.Value[12];
                        tmp.OpenUI        = item.Value[13];
                        tmp.PathMap       = item.Value[14];
                        tmp.PostTaskId    = item.Value[15];
                        tmp.Rewards       = CfgStringLua.Get(item.Value[16]);
                        tmp.Sequence      = item.Value[17];
                        tmp.SkipPrompt    = item.Value[18];
                        tmp.Taksdesc      = CfgStringLua.Get(item.Value[19]);
                        tmp.TapeName      = CfgStringLua.Get(item.Value[20]);
                        tmp.TaskName      = CfgStringLua.Get(item.Value[21]);
                        tmp.TaskTalkEnd   = item.Value[22];
                        tmp.TaskTalkStart = item.Value[23];
                        tmp.TaskType      = item.Value[24];
                        tmp.TrueDrop      = item.Value[25];

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