protected override void Setup() { base.Setup(); // setting up the character database this.CharacterDatabase = new DatabaseFactory("CharacterDB"); this.CharacterDatabase.Initialize(); // setting up the world database this.WorldDatabase = new DatabaseFactory("WorldDB"); this.WorldDatabase.Initialize(); // setting up the item database this.ItemDatabase = new DatabaseFactory("ItemDB"); this.ItemDatabase.Initialize(); // registering custom types with the serializer TypeSerializer.RegisterType(CustomTypeCode.ItemStructure); TypeSerializer.RegisterType(CustomTypeCode.ContainerItemStructure); TypeSerializer.RegisterType(CustomTypeCode.ActionItemStructure); TypeSerializer.RegisterType(CustomTypeCode.SlotItemStructure); TypeSerializer.RegisterType(CustomTypeCode.MenuItemStructure); TypeSerializer.RegisterType(CustomTypeCode.ActiveQuestStructure); TypeSerializer.RegisterType(CustomTypeCode.QuestProgressStructure); //this.counterPublisher.AddCounter(PhotonCounter.EventSentCount, "EventSentCounter"); //this.counterPublisher.AddCounter(PhotonCounter.EventSentPerSec, "EventSentPerSecCounter"); //this.counterPublisher.AddCounter(PhotonCounter.OperationReceiveCount, "OperationReceiveCounter"); //this.counterPublisher.AddCounter(PhotonCounter.OperationReceivePerSec, "OperationReceivePerSecCounter"); //this.counterPublisher.AddCounter(CpuUsageCounterReader.Instance, "CpuUsage"); //this.counterPublisher.Start(); }
/// <summary> /// Sets up logging and connects to the master server /// </summary> protected override void Setup() { Instance = this; TypeSerializer.RegisterType(CustomTypeCode.Guid); this.SetupLogging(); this.ConnectToMaster(this.MasterIPEndPoint); AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; }
protected override void Setup() { base.Setup(); this.userDatabase = new DatabaseFactory("UserDB"); this.userDatabase.Initialize(); this.characterDatabase = new DatabaseFactory("CharacterDB"); this.characterDatabase.Initialize(); TypeSerializer.RegisterType(CustomTypeCode.CharacterStructure); }
protected override void Setup() { base.Setup(); // setting up the character database this.CharacterDatabase = new DatabaseFactory("CharacterDB"); this.CharacterDatabase.Initialize(); // registering custom types with the serializer TypeSerializer.RegisterType(CustomTypeCode.ProfileStructure); TypeSerializer.RegisterType(CustomTypeCode.GroupStructure); TypeSerializer.RegisterType(CustomTypeCode.GroupMemberStructure); }
protected override void Setup() { // this will let us send raw bytes Protocol.AllowRawCustomValues = true; // init the settings this.Settings = ServerConfig.Initialize(this.BinaryPath); this.MasterLobby = new Lobby(); // register custom types TypeSerializer.RegisterType(CustomTypeCode.Guid); // setup logging this.SetupLogging(); // log any unhandled exception AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; if (Logger.IsDebugEnabled) { Logger.DebugFormat("(:> ********** <:) MasterServer Started > {0} (:> ********** <:)", DateTime.Now); } }