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

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareMapsetting>(232);
                    foreach (var item in dic)
                    {
                        DeclareMapsetting tmp = new DeclareMapsetting();
                        tmp.AreaHigh             = item.Value[0];
                        tmp.AreaWidth            = item.Value[1];
                        tmp.AutoFightSet         = item.Value[2];
                        tmp.BloomParam           = CfgStringLua.Get(item.Value[3]);
                        tmp.BonfireNum           = item.Value[4];
                        tmp.BornPosition         = CfgStringLua.Get(item.Value[5]);
                        tmp.CamControlParam      = CfgStringLua.Get(item.Value[6]);
                        tmp.CamLayerCullDistance = item.Value[7];
                        tmp.CameraVfx            = item.Value[8];
                        tmp.CanMandate           = item.Value[9];
                        tmp.CanTeam        = item.Value[10];
                        tmp.CanFly         = item.Value[11];
                        tmp.CanJump        = item.Value[12];
                        tmp.CanRiding      = item.Value[13];
                        tmp.Cinematic      = item.Value[14];
                        tmp.DropMap        = CfgStringLua.Get(item.Value[15]);
                        tmp.EnterPrompt    = item.Value[16];
                        tmp.ExpEfficiency  = item.Value[17];
                        tmp.Filter         = item.Value[18];
                        tmp.FilterNum      = item.Value[19];
                        tmp.FlyMaxHeight   = item.Value[20];
                        tmp.FlyMinHeight   = item.Value[21];
                        tmp.GuildKill      = item.Value[22];
                        tmp.IconModel      = item.Value[23];
                        tmp.LevelMax       = item.Value[24];
                        tmp.LevelMin       = item.Value[25];
                        tmp.LevelName      = CfgStringLua.Get(item.Value[26]);
                        tmp.Lines          = item.Value[27];
                        tmp.MapCamp        = item.Value[28];
                        tmp.MapGrid        = CfgStringLua.Get(item.Value[29]);
                        tmp.MapId          = item.Value[30];
                        tmp.MapInfo        = CfgStringLua.Get(item.Value[31]);
                        tmp.MapLogicType   = item.Value[32];
                        tmp.MapServerType  = item.Value[33];
                        tmp.Music          = CfgStringLua.Get(item.Value[34]);
                        tmp.Name           = CfgStringLua.Get(item.Value[35]);
                        tmp.NeedVip        = item.Value[36];
                        tmp.Online         = item.Value[37];
                        tmp.PkState        = item.Value[38];
                        tmp.ReliveMapId    = item.Value[39];
                        tmp.ReliveMapId2   = item.Value[40];
                        tmp.ReliveTime     = item.Value[41];
                        tmp.ReliveType     = item.Value[42];
                        tmp.RelivePosition = CfgStringLua.Get(item.Value[43]);
                        tmp.ShadowParam    = CfgStringLua.Get(item.Value[44]);
                        tmp.ShowMonsterHud = item.Value[45];
                        tmp.ShowNpcHud     = item.Value[46];
                        tmp.ShowPetHud     = item.Value[47];
                        tmp.ShowPkColor    = item.Value[48];
                        tmp.ShowPlayerHp   = item.Value[49];
                        tmp.ShowPlayerHud  = item.Value[50];
                        tmp.SpecialBody    = CfgStringLua.Get(item.Value[51]);
                        tmp.SpecialName    = CfgStringLua.Get(item.Value[52]);
                        tmp.SpecialWeapon  = CfgStringLua.Get(item.Value[53]);
                        tmp.SpecialWing    = CfgStringLua.Get(item.Value[54]);
                        tmp.Team           = item.Value[55];
                        tmp.TeamSent       = item.Value[56];
                        tmp.TeamAuto       = item.Value[57];
                        tmp.Type           = item.Value[58];
                        tmp.UseDrug        = item.Value[59];
                        tmp.Xunlu          = CfgStringLua.Get(item.Value[60]);

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "Mapsetting");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclareMapsetting>(232);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "Mapsetting");
                }
            }
        }
