private List <int> GetSinglePlaceJobList(int placeID) { if (!CacheJobPlace.ContainsKey(placeID) || CacheJobPlace[placeID].Count <= 0) { GUIRadarScan.Show(); List <int> mList = jobConfig.GetJobSingleElementList(placeID); CacheJobPlace.Add(placeID, mList); NetSender.Instance.C2GSModifyJobListReq(CacheJobPlace, playerData.starData.nLineDay); GUIRadarScan.Hide(); return(mList); } foreach (KeyValuePair <int, List <int> > mPair in CacheJobPlace) { if (placeID == mPair.Key) { return(mPair.Value); } } return(null); }
private void RefreshJobList(PlayerData playerData) { Dictionary <int, List <int> > jobRefreshDic = new Dictionary <int, List <int> >(); JobPlaceConfig jobPlaceConfig = Globals.Instance.MDataTableManager.GetConfig <JobPlaceConfig>(); JobConfig jobConfig = Globals.Instance.MDataTableManager.GetConfig <JobConfig>(); foreach (KeyValuePair <int, JobPlaceConfig.JobPlaceElement> jobPlaceElement in jobPlaceConfig.GetJobPlaceElementList()) { jobRefreshDic.Add(jobPlaceElement.Key, jobConfig.GetJobSingleElementList(jobPlaceElement.Key)); } Globals.Instance.MJobManager.getJobPlaceInformationDic = jobRefreshDic; NetSender.Instance.C2GSModifyJobListReq(jobRefreshDic, playerData.starData.nLineDay); Globals.Instance.MJobManager.GetJobRefreshLastTime = playerData.starData.nLineDay; }