Exemple #1
0
        public void SaveToDB()
        {
            feat myFeat = feat.All().FirstOrDefault(x => x.id == _id);

            myFeat.description      = _description;
            myFeat.grantsarmour     = _grantsarmour;
            myFeat.grantsbody       = _grantsbody;
            myFeat.grantsmana       = _grantsmana;
            myFeat.maxtimes         = _maxtimes;
            myFeat.name             = _name;
            myFeat.prerequisiterace = _prerequisiterace;
            myFeat.prerequisites    = _prerequisites;

            myFeat.Save();
        }
Exemple #2
0
        private static Feat MakeFeatFromDBFeat(feat inFeat)
        {
            Feat myFeat = new Feat();

            myFeat.Description      = inFeat.description;
            myFeat.FeatID           = inFeat.id;
            myFeat.GrantsArmour     = inFeat.grantsarmour;
            myFeat.GrantsBody       = inFeat.grantsbody;
            myFeat.GrantsMana       = inFeat.grantsmana;
            myFeat.MaxTimes         = inFeat.maxtimes;
            myFeat.Name             = inFeat.name;
            myFeat.PrerequisiteRace = inFeat.prerequisiterace;
            myFeat.PreRequisites    = inFeat.prerequisites;

            return(myFeat);
        }
Exemple #3
0
        public static Feat GetFeatByID(int id)
        {
            feat myFeat = feat.All().FirstOrDefault(x => x.id == id);

            return(MakeFeatFromDBFeat(myFeat));
        }