protected override void Broadcast(Mobile m, string msg) { foreach (Data data in Data.Datas.Values) { if (IsIn(data.Mobile) && !data.Ignores.Contains(m) && General.FactionName(data.Mobile) == General.FactionName(m)) { data.Mobile.SendMessage(m.AccessLevel == AccessLevel.Player ? ColorFor(data.Mobile) : Data.GetData(m).StaffC, String.Format("<{0}{1}> {2}: {3}", NameFor(m), (Style == ChatStyle.Regional && m.Region != null ? "-" + Server.Misc.Worlds.GetRegionName(m.Map, m.Location) : ""), m.RawName, msg)); } else if (data.Mobile.AccessLevel >= m.AccessLevel && ((data.GlobalF && !data.GIgnores.Contains(m)) || data.GListens.Contains(m))) { data.Mobile.SendMessage(data.GlobalFC, String.Format("(Global) <{0}> {1}: {2}", NameFor(m), m.RawName, msg)); } } }
public override ArrayList BuildList(Mobile m) { ArrayList list = base.BuildList(m); foreach (Mobile mob in new ArrayList(list)) { if (General.FactionName(mob) != General.FactionName(m)) { list.Remove(mob); } } return(list); }
protected override void BuildGump() { int width = 300; int y = 10; AddImage(10, y, 0x589); Avatar av = Avatar.GetAvatar(c_Target); if (av.Id < 100000) { AddImage(10 + av.X, y + av.Y, av.Id); } else { AddItem(10 + av.X, y + av.Y, av.Id - 100000); } AddHtml(95, y, width - 95, Server.Misc.Titles.ComputeTitle(Owner, c_Target)); if (Owner.AccessLevel != AccessLevel.Player) { AddHtml(95, y += 20, width - 95, "Access: " + c_Target.AccessLevel); } else if (c_Target.AccessLevel != AccessLevel.Player) { AddHtml(95, y += 20, width - 95, "" + c_Target.AccessLevel); } else { if (c_Target.Guild != null) { AddHtml(95, y += 20, width - 95, "[" + c_Target.Guild.Abbreviation + "] " + c_Target.GuildTitle); } if (General.IsInFaction(c_Target)) { AddHtml(95, y += 20, width - 95, General.FactionName(c_Target) + " " + General.FactionTitle(c_Target)); } } if (y < 89) { y = 89; } if (Owner == c_Target) { AddButton(32, y, 0x2626, 0x2627, "Avatar Down", new GumpCallback(AvatarDown)); AddButton(52, y, 0x2622, 0x2623, "Avatar Up", new GumpCallback(AvatarUp)); } AddHtml(0, y += 20, width, "<CENTER>" + General.Local(253) + " " + Data.GetData(c_Target).Karma); if (Owner == c_Target) { AddHtml(20, y += 25, 100, General.Local(247)); AddTextField(20, y += 25, width - 40, 65, 0x480, 0xBBC, "Signature", Data.GetData(c_Target).Signature); AddHtml(width - 125, y += 65, 50, General.Local(244)); AddHtml(width - 65, y, 50, General.Local(245)); AddButton(width - 140, y + 3, 0x2716, "Clear Sig", new GumpCallback(ClearSig)); AddButton(width - 80, y + 3, 0x2716, "Submit Sig", new GumpCallback(SubmitSig)); } else { AddHtml(20, y += 25, width - 40, 65, "'" + Data.GetData(c_Target).Signature + "'", false, false); y += 65; } if (Owner != c_Target) { ViewOptions(width); } AddBackgroundZero(0, 0, width, y + 40, Data.GetData(c_Target).DefaultBack); }