private static void LoadCDBsFromFolder(string folderName) { FileInfo[] fileInfos = (new DirectoryInfo(folderName)).GetFiles().Where(x => x.Extension == ".cdb").OrderByDescending(x => x.Name).ToArray(); //load cards.cdb last this way for (int i = 0; i < fileInfos.Length; i++) { if (fileInfos[i].Name.Length > 4) { if (fileInfos[i].Name.Substring(fileInfos[i].Name.Length - 4, 4) == ".cdb") { CardsManager.initialize(Path.Combine(folderName, fileInfos[i].Name)); } } } }
public static string getSetName(long Setcode) { string returnValue = ""; for (int i = 0; i < GameStringManager.xilies.Count; i++) { if (CardsManager.IfSetCard(GameStringManager.xilies[i].hashCode, Setcode)) { if (!returnValue.Contains(GameStringManager.xilies[i].content)) { returnValue += GameStringManager.xilies[i].content + ", "; } } } if (returnValue.Length > 2) { returnValue = returnValue.Substring(0, returnValue.Length - 2); } return(returnValue); }
internal static string get(int description) { string a = ""; if (description < 10000) { a = get("system", (int)description); } else { int code = description >> 4; int index = description & 0xf; try { a = CardsManager.Get(code).Str[index]; } catch (Exception e) { } } return(a); }