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; }
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; } }
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>(); }