Пример #1
0
                protected override void OnTick()
                {
                    if (m_Mobile == null || m_Boat == null || m_Boat.Map == Map.Internal)
                    {
                        return;
                    }
                    //Get spawn location on the deck
                    Point3D loc = m_Boat.FindSpawnLocationOnDeck();

                    //Check there is a valid spawn location.
                    //NOTE: 99.99% of the time there will always be at least one spawn location free (next to the tillerman)
                    //The only expception is if every location is blocked with an imapssable object, which is highly unlikley as you
                    //can't grapple a boat that has living players on it, and you have to use the overload bug to get an item next to the tillerman.
                    //I'll put this check in away though, as stranger things have happened! :)
                    if (loc == new Point3D())
                    {
                        m_Mobile.SendMessage("You swing across to the boat, but are unable to get a good footing upon the deck!");
                        return;
                    }
                    //Finally move the player
                    m_Mobile.MoveToWorld(loc, m_Boat.Map);
                }