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

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareCloneMap>(233);
                    foreach (var item in dic)
                    {
                        DeclareCloneMap tmp = new DeclareCloneMap();
                        tmp.BigChestId      = CfgStringLua.Get(item.Value[0]);
                        tmp.CameraSize      = item.Value[1];
                        tmp.CanCrossSerever = item.Value[2];
                        tmp.CanManyPeople   = item.Value[3];
                        tmp.CanOnePeople    = item.Value[4];
                        tmp.CanUpMorale     = item.Value[5];
                        tmp.CheckCamp       = item.Value[6];
                        tmp.Cinematic       = item.Value[7];
                        tmp.CloneStory      = item.Value[8];
                        tmp.CombatPower     = item.Value[9];
                        tmp.DuplicateName   = CfgStringLua.Get(item.Value[10]);
                        tmp.EnterItem       = CfgStringLua.Get(item.Value[11]);
                        tmp.EnterTime       = item.Value[12];
                        tmp.EnterType       = item.Value[13];
                        tmp.EquipLevel      = item.Value[14];
                        tmp.ExistTime       = item.Value[15];
                        tmp.Explain         = CfgStringLua.Get(item.Value[16]);
                        tmp.ExtraReward     = CfgStringLua.Get(item.Value[17]);
                        tmp.FailReward      = CfgStringLua.Get(item.Value[18]);
                        tmp.GoodRewardID    = CfgStringLua.Get(item.Value[19]);
                        tmp.GroupId         = item.Value[20];
                        tmp.Id                  = item.Value[21];
                        tmp.IfDouble            = item.Value[22];
                        tmp.IfUseUp             = item.Value[23];
                        tmp.Isscript            = item.Value[24];
                        tmp.ManualNum           = item.Value[25];
                        tmp.Mapid               = CfgStringLua.Get(item.Value[26]);
                        tmp.MaterialLevel       = item.Value[27];
                        tmp.MaxLv               = item.Value[28];
                        tmp.MaxNum              = item.Value[29];
                        tmp.MinLv               = item.Value[30];
                        tmp.MinNum              = item.Value[31];
                        tmp.ModelRotat          = item.Value[32];
                        tmp.NeedTaskId          = CfgStringLua.Get(item.Value[33]);
                        tmp.OpenInterface       = item.Value[34];
                        tmp.OpenTime            = CfgStringLua.Get(item.Value[35]);
                        tmp.OpenType            = item.Value[36];
                        tmp.Params              = CfgStringLua.Get(item.Value[37]);
                        tmp.ParticipationAward  = CfgStringLua.Get(item.Value[38]);
                        tmp.ParticipationAward1 = CfgStringLua.Get(item.Value[39]);
                        tmp.PictureRes          = CfgStringLua.Get(item.Value[40]);
                        tmp.Point               = CfgStringLua.Get(item.Value[41]);
                        tmp.PrefectRewardID     = CfgStringLua.Get(item.Value[42]);
                        tmp.RandomDescription   = CfgStringLua.Get(item.Value[43]);
                        tmp.ResetTime           = CfgStringLua.Get(item.Value[44]);
                        tmp.ResurrectionType    = CfgStringLua.Get(item.Value[45]);
                        tmp.Runningyedai        = CfgStringLua.Get(item.Value[46]);
                        tmp.ShowHead            = item.Value[47];
                        tmp.ShowModel           = item.Value[48];
                        tmp.SignUpTime          = item.Value[49];
                        tmp.SuccessReward       = CfgStringLua.Get(item.Value[50]);
                        tmp.Sweep               = CfgStringLua.Get(item.Value[51]);
                        tmp.Teamshow            = item.Value[52];
                        tmp.Type                = item.Value[53];
                        tmp.TypeName            = CfgStringLua.Get(item.Value[54]);

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "CloneMap");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclareCloneMap>(233);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "CloneMap");
                }
            }
        }
