示例#1
0
        /// <summary>
        /// Loads the world events.
        /// </summary>
        /// <returns></returns>
        public static bool LoadAll()
        {
            if (!Loaded)
            {
                ContentMgr.Load <WorldEvent>();
                ContentMgr.Load <WorldEventNpcData>();
                ContentMgr.Load <WorldEventQuest>();
                Loaded         = true;
                LastUpdateTime = DateTime.Now;

                Log.Debug("{0} World Events loaded.", _eventCount);

                // Add the Update method to the world task queue
                World.TaskQueue.CallPeriodically(10000, Update);
            }
            return(true);
        }
示例#2
0
        /// <summary>
        /// Loads the quest templates.
        /// </summary>
        /// <returns></returns>
        public static bool LoadAll()
        {
            if (!Loaded)
            {
                new DBCReader <QuestXpConverter>(RealmServerConfiguration.GetDBCFile(WCellConstants.DBC_QUESTXP));
                new DBCReader <QuestRewRepConverter>(RealmServerConfiguration.GetDBCFile(WCellConstants.DBC_QUESTFACTIONREWARD));
                new DBCReader <QuestHonorInfoConverter>(RealmServerConfiguration.GetDBCFile(WCellConstants.DBC_TEAMCONTRIBUTIONPOINTS));
                Templates = new QuestTemplate[30000];

                ContentMgr.Load <QuestTemplate>();
                ContentMgr.Load <QuestPOI>();
                ContentMgr.Load <QuestPOIPoints>();
                CreateQuestRelationGraph();

                EnsureCharacterQuestsLoaded();
                AddSpellCastObjectives();

                // add Item quest starters & add collect quests to corresponding items
                if (ItemMgr.Loaded)
                {
                    ItemMgr.EnsureItemQuestRelations();
                }

                // add items to list of provided items
                foreach (var qTempl in Templates)
                {
                    if (qTempl != null)
                    {
                        var itemTempl = ItemMgr.GetTemplate(qTempl.SrcItemId);
                        if (itemTempl != null && qTempl.SrcItemId != 0 && !qTempl.Starters.Contains(itemTempl))
                        {
                            qTempl.ProvidedItems.Add(new ItemStackDescription(qTempl.SrcItemId, 1));
                        }
                    }
                }

                Loaded = true;

                log.Debug("{0} Quests loaded.", _questCount);
            }
            return(true);
        }
示例#3
0
 public static void OnlyLoadSpawns(bool force)
 {
     if (spawnsLoaded && !force)
     {
         return;
     }
     if (force)
     {
         SpawnPoolTemplates.Clear();
         foreach (var npcSpawnPoolTemplate in SpawnPoolsByMap)
         {
             if (npcSpawnPoolTemplate != null)
             {
                 npcSpawnPoolTemplate.Clear();
             }
         }
     }
     ContentMgr.Load <NPCSpawnEntry>(force);
     SpawnsLoaded = true;
 }
示例#4
0
        public static void OnlyLoadSpawns(bool force)
        {
            if (NPCMgr.spawnsLoaded && !force)
            {
                return;
            }
            if (force)
            {
                NPCMgr.SpawnPoolTemplates.Clear();
                foreach (List <NPCSpawnPoolTemplate> spawnPoolsBy in NPCMgr.SpawnPoolsByMap)
                {
                    if (spawnPoolsBy != null)
                    {
                        spawnPoolsBy.Clear();
                    }
                }
            }

            ContentMgr.Load <NPCSpawnEntry>(force);
            NPCMgr.SpawnsLoaded = true;
        }
示例#5
0
        public static void LoadEntries(bool force)
        {
            if (!force)
            {
                if (NPCMgr.entriesLoaded)
                {
                    return;
                }
            }

            try
            {
                NPCMgr.Loading = true;
                FactionMgr.Initialize();
                ContentMgr.Load <NPCEntry>(force);
                NPCMgr.EntriesLoaded = true;
            }
            finally
            {
                NPCMgr.Loading = false;
            }
        }
