using System.Collections.Generic; using System.Linq; using cfg.GfgCfg; using ET; namespace GFGGame { public class CollegeBoostCfgArray : SingletonBaseET { //如成长任务下的所有子分类 public List GetCollegeBoostsByTypePart(int typePart) { var collegeBoostCfgList = CommonDataManager.Tables.TblCollegeBoostCfg.DataList .Where(a => a.TypeParts == typePart) .ToList(); return collegeBoostCfgList; } public int GetMaxStage(int typePart) { var collegeBoostCfgList = CommonDataManager.Tables.TblCollegeBoostCfg.DataList.Where(a => a.TypeParts == typePart).ToList(); var maxData = collegeBoostCfgList .Where(a => a.TypePhase == collegeBoostCfgList.Max(x => x.TypePhase)) .FirstOrDefault(a => a.Layer == collegeBoostCfgList.Max(x => x.Layer)); return maxData.TypePhase; } public int GetMaxLvl(int typePart) { var collegeBoostCfgList = CollegeBoostCfgArray.Instance.GetCollegeBoostsByTypePart(typePart); var maxData = collegeBoostCfgList .Where(a => a.TypePhase == collegeBoostCfgList.Max(x => x.TypePhase)) .FirstOrDefault(a => a.Layer == collegeBoostCfgList.Max(x => x.Layer)); return maxData.Layer; } public CollegeBoostCfg GetCollegeBoostCfgListByTypePartsAndTypePhaseAndLayer(int typePart, int typePhase, int layer) { var data = CommonDataManager.Tables.TblCollegeBoostCfg.DataList.FirstOrDefault(a => a.TypePhase == typePhase && a.Layer == layer); return data; } } }