Пример #1
0
        public override void OnDoubleClick(Mobile from)
        {
            if (TentCheck(from) == false)
            {
                from.SendMessage("You Already own a Tent");
            }
            else
            {

                if (IsChildOf(from.Backpack))
                {
                    if (Validate(from) == true)
                    {
                        TentWalls v = new TentWalls();
                        v.Location = from.Location;
                        v.Map = from.Map;

                        TentRoof w = new TentRoof();
                        w.Location = from.Location;
                        w.Map = from.Map;

                        TentFloor y = new TentFloor();
                        y.Location = from.Location;
                        y.Map = from.Map;

                        TentTrim z = new TentTrim();
                        z.Location = from.Location;
                        z.Map = from.Map;

                        TentVerifier tentverifier = new TentVerifier();
                        from.AddToBackpack(tentverifier);

                        SecureTent chest = new SecureTent((PlayerMobile)from);
                        chest.Location = new Point3D(from.X + 2, from.Y - 1, from.Z);
                        chest.Map = from.Map;

                        TentDestroyer x = new TentDestroyer(v, w, y, z, (PlayerMobile)from, (SecureTent)chest, (TentVerifier)tentverifier);
                        x.Location = new Point3D(from.X + 4, from.Y - 2, from.Z);
                        x.Map = from.Map;

                        from.SendGump(new TentGump(from));
                        this.Delete();
                    }
                    else
                    {
                        from.SendMessage("You cannot errect your Tent in this area.");
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
                }
            }
        }
Пример #2
0
        public override void OnDoubleClick(Mobile from)
        {
            if (TentCheck(from) == false)
            {
                from.SendMessage("You already have the max number of tents placed.");
            }
            else
            {
                if (IsChildOf(from.Backpack))
                {
                    if (Validate(from) == true)
                    {
                        TentWalls v = new TentWalls();
                        v.Location = from.Location;
                        v.Map      = from.Map;

                        TentRoof w = new TentRoof();
                        w.Location = from.Location;
                        w.Map      = from.Map;

                        TentFloor y = new TentFloor();
                        y.Location = from.Location;
                        y.Map      = from.Map;

                        TentTrim z = new TentTrim();
                        z.Location = from.Location;
                        z.Map      = from.Map;

                        //		TentVerifier tentverifier = new TentVerifier();
                        //		from.AddToBackpack (tentverifier);

                        SecureTent chest = new SecureTent((PlayerMobile)from);
                        chest.Location = new Point3D(from.X - 1, from.Y - 1, from.Z);
                        chest.Map      = from.Map;

                        TentDestroyer x = new TentDestroyer(v, w, y, z, (PlayerMobile)from, (SecureTent)chest); // ,(TentVerifier) tentverifier);
                        x.Location = new Point3D(from.X - 1, from.Y, from.Z);                                   // was x, y+1, z
                        x.Map      = from.Map;

                        from.SendGump(new TentGump(from));
                        this.Delete();
                    }
                    else
                    {
                        from.SendMessage("You cannot place your tent in this area.");
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1042001);                       // That must be in your pack for you to use it.
                }
            }
        }
Пример #3
0
        public override void OnDoubleClick(Mobile from)
        {
            if (TentCheck(from) == false)
            {
                from.SendMessage("You Already own a Tent");
            }
            else
            {
                if (IsChildOf(from.Backpack))
                {
                    if (Validate(from) == true)
                    {
                        TentWalls v = new TentWalls();
                        v.Location = from.Location;
                        v.Map      = from.Map;

                        TentRoof w = new TentRoof();
                        w.Location = from.Location;
                        w.Map      = from.Map;

                        TentFloor y = new TentFloor();
                        y.Location = from.Location;
                        y.Map      = from.Map;

                        TentTrim z = new TentTrim();
                        z.Location = from.Location;
                        z.Map      = from.Map;

                        TentVerifier tentverifier = new TentVerifier();
                        from.AddToBackpack(tentverifier);

                        SecureTent chest = new SecureTent((PlayerMobile)from, v, w, y, z);
                        chest.Location = new Point3D(from.X - 1, from.Y - 1, from.Z);
                        chest.Map      = from.Map;

                        BedRoll1 x = new BedRoll1(v, w, y, z, (PlayerMobile)from, (SecureTent)chest, (TentVerifier)tentverifier);
                        x.Location = new Point3D(from.X, from.Y + 1, from.Z);
                        x.Map      = from.Map;

                        from.SendGump(new TentGump(from));
                        this.Delete();
                    }
                    else
                    {
                        from.SendMessage("You cannot errect your Tent in this area.");
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1042001);               // That must be in your pack for you to use it.
                }
            }
        }
Пример #4
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            m_TentTrim     = (TentTrim)reader.ReadItem();
            m_TentFloor    = (TentFloor)reader.ReadItem();
            m_TentWalls    = (TentWalls)reader.ReadItem();
            m_TentRoof     = (TentRoof)reader.ReadItem();
            m_Player       = (PlayerMobile)reader.ReadMobile();
            m_Chest        = (SecureTent)reader.ReadItem();
            m_TentVerifier = (TentVerifier)reader.ReadItem();
        }
