From 2df58aeacbf1177ec01167bdeccfe89d6a8d5804 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期三, 13 二月 2019 14:20:28 +0800
Subject: [PATCH] 3335 配置表读取重构,修改配置表读取接口1
---
System/GeneralConfig/GeneralDefine.cs | 48 ++++++++++++++++++++++++------------------------
1 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/System/GeneralConfig/GeneralDefine.cs b/System/GeneralConfig/GeneralDefine.cs
index b9c6c67..19773bc 100644
--- a/System/GeneralConfig/GeneralDefine.cs
+++ b/System/GeneralConfig/GeneralDefine.cs
@@ -211,15 +211,15 @@
EarlierGetTreasure = new List<int>(GetIntArray("EarlierGetTreasure"));
BossSound = GetInt("BossSound");
PlayBossHurtInterval = GetFloat("BossSound", 2);
- var jobHeadPortraitConfig1 = Config.Instance.Get<FuncConfigConfig>("Job1Head");
+ var jobHeadPortraitConfig1 = FuncConfigConfig.Get("Job1Head");
jobHeadPortrait[1] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig1.Numerical1);
otherjobHeadPortrait[1] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig1.Numerical2);
- var jobHeadPortraitConfig2 = Config.Instance.Get<FuncConfigConfig>("Job2Head");
+ var jobHeadPortraitConfig2 = FuncConfigConfig.Get("Job2Head");
jobHeadPortrait[2] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig2.Numerical1);
otherjobHeadPortrait[2] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig2.Numerical2);
- var jobHeadPortraitConfig3 = Config.Instance.Get<FuncConfigConfig>("Job3Head");
+ var jobHeadPortraitConfig3 = FuncConfigConfig.Get("Job3Head");
jobHeadPortrait[3] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig3.Numerical1);
otherjobHeadPortrait[3] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig3.Numerical2);
@@ -295,7 +295,7 @@
elderGodBigBoss = GetInt("ElderGodBigBoss");
PassiveSkillShow = new List<int>(GetIntArray("PassiveSkillShow"));
- FuncConfigConfig func = Config.Instance.Get<FuncConfigConfig>("NpcPosOffset");
+ FuncConfigConfig func = FuncConfigConfig.Get("NpcPosOffset");
LitJson.JsonData _data = LitJson.JsonMapper.ToObject(func.Numerical1);
foreach (var _key in _data.Keys)
{
@@ -306,7 +306,7 @@
NpcPosOffset.Add(_npcID, new Vector3((float)_pos[0], 0, (float)_pos[1]));
}
- var putInItemPack = Config.Instance.Get<FuncConfigConfig>("PutInItemPack");
+ var putInItemPack = FuncConfigConfig.Get("PutInItemPack");
LitJson.JsonData itemPutInData = LitJson.JsonMapper.ToObject(putInItemPack.Numerical1);
itemPutInPackDict = new Dictionary<int, List<int>>();
foreach(var _key in itemPutInData.Keys)
@@ -325,7 +325,7 @@
}
}
- FuncConfigConfig nxxdImg = Config.Instance.Get<FuncConfigConfig>("NXXDPicture");
+ FuncConfigConfig nxxdImg = FuncConfigConfig.Get("NXXDPicture");
LitJson.JsonData nxxdData = LitJson.JsonMapper.ToObject(nxxdImg.Numerical1);
multipleRealmImgDict = new Dictionary<int, string>();
if (nxxdData.IsArray)
@@ -343,7 +343,7 @@
bossShuntDays = GetInt("BossShunt", 3);
itemDropEffect.Clear();
- func = Config.Instance.Get<FuncConfigConfig>("ItemEquipmentEffect");
+ func = FuncConfigConfig.Get("ItemEquipmentEffect");
_data = LitJson.JsonMapper.ToObject(func.Numerical1);
List<string> _keys = new List<string>(_data.Keys);
for (i = 0; i < _keys.Count; ++i)
@@ -385,7 +385,7 @@
}
dropEffectQuality.Clear();
- func = Config.Instance.Get<FuncConfigConfig>("IeemEquipmentEffectQuality");
+ func = FuncConfigConfig.Get("IeemEquipmentEffectQuality");
_data = LitJson.JsonMapper.ToObject(func.Numerical1);
_keys.Clear();
_keys.AddRange(_data.Keys);
@@ -395,7 +395,7 @@
}
customDropEffect.Clear();
- func = Config.Instance.Get<FuncConfigConfig>("ItemEquipmentEffectItem");
+ func = FuncConfigConfig.Get("ItemEquipmentEffectItem");
_data = LitJson.JsonMapper.ToObject(func.Numerical1);
_keys.Clear();
_keys.AddRange(_data.Keys);
@@ -423,7 +423,7 @@
}
BuffToHitEffect.Clear();
- func = Config.Instance.Get<FuncConfigConfig>("BuffToHitEffect");
+ func = FuncConfigConfig.Get("BuffToHitEffect");
if (!string.IsNullOrEmpty(func.Numerical1) && !string.IsNullOrEmpty(func.Numerical2))
{
string[] _buffs = func.Numerical1.Split('|');
@@ -444,7 +444,7 @@
neutralMaps.AddRange(GetIntArray("MapLine", 4));
neutralBossMaps.AddRange(GetIntArray("BossListMapID"));
- var _propertyIconCfg = Config.Instance.Get<FuncConfigConfig>("PropertyIcon");
+ var _propertyIconCfg = FuncConfigConfig.Get("PropertyIcon");
var _propertyIconJson = LitJson.JsonMapper.ToObject(_propertyIconCfg.Numerical1);
foreach (var _key in _propertyIconJson.Keys)
{
@@ -462,7 +462,7 @@
heroDialogueRotation = GetInputString("NpcHalfLength", 2).Vector3Parse();
heroDialogueScale = GetFloat("NpcHalfLength", 3);
- var ancientConfig = Config.Instance.Get<FuncConfigConfig>("ElderBattleTarget");
+ var ancientConfig = FuncConfigConfig.Get("ElderBattleTarget");
ancientGrandTotalAchievements = new List<int>();
ancientGrandTotalAchievements.AddRange(ConfigParse.GetMultipleStr<int>(ancientConfig.Numerical1));
ancientContinueKillAchievements = new List<int>();
@@ -495,7 +495,7 @@
if (ModeDefaultConfig == null)
{
- func = Config.Instance.Get<FuncConfigConfig>("ModeDefault");
+ func = FuncConfigConfig.Get("ModeDefault");
string[] _funcNpc = func.Numerical1.Split('|');
string[] _fightNpc = func.Numerical2.Split('|');
@@ -511,7 +511,7 @@
if (RealmGroup == null)
{
- func = Config.Instance.Get<FuncConfigConfig>("RealmGroup");
+ func = FuncConfigConfig.Get("RealmGroup");
string[] _group = func.Numerical1.Split('|');
RealmGroup = new int[_group.Length];
for (int j = 0; j < _group.Length; ++j)
@@ -520,7 +520,7 @@
}
}
- func = Config.Instance.Get<FuncConfigConfig>("PrefightAtkRange");
+ func = FuncConfigConfig.Get("PrefightAtkRange");
PrefightAtkRange = float.Parse(func.Numerical1);
inGameDownLoadHighestLevelPoint = GetInt("DownReward", 2);
@@ -540,7 +540,7 @@
DropItemEffectMapID = new Dictionary<int, List<int>>();
}
DropItemEffectMapID.Clear();
- func = Config.Instance.Get<FuncConfigConfig>("DropItemEffectMapID");
+ func = FuncConfigConfig.Get("DropItemEffectMapID");
_data = LitJson.JsonMapper.ToObject(func.Numerical1);
int _itemID;
_keys.Clear();
@@ -571,7 +571,7 @@
teamWorldCall = GetInputString("TeamWorldCall");
teamWorldCallInviteCount = GetInt("TeamWorldCall", 2);
- var ancientKingAwradConfig = Config.Instance.Get<FuncConfigConfig>("ElderBattlefieldTopAward");
+ var ancientKingAwradConfig = FuncConfigConfig.Get("ElderBattlefieldTopAward");
if (ancientKingAwradConfig != null)
{
var itemArray = LitJson.JsonMapper.ToObject<int[][]>(ancientKingAwradConfig.Numerical1);
@@ -586,27 +586,27 @@
}
}
- func = Config.Instance.Get<FuncConfigConfig>("QualityEffectConfig");
+ func = FuncConfigConfig.Get("QualityEffectConfig");
lowQualityEffectCount = int.Parse(func.Numerical1);
medQualityEffectCount = int.Parse(func.Numerical2);
highQualityEffectCount = int.Parse(func.Numerical3);
- func = Config.Instance.Get<FuncConfigConfig>("QualityPetCountConfig");
+ func = FuncConfigConfig.Get("QualityPetCountConfig");
lowQualityPetCount = int.Parse(func.Numerical1);
medQualityPetCount = int.Parse(func.Numerical2);
highQualityPetCount = int.Parse(func.Numerical3);
- func = Config.Instance.Get<FuncConfigConfig>("QualityGuardCountConfig");
+ func = FuncConfigConfig.Get("QualityGuardCountConfig");
lowQualityGuardCount = int.Parse(func.Numerical1);
medQualityGuardCount = int.Parse(func.Numerical2);
highQualityGuardCount = int.Parse(func.Numerical3);
- func = Config.Instance.Get<FuncConfigConfig>("QualityPetEffectCount");
+ func = FuncConfigConfig.Get("QualityPetEffectCount");
lowQualityPetEffectCount = int.Parse(func.Numerical1);
medQualityPetEffectCount = int.Parse(func.Numerical2);
highQualityPetEffectCount = int.Parse(func.Numerical3);
- func = Config.Instance.Get<FuncConfigConfig>("QualityHorseEffectCount");
+ func = FuncConfigConfig.Get("QualityHorseEffectCount");
lowQualityHorseEffectCount = int.Parse(func.Numerical1);
medQualityHorseEffectCount = int.Parse(func.Numerical2);
highQualityHorseEffectCount = int.Parse(func.Numerical3);
@@ -615,7 +615,7 @@
fairyLandBuffId = GetInt("XjmjAddHarm", 2);
achievementEarlierStageLevel = GetInt("AchieveLV");
- func = Config.Instance.Get<FuncConfigConfig>("PreloadSkillEffect");
+ func = FuncConfigConfig.Get("PreloadSkillEffect");
PreloadSkillEffect = new int[2][];
PreloadSkillEffect[0] = GetIntArray("PreloadSkillEffect");
PreloadSkillEffect[1] = GetIntArray("PreloadSkillEffect", 2);
@@ -874,7 +874,7 @@
private static string GetInputString(string _key, int _index = 1)
{
- var config = Config.Instance.Get<FuncConfigConfig>(_key);
+ var config = FuncConfigConfig.Get(_key);
var inputString = string.Empty;
switch (_index)
--
Gitblit v1.8.0