|
@@ -99,13 +99,17 @@ namespace GFGGame
|
|
|
for (int j = 0; j < ConstDressUpScoreType.scoreTypeList().Count; j++)
|
|
|
{
|
|
|
int score = j + 1;
|
|
|
+ string key = score.ToString();
|
|
|
int count = ItemDataManager.GetScore(itemCfg.id, score);
|
|
|
- if (propertyData.ContainsKey(score))
|
|
|
+ if (propertyData.ContainsKey(key))
|
|
|
{
|
|
|
- count = count + (int)propertyData[score];
|
|
|
+ count = count + (int)propertyData[key];
|
|
|
+ propertyData[key] = count;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ propertyData.Add(key, count);
|
|
|
}
|
|
|
-
|
|
|
- propertyData.Add(score, count);
|
|
|
}
|
|
|
}
|
|
|
return propertyData;
|
|
@@ -126,5 +130,29 @@ namespace GFGGame
|
|
|
|
|
|
return 2;
|
|
|
}
|
|
|
+
|
|
|
+ public List<SuitFosterCfg> GetSuitFosterRewards(int suitId)
|
|
|
+ {
|
|
|
+ List<SuitFosterCfg> list = new List<SuitFosterCfg>();
|
|
|
+ SuitFosterCfg[] cfg = SuitFosterCfgArray.Instance.GetCfgs(suitId);
|
|
|
+ for (int i = 0; i < cfg.Length; i++)
|
|
|
+ {
|
|
|
+ if (cfg[i].rewardsArr.Length > 0)
|
|
|
+ {
|
|
|
+ list.Add(cfg[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+ private List<SuitFosterCfg> SortRewardList(List<SuitFosterCfg> list)
|
|
|
+ {
|
|
|
+ list.Sort((SuitFosterCfg a, SuitFosterCfg b) =>
|
|
|
+ {
|
|
|
+
|
|
|
+ return 0;
|
|
|
+ });
|
|
|
+ return list;
|
|
|
+ }
|
|
|
}
|
|
|
}
|