Example #1
0
 public LoadShip(Mobile from, ShipCrate crate)
     : base(1116521, 3) //Load Ship from Crate
 {
     m_From  = from;
     m_Crate = crate;
 }
Example #2
0
            public override int LabelNumber => 1116523;  // Are you sure you want to destroy your shipping crate and its contents?

            public InternalGump(ShipCrate crate)
            {
                m_Crate = crate;
            }
Example #3
0
 public DestroyCrate(Mobile from, ShipCrate crate) : base(1116522, 3)
 {
     m_From  = from;
     m_Crate = crate;
 }
Example #4
0
 public LoadShip(Mobile from, ShipCrate crate)
     : base(1116521, 3) //Load Ship from Crate
 {
     m_From = from;
     m_Crate = crate;
 }
Example #5
0
 public DestroyCrate(Mobile from, ShipCrate crate) : base(1116522, 3)
 {
     m_From = from;
     m_Crate = crate;
 }
Example #6
0
            public override int LabelNumber { get { return 1116523; } } // Are you sure you want to destroy your shipping crate and its contents?

            public InternalGump(ShipCrate crate)
            {
                m_Crate = crate;
            }
Example #7
0
        public void TryRetrieveHold(Mobile from, BaseBoat boat)
        {
            for (int i = 0; i < m_Crates.Count; i++) {
                if (m_Crates[i].Owner == from) {
                    from.SendLocalizedMessage(1116516); //Thou must return thy current shipping crate before I can retrieve another shipment for you.
                    return;
                }
            }

            Container pack = from.Backpack;
            Container hold;

            if (boat is BaseGalleon)
                hold = ((BaseGalleon)boat).GalleonHold;
            else
                hold = boat.Hold;

            if (hold == null || hold.Items.Count == 0)
            {
                from.SendMessage("Your hold is empty!");
                return;
            }

            ShipCrate crate = new ShipCrate(from, boat);
            m_Crates.Add(crate);

            if (!pack.ConsumeTotal(typeof(Gold), DryDockAmount))
                Banker.Withdraw(from, DryDockAmount);

            bool cantMove = false;
            List<Item> items = new List<Item>(hold.Items);
            foreach (Item item in items)
            {
                if (item.Movable)
                    crate.DropItem(item);
                else
                    cantMove = true;
            }

            Point3D pnt = Point3D.Zero;

            if (!CanDropCrate(ref pnt, this.Map))
            {
                SayTo(from, 1116517); //Arrrgh!  My dock has no more room.  Please come back later.
                from.BankBox.DropItem(crate);
                from.SendMessage("Your shipping crate has been placed in your bank box.");
                //from.SendMessage("You have 30 minutes to obtain the contents of your shipping crate.  You can find it in the wearhouse on the westernmost tip of the floating emproiam");
            }
            else
            {
                from.SendLocalizedMessage(1116542, ShipCrate.DT.ToString()); //Yer ship has been unloaded to a crate inside this here warehouse.  You have ~1_time~ minutes to get yer goods or it be gone.
                crate.MoveToWorld(pnt, this.Map);
            }

            if (cantMove)
                from.SendMessage("We were unable to pack up one or more of the items in your cargo hold.");
        }
Example #8
0
 public static void RemoveCrate(ShipCrate crate)
 {
     if (m_Crates.Contains(crate))
         m_Crates.Remove(crate);
 }