Exemplo n.º 1
0
        public void CreateAllBiowareTest()
        {
            // Create a new Human character.
            Character objCharacter = new Character();
            objCharacter.LoadMetatype(Guid.Parse("e28e7075-f635-4c02-937c-e4fc61c51602"));

            TreeNode objNode = new TreeNode();
            List<Weapon> lstWeapons = new List<Weapon>();
            List<TreeNode> lstTreeNodes = new List<TreeNode>();

            GradeList objGradeList = new GradeList();
            objGradeList.LoadList(Improvement.ImprovementSource.Bioware);

            XmlDocument objXmlDocument = XmlManager.Instance.Load("bioware.xml");
            foreach (XmlNode objXmlNode in objXmlDocument.SelectNodes("/chummer/biowares/bioware"))
            {
                Cyberware objCyberware = new Cyberware(objCharacter);
                objCyberware.Create(objXmlNode, objCharacter, objGradeList.GetGrade("Standard"), Improvement.ImprovementSource.Bioware, 1, objNode, lstWeapons, lstTreeNodes);
            }
        }
Exemplo n.º 2
0
        public void CreateAllCyberwareTest()
        {
            // Create a new Human character.
            Character objCharacter = new Character();

            objCharacter.LoadMetatype(Guid.Parse("e28e7075-f635-4c02-937c-e4fc61c51602"));

            TreeNode        objNode      = new TreeNode();
            List <Weapon>   lstWeapons   = new List <Weapon>();
            List <TreeNode> lstTreeNodes = new List <TreeNode>();

            GradeList objGradeList = new GradeList();

            objGradeList.LoadList(Improvement.ImprovementSource.Cyberware);

            XmlDocument objXmlDocument = XmlManager.Instance.Load("cyberware.xml");

            foreach (XmlNode objXmlNode in objXmlDocument.SelectNodes("/chummer/cyberwares/cyberware"))
            {
                Cyberware objCyberware = new Cyberware(objCharacter);
                objCyberware.Create(objXmlNode, objCharacter, objGradeList.GetGrade("Standard"), Improvement.ImprovementSource.Cyberware, 1, objNode, lstWeapons, lstTreeNodes);
            }
        }