| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 | using ET;using GFGGame;using System;using System.Collections.Generic;namespace ET{    public static class CollegeSProxy    {        public static async ETTask<bool> 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<int> item = new List<int>() { 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<bool> 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<int> item = new List<int>() { 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;        }    }}
 |