public Player(Client client)
            : base(client.Manager, (ushort)client.Character.ObjectType, client.Random)
        {
            this.client = client;
            statsMgr    = new StatsManager(this, client.Random.CurrentSeed);
            Name        = client.Account.Name;
            AccountId   = client.Account.AccountId;

            Name           = client.Account.Name;
            Level          = client.Character.Level;
            Experience     = client.Character.Exp;
            ExperienceGoal = GetExpGoal(client.Character.Level);
            Stars          = GetStars();
            Texture1       = client.Character.Tex1;
            Texture2       = client.Character.Tex2;
            Effect         = client.Character.Effect;
            XmlEffect      = "";
            Skin           = client.Character.Skin;
            PermaSkin      = client.Character.PermaSkin != 0;
            XpBoost        = client.Character.XpBoost;
            Credits        = client.Account.Credits;
            Silver         = client.Account.Silver;
            UnlockedMoods  = client.Account.UnlockedMoods;
            NameChosen     = client.Account.NameChosen;
            CurrentFame    = client.Account.Stats.Fame;
            Fame           = client.Character.CurrentFame;
            ClassStats state = client.Account.Stats.ClassStates.SingleOrDefault(_ => _.ObjectType == ObjectType);

            FameGoal      = GetFameGoal(state?.BestFame ?? 0);
            CameraOffsetX = CameraOffsetY = 0;
            CameraX       = CameraY = 0;
            CameraRot     = 0;
            FixedCamera   = FixedCameraRot = false;
            CameraUpdate  = false;
            warpUses      = 0;

            Locked  = client.Account.Locked ?? new List <int>();
            Ignored = client.Account.Ignored ?? new List <int>();

            Glowing = -1;
            Manager.Data.AddDatabaseOperation(db => //We dont need to await here
            {
                if (db.IsUserInLegends(AccountId))
                {
                    Glowing = 0xFF0000;
                }
                if (client.Account.Admin)
                {
                    Glowing = 0xFF00FF;
                }
            });
            Guild            = client.Account.Guild.Name;
            GuildRank        = client.Account.Guild.Rank;
            HP               = client.Character.HitPoints;
            MP               = client.Character.MagicPoints;
            Floors           = client.Character.Floors;
            ConditionEffects = 0;
            OxygenBar        = 100;

            Party = Party.GetParty(this);
            if (Party != null)
            {
                if (Party.Leader.AccountId == AccountId)
                {
                    Party.Leader = this;
                }
                else
                {
                    Party.Members.Add(this);
                }
            }

            if (HP <= 0)
            {
                HP = client.Character.MaxHitPoints;
            }

            Inventory = new Inventory(this,
                                      client.Character.Equipment
                                      .Select(_ => _ == 0xffff ? null : client.Manager.GameData.Items[_])
                                      .ToArray(),
                                      client.Character.EquipData);
            Inventory.InventoryChanged += (sender, e) => CalculateBoost();
            SlotTypes =
                Utils.FromCommaSepString32(
                    client.Manager.GameData.ObjectTypeToElement[ObjectType].Element("SlotTypes").Value);
            Stats = new[]
            {
                client.Character.MaxHitPoints,
                client.Character.MaxMagicPoints,
                client.Character.Attack,
                client.Character.Defense,
                client.Character.Speed,
                client.Character.Vitality,
                client.Character.Wisdom,
                client.Character.Dexterity,
                client.Character.Aptitude,
                client.Character.Resilience,
                client.Character.Penetration
            };
            CalculateBoost();
            Pet = null;

            for (int i = 0; i < SlotTypes.Length; i++)
            {
                if (SlotTypes[i] == 0)
                {
                    SlotTypes[i] = 10;
                }
            }

            Ability = new Ability[3] {
                null, null, null
            };
            CacheAbilities  = Ability;
            CacheAP         = 0;
            AbilityCooldown = new int[3] {
                3, 3, 3
            };
            AbilityActiveDurations = new int[3] {
                0, 0, 0
            };
            AbilityToggle = new bool[3] {
                false, false, false
            };
            AbilityToggleVar = 0;
            Specialization   = client.Character.Specialization;

            UpdateAbilities();

            Mood = client.Character.Mood;

            MaxLevel = client.Character.MaxLevel;

            AddRecipes();

            // "default_" is default and all the rest are normal.
            // red, orange, yellow, green, blue.
            if (/*criteria*/ false)
            {
                ChatBubbleColour = "purple";
            }
            else
            {
                ChatBubbleColour = "default_";
            }
        }