using ET; using GFGGame; using System; using System.Collections.Generic; namespace ET { public static class CollegeSProxy { public static async ETTask ReqCollectUpgradeInfo() { var response = (M2C_GetDressUpSkillDes)await MessageHelper.SendToServer(new C2M_GetDressUpSkillDes()); if (!(response is { Error: ErrorCode.ERR_Success })) return false; int Count = response.CollectPartInfos.Count; CollegeBoostCfg collectcfg; for (int i = 0; i < response.CollectPartInfos.Count; i++) { List item = new List() { response.CollectPartInfos[i].Stage, response.CollectPartInfos[i].Lvl }; collectcfg = CollegeBoostCfgArray.Instance.GetCfgBytypePartsAndtypePhaseAndlayer(i, item[0], item[1]); if (collectcfg == null) { item.Add(0); } else { item.Add(collectcfg.value); } if (CollectPartDataManager.Instance.CollectPartDataDic.ContainsKey(response.CollectPartInfos[i].CollectPartType)) { CollectPartDataManager.Instance.CollectPartDataDic[response.CollectPartInfos[i].CollectPartType] = item; } else { CollectPartDataManager.Instance.CollectPartDataDic.Add(response.CollectPartInfos[i].CollectPartType, item); } } return true; } public static async ETTask ReqCollectUpgrade(int partType,int stage,int lv) { var response = (M2C_UpDressUpSkill)await MessageHelper.SendToServer(new C2M_UpDressUpSkill(){ CollectPartType = partType, Stage = stage,Lvl = lv }); if (!(response is { Error: ErrorCode.ERR_Success })) return false; List item = new List() { response.CollectPartInfo.Stage, response.CollectPartInfo.Lvl }; CollegeBoostCfg collectcfg = CollegeBoostCfgArray.Instance.GetCfgBytypePartsAndtypePhaseAndlayer(response.CollectPartInfo.CollectPartType, item[0], item[1]); if (collectcfg == null) { item.Add(0); } else { item.Add(collectcfg.value); } if (CollectPartDataManager.Instance.CollectPartDataDic.ContainsKey(response.CollectPartInfo.CollectPartType)) { CollectPartDataManager.Instance.CollectPartDataDic[response.CollectPartInfo.CollectPartType] = item; } else { CollectPartDataManager.Instance.CollectPartDataDic.Add(response.CollectPartInfo.CollectPartType, item); } EventAgent.DispatchEvent(ConstMessage.COLLEGE_UPGRADE); return true; } } }