Ejemplo n.º 1
0
        public static void WriteAll()
        {
            DBSetup.Initialize();
            World.EnsureMapDataLoaded();
            SpellHandler.Initialize();
            FactionMgr.Initialize();
            SkillHandler.Initialize();
            TalentMgr.Initialize();

            WriteZoneEnum();
            WriteMapEnum();
            WriteSkillEnums();
            WriteRangeEnum();
            WriteFactionEnums();
            WriteSpellFocusEnum();
            WriteSpellId();
            WriteSpellMechanicEnum();
            WriteTalentEnums();
            WriteItemId();
            WriteItemSetId();
            WriteNpcId();
            WriteGOEntryId();
            WriteRealmCategory();

            NPCMgr.ForceInitialize();
            WriteRideEnum();
        }
Ejemplo n.º 2
0
 public static void WriteNpcId()
 {
     SpellHandler.Initialize();
     FactionMgr.Initialize();
     NPCMgr.ForceInitialize();
     WriteEnum("NPCId", "NPCs", NPCMgr.Prototypes, false,
               (item) => { return(item.Entry != null); },
               (item) => {
         return(item.Entry.Name);
     },
               prototype => {
         var strs = new List <string>();
         if (prototype.Entry.Title.Length > 0)
         {
             strs.Add("Title: " + prototype.Entry.Title);
         }
         if (prototype.MinLevel > 0)
         {
             strs.Add("Level: " + prototype.MinLevel + (prototype.MaxLevel != prototype.MinLevel ? " - " + prototype.MaxLevel : ""));
         }
         if (prototype.DefaultFaction != null)
         {
             strs.Add("Faction: " + prototype.DefaultFaction);
         }
         if (prototype.Entry.Rank != CreatureRank.Normal)
         {
             strs.Add("Rank: " + prototype.Entry.Rank + (prototype.Entry.IsLeader ? " (Leader)" : ""));
         }
         else if (prototype.Entry.IsLeader)
         {
             strs.Add("Leader");
         }
         if (prototype.Entry.Spells != null && prototype.Entry.Spells.Length > 0)
         {
             strs.Add("Spells: " + prototype.Entry.Spells.ToString(", "));
         }
         if (prototype.Auras != null && prototype.Auras.Length > 0)
         {
             strs.Add("Auras: " + prototype.Auras.ToString(", "));
         }
         return(strs.ToString("\n"));
     },
               (item, name) => null,
               (item) => { return(item.Entry.Id.ToString()); });
 }
Ejemplo n.º 3
0
        public static void Startup()
        {
            Utility.Measure("Basic startup sequence", 1, () => {
                RealmServer.RealmServer.Instance.Start();
                NPCMgr.ForceInitialize();

                Region.AutoSpawn = true;

                var easternKD = WorldMgr.GetRegion(MapId.EasternKingdoms);
                var kalimdor  = WorldMgr.GetRegion(MapId.Kalimdor);
                var outlands  = WorldMgr.GetRegion(MapId.Outland);
                Utility.Measure("Spawning Main Maps", 1, () => {
                    //easternKD.Start();
                    //kalimdor.Start();
                });


                GC.Collect();
                Console.WriteLine("Total memory usage with fully spawned world: {0}", GC.GetTotalMemory(true));
            });
        }