Beispiel #1
0
        public static void ReadContainerData()
        {
            if (ItemManager == null)
                ItemManager = new ItemDataManager();

            string[] files = Directory.GetFiles(FormMain.ContainerPath, "*.container");
            foreach (var data in files.Select(Serializer.Deserialize<ContainerData>))
                ItemManager.ContainerData.Add(data.Name, data);
        }
Beispiel #2
0
        protected FormDetails()
        {
            InitializeComponent();

            if (ItemManager == null)
                ItemManager = new ItemDataManager();

            if (EntityManager == null)
                EntityManager = new EntityDataManager();

            if (SkillManager == null)
                SkillManager = new SkillDataManager();
        }
Beispiel #3
0
        public static void ReadItemData()
        {
            if (ItemManager == null)
                ItemManager = new ItemDataManager();

            string[] files = Directory.GetFiles(FormMain.ArmorPath, "*.armor");

            foreach (var data in files.Select(Serializer.Deserialize<ArmorData>))
                ItemManager.ArmorData.Add(data.Name, data);

            files = Directory.GetFiles(FormMain.ShieldPath, "*.shield");

            foreach (var data in files.Select(Serializer.Deserialize<ShieldData>))
                ItemManager.ShieldData.Add(data.Name, data);

            files = Directory.GetFiles(FormMain.WeaponPath, "*.weapon");

            foreach (var data in files.Select(Serializer.Deserialize<WeaponData>))
                ItemManager.WeaponData.Add(data.Name, data);
        }