|
@@ -61,55 +61,55 @@ namespace GFGGame
|
|
|
}
|
|
|
|
|
|
//加成属性服装占比
|
|
|
- public List<KeyValuePair<int, string>> GetPropertyPercentData(int suitId, int index)
|
|
|
- {
|
|
|
- List<SuitFosterCfg> cfgs = SuitFosterCfgArray.Instance.GetCfgsBysuitId(suitId);
|
|
|
- Dictionary<int, int> _data = new Dictionary<int, int>();
|
|
|
+ // public List<KeyValuePair<int, string>> GetPropertyPercentData(int suitId, int index)
|
|
|
+ // {
|
|
|
+ // List<SuitFosterCfg> cfgs = SuitFosterCfgArray.Instance.GetCfgsBysuitId(suitId);
|
|
|
+ // Dictionary<int, int> _data = new Dictionary<int, int>();
|
|
|
|
|
|
- for (int i = 0; i < cfgs.Count; i++)
|
|
|
- {
|
|
|
- int[][] partsArr = cfgs[i].partsArr;
|
|
|
- for (int j = 0; j < partsArr.Length; j++)
|
|
|
- {
|
|
|
- ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(partsArr[j][0]);
|
|
|
- // int id = ItemTypeCfgArray.Instance.GetCfg(itemCfg.subType).i;
|
|
|
- if (index < cfgs.Count && index == i || index >= cfgs.Count)
|
|
|
- {
|
|
|
- int num = 0;
|
|
|
+ // for (int i = 0; i < cfgs.Count; i++)
|
|
|
+ // {
|
|
|
+ // int[][] partsArr = cfgs[i].partsArr;
|
|
|
+ // for (int j = 0; j < partsArr.Length; j++)
|
|
|
+ // {
|
|
|
+ // ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(partsArr[j][0]);
|
|
|
+ // // int id = ItemTypeCfgArray.Instance.GetCfg(itemCfg.subType).i;
|
|
|
+ // if (index < cfgs.Count && index == i || index >= cfgs.Count)
|
|
|
+ // {
|
|
|
+ // int num = 0;
|
|
|
|
|
|
- if (!_data.ContainsKey(itemCfg.id))
|
|
|
- {
|
|
|
- _data.Add(itemCfg.id, num);
|
|
|
- }
|
|
|
+ // if (!_data.ContainsKey(itemCfg.id))
|
|
|
+ // {
|
|
|
+ // _data.Add(itemCfg.id, num);
|
|
|
+ // }
|
|
|
|
|
|
- num = _data[itemCfg.id];
|
|
|
- num = num + partsArr[j][1];
|
|
|
- _data[itemCfg.id] = num;
|
|
|
+ // num = _data[itemCfg.id];
|
|
|
+ // num = num + partsArr[j][1];
|
|
|
+ // _data[itemCfg.id] = num;
|
|
|
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
- ICollection keys = _data.Keys;
|
|
|
- Dictionary<int, string> _dataPercent = new Dictionary<int, string>();
|
|
|
- foreach (int key in keys)
|
|
|
- {
|
|
|
+ // ICollection keys = _data.Keys;
|
|
|
+ // Dictionary<int, string> _dataPercent = new Dictionary<int, string>();
|
|
|
+ // foreach (int key in keys)
|
|
|
+ // {
|
|
|
|
|
|
- ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(key);
|
|
|
- float mainScore = ItemDataManager.GetItemBaseScoreValue(key, itemCfg.mainScore);
|
|
|
- float addScore = _data[key];
|
|
|
- float percent = (addScore / mainScore * 100);
|
|
|
- _dataPercent.Add(key, percent.ToString("0.00"));
|
|
|
+ // ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(key);
|
|
|
+ // float mainScore = ItemDataManager.GetItemBaseScoreValue(key, itemCfg.mainScore);
|
|
|
+ // float addScore = _data[key];
|
|
|
+ // float percent = (addScore / mainScore * 100);
|
|
|
+ // _dataPercent.Add(key, percent.ToString("0.00"));
|
|
|
|
|
|
- }
|
|
|
- return new List<KeyValuePair<int, string>>(_dataPercent);
|
|
|
- }
|
|
|
+ // }
|
|
|
+ // return new List<KeyValuePair<int, string>>(_dataPercent);
|
|
|
+ // }
|
|
|
|
|
|
//获取当前阶段部件属性总值
|
|
|
- public void GetPropertyData(int suitId, int index, out SortedList _propertyData, out SortedList _addPropertyData)
|
|
|
+ public SortedList GetPropertyData(int suitId, int index)
|
|
|
{
|
|
|
- _propertyData = new SortedList();
|
|
|
- _addPropertyData = new SortedList();
|
|
|
+ SortedList _propertyData = new SortedList();
|
|
|
+ // _addPropertyData = new SortedList();
|
|
|
|
|
|
int[] parts = SuitCfgArray.Instance.GetCfg(suitId).partsArr;
|
|
|
for (int i = 0; i < parts.Length; i++)
|
|
@@ -131,39 +131,38 @@ namespace GFGGame
|
|
|
_propertyData.Add(score, count);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
- List<SuitFosterCfg> cfgs = SuitFosterCfgArray.Instance.GetCfgsBysuitId(suitId);
|
|
|
- for (int i = 0; i < cfgs.Count; i++)
|
|
|
+ return _propertyData;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Dictionary<int, int> GetAdditionPropertyData(int suitId, int index)
|
|
|
+ {
|
|
|
+ Dictionary<int, int> _addPropertyData = new Dictionary<int, int>();
|
|
|
+ SuitFosterCfg cfg = SuitFosterCfgArray.Instance.GetCfgsBysuitId(suitId)[index];
|
|
|
+
|
|
|
+ int[] parts = SuitCfgArray.Instance.GetCfg(suitId).partsArr;
|
|
|
+ for (int j = 0; j < parts.Length; j++)
|
|
|
{
|
|
|
- int[][] partsArr = cfgs[i].partsArr;
|
|
|
- for (int j = 0; j < partsArr.Length; j++)
|
|
|
+ ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(parts[j]);
|
|
|
+ for (int k = 0; k < ConstDressUpScoreType.scoreTypeList().Count; k++)
|
|
|
{
|
|
|
- ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(partsArr[j][0]);
|
|
|
- for (int k = 0; k < ConstDressUpScoreType.scoreTypeList().Count; k++)
|
|
|
- {
|
|
|
- int score = k + 1;
|
|
|
- if (index < cfgs.Count && index == i || index >= cfgs.Count)
|
|
|
- {
|
|
|
-
|
|
|
- int addCount = 0;
|
|
|
- if (score == itemCfg.mainScore)
|
|
|
- {
|
|
|
- addCount = partsArr[j][1];
|
|
|
- }
|
|
|
- if (_addPropertyData.ContainsKey(score))
|
|
|
- {
|
|
|
- addCount = addCount + (int)_addPropertyData[score];
|
|
|
- _addPropertyData[score] = addCount;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- _addPropertyData.Add(score, addCount);
|
|
|
- }
|
|
|
- }
|
|
|
+ int score = k + 1;
|
|
|
+
|
|
|
+ int addCount = cfg.addition;
|
|
|
|
|
|
+ if (_addPropertyData.ContainsKey(score))
|
|
|
+ {
|
|
|
+ addCount = addCount + (int)_addPropertyData[score];
|
|
|
+ _addPropertyData[score] = addCount;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _addPropertyData.Add(score, addCount);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ return _addPropertyData;
|
|
|
}
|
|
|
//0:已完成,1:养护中,2未养护
|
|
|
public int GetFosterState(int suitId, int index)
|