Ejemplo n.º 1
0
            public override void UseGate(Mobile m)
            {
                if (LinkedGate == null || !(LinkedGate is InternalItem) || !((InternalItem)LinkedGate).BoatGate || !LinkedGate.Deleted)
                {
                    if (LinkedGate != null && ((InternalItem)LinkedGate).BoatGate)
                    {
                        BaseBoat boat = BaseBoat.FindBoatAt(LinkedGate);

                        if (boat != null && !boat.HasAccess(m))
                        {
                            m.SendLocalizedMessage(1116617); // You do not have permission to board this ship.
                            return;
                        }
                    }

                    base.UseGate(m);
                }
                else
                {
                    m.SendMessage("The other gate no longer exists.");
                }
            }