Пример #2
0
        public static DeclareCloneMap Create(string in_big_chest_id, int in_camera_size, int in_canCrossSerever, int in_canManyPeople, int in_canOnePeople, int in_canUpMorale, int in_checkCamp, int in_cinematic, int in_clone_story, int in_combat_power, string in_duplicate_name, string in_enter_item, int in_enter_time, int in_enter_type, int in_equipLevel, int in_exist_time, string in_explain, string in_extra_reward, string in_fail_reward, string in_good_reward_ID, int in_group_id, int in_id, int in_if_double, int in_if_use_up, int in_isscript, int in_manual_num, string in_mapid, int in_materialLevel, int in_max_lv, int in_max_num, int in_min_lv, int in_min_num, int in_model_rotat, string in_needTaskId, int in_open_interface, string in_open_time, int in_open_type, string in_params, string in_participation_Award, string in_participation_Award1, string in_pictureRes, string in_point, string in_prefect_reward_ID, string in_random_Description, string in_reset_time, string in_resurrection_type, string in_runningyedai, int in_show_head, int in_show_model, int in_sign_up_time, string in_success_reward, string in_sweep, int in_teamshow, int in_type, string in_type_name)
        {
            DeclareCloneMap tmp = new DeclareCloneMap();

            tmp._big_chest_id    = in_big_chest_id;
            tmp._camera_size     = in_camera_size;
            tmp._canCrossSerever = in_canCrossSerever;
            tmp._canManyPeople   = in_canManyPeople;
            tmp._canOnePeople    = in_canOnePeople;
            tmp._canUpMorale     = in_canUpMorale;
            tmp._checkCamp       = in_checkCamp;
            tmp._cinematic       = in_cinematic;
            tmp._clone_story     = in_clone_story;
            tmp._combat_power    = in_combat_power;
            tmp._duplicate_name  = in_duplicate_name;
            tmp._enter_item      = in_enter_item;
            tmp._enter_time      = in_enter_time;
            tmp._enter_type      = in_enter_type;
            tmp._equipLevel      = in_equipLevel;
            tmp._exist_time      = in_exist_time;
            tmp._explain         = in_explain;
            tmp._extra_reward    = in_extra_reward;
            tmp._fail_reward     = in_fail_reward;
            tmp._good_reward_ID  = in_good_reward_ID;
            tmp._group_id        = in_group_id;
            tmp._id                   = in_id;
            tmp._if_double            = in_if_double;
            tmp._if_use_up            = in_if_use_up;
            tmp._isscript             = in_isscript;
            tmp._manual_num           = in_manual_num;
            tmp._mapid                = in_mapid;
            tmp._materialLevel        = in_materialLevel;
            tmp._max_lv               = in_max_lv;
            tmp._max_num              = in_max_num;
            tmp._min_lv               = in_min_lv;
            tmp._min_num              = in_min_num;
            tmp._model_rotat          = in_model_rotat;
            tmp._needTaskId           = in_needTaskId;
            tmp._open_interface       = in_open_interface;
            tmp._open_time            = in_open_time;
            tmp._open_type            = in_open_type;
            tmp._params               = in_params;
            tmp._participation_Award  = in_participation_Award;
            tmp._participation_Award1 = in_participation_Award1;
            tmp._pictureRes           = in_pictureRes;
            tmp._point                = in_point;
            tmp._prefect_reward_ID    = in_prefect_reward_ID;
            tmp._random_Description   = in_random_Description;
            tmp._reset_time           = in_reset_time;
            tmp._resurrection_type    = in_resurrection_type;
            tmp._runningyedai         = in_runningyedai;
            tmp._show_head            = in_show_head;
            tmp._show_model           = in_show_model;
            tmp._sign_up_time         = in_sign_up_time;
            tmp._success_reward       = in_success_reward;
            tmp._sweep                = in_sweep;
            tmp._teamshow             = in_teamshow;
            tmp._type                 = in_type;
            tmp._type_name            = in_type_name;

            return(tmp);
        }