protected override void OnTarget(Mobile from, object targeted) { if (targeted is WayPoint) { if (m_Last != null) { m_Last.NextPoint = (WayPoint)targeted; m_Last.FixName(); } } else if (targeted is IPoint3D) { Point3D p = new Point3D((IPoint3D)targeted); WayPoint point = new WayPoint(m_Last); point.MoveToWorld(p, from.Map); from.Target = new WayPointSeqTarget(point); from.SendMessage("Target the position of the next way point in the sequence, or target a way point link the newest way point to."); } else { from.SendMessage("Target a position, or another way point."); } }
protected override void OnTarget(Mobile from, object target) { if (target is WayPoint && m_Point != null) { WayPoint t = (WayPoint)target; m_Point.NextPoint = t; t.Connections.Add(m_Point); t.FixName(); m_Point.FixName(); } else { from.SendMessage("Target a way point."); } }
protected override void OnTarget(Mobile from, object target) { if (target is WayPoint) { WayPoint t = (WayPoint)target; t.Connections.Add(t.NextPoint); from.SendMessage("Select point to place next Waypoint"); from.Target = new WayPointSeqTarget(t); t.FixName(); } else { from.SendMessage("No valid target selected - select previous waypoint"); } }
protected override void OnTarget(Mobile from, object targeted) { if (targeted is WayPoint) { WayPoint t = (WayPoint)targeted; if (m_Last != null) { if (!m_Remove) { if (!m_Last.Connections.Contains(t) && m_Last.NextPoint != t) { if (m_Last.NextPoint == null) { m_Last.NextPoint = t; } else { m_Last.Connections.Add(t); } } if (!t.Connections.Contains(m_Last) && t.NextPoint != m_Last) { if (t.NextPoint == null) { t.NextPoint = m_Last; } else { t.Connections.Add(m_Last); } } t.FixName(); m_Last.FixName(); } else { m_Last.Connections.Remove(t); t.Connections.Remove(m_Last); if (t.NextPoint == m_Last) { t.NextPoint = null; } if (m_Last.NextPoint == t) { m_Last.NextPoint = null; } t.FixName(); m_Last.FixName(); } } else { from.Target = new WayPointConTarget(t, m_Remove); if (!m_Remove) { from.SendMessage("Target the next way point to connect."); } else { from.SendMessage("Target the next way point to disconnect."); } } } else { from.SendMessage("That is not a way point."); } }