Exemplo n.º 1
0
        public MainWindow()
        {
            Gnomes      = new ObservableCollection <GnomeRow>();
            Professions = new List <Profession>();
            Enemies     = new List <EnemyRow>();

            InitializeComponent();
            InitializeTabs();
            InitializeGnomoria();

            ProgressBar.Visibility = Visibility.Hidden;
            GameLoaded             = false;
            ShowWorld(null, null);

            ItemList.ItemsSource     = ItemRow.GetItems();
            MaterialList.ItemsSource = MaterialRow.GetMaterials();
            //QualityList.ItemsSource = QualityRow.GetQualities();
            ItemList.SelectedIndex     = 145;
            MaterialList.SelectedIndex = 59;
            //QualityList.SelectedIndex = 5;
        }
Exemplo n.º 2
0
        public string CreateItem(ItemRow item, MaterialRow material, int amount, Vector3 position)
        {
            string name = "";

            for (var i = 0; i < amount; i++)
            {
                switch (item.ItemId)
                {
                case ItemID.LeatherArmorPanel:
                case ItemID.LeatherBoot:
                case ItemID.LeatherBracer:
                case ItemID.LeatherCuirass:
                case ItemID.LeatherGlove:
                case ItemID.LeatherGreave:
                case ItemID.LeatherHelm:
                case ItemID.LeatherStrap:
                case ItemID.BoneShirt:
                case ItemID.Needle:
                case ItemID.Statuette:
                case ItemID.Sausage:
                case ItemID.SausageOmelette:
                case ItemID.Sandwich:
                case ItemID.SkullHelmet:
                case ItemID.Wine:
                case ItemID.Barrel:
                case ItemID.Bed:
                case ItemID.BedFrame:
                case ItemID.Bellows:
                case ItemID.Cabinet:
                case ItemID.Chair:
                case ItemID.Crate:
                case ItemID.CrossbowStock:
                case ItemID.Dresser:
                case ItemID.FancyBedFrame:
                case ItemID.FancyBed:
                case ItemID.Haft:
                case ItemID.Hilt:
                case ItemID.Loom:
                case ItemID.TrainingDummy:
                case ItemID.Wheelbarrow:
                case ItemID.WoodDoor:
                case ItemID.WoodenShield:
                case ItemID.Workbench:
                case ItemID.Block:
                case ItemID.Chisel:
                case ItemID.Furnace:
                case ItemID.Hearth:
                case ItemID.Knife:
                case ItemID.Mold:
                case ItemID.PetRock:
                case ItemID.Pillar:
                case ItemID.Sawblade:
                case ItemID.Statue:
                case ItemID.Stick:
                case ItemID.StoneDoor:
                case ItemID.StoneHammer:
                case ItemID.StoneHandAxe:
                case ItemID.StoneKnifeBlade:
                case ItemID.StoneSword:
                case ItemID.Table:
                case ItemID.Torch:
                case ItemID.Trough:
                case ItemID.Gem:
                case ItemID.AmmoPouch:
                case ItemID.Bag:
                case ItemID.Bandage:
                case ItemID.Mattress:
                case ItemID.Padding:
                case ItemID.String:
                case ItemID.Bolt:
                case ItemID.AlarmBell:
                case ItemID.Anvil:
                case ItemID.ArmorPlate:
                case ItemID.Axle:
                case ItemID.BallPeenHammer:
                case ItemID.Bar:
                case ItemID.BattleAxe:
                case ItemID.BattleAxeHead:
                case ItemID.BladeTrap:
                case ItemID.Blunderbuss:
                case ItemID.BlunderbussBarrel:
                case ItemID.Boot:
                case ItemID.Breastplate:
                case ItemID.Claymore:
                case ItemID.ClaymoreBlade:
                case ItemID.CommemorativeCoin:
                case ItemID.Crossbow:
                case ItemID.CrossbowBolt:
                case ItemID.CrossbowBow:
                case ItemID.CuttingWheel:
                case ItemID.Cylinder:
                case ItemID.File:
                case ItemID.MechanicalWall:
                case ItemID.Gauntlet:
                case ItemID.Gear:
                case ItemID.Gearbox:
                case ItemID.GemmedNecklace:
                case ItemID.GemmedRing:
                case ItemID.Greave:
                case ItemID.Hammer:
                case ItemID.HammerHead:
                case ItemID.HandAxe:
                case ItemID.HandAxeHead:
                case ItemID.Handcrank:
                case ItemID.Hatch:
                case ItemID.Helmet:
                case ItemID.Lever:
                case ItemID.MechanismBase:
                case ItemID.MetalSliver:
                case ItemID.MusketRound:
                case ItemID.Necklace:
                case ItemID.Pauldron:
                case ItemID.Pickaxe:
                case ItemID.PickaxeHead:
                case ItemID.Pistol:
                case ItemID.PistolBarrel:
                case ItemID.PressurePlate:
                case ItemID.Ring:
                case ItemID.Rod:
                case ItemID.Screw:
                case ItemID.Shield:
                case ItemID.ShieldBacking:
                case ItemID.ShieldBoss:
                case ItemID.Spike:
                case ItemID.SpikeTrap:
                case ItemID.Spring:
                case ItemID.Sword:
                case ItemID.SwordBlade:
                case ItemID.TowerShield:
                case ItemID.TowerShieldBacking:
                case ItemID.TrapBase:
                case ItemID.Warhammer:
                case ItemID.WarhammerHead:
                case ItemID.Wrench:
                case ItemID.Cheese:
                case ItemID.CheeseOmelette:
                case ItemID.MushroomOmelette:
                case ItemID.Bread:
                case ItemID.Plank:
                /*var complexItem = CreateComplexItem(item.ItemId, material.Material, position);
                 * name = complexItem.Name();
                 * break;*/
                case ItemID.Bone:
                case ItemID.Clipping:
                case ItemID.Egg:
                case ItemID.Fruit:
                case ItemID.Meat:
                case ItemID.Milk:
                case ItemID.Mushroom:
                case ItemID.RawCloth:
                case ItemID.RawCoal:
                case ItemID.RawGem:
                case ItemID.RawHide:
                case ItemID.RawOre:
                case ItemID.RawSoil:
                case ItemID.RawStone:
                case ItemID.RawWood:
                case ItemID.Seed:
                case ItemID.Skull:
                case ItemID.Straw:
                case ItemID.Wheat:
                default:
                    var newItem = CreateSimpleItem(item.ItemId, material.Material, position);
                    GnomanEmpire.Instance.Fortress.AddItem(newItem);
                    name = newItem.Name();
                    break;
                }
            }
            return(name);
        }
