示例#1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            m_GardenGround   = (GardenGround)reader.ReadItem();
            m_GardenFence    = (GardenFence)reader.ReadItem();
            m_Player         = (PlayerMobile)reader.ReadMobile();
            m_SecureGarden   = (SecureGarden)reader.ReadItem();
            m_GardenVerifier = (GardenVerifier)reader.ReadItem();
        }
示例#2
0
 public GardenDestroyer(GardenFence gardenfence, GardenGround gardenground, PlayerMobile player, SecureGarden securegarden, GardenVerifier gardenverifier)
 {
     Name             = "'Clean-Up' Sign";
     m_Player         = player;
     m_GardenFence    = gardenfence;
     m_GardenGround   = gardenground;
     m_SecureGarden   = securegarden;
     m_GardenVerifier = gardenverifier;
     this.ItemID      = 2981;
     this.Visible     = true;
 }
示例#3
0
        public override void OnDoubleClick(Mobile from)
        {
            if (GardenCheck(from) == false)
            {
                from.SendMessage("You already own a splendid garden.");
            }
            else
            {
                if (IsChildOf(from.Backpack))
                {
                    if (Validate(from) == true)
                    {
                        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);

                        SecureGarden securegarden = new SecureGarden((PlayerMobile)from);
                        securegarden.Location = new Point3D(from.X - 1, from.Y - 2, from.Z);
                        securegarden.Map      = from.Map;

                        GardenDestroyer x = new GardenDestroyer(v, y, (PlayerMobile)from, (SecureGarden)securegarden, (GardenVerifier)gardenverifier);
                        x.Location = new Point3D(from.X + 3, from.Y - 2, from.Z);
                        x.Map      = from.Map;

                        from.SendGump(new GardenGump(from));
                        this.Delete();
                    }
                    else
                    {
                        from.SendMessage("You cannot errect your garden in this area.");
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1042001);               // That must be in your pack for you to use it.
                }
            }
        }