Ejemplo n.º 1
0
        public override bool CanChat(Mobile m, bool say)
        {
            if (!General.IsInFaction(m))
            {
                if (say)
                {
                    m.SendMessage(Data.GetData(m).SystemC, General.Local(37));
                }
                return(false);
            }

            return(base.CanChat(m, say));
        }
Ejemplo n.º 2
0
        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);
        }