The user account contains information pertaining to a particular account
コード例 #1
0
ファイル: UserHero.cs プロジェクト: GrindFest/GrindFest
        public UserHero(UserAccount account, int positionX, int positionY, string zoneName, string name)
        {
            Account = account;
            PositionX = positionX;
            PositionY = positionY;
            ZoneName = zoneName;
            Name = name;

            CreationDate = DateTime.UtcNow;
        }
コード例 #2
0
        public bool Authenticate(string username, string password, out UserAccount account)
        {
            using (var context = new GameDatabaseContext())
            {
                account = context.Accounts.FirstOrDefault((a) => a.Username == username);

                if (account == null)
                    return false;
                return account.Password == password;
            }
        }
コード例 #3
0
ファイル: UserHero.cs プロジェクト: gitter-badger/OpenORPG
        public UserHero(UserAccount account, int positionX, int positionY, long id, string name)
        {
            Account = account;
            PositionX = positionX;
            PositionY = positionY;
            ZoneId = id;
            Name = name;

            CreationDate = DateTime.UtcNow;

            Inventory = new List<UserItem>();
            Skills = new List<UserSkill>();
            QuestInfo = new List<UserQuestInfo>();
            Equipment = new List<UserEquipment>();
            Flags = new List<UserFlag>();
        }