public static string[] GetDropGoodsPathDatas(int type, int id, int star, int limitCount) { List <PathData> pathList = DropMessageData.GetPathDatas(new GameResData((BaseResType)type, id, 0, star), limitCount); if (pathList == null) { return(null); } string[] path = new string[pathList.Count]; for (int i = 0; i < pathList.Count; i++) { PathData d = pathList[i]; path[i] = string.Format("{0},{1}", (int)d.type, d.id); } return(path); }
private void RefreshPath() { List <PathData> pathDataList = DropMessageData.GetPathDatas(_gameResData, pathButton.Length); if (pathDataList == null) { for (int i = 0; i < pathButton.Length; i++) { pathButton[i].gameObject.SetActive(false); } noPathGO.SetActive(true); noPathGO.GetComponent <Text>().text = "无"; } else if (pathDataList.Count == 0) { for (int i = 0; i < pathButton.Length; i++) { pathButton[i].gameObject.SetActive(false); } noPathGO.SetActive(true); DropMessageData data = DropMessageData.GetDropMsgDataByResData(_gameResData, true); if (data != null) { noPathGO.GetComponent <Text>().text = Localization.Get(data.des); } } else { for (int i = 0; i < pathButton.Length; i++) { if (i < pathDataList.Count) { pathButton[i].Set(pathDataList[i].type, pathDataList[i].id); } pathButton[i].gameObject.SetActive(i < pathDataList.Count); } noPathGO.SetActive(false); } }