示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="configPath"></param>
        public void Start(string configPath)
        {
            ConfigurationManager = new ConfigurationManager();
            ConfigurationManager.RegisterAttributes();
            ConfigurationManager.Add(new JsonConfigurationProvider(configPath), true);
            ConfigurationManager.Load();

            CommandManager = new CommandManager <WorldCommandContext>();
            CommandManager.RegisterCommands();

            AddUpdatable(Dispatcher = new MessageDispatcher());
            AddUpdatable(RPCManager.Instance);

            AddTimer(WorldConfig.WORLD_SAVE_INTERVAL, SaveWorld);
            AddTimer(WorldConfig.WEB_PLAYERS_CONNECTED_UPDATE_INTERVAL, UpdateOnlinePlayers);

            Crypt.GenerateNetworkKey();
            WorldDbMgr.Instance.Initialize();
            QuestManager.Instance.Initialize();
            InteractiveObjectManager.Instance.Initialize();
            JobManager.Instance.Initialize();
            ClientManager.Instance.Initialize();
            SpellManager.Instance.Initialize();
            AuctionHouseManager.Instance.Initialize();
            AreaManager.Instance.Initialize();
            NpcManager.Instance.Initialize();
            SpawnManager.Instance.Initialize();
            PaddockManager.Instance.Initialize();
            MapManager.Instance.Initialize();
            GuildManager.Instance.Initialize();
            EntityManager.Instance.Initialize();
            RPCManager.Instance.Initialize();

            Start(WorldConfig.WORLD_SERVICE_IP, WorldConfig.WORLD_SERVICE_PORT);
        }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="configPath"></param>
        public void Start(string configPath)
        {
            ConfigurationManager = new ConfigurationManager();
            ConfigurationManager.RegisterAttributes();
            ConfigurationManager.Add(new JsonConfigurationProvider(configPath), true);
            ConfigurationManager.Load();

            Crypt.GenerateNetworkKey();
            AuthDbMgr.Instance.Initialize();
            AuthRPCService.Instance.Start();

            base.AddTimer(60000, UpdateAuth);

            base.Start(AuthServiceIP, AuthServicePort);
        }
示例#3
0
        static void Main()
        {
            XmlConfigurator.Configure();

            Processor.Start();

            var configManager = new ConfigurationManager();

            configManager.RegisterAttributes();
            configManager.Add(new JsonConfigurationProvider(CONFIG_PATH), true);
            configManager.Load();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm());
        }
示例#4
0
 /// <summary>
 /// Initialize configurations by loading the config.json file in ~/app_data/.
 /// </summary>
 public void Initialize(HttpServerUtility server)
 {
     m_configMgr.Add(new JsonConfigurationProvider(server.MapPath(CONFIG_PATH)), true);
     m_configMgr.Load();
 }
示例#5
0
        //place order

        public void PlaceOrder(Vegetable vegetable)
        {
            _inventoryManager.Add(vegetable, _defaultOrderQuantity);
        }