Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Battles"/> class.
        /// </summary>
        internal Battles()
        {
            this.Seed = MySQL_Backup.GetSeed("Battles");

            this.Waiting   = new Waiting();
            this.Completed = new ConcurrentDictionary <long, Battle>();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Slots.Accounts"/> class.
        /// </summary>
        internal Accounts()
        {
            this.Seed = Constants.Database == DBMS.Mongo ? Mongo.PlayerSeed : MySQL_Backup.GetSeed("Players");

            this.Homes   = new ConcurrentDictionary <long, Home>();
            this.Players = new ConcurrentDictionary <long, Player>();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Clans"/> class.
        /// </summary>
        internal Clans()
        {
            if (Constants.Database == DBMS.Mongo)
            {
                this.Seed = Mongo.ClanSeed;

                foreach (Core.Database.Models.Mongo.Clans Save in Mongo.Clans.Find(T => true).ToList())
                {
                    if (Save != null)
                    {
                        Alliance Alliance = new Alliance(Save.HighID, Save.LowID);

                        JsonConvert.PopulateObject(Save.Data.ToJson(), Alliance, this.Settings);

                        this.Add(Alliance);
                    }
                }

                Logging.Info(this.GetType(), this.Count + " alliances loaded in-memory.");
            }
            else
            {
                this.Seed = MySQL_Backup.GetSeed("Clans");
                this.GetRange();
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Players"/> class.
 /// </summary>
 internal Players()
 {
     if (Constants.Database == DBMS.Mongo)
     {
         this.Seed = Mongo.PlayerSeed;
     }
     else
     {
         this.Seed = MySQL_Backup.GetSeed("Players");
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Clans"/> class.
 /// </summary>
 internal Clans()
 {
     if (Constants.Database == DBMS.Mongo)
     {
         this.Seed = Mongo.ClanSeed;
     }
     else
     {
         this.Seed = MySQL_Backup.GetSeed("Clans");
         this.GetRange();
     }
 }
Exemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Clans"/> class.
 /// </summary>
 internal Clans()
 {
     this.Seed = MySQL_Backup.GetSeed("Clans") + 1;
     this.GetRange();
 }
Exemplo n.º 7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Clans"/> class.
        /// </summary>
        internal Clans()
        {
            this.Seed = MySQL_Backup.GetClanSeed() + 1;

            this.GetRange();
        }
Exemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Players"/> class.
 /// </summary>
 internal Players()
 {
     this.Seed = MySQL_Backup.GetPlayerSeed() + 1;
 }
Exemplo n.º 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Clans"/> class.
 /// </summary>
 internal Clans()
 {
     this.Seed = Constants.Database == DBMS.Mongo ? Mongo.ClanSeed : MySQL_Backup.GetSeed("Clans");
 }
Exemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Players"/> class.
 /// </summary>
 internal Players()
 {
     this.Seed = Constants.Database == DBMS.Mongo ? Mongo.PlayerSeed : MySQL_Backup.GetSeed("Players");
 }
Exemplo n.º 11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Players"/> class.
 /// </summary>
 internal Players()
 {
     this.Seed = MySQL_Backup.GetSeed("Players") + 1;
 }