Example #1
0
 public NewPlank(NewBaseBoat boat, Point3D initOffset, PlankSide side, uint keyValue)
     : base(boat, 0x3EB1 + (int)side, initOffset)
 {
     m_Side     = side;
     m_KeyValue = keyValue;
     m_Locked   = true;
 }
Example #2
0
        public override void OnDoubleClick(Mobile from)
        {
            NewBaseBoat ship = Transport as NewBaseBoat;

            if (ship == null || !ship.IsOnBoard(from))
            {
                if (ship.TillerManItem != null)
                {
                    ship.TillerManItem.Say(502490); // You must be on the ship to open the hold.
                }
                if (ship.TillerManMobile != null)
                {
                    ship.TillerManMobile.TillerManSay(502490); // You must be on the ship to open the hold.
                }
            }
            else if (ship.IsMovingShip)
            {
                if (ship.TillerManItem != null)
                {
                    ship.TillerManItem.Say(502491); // I can not open the hold while the ship is moving.
                }
                if (ship.TillerManMobile != null)
                {
                    ship.TillerManMobile.TillerManSay(502491); // I can not open the hold while the ship is moving.
                }
            }
            else
            {
                base.OnDoubleClick(from);
            }
        }
Example #3
0
 public NewTillerMan(NewBaseBoat boat, Point3D initOffset)
     : base(boat, 0x3E4E, initOffset)
 {
     _boat = boat;
     if (_boat != null)
     {
         _boat.TillerMan = this;
     }
 }
Example #4
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 1:
            {
                _boat = reader.ReadItem() as NewBaseBoat;
                break;
            }
            }
        }
Example #5
0
 public NewHold(NewBaseBoat boat, Point3D initOffset)
     : base(boat, 0x3EAE, initOffset)
 {
 }
Example #6
0
        public void OnPlacement(Mobile from, Point3D p)
        {
            if (Deleted)
            {
                return;
            }
            else if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1042001);                   // That must be in your pack for you to use it.
            }
            else
            {
                Map map = from.Map;

                if (map == null)
                {
                    return;
                }

                if (from.AccessLevel < AccessLevel.GameMaster && (map == Map.Ilshenar || map == Map.Malas))
                {
                    from.SendLocalizedMessage(1043284);                       // A ship can not be created here.
                    return;
                }

                if (from.Region.IsPartOf(typeof(HouseRegion)) /*|| BaseGalleon.FindBoatAt( from, from.Map ) != null */)
                {
                    from.SendLocalizedMessage(1010568, null, 0x25);                       // You may not place a ship while on another ship or inside a house.
                    return;
                }

                NewBaseBoat boat = Boat;

                if (boat == null)
                {
                    return;
                }

                p = new Point3D(p.X - m_Offset.X, p.Y - m_Offset.Y, p.Z - m_Offset.Z);

                if (/*BaseSmoothMulti.IsValidLocation( p, map ) &&*/ boat.CanFit(p, map, boat.ItemID))
                {
                    Delete();

                    /*boat.Owner = from;*/
                    boat.Anchored = true;

                    uint keyValue = boat.CreateKeys(from);

                    if (boat.PPlank != null)
                    {
                        boat.PPlank.KeyValue = keyValue;
                    }
                    if (boat.SPlank != null)
                    {
                        boat.SPlank.KeyValue = keyValue;
                    }

                    boat.MoveToWorld(p, map);
                }
                else
                {
                    boat.Delete();
                    from.SendLocalizedMessage(1043284);                       // A ship can not be created here.
                }
            }
        }
Example #7
0
 public DryDockEntry(Mobile from, NewBaseBoat boat)
     : base(1116520)
 {
     _from = from;
     _boat = boat;
 }
Example #8
0
 public RenameEntry(Mobile from, NewBaseBoat boat)
     : base(1111680)
 {
     _from = from;
     _boat = boat;
 }
Example #9
0
 public NewTillerMan(NewBaseBoat boat, Point3D initOffset)
     : base(boat, 0x3E4E, initOffset)
 {
 }