예제 #1
0
 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));
             }
         }
     }
 }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }