public static FeatList RetrieveFeatsForCharacter(int characterid) { FeatList myFeats = new FeatList(); myFeats.ParentCharacterID = characterid; foreach (characterfeat myCharacterFeat in characterfeat.All().Where(x => x.characterid == characterid)) { myFeats.List.Add(Feat.GetFeatByID(myCharacterFeat.featid)); } return(myFeats); }
public static Character GetCharacterByID(int characterid) { character dbCharacter = character.All().FirstOrDefault(x => x.id == characterid); if (dbCharacter != null) { Character myCharacter = MakeCharacterFromDBCharacter(dbCharacter); myCharacter.Feats.SetFeatList(FeatList.RetrieveFeatsForCharacter(characterid)); myCharacter.Lammies.SetLammyList(LammyList.RetrieveLammiesForCharacterID(characterid)); return(myCharacter); } else { return(null); } }
public void SetFeatList(FeatList myList) { _feats = myList.List; }
public Character() { _lammies = new LammyList(); _feats = new FeatList(); }