示例#6
0
        public static void LoadAll()
        {
            if (!Loaded)
            {
                //ContentHandler.Load<ItemRandomSuffixInfo>();
                ContentMgr.Load <ItemTemplate>();
                ContentMgr.Load <ItemRandomEnchantEntry>();

                OnLoaded();

                foreach (var templ in Templates)
                {
                    if (templ != null)
                    {
                        templ.InitializeTemplate();
                    }
                }

                TruncSets();

                if (ArchetypeMgr.Loaded)
                {
                    ArchetypeMgr.LoadItems();
                }

                SpellHandler.InitTools();
                LoadItemCharRelations();

                AuctionMgr.Instance.LoadItems();

                if (QuestMgr.Loaded)
                {
                    EnsureItemQuestRelations();
                }

                RealmServer.InitMgr.SignalGlobalMgrReady(typeof(ItemMgr));
                Loaded = true;
            }
        }
示例#7
0
        public static void Initialize()
        {
            if (!loaded)
            {
                InitClasses();
                InitRaces();
                ContentMgr.Load <ClassLevelSetting>();
                ContentMgr.Load <Archetype>();

                ContentMgr.Load <PlayerSpellEntry>();
                //ContentHandler.Load<PlayerSkillEntry>();
                ContentMgr.Load <PlayerActionButtonEntry>();
                ContentMgr.Load <LevelStatInfo>();

                if (ItemMgr.Loaded)
                {
                    LoadItems();
                }

                for (var i = 0; i < SpellLines.SpellLinesByClass.Length; i++)
                {
                    var lines = SpellLines.SpellLinesByClass[i];
                    if (lines == null)
                    {
                        continue;
                    }

                    var clss = GetClass((ClassId)i);
                    if (clss != null)
                    {
                        clss.SpellLines = lines;
                    }
                }

                loaded = true;
            }
        }
示例#8
0
        /// <summary>
        /// sets up content manager and spritebatch to be used in every screen
        /// load all content
        /// </summary>
        protected override void LoadContent()
        {
            GraphicsDeviceMgr.ToggleFullScreen();


            //reset event log
            File.Create("Logs/ScreenEventLog.txt").Close();
            //log that the game has started
            LogScreenEvent("GAME STARTED");

            Camera.Position = new Vector2(0, 0);

            oldState = Keyboard.GetState();
            newState = Keyboard.GetState();

            ContentMgr  = Content;
            SpriteBatch = new SpriteBatch(GraphicsDevice);


            //load any assets to be used in all screens

            ExtraSmallFont = ContentMgr.Load <SpriteFont>("Fonts/ExtraSmallFont");
            SmallFont      = ContentMgr.Load <SpriteFont>("Fonts/SmallFont");
            MediumFont     = ContentMgr.Load <SpriteFont>("Fonts/MediumFont");
            LargeFont      = ContentMgr.Load <SpriteFont>("Fonts/LargeFont");

            LoadLighting();

            base.LoadContent();


            AddScreen(new DefaultScreen());            //this empty screen needs to always be on the bottom
            //FIRST LOADED SCREEN
            AddScreen(new CogThoughtSplashScreen());
            //AddScreen(new CogThoughtSpashScreen());
            //FIRST LOADED SCREEN
        }
示例#9
0
        public static void LoadAll()
        {
            if (LootMgr.Loaded)
            {
                return;
            }
            ContentMgr.Load <NPCLootItemEntry>();
            ContentMgr.Load <ItemLootItemEntry>();
            ContentMgr.Load <GOLootItemEntry>();
            ContentMgr.Load <FishingLootItemEntry>();
            ContentMgr.Load <MillingLootItemEntry>();
            ContentMgr.Load <PickPocketLootItemEntry>();
            ContentMgr.Load <ProspectingLootItemEntry>();
            ContentMgr.Load <DisenchantingLootItemEntry>();
            ContentMgr.Load <ReferenceLootItemEntry>();
            for (int index = LootMgr.ReferenceEntries.Count - 1; index >= 0; --index)
            {
                KeyValuePair <ResolvedLootItemList, LootItemEntry> referenceEntry = LootMgr.ReferenceEntries[index];
                referenceEntry.Key.Remove((LootEntity)referenceEntry.Value);
                LootMgr.LookupRef(referenceEntry.Key, referenceEntry.Value);
            }

            LootMgr.Loaded = true;
        }
