Esempio n. 1
0
 private static void LoadGameData()
 {
     Console.ForegroundColor = ConsoleColor.Yellow;
     Console.WriteLine("Loading Classes..."); modDatabase.LoadClasses();
     Console.WriteLine("Loading Maps..."); modDatabase.LoadMaps();
     Console.WriteLine("Creating Map Matrices...");
     for (int i = 1; i < Constants.MAX_MAPS; i++)
     {
         modPathfinding.CreatePathMatrix(i);
     }
     Console.WriteLine("Loading Items..."); S_Items.LoadItems();
     Console.WriteLine("Loading Npc's..."); modDatabase.LoadNpcs();
     Console.WriteLine("Loading Resources..."); S_Resources.LoadResources();
     Console.WriteLine("Loading Shops..."); modDatabase.LoadShops();
     Console.WriteLine("Loading Skills..."); modDatabase.LoadSkills();
     Console.WriteLine("Loading Animations..."); S_Animations.LoadAnimations();
     Console.WriteLine("Loading Quests..."); S_Quest.LoadQuests();
     Console.WriteLine("Loading House Configurations..."); S_Housing.LoadHouses();
     Console.WriteLine("Loading Switches..."); S_Events.LoadSwitches();
     Console.WriteLine("Loading Variables..."); S_Events.LoadVariables();
     Console.WriteLine("Spawning global events..."); S_EventLogic.SpawnAllMapGlobalEvents();
     Console.WriteLine("Loading projectiles..."); S_Projectiles.LoadProjectiles();
     Console.WriteLine("Loading Recipes..."); modCrafting.LoadRecipes();
     Console.WriteLine("Loading Pets..."); S_Pets.LoadPets();
     Console.ResetColor();
 }
Esempio n. 2
0
 private static void LoadGameData()
 {
     Console.WriteLine("Loading Classes..."); modDatabase.LoadClasses();
     Console.WriteLine("Loading Maps..."); modDatabase.LoadMaps();
     Console.WriteLine("Loading Items..."); S_Items.LoadItems();
     Console.WriteLine("Loading Npc's..."); modDatabase.LoadNpcs();
     Console.WriteLine("Loading Resources..."); S_Resources.LoadResources();
     Console.WriteLine("Loading Shops..."); modDatabase.LoadShops();
     Console.WriteLine("Loading Skills..."); modDatabase.LoadSkills();
     Console.WriteLine("Loading Animations..."); S_Animations.LoadAnimations();
     Console.WriteLine("Loading Quests..."); S_Quest.LoadQuests();
     Console.WriteLine("Loading House Configurations..."); S_Housing.LoadHouses();
     Console.WriteLine("Loading Switches..."); S_Events.LoadSwitches();
     Console.WriteLine("Loading Variables..."); S_Events.LoadVariables();
     Console.WriteLine("Spawning global events..."); S_EventLogic.SpawnAllMapGlobalEvents();
     Console.WriteLine("Loading projectiles..."); S_Projectiles.LoadProjectiles();
     Console.WriteLine("Loading Recipes..."); modCrafting.LoadRecipes();
     Console.WriteLine("Loading Pets..."); S_Pets.LoadPets();
 }
Esempio n. 3
0
        public static void SaveHouse(int index)
        {
            XmlClass myXml = new XmlClass
            {
                Filename = Path.Combine(Application.StartupPath, "data", "houseconfig.xml"),
                Root     = "Config"
            };

            myXml.LoadXml();
            if (index > 0 && index <= S_Housing.MAX_HOUSES)
            {
                myXml.WriteString("House" + Conversions.ToString(index), "BaseMap", Conversions.ToString(S_Housing.HouseConfig[index].BaseMap));
                myXml.WriteString("House" + Conversions.ToString(index), "Name", S_Housing.HouseConfig[index].ConfigName);
                myXml.WriteString("House" + Conversions.ToString(index), "MaxFurniture", Conversions.ToString(S_Housing.HouseConfig[index].MaxFurniture));
                myXml.WriteString("House" + Conversions.ToString(index), "Price", Conversions.ToString(S_Housing.HouseConfig[index].Price));
                myXml.WriteString("House" + Conversions.ToString(index), "X", Conversions.ToString(S_Housing.HouseConfig[index].X));
                myXml.WriteString("House" + Conversions.ToString(index), "Y", Conversions.ToString(S_Housing.HouseConfig[index].Y));
            }
            myXml.CloseXml(true);
            S_Housing.LoadHouses();
        }