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/Compose/New/ComposeWinModel.cs | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/System/Compose/New/ComposeWinModel.cs b/System/Compose/New/ComposeWinModel.cs
index b79086c..89fac1f 100644
--- a/System/Compose/New/ComposeWinModel.cs
+++ b/System/Compose/New/ComposeWinModel.cs
@@ -95,9 +95,9 @@
private Dictionary<int, List<int>> composeJobLimitDict = new Dictionary<int, List<int>>();
public void ParseFuncConfig()
{
- addonsFormulaModel = Config.Instance.Get<FuncConfigConfig>("ComposeAddonsFormula");
+ addonsFormulaModel = FuncConfigConfig.Get("ComposeAddonsFormula");
composeJobLimitDict.Clear();
- FuncConfigConfig funcConfig = Config.Instance.Get<FuncConfigConfig>("ComposeJobLimit");
+ FuncConfigConfig funcConfig = FuncConfigConfig.Get("ComposeJobLimit");
JsonData limitData = JsonMapper.ToObject(funcConfig.Numerical1);
foreach (var job in limitData.Keys)
{
@@ -422,7 +422,7 @@
if (makeIds == null || makeIds.Length < 1) return PackType.rptDeleted;
int makeId = makeIds[0];
- var itemConfig = Config.Instance.Get<ItemConfig>(makeId);
+ var itemConfig = ItemConfig.Get(makeId);
return GeneralDefine.GetPackTypeByItemType(itemConfig.Type);
}
@@ -489,7 +489,7 @@
for ( int i = 0; i < fixedCounts.Length; i++)
{
var fixedId = fixedIds[i];
- var itemConfig = Config.Instance.Get<ItemConfig>(fixedId);
+ var itemConfig = ItemConfig.Get(fixedId);
var packType = GeneralDefine.GetPackTypeByItemType(itemConfig.Type);
int haveCount = playerPack.GetItemCountByID(packType,fixedIds[i]);
if (haveCount < fixedCounts[i])
@@ -543,7 +543,7 @@
int haveCount = playerPack.GetItemCountByID(packType, fixedIds[i]);
if (haveCount < fixedCounts[i])
{
- ItemConfig fixedConfig = Config.Instance.Get<ItemConfig>(fixedIds[i]);
+ ItemConfig fixedConfig = ItemConfig.Get(fixedIds[i]);
if (fixedConfig.GetWay.Length < 1)
{
ItemAttrData attrData = new ItemAttrData(fixedConfig.ID);
@@ -559,7 +559,7 @@
if(!IsEnoughMoney(compoundModel))
{
- ItemConfig fixedConfig = Config.Instance.Get<ItemConfig>(2100);
+ ItemConfig fixedConfig = ItemConfig.Get(2100);
if (fixedConfig.GetWay.Length < 1)
{
ItemAttrData attrData = new ItemAttrData(fixedConfig.ID);
@@ -950,7 +950,7 @@
{
if (CurComposeModel == null) return string.Empty;
int[] makeIds = CurComposeModel.makeID;
- ItemConfig config = Config.Instance.Get<ItemConfig>(makeIds[0]);
+ ItemConfig config = ItemConfig.Get(makeIds[0]);
StringBuilder stringBuilder = new StringBuilder();
if (bindCnt > 0)
{
@@ -1135,7 +1135,7 @@
public bool CheckComposeItemById(int itemId,out int jumpId)
{
jumpId = 0;
- ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(itemId);
+ ItemConfig itemConfig = ItemConfig.Get(itemId);
if (itemConfig == null) return false;
int[] composeCondi = itemConfig.JumpComposeCondi;
@@ -1268,7 +1268,7 @@
{
if (type != PackType.rptItem) return;
- ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(id);
+ ItemConfig itemConfig = ItemConfig.Get(id);
if(itemConfig != null && itemConfig.Type == (int)ItemType.ComposeSuitStone)
{
RefreshComposeRed();
--
Gitblit v1.8.0