Server.Engines.PartySystem.Party.ListenToParty_OnTarget C# (CSharp) Method

ListenToParty_OnTarget() public static method

public static ListenToParty_OnTarget ( Server.Mobile from, object obj ) : void
from Server.Mobile
obj object
return void
		public static void ListenToParty_OnTarget( Mobile from, object obj )
		{
			if ( obj is Mobile )
			{
				Party p = Party.Get( (Mobile) obj );

				if ( p == null )
				{
					from.SendMessage( "They are not in a party." );
				}
				else if ( p.m_Listeners.Contains( from ) )
				{
					p.m_Listeners.Remove( from );
					from.SendMessage( "You are no longer listening to that party." );
				}
				else
				{
					p.m_Listeners.Add( from );
					from.SendMessage( "You are now listening to that party." );
				}
			}
		}