Exemplo n.º 3
0
        public string CreateItem(ItemRow item, MaterialRow material, int amount, Vector3 position)
        {
            string name = "";

            for (var i = 0; i < amount; i++)
            {
                switch (item.ItemId)
                {
                    case ItemID.LeatherArmorPanel:
                    case ItemID.LeatherBoot:
                    case ItemID.LeatherBracer:
                    case ItemID.LeatherCuirass:
                    case ItemID.LeatherGlove:
                    case ItemID.LeatherGreave:
                    case ItemID.LeatherHelm:
                    case ItemID.LeatherStrap:
                    case ItemID.BoneShirt:
                    case ItemID.Needle:
                    case ItemID.Statuette:
                    case ItemID.Sausage:
                    case ItemID.SausageOmelette:
                    case ItemID.Sandwich:
                    case ItemID.SkullHelmet:
                    case ItemID.Wine:
                    case ItemID.Barrel:
                    case ItemID.Bed:
                    case ItemID.BedFrame:
                    case ItemID.Bellows:
                    case ItemID.Cabinet:
                    case ItemID.Chair:
                    case ItemID.Crate:
                    case ItemID.CrossbowStock:
                    case ItemID.Dresser:
                    case ItemID.FancyBedFrame:
                    case ItemID.FancyBed:
                    case ItemID.Haft:
                    case ItemID.Hilt:
                    case ItemID.Loom:
                    case ItemID.TrainingDummy:
                    case ItemID.Wheelbarrow:
                    case ItemID.WoodDoor:
                    case ItemID.WoodenShield:
                    case ItemID.Workbench:
                    case ItemID.Block:
                    case ItemID.Chisel:
                    case ItemID.Furnace:
                    case ItemID.Hearth:
                    case ItemID.Knife:
                    case ItemID.Mold:
                    case ItemID.PetRock:
                    case ItemID.Pillar:
                    case ItemID.Sawblade:
                    case ItemID.Statue:
                    case ItemID.Stick:
                    case ItemID.StoneDoor:
                    case ItemID.StoneHammer:
                    case ItemID.StoneHandAxe:
                    case ItemID.StoneKnifeBlade:
                    case ItemID.StoneSword:
                    case ItemID.Table:
                    case ItemID.Torch:
                    case ItemID.Trough:
                    case ItemID.Gem:
                    case ItemID.AmmoPouch:
                    case ItemID.Bag:
                    case ItemID.Bandage:
                    case ItemID.Mattress:
                    case ItemID.Padding:
                    case ItemID.String:
                    case ItemID.Bolt:
                    case ItemID.AlarmBell:
                    case ItemID.Anvil:
                    case ItemID.ArmorPlate:
                    case ItemID.Axle:
                    case ItemID.BallPeenHammer:
                    case ItemID.Bar:
                    case ItemID.BattleAxe:
                    case ItemID.BattleAxeHead:
                    case ItemID.BladeTrap:
                    case ItemID.Blunderbuss:
                    case ItemID.BlunderbussBarrel:
                    case ItemID.Boot:
                    case ItemID.Breastplate:
                    case ItemID.Claymore:
                    case ItemID.ClaymoreBlade:
                    case ItemID.CommemorativeCoin:
                    case ItemID.Crossbow:
                    case ItemID.CrossbowBolt:
                    case ItemID.CrossbowBow:
                    case ItemID.CuttingWheel:
                    case ItemID.Cylinder:
                    case ItemID.File:
                    case ItemID.MechanicalWall:
                    case ItemID.Gauntlet:
                    case ItemID.Gear:
                    case ItemID.Gearbox:
                    case ItemID.GemmedNecklace:
                    case ItemID.GemmedRing:
                    case ItemID.Greave:
                    case ItemID.Hammer:
                    case ItemID.HammerHead:
                    case ItemID.HandAxe:
                    case ItemID.HandAxeHead:
                    case ItemID.Handcrank:
                    case ItemID.Hatch:
                    case ItemID.Helmet:
                    case ItemID.Lever:
                    case ItemID.MechanismBase:
                    case ItemID.MetalSliver:
                    case ItemID.MusketRound:
                    case ItemID.Necklace:
                    case ItemID.Pauldron:
                    case ItemID.Pickaxe:
                    case ItemID.PickaxeHead:
                    case ItemID.Pistol:
                    case ItemID.PistolBarrel:
                    case ItemID.PressurePlate:
                    case ItemID.Ring:
                    case ItemID.Rod:
                    case ItemID.Screw:
                    case ItemID.Shield:
                    case ItemID.ShieldBacking:
                    case ItemID.ShieldBoss:
                    case ItemID.Spike:
                    case ItemID.SpikeTrap:
                    case ItemID.Spring:
                    case ItemID.Sword:
                    case ItemID.SwordBlade:
                    case ItemID.TowerShield:
                    case ItemID.TowerShieldBacking:
                    case ItemID.TrapBase:
                    case ItemID.Warhammer:
                    case ItemID.WarhammerHead:
                    case ItemID.Wrench:
                    case ItemID.Cheese:
                    case ItemID.CheeseOmelette:
                    case ItemID.MushroomOmelette:
                    case ItemID.Bread:
                    case ItemID.Plank:
                        /*var complexItem = CreateComplexItem(item.ItemId, material.Material, position);
                        name = complexItem.Name();
                        break;*/
                    case ItemID.Bone:
                    case ItemID.Clipping:
                    case ItemID.Egg:
                    case ItemID.Fruit:
                    case ItemID.Meat:
                    case ItemID.Milk:
                    case ItemID.Mushroom:
                    case ItemID.RawCloth:
                    case ItemID.RawCoal:
                    case ItemID.RawGem:
                    case ItemID.RawHide:
                    case ItemID.RawOre:
                    case ItemID.RawSoil:
                    case ItemID.RawStone:
                    case ItemID.RawWood:
                    case ItemID.Seed:
                    case ItemID.Skull:
                    case ItemID.Straw:
                    case ItemID.Wheat:
                    default:
                        var newItem = CreateSimpleItem(item.ItemId, material.Material, position);
                        GnomanEmpire.Instance.Fortress.AddItem(newItem);
                        name = newItem.Name();
                        break;
                }
            }
            return name;
        }