示例#10
0
        public static void LoadAll()
        {
            if (!Loaded)
            {
                ContentMgr.Load <NPCLootItemEntry>();
                ContentMgr.Load <ItemLootItemEntry>();
                ContentMgr.Load <GOLootItemEntry>();
                ContentMgr.Load <FishingLootItemEntry>();
                ContentMgr.Load <MillingLootItemEntry>();
                ContentMgr.Load <PickPocketLootItemEntry>();
                ContentMgr.Load <ProspectingLootItemEntry>();
                ContentMgr.Load <DisenchantingLootItemEntry>();
                ContentMgr.Load <ReferenceLootItemEntry>();

                for (var i = ReferenceEntries.Count - 1; i >= 0; i--)
                {
                    var pair = ReferenceEntries[i];
                    pair.Key.Remove(pair.Value);
                    LookupRef(pair.Key, pair.Value);
                }

                Loaded = true;
            }
        }
示例#11
0
 public static void Init()
 {
     ContentMgr.Load <HairTableRecord>();
     ContentMgr.Load <FaceTableRecord>();
 }
示例#12
0
 public override void Process(CmdTrigger <RealmServerCmdArgs> trigger)
 {
     ContentMgr.Load <Asda2BossSummonRecord>(true);
 }
示例#13
0
 public static void Init()
 {
     ContentMgr.Load <MountTemplate>();
 }
示例#14
0
 public static void Init()
 {
     ContentMgr.Load <PerlevelItemBonusTemplate>();
     ContentMgr.Load <PerlevelItemBonusTemplateItem>();
 }
示例#15
0
 public static void InitEntries()
 {
     ContentMgr.Load <PetTemplate>();
     ContentMgr.Load <PetExpTableRecord>();
     ContentMgr.Load <PetOptionValueRecord>();
 }
示例#16
0
 public static void Init()
 {
     ContentMgr.Load <MineTableRecord>();
 }
示例#17
0
 public static void EnsureGOQuestRelationsLoaded()
 {
     ContentMgr.Load <GOQuestGiverRelation>();
 }
示例#18
0
 private static void LoadVendors(bool force)
 {
     NPCMgr.LoadItemExtendedCostEntries();
     ContentMgr.Load <VendorItemEntry>(force);
 }
示例#19
0
 public static void Initialize()
 {
     ContentMgr.Load <LevelXp>();
 }
示例#20
0
 public static void InitAITexts()
 {
     ContentMgr.Load <NPCAiText>();
 }
示例#21
0
 private static void LoadTrainers(bool force)
 {
     ContentMgr.Load <TrainerSpellEntry>(force);
 }
示例#22
0
		public static void InitEntries()
		{
			ContentMgr.Load<PetLevelStatInfo>();
		}
示例#23
0
 public static void LoadAll()
 {
     ContentMgr.Load <Asda2NPCLootItemEntry>(true);
     Asda2LootMgr.Loaded = true;
 }
示例#24
0
 public static void InitAchievements()
 {
     ContentMgr.Load <Asda2TitleTemplate>();
 }
示例#25
0
 public static void InitializeSpawnMgr()
 {
     ContentMgr.Load <SpawnPoolTemplateEntry>();
 }
示例#26
0
 public static void EnsureNPCRelationsLoaded()
 {
     ContentMgr.Load <NPCQuestGiverRelation>();
 }
示例#27
0
 public static void LoadEntries()
 {
     ContentMgr.Load <StaticGossipEntry>();
 }
示例#28
0
 public override void Process(CmdTrigger <RealmServerCmdArgs> trigger)
 {
     trigger.Reply("Loading content-mapping information...");
     ContentMgr.Load();
     trigger.Reply("Done.");
 }
示例#29
0
 public static void Init()
 {
     ContentMgr.Load <Asda2RecipeTemplate>();
 }
示例#30
0
 public static void LoadWaypoints(bool force)
 {
     ContentMgr.Load <WaypointEntry>(force);
 }