예제 #1
0
        private static Dictionary<int, DropInfo> LoadDropInfo()
        {
            Dictionary<int, DropInfo> items = new Dictionary<int, DropInfo>();

            if (File.Exists(FilePath))
            {
                IniReader reader = new IniReader(FilePath);
                int i = 1;
                while (reader.GetIniString(i.ToString(), "TemplateId") != "")
                {
                    string section = i.ToString();
                    int id = Convert.ToInt32(reader.GetIniString(section, "TemplateId"));
                    int time = Convert.ToInt32(reader.GetIniString(section, "Time"));
                    int count = Convert.ToInt32(reader.GetIniString(section, "Count"));
                    DropInfo info = new DropInfo(id, time, count, count);
                    items.Add(info.ID, info);
                    i++;
                }
                return items;
            }

            return null;
        }