示例#1
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile from = state.Mobile;

            int buttonID = info.ButtonID;

            if (buttonID == 2)
            {
                m_Page++;
                from.CloseGump(typeof(FindboatGump));
                from.SendGump(new FindboatGump(from, m_List, m_Page));
            }
            if (buttonID == 1)
            {
                m_Page--;
                from.CloseGump(typeof(FindboatGump));
                from.SendGump(new FindboatGump(from, m_List, m_Page));
            }
            if (buttonID > 100)
            {
                int      index = buttonID - 101;
                BaseBoat boat  = m_List[index] as BaseBoat;
                Point3D  xyz   = boat.GetWorldLocation();
                int      x     = xyz.X;
                int      y     = xyz.Y;
                int      z     = -2;

                Point3D dest = new Point3D(x, y, z);
                from.MoveToWorld(dest, boat.Map);
            }
        }
示例#2
0
        private void AddDetails(int index)
        {
            if (index < m_List.Count)
            {
                int btn;
                int row;
                btn = (index) + 101;
                row = index % 12;

                BaseBoat boat = m_List[index] as BaseBoat;

                AddLabel(32, 40 + (row * 20), 1152, String.Format("{0}", boat.ShipName));
                AddLabel(132, 40 + (row * 20), 1152, String.Format("{0}", boat.Owner));
                AddLabel(292, 40 + (row * 20), 1152, String.Format("{0} {1}", boat.GetWorldLocation(), boat.Map));

                AddButton(480, 45 + (row * 20), 2437, 2438, btn, GumpButtonType.Reply, 0);
            }
        }