Esempio n. 2
0
        public static DeclareMapsetting Create(int in_area_high, int in_area_width, int in_auto_fight_set, string in_bloom_param, int in_bonfire_num, string in_bornPosition, string in_cam_control_param, int in_cam_layer_cull_distance, int in_camera_vfx, int in_can_mandate, int in_can_team, int in_canFly, int in_canJump, int in_canRiding, int in_cinematic, string in_dropMap, int in_enterPrompt, int in_exp_efficiency, int in_filter, int in_filter_num, int in_fly_max_height, int in_fly_min_height, int in_guild_kill, int in_icon_model, int in_level_max, int in_level_min, string in_level_name, int in_lines, int in_map_camp, string in_map_grid, int in_map_id, string in_map_info, int in_map_logic_type, int in_mapServerType, string in_music, string in_name, int in_needVip, int in_online, int in_pkState, int in_relive_mapId, int in_relive_mapId2, int in_relive_time, int in_relive_type, string in_relivePosition, string in_shadow_param, int in_show_monster_hud, int in_show_npc_hud, int in_show_pet_hud, int in_show_pk_color, int in_show_player_hp, int in_show_player_hud, string in_special_body, string in_special_name, string in_special_weapon, string in_special_wing, int in_team, int in_team_sent, int in_teamAuto, int in_type, int in_use_drug, string in_xunlu)
        {
            DeclareMapsetting tmp = new DeclareMapsetting();

            tmp._area_high               = in_area_high;
            tmp._area_width              = in_area_width;
            tmp._auto_fight_set          = in_auto_fight_set;
            tmp._bloom_param             = in_bloom_param;
            tmp._bonfire_num             = in_bonfire_num;
            tmp._bornPosition            = in_bornPosition;
            tmp._cam_control_param       = in_cam_control_param;
            tmp._cam_layer_cull_distance = in_cam_layer_cull_distance;
            tmp._camera_vfx              = in_camera_vfx;
            tmp._can_mandate             = in_can_mandate;
            tmp._can_team         = in_can_team;
            tmp._canFly           = in_canFly;
            tmp._canJump          = in_canJump;
            tmp._canRiding        = in_canRiding;
            tmp._cinematic        = in_cinematic;
            tmp._dropMap          = in_dropMap;
            tmp._enterPrompt      = in_enterPrompt;
            tmp._exp_efficiency   = in_exp_efficiency;
            tmp._filter           = in_filter;
            tmp._filter_num       = in_filter_num;
            tmp._fly_max_height   = in_fly_max_height;
            tmp._fly_min_height   = in_fly_min_height;
            tmp._guild_kill       = in_guild_kill;
            tmp._icon_model       = in_icon_model;
            tmp._level_max        = in_level_max;
            tmp._level_min        = in_level_min;
            tmp._level_name       = in_level_name;
            tmp._lines            = in_lines;
            tmp._map_camp         = in_map_camp;
            tmp._map_grid         = in_map_grid;
            tmp._map_id           = in_map_id;
            tmp._map_info         = in_map_info;
            tmp._map_logic_type   = in_map_logic_type;
            tmp._mapServerType    = in_mapServerType;
            tmp._music            = in_music;
            tmp._name             = in_name;
            tmp._needVip          = in_needVip;
            tmp._online           = in_online;
            tmp._pkState          = in_pkState;
            tmp._relive_mapId     = in_relive_mapId;
            tmp._relive_mapId2    = in_relive_mapId2;
            tmp._relive_time      = in_relive_time;
            tmp._relive_type      = in_relive_type;
            tmp._relivePosition   = in_relivePosition;
            tmp._shadow_param     = in_shadow_param;
            tmp._show_monster_hud = in_show_monster_hud;
            tmp._show_npc_hud     = in_show_npc_hud;
            tmp._show_pet_hud     = in_show_pet_hud;
            tmp._show_pk_color    = in_show_pk_color;
            tmp._show_player_hp   = in_show_player_hp;
            tmp._show_player_hud  = in_show_player_hud;
            tmp._special_body     = in_special_body;
            tmp._special_name     = in_special_name;
            tmp._special_weapon   = in_special_weapon;
            tmp._special_wing     = in_special_wing;
            tmp._team             = in_team;
            tmp._team_sent        = in_team_sent;
            tmp._teamAuto         = in_teamAuto;
            tmp._type             = in_type;
            tmp._use_drug         = in_use_drug;
            tmp._xunlu            = in_xunlu;

            return(tmp);
        }