Beispiel #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.");
            }

            var shardDb = new ShardDatabase();

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

            shardDb.Exists(true);
        }
Beispiel #2
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;
        }
Beispiel #4
0
 internal SerializedShardDatabase(ShardDatabase shardDatabase)
 {
     BaseDatabase = shardDatabase;
 }
Beispiel #5
0
 internal SerializedShardDatabase(ShardDatabase shardDatabase)
 {
     _wrappedDatabase = shardDatabase;
 }
Beispiel #6
0
 internal SerializedShardDatabase(ShardDatabase shardDatabase)
 {
     _wrappedDatabase = shardDatabase;
     Config           = new ShardPropertyTables();
 }