예제 #1
0
            public override void OnClick()
            {
                if (m_DockMaster.Map == null)
                {
                    return;
                }

                Container pack = m_From.Backpack;

                if (pack != null && pack.GetAmount(typeof(Gold)) < DryDockAmount && Banker.GetBalance(m_From) < DryDockAmount)
                {
                    m_DockMaster.PrivateOverheadMessage(MessageType.Regular, m_DockMaster.SpeechHue, 1116506, DryDockAmount.ToString(), m_From.NetState); //The price is ~1_price~ and I will accept nothing less!
                    return;
                }

                BaseBoat boat = BaseBoat.GetBoat(m_From);

                if (boat != null && m_DockMaster.InRange(boat.Location, 50))
                {
                    m_DockMaster.TryRetrieveHold(m_From, boat);
                }
                else
                {
                    m_DockMaster.SayTo(m_From, 502581); //I cannot find the ship!
                }
            }
예제 #2
0
            public override void OnClick()
            {
                BaseBoat boat = BaseBoat.GetBoat(m_From);

                if (boat != null && m_DockMaster.InRange(boat.Location, 100))
                {
                    boat.BeginDryDock(m_From, m_DockMaster);
                }
                else
                {
                    m_DockMaster.SayTo(m_From, 502581); //I cannot find the ship!
                }
            }
예제 #3
0
            public override void OnClick()
            {
                BaseBoat boat = m_DockMaster.GetBoatInRegion(m_From);

                if (boat != null)
                {
                    boat.BeginDryDock(m_From, m_DockMaster);
                }
                else
                {
                    m_DockMaster.SayTo(m_From, 502581); //I cannot find the ship!
                }
            }