| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using TableConfig; |
| | | using System; |
| | | using System.Text.RegularExpressions; |
| | | |
| | | public class GeneralConfig : Singleton<GeneralConfig> |
| | | { |
| | | public int greatMasterStartLV { get; private set; } |
| | | public int playerMaxLevel { get; private set; } |
| | | public float potentialUpSuccessRecommend { get; private set; } |
| | | public int[] kylinHomeCollectItems; |
| | | public List<int> dailyQuestOpenTime; |
| | | public int flyBootItemId { get; private set; } |
| | | public int teamReadyTime { get; private set; } |
| | | public int elderGodAreaAngerTotal { get; private set; } |
| | | public float petRandomSpeak { get; private set; } |
| | | public int[] openJobs { get; private set; } |
| | | public int playerNameLength { get; private set; } |
| | | public int guardDungeonCageNPCID { get; private set; } |
| | | public float guardBubbleInterval { get; private set; } |
| | | public List<int> autoOnHookMap { get; private set; } |
| | | public float autoRideHorse { get; private set; } |
| | | public Dictionary<int, string> equipPlaceNameDict { get; private set; } |
| | | public Dictionary<int, int> moneyDisplayIds { get; private set; } |
| | | public int expDisplayId { get; private set; } |
| | | public float xpGuideDelay { get; private set; } |
| | | public float xpGuideDuration { get; private set; } |
| | | public Dictionary<int, string> trailBossHeadIcons { get; private set; } |
| | | public Dictionary<int, string> godWeaponMobs { get; private set; } |
| | | public float ResetComAtkTime { get; private set; } |
| | | public int RotateSpeed { get; private set; } |
| | | public float CloseNpcDist { get; private set; } |
| | | public float FarawayNpcDist { get; private set; } |
| | | public List<int> SpecialNpcIDs { get; private set; } |
| | | public Dictionary<int, int> wingEquipLimits { get; private set; } |
| | | public float PetDanceInterval { get; private set; } |
| | | public float audioScaleWhenFullScreenOn { get; private set; } |
| | | public int ruinsTranscriptMapId { get; private set; } |
| | | public List<int> GuardianPickUpID { get; private set; } |
| | | public List<int> EarlierGetTreasure { get; private set; } |
| | | public int BossSound { get; private set; } |
| | | public Dictionary<int, int> iceCrystalMonsterScores { get; private set; } |
| | | public float PlayBossHurtInterval { get; private set; } |
| | | public List<int> NoXpDungeons { get; private set; } |
| | | public List<int> RandomJobs { get; private set; } |
| | | public int elderGodTalkingTime { get; private set; } |
| | | public int elderGodBigBoss { get; private set; } |
| | | public List<int> PassiveSkillShow { get; private set; } |
| | | public List<int> bossShuntMaps { get; private set; } |
| | | public int bossShuntDays { get; private set; } |
| | | public Dictionary<int, int[]> itemDropEffect = new Dictionary<int, int[]>(); |
| | | public Dictionary<int, int[]> xllyDropEffect = new Dictionary<int, int[]>(); |
| | | public Dictionary<int, int[]> xqryDropEffect = new Dictionary<int, int[]>(); |
| | | public Dictionary<int, List<int[]>> customDropEffect = new Dictionary<int, List<int[]>>(); |
| | | public Dictionary<int, int> dropEffectQuality = new Dictionary<int, int>(); |
| | | public Dictionary<int, int> BuffToHitEffect = new Dictionary<int, int>(); |
| | | |
| | | //参数int,int ,string 分别表示职业,转生等级,icon |
| | | Dictionary<int, Dictionary<int, string>> jobHeadPortrait = new Dictionary<int, Dictionary<int, string>>(); |
| | | Dictionary<int, Dictionary<int, string>> otherjobHeadPortrait = new Dictionary<int, Dictionary<int, string>>(); |
| | | public Dictionary<int, int> bossWearyValues = new Dictionary<int, int>(); |
| | | public Dictionary<int, Vector3> NpcPosOffset = new Dictionary<int, Vector3>(); |
| | | public Dictionary<int, string> propertyIconDict = new Dictionary<int, string>(); |
| | | |
| | | public int demonJarHintLevelLimit { get; private set; } |
| | | public int demonJarHintLineId { get; private set; } |
| | | public int skillPanelUnLock { get; private set; } |
| | | public int dailyQuestRedpointLevelLimit { get; private set; } |
| | | public int lowHpRemind { get; private set; } |
| | | public int munekadolockLimit { get; private set; } |
| | | public int maxItemDropEffectCount { get; private set; } |
| | | |
| | | public int[] autoBuyItemIds; |
| | | public int[] autoBuyItemPrices; |
| | | |
| | | public List<int> neutralMaps = new List<int>(); |
| | | |
| | | public int demonJarRedPoint { get; private set; } |
| | | public string LoadLV { get; private set; } |
| | | |
| | | public float mainWinSkillResetTime { get; private set; } |
| | | public int OffLineTimeLackRemendLevelLimit { get; private set; } |
| | | public Vector3 heroDialogueOffset { get; private set; } |
| | | public Vector3 heroDialogueRotation { get; private set; } |
| | | public float heroDialogueScale { get; private set; } |
| | | |
| | | public List<int> ancientGrandTotalAchievements { get; private set; } |
| | | public List<int> ancientContinueKillAchievements { get; private set; } |
| | | |
| | | public int trialDungeonGroupChallengeTipLv { get; private set; } |
| | | public int prayerRedpointLimitLv { get; private set; } |
| | | |
| | | public int demonJarLevelLimit { get; private set; } |
| | | |
| | | public int fairyLandGuideId = 82; |
| | | |
| | | public int specialGuide41Mission { get; private set; } |
| | | public int specialGuide41Achievement { get; private set; } |
| | | |
| | | public int supremeRechargeVipLv { get; private set; } |
| | | |
| | | public int rechargeRedpointLv { get; private set; } |
| | | public int rechargeRedpointMinLv { get; private set; } |
| | | |
| | | public int runeTowerSweepBuyTimes { get; private set; } |
| | | public int runeTowerSweepBuyPrice { get; private set; } |
| | | |
| | | public List<int> bossRebornTotalPoint { get; private set; } |
| | | public List<int> bossRebornTotalPointWorldLevelNeed { get; private set; } |
| | | |
| | | public int teamMatchingTimeOut { get; private set; } |
| | | public List<int> inGameDownLoadLevelCheckPoints = null; |
| | | public List<int> inGameDownLoadTaskCheckPoints = null; |
| | | public int inGameDownLoadHighLevel { get; private set; } |
| | | public List<int> worldBossNoRebornRemindMaps = null; |
| | | public List<int> bossHomeNoRebornRemindMaps = null; |
| | | public List<int> elderGodNoRebornRemindMaps = null; |
| | | public List<int> demonJarNoRebornRemindMaps = null; |
| | | |
| | | public string[][] ModeDefaultConfig { get; private set; } |
| | | |
| | | public void Init() |
| | | { |
| | | try |
| | | { |
| | | greatMasterStartLV = GetInt("GreatMasterStartLV"); |
| | | playerMaxLevel = GetInt("PlayerMaxLV"); |
| | | potentialUpSuccessRecommend = GetFloat("SPSkillType", 2) * 0.0001f; |
| | | kylinHomeCollectItems = GetIntArray("KirinNpc", 2); |
| | | dailyQuestOpenTime = GetTimeArray("ActionTime", 1); |
| | | flyBootItemId = GetInt("TransportPay"); |
| | | teamReadyTime = GetInt("TeamReadyTime"); |
| | | playerNameLength = GetInt("RoleNameLength"); |
| | | elderGodAreaAngerTotal = GetInt("AngryAdd", 4); |
| | | petRandomSpeak = GetFloat("PetRandomSpeak"); |
| | | guardDungeonCageNPCID = GetInt("GuardFBCageNPCID"); |
| | | guardBubbleInterval = GetFloat("GuardFBCageNPCID", 3); |
| | | autoRideHorse = GetFloat("AutoRideHorseTime") * Constants.F_DELTA; |
| | | moneyDisplayIds = ConfigParse.GetDic<int, int>(GetInputString("MoneyDisplayModel", 1)); |
| | | expDisplayId = GetInt("MoneyDisplayModel", 2); |
| | | openJobs = GetIntArray("OpenJob"); |
| | | xpGuideDelay = GetFloat("GuideConfig"); |
| | | xpGuideDuration = GetFloat("GuideConfig", 2); |
| | | ResetComAtkTime = GetFloat("AtkWaitingTime"); |
| | | autoOnHookMap = new List<int>(GetIntArray("AutoOnHookMap")); |
| | | GuardianPickUpID = new List<int>(GetIntArray("GuardianPickUpID")); |
| | | RotateSpeed = GetInt("RoleTurnedAngle"); |
| | | CloseNpcDist = GetFloat("ConversationDistanc", 2); |
| | | FarawayNpcDist = GetFloat("ConversationDistanc"); |
| | | SpecialNpcIDs = new List<int>(GetIntArray("SpecialCollectNpcs", 1)); |
| | | PetDanceInterval = GetInt("PetDanceInterval") * Constants.F_GAMMA; |
| | | ruinsTranscriptMapId = GetInt("SpRewardMapID"); |
| | | EarlierGetTreasure = new List<int>(GetIntArray("EarlierGetTreasure")); |
| | | BossSound = GetInt("BossSound"); |
| | | PlayBossHurtInterval = GetFloat("BossSound", 2); |
| | | var jobHeadPortraitConfig1 = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("Job1Head"); |
| | | jobHeadPortrait[1] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig1.Numerical1); |
| | | otherjobHeadPortrait[1] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig1.Numerical2); |
| | | |
| | | var jobHeadPortraitConfig2 = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("Job2Head"); |
| | | jobHeadPortrait[2] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig2.Numerical1); |
| | | otherjobHeadPortrait[2] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig2.Numerical2); |
| | | |
| | | var jobHeadPortraitConfig3 = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("Job3Head"); |
| | | jobHeadPortrait[3] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig3.Numerical1); |
| | | otherjobHeadPortrait[3] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig3.Numerical2); |
| | | |
| | | bossWearyValues = ConfigParse.GetDic<int, int>(GetInputString("KillBossCntLimit", 2)); |
| | | wingEquipLimits = ConfigParse.GetDic<int, int>(GetInputString("WingRealmLimit", 1)); |
| | | int i = 0; |
| | | int[] equipPlaces = GetIntArray("EquipArea", 1); |
| | | string[] equipPlacesNames = GetStringArray("EquipArea", 2); |
| | | equipPlaceNameDict = new Dictionary<int, string>(); |
| | | for (i = 0; i < equipPlaces.Length; i++) |
| | | { |
| | | if (!equipPlaceNameDict.ContainsKey(equipPlaces[i])) |
| | | { |
| | | equipPlaceNameDict.Add(equipPlaces[i], equipPlacesNames[i]); |
| | | } |
| | | else |
| | | { |
| | | DesignDebug.LogError("EquipArea : 装备位置重复"); |
| | | } |
| | | } |
| | | var _trailBossJson = LitJson.JsonMapper.ToObject(GetInputString("MuneKadoTrialBossHead", 1)); |
| | | trailBossHeadIcons = new Dictionary<int, string>(); |
| | | foreach (var _key in _trailBossJson.Keys) |
| | | { |
| | | var _npcId = int.Parse(_key); |
| | | if (!trailBossHeadIcons.ContainsKey(_npcId)) |
| | | { |
| | | trailBossHeadIcons.Add(_npcId, _trailBossJson[_key].ToString()); |
| | | } |
| | | } |
| | | var _godWeaponJson = LitJson.JsonMapper.ToObject(GetInputString("GodModel", 1)); |
| | | godWeaponMobs = new Dictionary<int, string>(); |
| | | foreach (var _key in _godWeaponJson.Keys) |
| | | { |
| | | var _godWeaponType = int.Parse(_key); |
| | | if (!godWeaponMobs.ContainsKey(_godWeaponType)) |
| | | { |
| | | godWeaponMobs.Add(_godWeaponType, _godWeaponJson[_key].ToString()); |
| | | } |
| | | } |
| | | |
| | | audioScaleWhenFullScreenOn = GetFloat("AudioSound"); |
| | | |
| | | iceCrystalMonsterScores = ConfigParse.GetDic<int, int>(GetInputString("IceLodeNeedPoint", 2)); |
| | | |
| | | NoXpDungeons = new List<int>(GetIntArray("XpNoUseDungeon")); |
| | | RandomJobs = new List<int>(GetIntArray("RandomJob")); |
| | | elderGodTalkingTime = GetInt("ElderGodTalkingTime"); |
| | | elderGodBigBoss = GetInt("ElderGodBigBoss"); |
| | | PassiveSkillShow = new List<int>(GetIntArray("PassiveSkillShow")); |
| | | |
| | | FuncConfigConfig func = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("NpcPosOffset"); |
| | | LitJson.JsonData _data = LitJson.JsonMapper.ToObject(func.Numerical1); |
| | | foreach (var _key in _data.Keys) |
| | | { |
| | | int _npcID = int.Parse(_key); |
| | | double[] _pos = new double[2]; |
| | | _pos[0] = (double)_data[_key][0]; |
| | | _pos[1] = (double)_data[_key][1]; |
| | | NpcPosOffset.Add(_npcID, new Vector3((float)_pos[0], 0, (float)_pos[1])); |
| | | } |
| | | |
| | | bossShuntMaps = new List<int>(GetIntArray("BossShunt")); |
| | | bossShuntDays = GetInt("BossShunt", 3); |
| | | |
| | | itemDropEffect.Clear(); |
| | | func = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("ItemEquipmentEffect"); |
| | | _data = LitJson.JsonMapper.ToObject(func.Numerical1); |
| | | List<string> _keys = new List<string>(_data.Keys); |
| | | for (i = 0; i < _keys.Count; ++i) |
| | | { |
| | | int[] _props = new int[3]; |
| | | for (int j = 0; j < 3; ++j) |
| | | { |
| | | _props[j] = (int)_data[_keys[i]][j]; |
| | | } |
| | | itemDropEffect[int.Parse(_keys[i])] = _props; |
| | | } |
| | | |
| | | xllyDropEffect.Clear(); |
| | | _data = LitJson.JsonMapper.ToObject(func.Numerical2); |
| | | _keys.Clear(); |
| | | _keys.AddRange(_data.Keys); |
| | | for (i = 0; i < _keys.Count; ++i) |
| | | { |
| | | int[] _props = new int[3]; |
| | | for (int j = 0; j < 3; ++j) |
| | | { |
| | | _props[j] = (int)_data[_keys[i]][j]; |
| | | } |
| | | xllyDropEffect[int.Parse(_keys[i])] = _props; |
| | | } |
| | | |
| | | xqryDropEffect.Clear(); |
| | | _data = LitJson.JsonMapper.ToObject(func.Numerical3); |
| | | _keys.Clear(); |
| | | _keys.AddRange(_data.Keys); |
| | | for (i = 0; i < _keys.Count; ++i) |
| | | { |
| | | int[] _props = new int[3]; |
| | | for (int j = 0; j < 3; ++j) |
| | | { |
| | | _props[j] = (int)_data[_keys[i]][j]; |
| | | } |
| | | xqryDropEffect[int.Parse(_keys[i])] = _props; |
| | | } |
| | | |
| | | dropEffectQuality.Clear(); |
| | | func = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("IeemEquipmentEffectQuality"); |
| | | _data = LitJson.JsonMapper.ToObject(func.Numerical1); |
| | | _keys.Clear(); |
| | | _keys.AddRange(_data.Keys); |
| | | for (i = 0; i < _keys.Count; ++i) |
| | | { |
| | | dropEffectQuality[int.Parse(_keys[i])] = (int)_data[_keys[i]]; |
| | | } |
| | | |
| | | customDropEffect.Clear(); |
| | | func = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("ItemEquipmentEffectItem"); |
| | | _data = LitJson.JsonMapper.ToObject(func.Numerical1); |
| | | _keys.Clear(); |
| | | _keys.AddRange(_data.Keys); |
| | | int[] _tmp = null; |
| | | List<int[]> _content = null; |
| | | for (i = 0; i < _keys.Count; ++i) |
| | | { |
| | | _content = new List<int[]>(); |
| | | foreach (LitJson.JsonData _values in _data[_keys[i]]) |
| | | { |
| | | if (_values.IsArray) |
| | | { |
| | | _tmp = new int[2]; |
| | | _tmp[0] = (int)_values[0]; |
| | | _tmp[1] = (int)_values[1]; |
| | | } |
| | | else |
| | | { |
| | | _tmp = new int[1]; |
| | | _tmp[0] = (int)_values; |
| | | } |
| | | _content.Add(_tmp); |
| | | } |
| | | customDropEffect.Add(int.Parse(_keys[i]), _content); |
| | | } |
| | | |
| | | BuffToHitEffect.Clear(); |
| | | func = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("BuffToHitEffect"); |
| | | if (!string.IsNullOrEmpty(func.Numerical1) && !string.IsNullOrEmpty(func.Numerical2)) |
| | | { |
| | | string[] _buffs = func.Numerical1.Split('|'); |
| | | string[] _effects = func.Numerical2.Split('|'); |
| | | for (i = 0; i < _buffs.Length; ++i) |
| | | { |
| | | BuffToHitEffect[int.Parse(_buffs[i])] = int.Parse(_effects[i]); |
| | | } |
| | | } |
| | | |
| | | demonJarHintLevelLimit = GetInt("DemonJarFirstRemin"); |
| | | demonJarHintLineId = GetInt("DemonJarFirstRemin", 2); |
| | | skillPanelUnLock = GetInt("SkillPanelUnlock"); |
| | | dailyQuestRedpointLevelLimit = GetInt("DailyQuestRedPoint"); |
| | | lowHpRemind = GetInt("LowHpRemind"); |
| | | autoBuyItemIds = GetIntArray("BuyItemPrice", 1); |
| | | autoBuyItemPrices = GetIntArray("BuyItemPrice", 2); |
| | | neutralMaps.AddRange(GetIntArray("BossListMapID")); |
| | | |
| | | var _propertyIconCfg = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("PropertyIcon"); |
| | | var _propertyIconJson = LitJson.JsonMapper.ToObject(_propertyIconCfg.Numerical1); |
| | | foreach (var _key in _propertyIconJson.Keys) |
| | | { |
| | | var _property = int.Parse(_key); |
| | | propertyIconDict.Add(_property, _propertyIconJson[_key].ToString()); |
| | | } |
| | | |
| | | munekadolockLimit = GetInt("MunekadoLockLimit"); |
| | | demonJarRedPoint = GetInt("DemonJarRedPoint"); |
| | | LoadLV = GetInputString("LoadLV"); |
| | | |
| | | mainWinSkillResetTime = GetFloat("AutomaticSwitch"); |
| | | OffLineTimeLackRemendLevelLimit = GetInt("TJGLevelLimit"); |
| | | heroDialogueOffset = GetInputString("NpcHalfLength", 1).Vector3Parse(); |
| | | heroDialogueRotation = GetInputString("NpcHalfLength", 2).Vector3Parse(); |
| | | heroDialogueScale = GetFloat("NpcHalfLength", 3); |
| | | |
| | | var ancientConfig = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("ElderBattleTarget"); |
| | | ancientGrandTotalAchievements = new List<int>(); |
| | | ancientGrandTotalAchievements.AddRange(ConfigParse.GetMultipleStr<int>(ancientConfig.Numerical1)); |
| | | ancientContinueKillAchievements = new List<int>(); |
| | | ancientContinueKillAchievements.AddRange(ConfigParse.GetMultipleStr<int>(ancientConfig.Numerical2)); |
| | | |
| | | trialDungeonGroupChallengeTipLv = GetInt("SingleIntoFB"); |
| | | prayerRedpointLimitLv = GetInt("PrayRedPoint"); |
| | | demonJarLevelLimit = GetInt("DemonJarLevelLimit"); |
| | | maxItemDropEffectCount = GetInt("ItemMaskEffect"); |
| | | |
| | | specialGuide41Mission = GetInt("SpecialGuide41", 1); |
| | | specialGuide41Achievement = GetInt("SpecialGuide41", 2); |
| | | |
| | | supremeRechargeVipLv = GetInt("SupremeCTGVipLimit", 1); |
| | | |
| | | rechargeRedpointLv = GetInt("FirstPayRedPoint", 1); |
| | | rechargeRedpointMinLv = GetInt("FirstPayRedPoint", 2); |
| | | runeTowerSweepBuyTimes = GetInt("RuneTowerSweepBuy"); |
| | | runeTowerSweepBuyPrice = GetInt("RuneTowerSweepBuy", 2); |
| | | bossRebornTotalPoint = new List<int>(GetIntArray("BossRebornTotalPoint")); |
| | | bossRebornTotalPointWorldLevelNeed = new List<int>(GetIntArray("BossRebornTotalPoint", 2)); |
| | | teamMatchingTimeOut = GetInt("TeamMatchingTimeOut"); |
| | | inGameDownLoadLevelCheckPoints = new List<int>(GetIntArray("InGameDownLoad")); |
| | | inGameDownLoadTaskCheckPoints = new List<int>(GetIntArray("InGameDownLoad", 2)); |
| | | inGameDownLoadHighLevel = GetInt("InGameDownLoad", 3); |
| | | |
| | | worldBossNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 1)); |
| | | bossHomeNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 2)); |
| | | elderGodNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 3)); |
| | | demonJarNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 4)); |
| | | |
| | | if (ModeDefaultConfig == null) |
| | | { |
| | | func = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("ModeDefault"); |
| | | |
| | | string[] _funcNpc = func.Numerical1.Split('|'); |
| | | string[] _fightNpc = func.Numerical2.Split('|'); |
| | | string[] _pet = func.Numerical3.Split('|'); |
| | | string[] _horse = func.Numerical4.Split('|'); |
| | | |
| | | ModeDefaultConfig = new string[4][]; |
| | | ModeDefaultConfig[0] = _funcNpc; |
| | | ModeDefaultConfig[1] = _fightNpc; |
| | | ModeDefaultConfig[2] = _pet; |
| | | ModeDefaultConfig[3] = _horse; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Debug.LogError(ex); |
| | | } |
| | | |
| | | } |
| | | |
| | | public string GetJobHeadPortrait(int _job, int _ReincarnationLv) |
| | | { |
| | | if (jobHeadPortrait.ContainsKey(_job) && jobHeadPortrait[_job].ContainsKey(_ReincarnationLv)) |
| | | { |
| | | return jobHeadPortrait[_job][_ReincarnationLv]; |
| | | } |
| | | else |
| | | { |
| | | return string.Empty; |
| | | } |
| | | } |
| | | |
| | | public string GetOtherJobHeadPortrait(int _job, int _ReincarnationLv) |
| | | { |
| | | if (otherjobHeadPortrait.ContainsKey(_job) && otherjobHeadPortrait[_job].ContainsKey(_ReincarnationLv)) |
| | | { |
| | | return otherjobHeadPortrait[_job][_ReincarnationLv]; |
| | | } |
| | | else |
| | | { |
| | | return string.Empty; |
| | | } |
| | | } |
| | | |
| | | private int GetInt(string _key, int _index = 1) |
| | | { |
| | | var result = 0; |
| | | int.TryParse(GetInputString(_key, _index), out result); |
| | | return result; |
| | | } |
| | | |
| | | private float GetFloat(string _key, int _index = 1) |
| | | { |
| | | var result = 0f; |
| | | float.TryParse(GetInputString(_key, _index), out result); |
| | | return result; |
| | | } |
| | | |
| | | private bool GetBool(string _key, int _index = 1) |
| | | { |
| | | var result = false; |
| | | bool.TryParse(GetInputString(_key, _index), out result); |
| | | return result; |
| | | } |
| | | |
| | | private int[] GetIntArray(string _key, int _index = 1) |
| | | { |
| | | var inputString = GetInputString(_key, _index); |
| | | var stringArray = inputString.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); |
| | | |
| | | if (stringArray.Length == 0) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | var result = new int[stringArray.Length]; |
| | | for (int i = 0; i < stringArray.Length; i++) |
| | | { |
| | | int.TryParse(stringArray[i], out result[i]); |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | private string[] GetStringArray(string _key, int _index = 1) |
| | | { |
| | | var inputString = GetInputString(_key, _index); |
| | | var stringArray = inputString.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); |
| | | |
| | | if (stringArray.Length == 0) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | var result = new string[stringArray.Length]; |
| | | for (int i = 0; i < stringArray.Length; i++) |
| | | { |
| | | result[i] = stringArray[i]; |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | private float[] GetFloatArray(string _key, int _index = 1) |
| | | { |
| | | var inputString = GetInputString(_key, _index); |
| | | var stringArray = inputString.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); |
| | | |
| | | if (stringArray.Length == 0) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | var result = new float[stringArray.Length]; |
| | | for (int i = 0; i < stringArray.Length; i++) |
| | | { |
| | | float.TryParse(stringArray[i], out result[i]); |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | private bool[] GetBoolArray(string _key, int _index = 1) |
| | | { |
| | | var inputString = GetInputString(_key, _index); |
| | | var stringArray = inputString.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); |
| | | |
| | | if (stringArray.Length == 0) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | var result = new bool[stringArray.Length]; |
| | | for (int i = 0; i < stringArray.Length; i++) |
| | | { |
| | | bool.TryParse(stringArray[i], out result[i]); |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | private List<int> GetTimeArray(string _key, int _index = 1) |
| | | { |
| | | var configContent = GetInputString(_key, _index); |
| | | var stringArray = configContent.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); |
| | | var timeList = new List<int>(); |
| | | for (int i = 0; i < stringArray.Length; i++) |
| | | { |
| | | var input = stringArray[i]; |
| | | var matches = Regex.Matches(input, "[0-9]{1,2}"); |
| | | var hour = matches.Count > 0 ? int.Parse(matches[0].Value) : 0; |
| | | var minute = matches.Count > 1 ? int.Parse(matches[1].Value) : 0; |
| | | timeList.Add(hour * 60 + minute); |
| | | } |
| | | |
| | | return timeList; |
| | | } |
| | | |
| | | private string GetInputString(string _key, int _index = 1) |
| | | { |
| | | var config = ConfigManager.Instance.GetTemplate<FuncConfigConfig>(_key); |
| | | var inputString = string.Empty; |
| | | |
| | | switch (_index) |
| | | { |
| | | case 1: |
| | | inputString = config.Numerical1; |
| | | break; |
| | | case 2: |
| | | inputString = config.Numerical2; |
| | | break; |
| | | case 3: |
| | | inputString = config.Numerical3; |
| | | break; |
| | | case 4: |
| | | inputString = config.Numerical4; |
| | | break; |
| | | case 5: |
| | | inputString = config.Numerical5; |
| | | break; |
| | | } |
| | | |
| | | return inputString; |
| | | } |
| | | |
| | | |
| | | } |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using TableConfig;
|
| | | using System;
|
| | | using System.Text.RegularExpressions;
|
| | |
|
| | | public class GeneralConfig : Singleton<GeneralConfig>
|
| | | {
|
| | | public int greatMasterStartLV { get; private set; }
|
| | | public int playerMaxLevel { get; private set; }
|
| | | public float potentialUpSuccessRecommend { get; private set; }
|
| | | public int[] kylinHomeCollectItems;
|
| | | public List<int> dailyQuestOpenTime;
|
| | | public int flyBootItemId { get; private set; }
|
| | | public int teamReadyTime { get; private set; }
|
| | | public int elderGodAreaAngerTotal { get; private set; }
|
| | | public float petRandomSpeak { get; private set; }
|
| | | public int[] openJobs { get; private set; }
|
| | | public int playerNameLength { get; private set; }
|
| | | public int guardDungeonCageNPCID { get; private set; }
|
| | | public float guardBubbleInterval { get; private set; }
|
| | | public List<int> autoOnHookMap { get; private set; }
|
| | | public float autoRideHorse { get; private set; }
|
| | | public Dictionary<int, string> equipPlaceNameDict { get; private set; }
|
| | | public Dictionary<int, int> moneyDisplayIds { get; private set; }
|
| | | public int expDisplayId { get; private set; }
|
| | | public float xpGuideDelay { get; private set; }
|
| | | public float xpGuideDuration { get; private set; }
|
| | | public Dictionary<int, string> trailBossHeadIcons { get; private set; }
|
| | | public Dictionary<int, string> godWeaponMobs { get; private set; }
|
| | | public float ResetComAtkTime { get; private set; }
|
| | | public int RotateSpeed { get; private set; }
|
| | | public float CloseNpcDist { get; private set; }
|
| | | public float FarawayNpcDist { get; private set; }
|
| | | public List<int> SpecialNpcIDs { get; private set; }
|
| | | public Dictionary<int, int> wingEquipLimits { get; private set; }
|
| | | public float PetDanceInterval { get; private set; }
|
| | | public float audioScaleWhenFullScreenOn { get; private set; }
|
| | | public int ruinsTranscriptMapId { get; private set; }
|
| | | public List<int> GuardianPickUpID { get; private set; }
|
| | | public List<int> EarlierGetTreasure { get; private set; }
|
| | | public int BossSound { get; private set; }
|
| | | public Dictionary<int, int> iceCrystalMonsterScores { get; private set; }
|
| | | public float PlayBossHurtInterval { get; private set; }
|
| | | public List<int> NoXpDungeons { get; private set; }
|
| | | public List<int> RandomJobs { get; private set; }
|
| | | public int elderGodTalkingTime { get; private set; }
|
| | | public int elderGodBigBoss { get; private set; }
|
| | | public List<int> PassiveSkillShow { get; private set; }
|
| | | public List<int> bossShuntMaps { get; private set; }
|
| | | public int bossShuntDays { get; private set; }
|
| | | public Dictionary<int, int[]> itemDropEffect = new Dictionary<int, int[]>();
|
| | | public Dictionary<int, int[]> xllyDropEffect = new Dictionary<int, int[]>();
|
| | | public Dictionary<int, int[]> xqryDropEffect = new Dictionary<int, int[]>();
|
| | | public Dictionary<int, List<int[]>> customDropEffect = new Dictionary<int, List<int[]>>();
|
| | | public Dictionary<int, int> dropEffectQuality = new Dictionary<int, int>();
|
| | | public Dictionary<int, int> BuffToHitEffect = new Dictionary<int, int>();
|
| | |
|
| | | //参数int,int ,string 分别表示职业,转生等级,icon
|
| | | Dictionary<int, Dictionary<int, string>> jobHeadPortrait = new Dictionary<int, Dictionary<int, string>>();
|
| | | Dictionary<int, Dictionary<int, string>> otherjobHeadPortrait = new Dictionary<int, Dictionary<int, string>>();
|
| | | public Dictionary<int, int> bossWearyValues = new Dictionary<int, int>();
|
| | | public Dictionary<int, Vector3> NpcPosOffset = new Dictionary<int, Vector3>();
|
| | | public Dictionary<int, string> propertyIconDict = new Dictionary<int, string>();
|
| | |
|
| | | public int demonJarHintLevelLimit { get; private set; }
|
| | | public int demonJarHintLineId { get; private set; }
|
| | | public int skillPanelUnLock { get; private set; }
|
| | | public int dailyQuestRedpointLevelLimit { get; private set; }
|
| | | public int lowHpRemind { get; private set; }
|
| | | public int munekadolockLimit { get; private set; }
|
| | | public int maxItemDropEffectCount { get; private set; }
|
| | |
|
| | | public int[] autoBuyItemIds;
|
| | | public int[] autoBuyItemPrices;
|
| | |
|
| | | public List<int> neutralMaps = new List<int>();
|
| | |
|
| | | public int demonJarRedPoint { get; private set; }
|
| | | public string LoadLV { get; private set; }
|
| | |
|
| | | public float mainWinSkillResetTime { get; private set; }
|
| | | public int OffLineTimeLackRemendLevelLimit { get; private set; }
|
| | | public Vector3 heroDialogueOffset { get; private set; }
|
| | | public Vector3 heroDialogueRotation { get; private set; }
|
| | | public float heroDialogueScale { get; private set; }
|
| | |
|
| | | public List<int> ancientGrandTotalAchievements { get; private set; }
|
| | | public List<int> ancientContinueKillAchievements { get; private set; }
|
| | |
|
| | | public int trialDungeonGroupChallengeTipLv { get; private set; }
|
| | | public int prayerRedpointLimitLv { get; private set; }
|
| | |
|
| | | public int demonJarLevelLimit { get; private set; }
|
| | |
|
| | | public int fairyLandGuideId = 82;
|
| | |
|
| | | public int specialGuide41Mission { get; private set; }
|
| | | public int specialGuide41Achievement { get; private set; }
|
| | |
|
| | | public int supremeRechargeVipLv { get; private set; }
|
| | |
|
| | | public int rechargeRedpointLv { get; private set; }
|
| | | public int rechargeRedpointMinLv { get; private set; }
|
| | |
|
| | | public int runeTowerSweepBuyTimes { get; private set; }
|
| | | public int runeTowerSweepBuyPrice { get; private set; }
|
| | |
|
| | | public int teamMatchingTimeOut { get; private set; }
|
| | | public List<int> inGameDownLoadLevelCheckPoints = null;
|
| | | public List<int> inGameDownLoadTaskCheckPoints = null;
|
| | | public int inGameDownLoadHighLevel { get; private set; }
|
| | | public List<int> worldBossNoRebornRemindMaps = null;
|
| | | public List<int> bossHomeNoRebornRemindMaps = null;
|
| | | public List<int> elderGodNoRebornRemindMaps = null;
|
| | | public List<int> demonJarNoRebornRemindMaps = null;
|
| | |
|
| | | public string[][] ModeDefaultConfig { get; private set; }
|
| | | public int[] RealmGroup { get; private set; }
|
| | | public float PrefightAtkRange { get; private set; }
|
| | |
|
| | | public Dictionary<int, string> multipleRealmImgDict { get; private set; }
|
| | |
|
| | | public int inGameDownLoadHighestLevelPoint { get; private set; }
|
| | |
|
| | | public List<int> dungeonCanUseMoneyIds { get; private set; }
|
| | |
|
| | | public void Init()
|
| | | {
|
| | | try
|
| | | {
|
| | | greatMasterStartLV = GetInt("GreatMasterStartLV");
|
| | | playerMaxLevel = GetInt("PlayerMaxLV");
|
| | | potentialUpSuccessRecommend = GetFloat("SPSkillType", 2) * 0.0001f;
|
| | | kylinHomeCollectItems = GetIntArray("KirinNpc", 2);
|
| | | dailyQuestOpenTime = GetTimeArray("ActionTime", 1);
|
| | | flyBootItemId = GetInt("TransportPay");
|
| | | teamReadyTime = GetInt("TeamReadyTime");
|
| | | playerNameLength = GetInt("RoleNameLength");
|
| | | elderGodAreaAngerTotal = GetInt("AngryAdd", 4);
|
| | | petRandomSpeak = GetFloat("PetRandomSpeak");
|
| | | guardDungeonCageNPCID = GetInt("GuardFBCageNPCID");
|
| | | guardBubbleInterval = GetFloat("GuardFBCageNPCID", 3);
|
| | | autoRideHorse = GetFloat("AutoRideHorseTime") * Constants.F_DELTA;
|
| | | moneyDisplayIds = ConfigParse.GetDic<int, int>(GetInputString("MoneyDisplayModel", 1));
|
| | | expDisplayId = GetInt("MoneyDisplayModel", 2);
|
| | | openJobs = GetIntArray("OpenJob");
|
| | | xpGuideDelay = GetFloat("GuideConfig");
|
| | | xpGuideDuration = GetFloat("GuideConfig", 2);
|
| | | ResetComAtkTime = GetFloat("AtkWaitingTime");
|
| | | autoOnHookMap = new List<int>(GetIntArray("AutoOnHookMap"));
|
| | | GuardianPickUpID = new List<int>(GetIntArray("GuardianPickUpID"));
|
| | | RotateSpeed = GetInt("RoleTurnedAngle");
|
| | | CloseNpcDist = GetFloat("ConversationDistanc", 2);
|
| | | FarawayNpcDist = GetFloat("ConversationDistanc");
|
| | | SpecialNpcIDs = new List<int>(GetIntArray("SpecialCollectNpcs", 1));
|
| | | PetDanceInterval = GetInt("PetDanceInterval") * Constants.F_GAMMA;
|
| | | ruinsTranscriptMapId = GetInt("SpRewardMapID");
|
| | | EarlierGetTreasure = new List<int>(GetIntArray("EarlierGetTreasure"));
|
| | | BossSound = GetInt("BossSound");
|
| | | PlayBossHurtInterval = GetFloat("BossSound", 2);
|
| | | var jobHeadPortraitConfig1 = Config.Instance.Get<FuncConfigConfig>("Job1Head");
|
| | | jobHeadPortrait[1] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig1.Numerical1);
|
| | | otherjobHeadPortrait[1] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig1.Numerical2);
|
| | |
|
| | | var jobHeadPortraitConfig2 = Config.Instance.Get<FuncConfigConfig>("Job2Head");
|
| | | jobHeadPortrait[2] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig2.Numerical1);
|
| | | otherjobHeadPortrait[2] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig2.Numerical2);
|
| | |
|
| | | var jobHeadPortraitConfig3 = Config.Instance.Get<FuncConfigConfig>("Job3Head");
|
| | | jobHeadPortrait[3] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig3.Numerical1);
|
| | | otherjobHeadPortrait[3] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig3.Numerical2);
|
| | |
|
| | | bossWearyValues = ConfigParse.GetDic<int, int>(GetInputString("KillBossCntLimit", 2));
|
| | | wingEquipLimits = ConfigParse.GetDic<int, int>(GetInputString("WingRealmLimit", 1));
|
| | | int i = 0;
|
| | | int[] equipPlaces = GetIntArray("EquipArea", 1);
|
| | | string[] equipPlacesNames = GetStringArray("EquipArea", 2);
|
| | | equipPlaceNameDict = new Dictionary<int, string>();
|
| | | for (i = 0; i < equipPlaces.Length; i++)
|
| | | {
|
| | | if (!equipPlaceNameDict.ContainsKey(equipPlaces[i]))
|
| | | {
|
| | | equipPlaceNameDict.Add(equipPlaces[i], equipPlacesNames[i]);
|
| | | }
|
| | | else
|
| | | {
|
| | | DebugEx.LogError("EquipArea : 装备位置重复");
|
| | | }
|
| | | }
|
| | | var _trailBossJson = LitJson.JsonMapper.ToObject(GetInputString("MuneKadoTrialBossHead", 1));
|
| | | trailBossHeadIcons = new Dictionary<int, string>();
|
| | | foreach (var _key in _trailBossJson.Keys)
|
| | | {
|
| | | var _npcId = int.Parse(_key);
|
| | | if (!trailBossHeadIcons.ContainsKey(_npcId))
|
| | | {
|
| | | trailBossHeadIcons.Add(_npcId, _trailBossJson[_key].ToString());
|
| | | }
|
| | | }
|
| | | var _godWeaponJson = LitJson.JsonMapper.ToObject(GetInputString("GodModel", 1));
|
| | | godWeaponMobs = new Dictionary<int, string>();
|
| | | foreach (var _key in _godWeaponJson.Keys)
|
| | | {
|
| | | var _godWeaponType = int.Parse(_key);
|
| | | if (!godWeaponMobs.ContainsKey(_godWeaponType))
|
| | | {
|
| | | godWeaponMobs.Add(_godWeaponType, _godWeaponJson[_key].ToString());
|
| | | }
|
| | | }
|
| | |
|
| | | audioScaleWhenFullScreenOn = GetFloat("AudioSound");
|
| | |
|
| | | iceCrystalMonsterScores = ConfigParse.GetDic<int, int>(GetInputString("IceLodeNeedPoint", 2));
|
| | |
|
| | | NoXpDungeons = new List<int>(GetIntArray("XpNoUseDungeon"));
|
| | | RandomJobs = new List<int>(GetIntArray("RandomJob"));
|
| | | elderGodTalkingTime = GetInt("ElderGodTalkingTime");
|
| | | elderGodBigBoss = GetInt("ElderGodBigBoss");
|
| | | PassiveSkillShow = new List<int>(GetIntArray("PassiveSkillShow"));
|
| | |
|
| | | FuncConfigConfig func = Config.Instance.Get<FuncConfigConfig>("NpcPosOffset");
|
| | | LitJson.JsonData _data = LitJson.JsonMapper.ToObject(func.Numerical1);
|
| | | foreach (var _key in _data.Keys)
|
| | | {
|
| | | int _npcID = int.Parse(_key);
|
| | | double[] _pos = new double[2];
|
| | | _pos[0] = (double)_data[_key][0];
|
| | | _pos[1] = (double)_data[_key][1];
|
| | | NpcPosOffset.Add(_npcID, new Vector3((float)_pos[0], 0, (float)_pos[1]));
|
| | | }
|
| | |
|
| | | FuncConfigConfig nxxdImg = Config.Instance.Get<FuncConfigConfig>("NXXDPicture");
|
| | | LitJson.JsonData nxxdData = LitJson.JsonMapper.ToObject(nxxdImg.Numerical1);
|
| | | multipleRealmImgDict = new Dictionary<int, string>();
|
| | | if (nxxdData.IsArray)
|
| | | {
|
| | | for (i = 0; i < nxxdData.Count; i++)
|
| | | {
|
| | | if (nxxdData[i].IsArray)
|
| | | {
|
| | | multipleRealmImgDict.Add(int.Parse(nxxdData[i][0].ToString()), nxxdData[i][1].ToString());
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | bossShuntMaps = new List<int>(GetIntArray("BossShunt"));
|
| | | bossShuntDays = GetInt("BossShunt", 3);
|
| | |
|
| | | itemDropEffect.Clear();
|
| | | func = Config.Instance.Get<FuncConfigConfig>("ItemEquipmentEffect");
|
| | | _data = LitJson.JsonMapper.ToObject(func.Numerical1);
|
| | | List<string> _keys = new List<string>(_data.Keys);
|
| | | for (i = 0; i < _keys.Count; ++i)
|
| | | {
|
| | | int[] _props = new int[3];
|
| | | for (int j = 0; j < 3; ++j)
|
| | | {
|
| | | _props[j] = (int)_data[_keys[i]][j];
|
| | | }
|
| | | itemDropEffect[int.Parse(_keys[i])] = _props;
|
| | | }
|
| | |
|
| | | xllyDropEffect.Clear();
|
| | | _data = LitJson.JsonMapper.ToObject(func.Numerical2);
|
| | | _keys.Clear();
|
| | | _keys.AddRange(_data.Keys);
|
| | | for (i = 0; i < _keys.Count; ++i)
|
| | | {
|
| | | int[] _props = new int[3];
|
| | | for (int j = 0; j < 3; ++j)
|
| | | {
|
| | | _props[j] = (int)_data[_keys[i]][j];
|
| | | }
|
| | | xllyDropEffect[int.Parse(_keys[i])] = _props;
|
| | | }
|
| | |
|
| | | xqryDropEffect.Clear();
|
| | | _data = LitJson.JsonMapper.ToObject(func.Numerical3);
|
| | | _keys.Clear();
|
| | | _keys.AddRange(_data.Keys);
|
| | | for (i = 0; i < _keys.Count; ++i)
|
| | | {
|
| | | int[] _props = new int[3];
|
| | | for (int j = 0; j < 3; ++j)
|
| | | {
|
| | | _props[j] = (int)_data[_keys[i]][j];
|
| | | }
|
| | | xqryDropEffect[int.Parse(_keys[i])] = _props;
|
| | | }
|
| | |
|
| | | dropEffectQuality.Clear();
|
| | | func = Config.Instance.Get<FuncConfigConfig>("IeemEquipmentEffectQuality");
|
| | | _data = LitJson.JsonMapper.ToObject(func.Numerical1);
|
| | | _keys.Clear();
|
| | | _keys.AddRange(_data.Keys);
|
| | | for (i = 0; i < _keys.Count; ++i)
|
| | | {
|
| | | dropEffectQuality[int.Parse(_keys[i])] = (int)_data[_keys[i]];
|
| | | }
|
| | |
|
| | | customDropEffect.Clear();
|
| | | func = Config.Instance.Get<FuncConfigConfig>("ItemEquipmentEffectItem");
|
| | | _data = LitJson.JsonMapper.ToObject(func.Numerical1);
|
| | | _keys.Clear();
|
| | | _keys.AddRange(_data.Keys);
|
| | | int[] _tmp = null;
|
| | | List<int[]> _content = null;
|
| | | for (i = 0; i < _keys.Count; ++i)
|
| | | {
|
| | | _content = new List<int[]>();
|
| | | foreach (LitJson.JsonData _values in _data[_keys[i]])
|
| | | {
|
| | | if (_values.IsArray)
|
| | | {
|
| | | _tmp = new int[2];
|
| | | _tmp[0] = (int)_values[0];
|
| | | _tmp[1] = (int)_values[1];
|
| | | }
|
| | | else
|
| | | {
|
| | | _tmp = new int[1];
|
| | | _tmp[0] = (int)_values;
|
| | | }
|
| | | _content.Add(_tmp);
|
| | | }
|
| | | customDropEffect.Add(int.Parse(_keys[i]), _content);
|
| | | }
|
| | |
|
| | | BuffToHitEffect.Clear();
|
| | | func = Config.Instance.Get<FuncConfigConfig>("BuffToHitEffect");
|
| | | if (!string.IsNullOrEmpty(func.Numerical1) && !string.IsNullOrEmpty(func.Numerical2))
|
| | | {
|
| | | string[] _buffs = func.Numerical1.Split('|');
|
| | | string[] _effects = func.Numerical2.Split('|');
|
| | | for (i = 0; i < _buffs.Length; ++i)
|
| | | {
|
| | | BuffToHitEffect[int.Parse(_buffs[i])] = int.Parse(_effects[i]);
|
| | | }
|
| | | }
|
| | |
|
| | | demonJarHintLevelLimit = GetInt("DemonJarFirstRemin");
|
| | | demonJarHintLineId = GetInt("DemonJarFirstRemin", 2);
|
| | | skillPanelUnLock = GetInt("SkillPanelUnlock");
|
| | | dailyQuestRedpointLevelLimit = GetInt("DailyQuestRedPoint");
|
| | | lowHpRemind = GetInt("LowHpRemind");
|
| | | autoBuyItemIds = GetIntArray("BuyItemPrice", 1);
|
| | | autoBuyItemPrices = GetIntArray("BuyItemPrice", 2);
|
| | | neutralMaps.AddRange(GetIntArray("BossListMapID"));
|
| | |
|
| | | var _propertyIconCfg = Config.Instance.Get<FuncConfigConfig>("PropertyIcon");
|
| | | var _propertyIconJson = LitJson.JsonMapper.ToObject(_propertyIconCfg.Numerical1);
|
| | | foreach (var _key in _propertyIconJson.Keys)
|
| | | {
|
| | | var _property = int.Parse(_key);
|
| | | propertyIconDict.Add(_property, _propertyIconJson[_key].ToString());
|
| | | }
|
| | |
|
| | | munekadolockLimit = GetInt("MunekadoLockLimit");
|
| | | demonJarRedPoint = GetInt("DemonJarRedPoint");
|
| | | LoadLV = GetInputString("LoadLV");
|
| | |
|
| | | mainWinSkillResetTime = GetFloat("AutomaticSwitch");
|
| | | OffLineTimeLackRemendLevelLimit = GetInt("TJGLevelLimit");
|
| | | heroDialogueOffset = GetInputString("NpcHalfLength", 1).Vector3Parse();
|
| | | heroDialogueRotation = GetInputString("NpcHalfLength", 2).Vector3Parse();
|
| | | heroDialogueScale = GetFloat("NpcHalfLength", 3);
|
| | |
|
| | | var ancientConfig = Config.Instance.Get<FuncConfigConfig>("ElderBattleTarget");
|
| | | ancientGrandTotalAchievements = new List<int>();
|
| | | ancientGrandTotalAchievements.AddRange(ConfigParse.GetMultipleStr<int>(ancientConfig.Numerical1));
|
| | | ancientContinueKillAchievements = new List<int>();
|
| | | ancientContinueKillAchievements.AddRange(ConfigParse.GetMultipleStr<int>(ancientConfig.Numerical2));
|
| | |
|
| | | trialDungeonGroupChallengeTipLv = GetInt("SingleIntoFB");
|
| | | prayerRedpointLimitLv = GetInt("PrayRedPoint");
|
| | | demonJarLevelLimit = GetInt("DemonJarLevelLimit");
|
| | | maxItemDropEffectCount = GetInt("ItemMaskEffect");
|
| | |
|
| | | specialGuide41Mission = GetInt("SpecialGuide41", 1);
|
| | | specialGuide41Achievement = GetInt("SpecialGuide41", 2);
|
| | |
|
| | | supremeRechargeVipLv = GetInt("SupremeCTGVipLimit", 1);
|
| | |
|
| | | rechargeRedpointLv = GetInt("FirstPayRedPoint", 1);
|
| | | rechargeRedpointMinLv = GetInt("FirstPayRedPoint", 2);
|
| | | runeTowerSweepBuyTimes = GetInt("RuneTowerSweepBuy");
|
| | | runeTowerSweepBuyPrice = GetInt("RuneTowerSweepBuy", 2);
|
| | | teamMatchingTimeOut = GetInt("TeamMatchingTimeOut");
|
| | | inGameDownLoadLevelCheckPoints = new List<int>(GetIntArray("InGameDownLoad"));
|
| | | inGameDownLoadTaskCheckPoints = new List<int>(GetIntArray("InGameDownLoad", 2));
|
| | | inGameDownLoadHighLevel = GetInt("InGameDownLoad", 3);
|
| | |
|
| | | worldBossNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 1));
|
| | | bossHomeNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 2));
|
| | | elderGodNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 3));
|
| | | demonJarNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 4));
|
| | |
|
| | | if (ModeDefaultConfig == null)
|
| | | {
|
| | | func = Config.Instance.Get<FuncConfigConfig>("ModeDefault");
|
| | |
|
| | | string[] _funcNpc = func.Numerical1.Split('|');
|
| | | string[] _fightNpc = func.Numerical2.Split('|');
|
| | | string[] _pet = func.Numerical3.Split('|');
|
| | | string[] _horse = func.Numerical4.Split('|');
|
| | |
|
| | | ModeDefaultConfig = new string[4][];
|
| | | ModeDefaultConfig[0] = _funcNpc;
|
| | | ModeDefaultConfig[1] = _fightNpc;
|
| | | ModeDefaultConfig[2] = _pet;
|
| | | ModeDefaultConfig[3] = _horse;
|
| | | }
|
| | |
|
| | | if (RealmGroup == null)
|
| | | {
|
| | | func = Config.Instance.Get<FuncConfigConfig>("RealmGroup");
|
| | | string[] _group = func.Numerical1.Split('|');
|
| | | RealmGroup = new int[_group.Length];
|
| | | for (int j = 0; j < _group.Length; ++j)
|
| | | {
|
| | | int.TryParse(_group[j], out RealmGroup[j]);
|
| | | }
|
| | | }
|
| | |
|
| | | func = Config.Instance.Get<FuncConfigConfig>("PrefightAtkRange");
|
| | | PrefightAtkRange = float.Parse(func.Numerical1);
|
| | | inGameDownLoadHighestLevelPoint = GetInt("DownReward", 2);
|
| | |
|
| | | dungeonCanUseMoneyIds = new List<int>(GetIntArray("FBEnterTickeyAuto", 1));
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | Debug.LogError(ex);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public string GetJobHeadPortrait(int _job, int _ReincarnationLv)
|
| | | {
|
| | | if (jobHeadPortrait.ContainsKey(_job) && jobHeadPortrait[_job].ContainsKey(_ReincarnationLv))
|
| | | {
|
| | | return jobHeadPortrait[_job][_ReincarnationLv];
|
| | | }
|
| | | else
|
| | | {
|
| | | return string.Empty;
|
| | | }
|
| | | }
|
| | |
|
| | | public string GetOtherJobHeadPortrait(int _job, int _ReincarnationLv)
|
| | | {
|
| | | if (otherjobHeadPortrait.ContainsKey(_job) && otherjobHeadPortrait[_job].ContainsKey(_ReincarnationLv))
|
| | | {
|
| | | return otherjobHeadPortrait[_job][_ReincarnationLv];
|
| | | }
|
| | | else
|
| | | {
|
| | | return string.Empty;
|
| | | }
|
| | | }
|
| | |
|
| | | private int GetInt(string _key, int _index = 1)
|
| | | {
|
| | | var result = 0;
|
| | | int.TryParse(GetInputString(_key, _index), out result);
|
| | | return result;
|
| | | }
|
| | |
|
| | | private float GetFloat(string _key, int _index = 1)
|
| | | {
|
| | | var result = 0f;
|
| | | float.TryParse(GetInputString(_key, _index), out result);
|
| | | return result;
|
| | | }
|
| | |
|
| | | private bool GetBool(string _key, int _index = 1)
|
| | | {
|
| | | var result = false;
|
| | | bool.TryParse(GetInputString(_key, _index), out result);
|
| | | return result;
|
| | | }
|
| | |
|
| | | private int[] GetIntArray(string _key, int _index = 1)
|
| | | {
|
| | | var inputString = GetInputString(_key, _index);
|
| | | var stringArray = inputString.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries);
|
| | |
|
| | | if (stringArray.Length == 0)
|
| | | {
|
| | | return null;
|
| | | }
|
| | |
|
| | | var result = new int[stringArray.Length];
|
| | | for (int i = 0; i < stringArray.Length; i++)
|
| | | {
|
| | | int.TryParse(stringArray[i], out result[i]);
|
| | | }
|
| | |
|
| | | return result;
|
| | | }
|
| | |
|
| | | private string[] GetStringArray(string _key, int _index = 1)
|
| | | {
|
| | | var inputString = GetInputString(_key, _index);
|
| | | var stringArray = inputString.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries);
|
| | |
|
| | | if (stringArray.Length == 0)
|
| | | {
|
| | | return null;
|
| | | }
|
| | |
|
| | | var result = new string[stringArray.Length];
|
| | | for (int i = 0; i < stringArray.Length; i++)
|
| | | {
|
| | | result[i] = stringArray[i];
|
| | | }
|
| | |
|
| | | return result;
|
| | | }
|
| | |
|
| | |
|
| | | private float[] GetFloatArray(string _key, int _index = 1)
|
| | | {
|
| | | var inputString = GetInputString(_key, _index);
|
| | | var stringArray = inputString.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries);
|
| | |
|
| | | if (stringArray.Length == 0)
|
| | | {
|
| | | return null;
|
| | | }
|
| | |
|
| | | var result = new float[stringArray.Length];
|
| | | for (int i = 0; i < stringArray.Length; i++)
|
| | | {
|
| | | float.TryParse(stringArray[i], out result[i]);
|
| | | }
|
| | |
|
| | | return result;
|
| | | }
|
| | |
|
| | | private bool[] GetBoolArray(string _key, int _index = 1)
|
| | | {
|
| | | var inputString = GetInputString(_key, _index);
|
| | | var stringArray = inputString.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries);
|
| | |
|
| | | if (stringArray.Length == 0)
|
| | | {
|
| | | return null;
|
| | | }
|
| | |
|
| | | var result = new bool[stringArray.Length];
|
| | | for (int i = 0; i < stringArray.Length; i++)
|
| | | {
|
| | | bool.TryParse(stringArray[i], out result[i]);
|
| | | }
|
| | |
|
| | | return result;
|
| | | }
|
| | |
|
| | | private List<int> GetTimeArray(string _key, int _index = 1)
|
| | | {
|
| | | var configContent = GetInputString(_key, _index);
|
| | | var stringArray = configContent.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries);
|
| | | var timeList = new List<int>();
|
| | | for (int i = 0; i < stringArray.Length; i++)
|
| | | {
|
| | | var input = stringArray[i];
|
| | | var matches = Regex.Matches(input, "[0-9]{1,2}");
|
| | | var hour = matches.Count > 0 ? int.Parse(matches[0].Value) : 0;
|
| | | var minute = matches.Count > 1 ? int.Parse(matches[1].Value) : 0;
|
| | | timeList.Add(hour * 60 + minute);
|
| | | }
|
| | |
|
| | | return timeList;
|
| | | }
|
| | |
|
| | | private string GetInputString(string _key, int _index = 1)
|
| | | {
|
| | | var config = Config.Instance.Get<FuncConfigConfig>(_key);
|
| | | var inputString = string.Empty;
|
| | |
|
| | | switch (_index)
|
| | | {
|
| | | case 1:
|
| | | inputString = config.Numerical1;
|
| | | break;
|
| | | case 2:
|
| | | inputString = config.Numerical2;
|
| | | break;
|
| | | case 3:
|
| | | inputString = config.Numerical3;
|
| | | break;
|
| | | case 4:
|
| | | inputString = config.Numerical4;
|
| | | break;
|
| | | case 5:
|
| | | inputString = config.Numerical5;
|
| | | break;
|
| | | }
|
| | |
|
| | | return inputString;
|
| | | }
|
| | |
|
| | |
|
| | | }
|