示例#1
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);
        }
示例#2
0
        public void Add(Feat myFeat)
        {
            if (_parentcharacterid == -1)
            {
                throw new Exception("No Parent Character ID set");
            }
            else
            {
                _feats.Add(myFeat);

                characterfeat myLink = new characterfeat();
                myLink.featid      = myFeat.FeatID;
                myLink.characterid = _parentcharacterid;
                myLink.Save();
            }
        }