示例#1
0
        public static LammyList RetrieveLammiesForCharacterID(int characterid)
        {
            LammyList myLammyList = new LammyList();

            myLammyList.ParentCharacterID = characterid;

            foreach (characterlammy lammyLink in characterlammy.All().Where(x => x.characterid == characterid))
            {
                myLammyList.List.Add(Lammy.GetLammyByID(lammyLink.lammyid));
            }

            return(myLammyList);
        }
示例#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);
            }
        }
示例#3
0
 public void SetLammyList(LammyList myList)
 {
     _lammies = myList.List;
 }
示例#4
0
 public Character()
 {
     _lammies = new LammyList();
     _feats   = new FeatList();
 }