Пример #1
0
        public void Initialize()
        {
            GameData = new EmbeddedData();

            //LootSerialization.PopulateLoot();

            Behaviors = new BehaviorDb(this);

            Player.HandleQuests(GameData);

            Merchant.HandleMerchant(GameData);

            AddWorld((int)WorldID.NEXUS_ID, Worlds[0] = new Nexus());
            AddWorld((int)WorldID.MARKET, new ClothBazaar());
            AddWorld((int)WorldID.TEST_ID, new Test());
            AddWorld((int)WorldID.TUT_ID, new Tutorial(true));
            AddWorld((int)WorldID.DAILY_QUEST_ID, new DailyQuestRoom());

            Monitor = new RealmPortalMonitor(this);

            Task.Factory.StartNew(() => GameWorld.AutoName(1, true)).ContinueWith(_ => AddWorld(_.Result), TaskScheduler.Default);

            InterServer = new ISManager(this);

            Chat = new ChatManager(this);

            Commands = new CommandManager(this);

            NPCs npcs = new NPCs();

            npcs.Initialize(this);

            Log.Info($"\t- {NPCs.Database.Count}\tNPC{(NPCs.Database.Count > 1 ? "s" : "")}.");
        }