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

Contains() public method

public Contains ( Server.Mobile m ) : bool
m Server.Mobile
return bool
		public bool Contains( Mobile m )
		{
			return ( this[m] != null );
		}

Usage Example

Example #1
0
        public override void OnPublicMessage(Mobile from, string text)
        {
            if (text.Length > 128 || (text = text.Trim()).Length == 0)
            {
                return;
            }

            Party p = Party.Get(from);

            if (p != null)
            {
                p.SendPublicMessage(from, text);

                foreach (Data data in Data.Datas.Values)
                {
                    if (data.GlobalW && !p.Contains(data.Mobile))
                    {
                        data.Mobile.SendMessage(data.GlobalWC, "(Global) <World->Party> {0}: {1}", from.Name, text);
                    }
                }
            }
            else
            {
                from.SendLocalizedMessage(3000211); // You are not in a party.
            }
        }
All Usage Examples Of Server.Engines.PartySystem.Party::Contains