Пример #5
0
 public TentDestroyer(TentWalls tentwalls, TentRoof tentroof, TentFloor tentfloor, TentTrim tenttrim, PlayerMobile player, SecureTent chest, TentVerifier tentverifier)
 {
     Name           = player.Name + "'s tent carrying case";
     m_Player       = player;
     m_TentRoof     = tentroof;
     m_TentWalls    = tentwalls;
     m_TentFloor    = tentfloor;
     m_TentTrim     = tenttrim;
     m_Chest        = chest;
     m_TentVerifier = tentverifier;
     this.ItemID    = 2648;
     this.Visible   = true;
     Hue            = 696;
 }
Пример #6
0
 public BedRoll1(TentWalls tentwalls, TentRoof tentroof, TentFloor tentfloor, TentTrim tenttrim, PlayerMobile player, SecureTent chest, TentVerifier tentverifier)
 {
     Name           = "A Sleeping Bag";
     m_Player       = player;
     m_TentRoof     = tentroof;
     m_TentWalls    = tentwalls;
     m_TentFloor    = tentfloor;
     m_TentTrim     = tenttrim;
     m_Chest        = chest;
     m_TentVerifier = tentverifier;
     this.ItemID    = 2645;
     this.Visible   = true;
     Hue            = 1072;
 }
Пример #7
0
 public TentDestroyer(TentWalls tentwalls, TentRoof tentroof, TentFloor tentfloor, TentTrim tenttrim, PlayerMobile player, SecureTent chest, TentVerifier tentverifier)
 {
     Name = player.Name +"'s tent carrying case";
     m_Player = player;
     m_TentRoof = tentroof;
     m_TentWalls = tentwalls;
     m_TentFloor = tentfloor;
     m_TentTrim = tenttrim;
     m_Chest = chest;
     m_TentVerifier = tentverifier;
     this.ItemID = 2648;
     this.Visible = true;
     Hue = 696;
 }
Пример #8
0
        public TentDestroyer(TentWalls tentwalls, TentRoof tentroof, TentFloor tentfloor, TentTrim tenttrim, PlayerMobile player, SecureTent chest)
        {
            Name         = "A tent carrying bag";
            m_Player     = player;
            m_TentRoof   = tentroof;
            m_TentWalls  = tentwalls;
            m_TentFloor  = tentfloor;
            m_TentTrim   = tenttrim;
            m_Chest      = chest;
            this.ItemID  = 2648; // 2645;
            this.Visible = true;
            Hue          = 277;  // 1072;

            m_Timer = new AutoDeleteTimer(this);
            m_Timer.Start();
        }
Пример #9
0
        public TentDestroyer(TentWalls tentwalls, TentRoof tentroof, TentFloor tentfloor, TentTrim tenttrim, PlayerMobile player, SecureTent chest)
        {
            Name = "A tent carrying bag";
            m_Player = player;
            m_TentRoof = tentroof;
            m_TentWalls = tentwalls;
            m_TentFloor = tentfloor;
            m_TentTrim = tenttrim;
            m_Chest = chest;
            this.ItemID = 2648; // 2645;
            this.Visible = true;
            Hue = 277; // 1072;

            m_Timer = new AutoDeleteTimer(this);
            m_Timer.Start();
        }
Пример #10
0
 public TentDestroyer(TentWalls tentwalls, TentRoof tentroof, TentFloor tentfloor, TentTrim tenttrim, PlayerMobile player, SecureTent chest, TentVerifier tentverifier)
 {
     Name        = "A tent carrying bag";
     m_Player    = player;
     m_TentRoof  = tentroof;
     m_TentWalls = tentwalls;
     m_TentFloor = tentfloor;
     m_TentTrim  = tenttrim;
     m_Chest     = chest;
     if (tentverifier != null)
     {
         m_TentVerifier = tentverifier;
     }
     this.ItemID  = 2648;   // 2645;
     this.Visible = true;
     Hue          = 277;    // 1072;
 }
Пример #11
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            m_TentTrim = (TentTrim)reader.ReadItem();
            m_TentFloor = (TentFloor)reader.ReadItem();
            m_TentWalls = (TentWalls)reader.ReadItem();
            m_TentRoof = (TentRoof)reader.ReadItem();
            m_Player = (PlayerMobile)reader.ReadMobile();
            m_Chest = (SecureTent)reader.ReadItem();

            CheckAbandoned();
        }
Пример #12
0
 public TentDestroyer(TentWalls tentwalls, TentRoof tentroof, TentFloor tentfloor, TentTrim tenttrim, PlayerMobile player, SecureTent chest) :
     this(tentwalls, tentroof, tentfloor, tenttrim, player, chest, null)
 {
 }