Ejemplo n.º 1
0
        public void Load()
        {
            System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;

            //this.SkillStorage = LoadSkills();

            skillDropping = new SkillDropping();
            skillDropping.Load(basePath);

            this.WeaponSettings = new WeaponDropSettings();
            if (!this.WeaponSettings.Load(basePath))
            {
                throw new Exception("Error of loading weapon settings....");
            }



            this.ModuleSettings = new ModuleSettingsRes();
            if (!this.ModuleSettings.Load(basePath))
            {
                throw new Exception("exception: module settings loading error");
            }

            this.Sets = new ModuleSetRes();
            if (!this.Sets.Load(basePath))
            {
                throw new Exception("exception: error of loading module sets...");
            }


            this.ColorRes = new ColorInfoRes();
            this.ColorRes.Load(basePath);

            this.ModuleTemplates = new ModuleInfoStorage();
            this.ModuleTemplates.Load(basePath);

            this.ServerInputs = new ServerInputsRes();
            this.ServerInputs.Load(basePath, "Data/server_inputs.xml");

            //load materials
            this.Materials = new MaterialRes();
            this.Materials.Load(basePath);

            this.MiscItemDataRes = new MiscInventoryItemDataRes();
            this.MiscItemDataRes.Load(basePath);

            //load asteroids
            this.Asteroids = new AsteroidsRes();
            this.Asteroids.Load(basePath);

            this.Zones = new ZonesRes();
            this.Zones.Load(basePath);

            this.Skills = new SkillRes();
            this.Skills.Load(basePath);

            //this.NpcTypes = new NpcTypeDataRes();
            //if (false == this.NpcTypes.Load(basePath))
            //{
            //    throw new Exception("load npc types error");
            //}

            this.Weapons = new WeaponDataRes();
            this.Weapons.Load(basePath);

            this.Leveling = new Leveling();
            this.Leveling.Load(basePath);

            //this.Events = new ResEvents();
            //this.Events.Load(basePath);

            this.NpcGroups = new NpcGroupRes();
            this.NpcGroups.Load(basePath);
            if (!this.NpcGroups.Loaded)
            {
                throw new Exception("Npc Groups Resources loading error");
            }

            this.StartModules = new StartPlayerModuleRes();
            this.StartModules.Load(basePath);
            if (!this.StartModules.Loaded)
            {
                throw new Exception("StartModules loading error");
            }

            fractionResolver = new FractionResolver();
            fractionResolver.Load(basePath);

            CraftingMaterials = new ResSchemeCraftingMaterials();
            CraftingMaterials.Load(basePath);

            PassiveBonuses = new ResPassiveBonuses();
            PassiveBonuses.Load(basePath);

            colorLists = new ColorListCollection();
            colorLists.Load(Path.Combine(basePath, "Data/Drop/color_lists.xml"));

            dropLists = new DropListCollection();
            dropLists.Load(Path.Combine(basePath, "Data/Drop/drop_lists.xml"));

            petParameters = new PetParameters();
            petParameters.Load(Path.Combine(basePath, "Data/pets.xml"));

            petSkills = new PetSkillCollection();
            petSkills.Load(Path.Combine(basePath, "Data/pet_active_skills.xml"));

            petPassiveBonuses = new PetPassiveBonusCollection();
            (petPassiveBonuses as PetPassiveBonusCollection).Load(Path.Combine(basePath, "Data/passive_pet_bonuses.xml"));

            craftObjects = new CraftResourceObjectTable();
            craftObjects.Load(Path.Combine(basePath, "Data/Materials/craft_resource.xml"));

            playerConstructions = new ConstructionDataResource();
            playerConstructions.Load(Path.Combine(basePath, "Data/player_constructions.xml"));

            predefinedDropLists = new PredefinedDropLists();
            predefinedDropLists.Load(Path.Combine(basePath, "Data/Drop/predefined_dls.xml"));

            npcSkills = new NpcClassSkillsResource();
            npcSkills.Load(Path.Combine(basePath, "Data/npc_skill_table.xml"));

            m_ContractResource.Load(Path.Combine(basePath, "Data/contracts.xml"));

            contractItems = new ContractItemDataCollection();
            contractItems.Load(Path.Combine(basePath, "Data/contract_items.xml"));

            achievments = new AchievmentDataCollection();
            achievments.Load(Path.Combine(basePath, "Data/achievments.xml"));

            difficulty = new DifficultyRes();
            difficulty.Load(Path.Combine(basePath, "Data/Drop/difficulty.xml"));

            planetOreMap = new Planet2OreMapRes();
            planetOreMap.Load(Path.Combine(basePath, "Data/planet2oremap.xml"));

            Quests.Load(Path.Combine(basePath, "Data/quests.xml"));
            //quests = new QuestDataResource();
            //quests.Load(basePath);

            //dialogs = new DialogDataResource();
            //dialogs.Load(basePath);
        }