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.
}
}