Exemplo n.º 1
0
        public void EndDryDock(Mobile from)
        {
            if (Deleted || CheckDecay())
            {
                return;
            }

            DryDockResult result = CheckDryDock(from);

            if (result == DryDockResult.Dead)
            {
                from.SendLocalizedMessage(502493); // You appear to be dead.
            }
            else if (result == DryDockResult.NoKey)
            {
                from.SendLocalizedMessage(502494); // You must have a key to the ship to dock the boat.
            }
            else if (result == DryDockResult.NotAnchored)
            {
                from.SendLocalizedMessage(1010570); // You must lower the anchor to dock the boat.
            }
            else if (result == DryDockResult.Mobiles)
            {
                from.SendLocalizedMessage(502495); // You cannot dock the ship with beings on board!
            }
            else if (result == DryDockResult.Items)
            {
                from.SendLocalizedMessage(502496); // You cannot dock the ship with a cluttered deck.
            }
            else if (result == DryDockResult.Hold)
            {
                from.SendLocalizedMessage(502497); // Make sure your hold is empty, and try again!
            }
            if (result != DryDockResult.Valid)
            {
                return;
            }

            BaseDockedGalleon boat = DockedGalleon;

            if (boat == null)
            {
                return;
            }

            RemoveKeys(from);

            from.AddToBackpack(boat);
            if (TillerManMobile != null)
            {
                TillerManMobile.Delete();
            }
            Delete();
        }
Exemplo n.º 2
0
        public void AssociateMap(MapItem map)
        {
            if (CheckDecay())
            {
                return;
            }

            if (map is BlankMap)
            {
                if (TillerManItem != null)
                {
                    TillerManItem.Say(502575);                       // Ar, that is not a map, tis but a blank piece of paper!
                }
                if (TillerManMobile != null)
                {
                    TillerManMobile.TillerManSay(502575);                       // Ar, that is not a map, tis but a blank piece of paper!
                }
            }
            else if (map.Pins.Count == 0)
            {
                if (TillerManItem != null)
                {
                    TillerManItem.Say(502576);                       // Arrrr, this map has no course on it!
                }
                if (TillerManMobile != null)
                {
                    TillerManMobile.TillerManSay(502576);                       // Arrrr, this map has no course on it!
                }
            }
            else
            {
                StopMove(false);

                MapItem      = map;
                NextNavPoint = -1;

                if (TillerManItem != null)
                {
                    TillerManItem.Say(502577);                       // A map!
                }
                if (TillerManMobile != null)
                {
                    TillerManMobile.TillerManSay(502577);                       // A map!
                }
            }
        }