SendPrivateMessage() public method

public SendPrivateMessage ( Server.Mobile from, Server.Mobile to, string text ) : void
from Server.Mobile
to Server.Mobile
text string
return void
Exemplo n.º 1
0
        public override void OnPrivateMessage(Mobile from, Mobile target, string text)
        {
            if (text.Length > 128 || (text = text.Trim()).Length == 0)
            {
                return;
            }

            Party p = Party.Get(from);

            if (p != null && p.Contains(target))
            {
                p.SendPrivateMessage(from, target, text);
            }
            else
            {
                from.SendLocalizedMessage(3000211);                 // You are not in a party.
            }
        }