Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
            }
        }
Esempio n. 3
0
 public void SetFeatList(FeatList myList)
 {
     _feats = myList.List;
 }
Esempio n. 4
0
 public Character()
 {
     _lammies = new LammyList();
     _feats   = new FeatList();
 }