Example #1
0
        public static void Initialize(bool autoRetry = true)
        {
            Authentication.Exists(true);

            if (Authentication.GetListofAccountsByAccessLevel(ACE.Entity.Enum.AccessLevel.Admin).Count == 0)
            {
                log.Warn("Database does not contain any admin accounts. The next account to be created will automatically be promoted to an Admin account.");
                AutoPromoteNextAccountToAdmin = true;
            }
            else
            {
                AutoPromoteNextAccountToAdmin = false;
            }

            World.Exists(true);

            var playerWeenieLoadTest = World.GetCachedWeenie("human");

            if (playerWeenieLoadTest == null)
            {
                log.Fatal("Database does not contain the weenie for human (1). Characters cannot be created or logged into until the missing weenie is restored.");
            }

            // By default, we hold on to player biotas a little bit longer to help with offline updates like pass-up xp, allegiance updates, etc...
            var shardDb = new ShardDatabaseWithCaching(TimeSpan.FromMinutes(31), TimeSpan.FromMinutes(11));

            serializedShardDb = new SerializedShardDatabase(shardDb);
            Shard             = serializedShardDb;

            shardDb.Exists(true);
        }
Example #2
0
        public static void Initialize(bool autoRetry = true)
        {
            Authentication.Exists(true);

            if (Authentication.GetListofAccountsByAccessLevel(ACE.Entity.Enum.AccessLevel.Admin).Count == 0)
            {
                log.Warn("Database does not contain any admin accounts. The next account to be created will automatically be promoted to an Admin account.");
                AutoPromoteNextAccountToAdmin = true;
            }
            else
            {
                AutoPromoteNextAccountToAdmin = false;
            }

            World.Exists(true);

            var playerWeenieLoadTest = World.GetCachedWeenie("human");

            if (playerWeenieLoadTest == null)
            {
                log.Fatal("Database does not contain the weenie for human (1). Characters cannot be created or logged into until the missing weenie is restored.");
            }

            var shardDb = new ShardDatabase();

            serializedShardDb = new SerializedShardDatabase(shardDb);
            Shard             = serializedShardDb;

            shardDb.Exists(true);
        }
Example #3
0
        public static void Initialize(bool autoRetry = true)
        {
            Authentication.Exists(true);
            World.Exists(true);

            var shardDb = new ShardDatabase();

            serializedShardDb = new SerializedShardDatabase(shardDb);
            Shard             = serializedShardDb;

            shardDb.Exists(true);

            var playerWeenieLoadTest = World.GetCachedWeenie("human");

            if (playerWeenieLoadTest == null)
            {
                log.Fatal($"Database does not contain the weenie for human (1). Characters cannot be created or logged into until the missing weenie is restored.");
            }
        }
        public static void Initialize(bool autoRetry = true)
        {
            var config = ConfigManager.Config.MySql;

            Authentication.Initialize(config.Authentication.Host, config.Authentication.Port, config.Authentication.Username, config.Authentication.Password, config.Authentication.Database, autoRetry);

            var worldDb = new WorldDatabase();

            worldDb.Initialize(config.World.Host, config.World.Port, config.World.Username, config.World.Password, config.World.Database, autoRetry);
            var cachingWorldDb = new CachingWorldDatabase(worldDb);

            World = cachingWorldDb;

            var shardDb = new ShardDatabase();

            shardDb.Initialize(config.Shard.Host, config.Shard.Port, config.Shard.Username, config.Shard.Password, config.Shard.Database, autoRetry);
            serializedShardDb = new SerializedShardDatabase(shardDb);
            Shard             = serializedShardDb;
        }
Example #5
0
        public static void Initialize(bool autoRetry = true)
        {
            Authentication.Exists(true);

            if (Authentication.GetListofAccountsByAccessLevel(ACE.Entity.Enum.AccessLevel.Admin).Count == 0)
            {
                log.Warn("Authentication Database does not contain any admin accounts. The next account to be created will automatically be promoted to an Admin account.");
                AutoPromoteNextAccountToAdmin = true;
            }
            else
            {
                AutoPromoteNextAccountToAdmin = false;
            }

            World.Exists(true);

            if (!World.IsWorldDatabaseGuidRangeValid())
            {
                log.Fatal("World Database contains instance GUIDs outside of static range which will prevent GuidManager from properly assigning GUIDs and can result in GUID exhaustion prematurely.");
                InitializationFailure = true;
                return;
            }

            var playerWeenieLoadTest = World.GetCachedWeenie("human");

            if (playerWeenieLoadTest == null)
            {
                log.Fatal("World Database does not contain the weenie for human (1). Characters cannot be created or logged into until the missing weenie is restored.");
                InitializationFailure = true;
                return;
            }

            // By default, we hold on to player biotas a little bit longer to help with offline updates like pass-up xp, allegiance updates, etc...
            var shardDb = new ShardDatabaseWithCaching(TimeSpan.FromMinutes(Common.ConfigManager.Config.Server.ShardPlayerBiotaCacheTime), TimeSpan.FromMinutes(Common.ConfigManager.Config.Server.ShardNonPlayerBiotaCacheTime));

            serializedShardDb = new SerializedShardDatabase(shardDb);
            Shard             = serializedShardDb;

            shardDb.Exists(true);
        }