コード例 #1
0
		public static void DoOnTarget( Mobile from, object o, Mercenary merc )
		{
			EtherealMount ethy = o as EtherealMount;
			if ( null != ethy )
			{
				if ( null != ethy.Rider )
					from.SendMessage( "This ethereal mount is already in use by someone else." );

				else if ( !ethy.IsChildOf( from.Backpack ) )
					from.SendMessage( "The ethereal mount must be in your pack for you to use it." );
				else
					ethy.Rider = merc;
			}
			else
			{
				BaseMount mount = o as BaseMount;

				if ( null == mount )
					from.SendMessage( "That is not a mount." );

				else if ( null != mount.Rider )
					from.SendMessage( "This mount is already in use by someone else." );

				else if ( mount.ControlMaster != from )
					from.SendMessage( "You do not own this mount." );
				else
					mount.Rider = merc;
			}
		}
コード例 #2
0
 public MountTarget(Mobile from, Mercenary merc) : base(1, false, TargetFlags.None)
 {
     m_Merc = merc;
     from.SendMessage("Choose a mount for " + m_Merc.Name + " to ride.");
 }