Пример #1
0
 public sysItemType(string n, string nl, sysTreeItemType itype, int w8, string dimension, sysDamageRoll sysdmgroll) : base(n, nl)
 {
     this.Weight     = w8;
     this.ItemType   = itype;
     this.Dimensions = dimension;
     this.Damage     = sysdmgroll;
 }
Пример #2
0
        public static sysTreeItemType SeedTreeData(IList <sysDamageRoll> dmgrolls)
        {
            sysTreeItemType mTree = new sysTreeItemType(nwdbConst.sysTreeNameItemType, -1);

            sysTreeItemType siFamily    = new sysTreeItemType("Equipment", 0);
            sysTreeItemType siFamily2   = new sysTreeItemType("Resources", 0);
            sysTreeItemType siClass     = new sysTreeItemType("Weapons", 0);
            sysTreeItemType siClass2    = new sysTreeItemType("Armour", 0);
            sysTreeItemType siClass3    = new sysTreeItemType("Jewellry", 0);
            sysTreeItemType siSubClass1 = new sysTreeItemType("Polearms", 0);
            sysTreeItemType siSubClass2 = new sysTreeItemType("Bows", 0);
            sysTreeItemType siSubClass3 = new sysTreeItemType("Staffs,Rods,Wands", 0);

            mTree.AddChild(siFamily);
            mTree.AddChild(siFamily2);

            siFamily.AddChild(siClass);
            siFamily.AddChild(siClass2);
            siFamily.AddChild(siClass3);
            siClass.AddChild(siSubClass2);
            siClass.AddChild(siSubClass1);
            siClass.AddChild(siSubClass3);

            siSubClass1.Items.Add(new sysItemType("Halberd", "Halberd", siSubClass1, 10, "8x1", dmgrolls.First(x => x.LongName == "1d12+0")));
            siSubClass1.Items.Add(new sysItemType("Spear", "Spear", siSubClass1, 8, "8x1", dmgrolls.First(x => x.LongName == "1d6+0")));
            siSubClass2.Items.Add(new sysItemType("LongBow", "LongBow", siSubClass2, 8, "5x1", dmgrolls.First(x => x.LongName == "1d6+0")));
            siSubClass2.Items.Add(new sysItemType("CompBow", "Composite Bow", siSubClass2, 8, "5x1", dmgrolls.First(x => x.LongName == "1d6+0")));

            return(mTree);
        }