public GardenDeleteGump(GardenDestroyer gardendestroyer, Mobile owner) : base(150, 75) { m_GardenDestroyer = gardendestroyer; owner.CloseGump(typeof(GardenDeleteGump)); this.Closable = false; this.Disposable = false; this.Dragable = true; this.Resizable = false; this.AddPage(0); this.AddBackground(0, 0, 300, 120, 9200); this.AddBackground(10, 10, 280, 100, 3500); this.AddLabel(30, 30, 0, @"Do you want to destroy your garden?"); this.AddButton(100, 66, 4023, 4024, 1, GumpButtonType.Reply, 0); this.AddButton(160, 66, 4017, 4018, 0, GumpButtonType.Reply, 0); }
public override void OnDoubleClick(Mobile from) { if (GardenCheck(from) == false) { from.SendMessage("You reach the maximum amount of garden."); } else { if (IsChildOf(from.Backpack)) { if (CropHelper.ValidateRegion(from)) { GardenFence v = new GardenFence(); v.Location = from.Location; v.Map = from.Map; GardenGround y = new GardenGround(); y.Location = from.Location; y.Map = from.Map; GardenVerifier gardenverifier = new GardenVerifier(); from.AddToBackpack(gardenverifier); GardenDestroyer x = new GardenDestroyer(v, y, from, gardenverifier); x.Location = new Point3D(from.X - 2, from.Y + 4, from.Z - 3); x.Map = from.Map; this.Delete(); } else { from.SendMessage("You cannot create your garden in this area!"); } } else { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } } }
public override void OnDoubleClick(Mobile from) { if (GardenCheck(from) == false) { from.SendMessage("You reach the maximum amount of garden."); } else { if (IsChildOf(from.Backpack)) { if (CropHelper.ValidateRegion(from)) { GardenFence v = new GardenFence(); v.Location = from.Location; v.Map = from.Map; GardenGround y = new GardenGround(); y.Location = from.Location; y.Map = from.Map; GardenVerifier gardenverifier = new GardenVerifier(); from.AddToBackpack(gardenverifier); GardenDestroyer x = new GardenDestroyer(v, y, from, gardenverifier); x.Location = new Point3D(from.X - 2, from.Y + 4, from.Z - 3); x.Map = from.Map; this.Delete(); } else { from.SendMessage("You cannot create your garden in this area!"); } } else { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } } }