/// <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); }
/// <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); }
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()); }
/// <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(); }
//place order public void PlaceOrder(Vegetable vegetable) { _inventoryManager.Add(vegetable, _defaultOrderQuantity); }