Beispiel #1
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);
        }
        protected override void BuildGump()
        {
            int width = 300;
            int y     = 10;

            AddImage(10, y, 0x589);
            Avatar av = Avatar.GetAvatar(c_Message.From);

            if (av.Id < 100000)
            {
                AddImage(10 + av.X, y + av.Y, av.Id);
            }
            else
            {
                AddItem(10 + av.X, y + av.Y, av.Id - 100000);
            }

            AddButton(20, 20, 0x2716, "Profile", new GumpCallback(Profile));

            AddHtml(95, y += 15, width - 105, General.Local(60) + " " + c_Message.From.RawName);
            AddHtml(95, y += 20, width - 105, 42, c_Message.Subject, false, false);

            AddHtml(20, y += 50, width - 40, 80, HTML.Black + c_Message.Msg, true, true);
            y             += 90;

            if (Data.GetData(Owner).Messages.Contains(c_Message))
            {
                if (c_Message.Type == MsgType.Normal)
                {
                    if (Message.CanMessage(Owner, c_Message.From) && !Message.StaffTimeout(c_Message))
                    {
                        AddHtml(width - 85, y, 50, General.Local(248));
                        AddButton(width - 100, y + 3, 0x2716, "Reply", new GumpCallback(Reply));
                    }

                    AddHtml(width - 145, y, 50, General.Local(249));
                    AddButton(width - 160, y + 3, 0x2716, "Delete", new GumpCallback(Delete));

                    if (c_Message.From.AccessLevel == AccessLevel.Player)
                    {
                        AddHtml(95, y, 50, General.Local(2));
                        AddButton(80, y + 3, 0x2716, "Ignore", new GumpCallback(Ignore));
                    }
                }
                else if (c_Message.Type == MsgType.Invite)
                {
                    AddHtml(width - 85, y, 50, General.Local(250));
                    AddButton(width - 100, y + 3, 0x2716, "Accept", new GumpCallback(Accept));

                    AddHtml(width - 145, y, 50, General.Local(251));
                    AddButton(width - 160, y + 3, 0x2716, "Deny", new GumpCallback(Deny));

                    if (c_Message.From.AccessLevel == AccessLevel.Player)
                    {
                        AddHtml(95, y, 50, General.Local(2));
                        AddButton(80, y + 3, 0x2716, "Ignore", new GumpCallback(Ignore));
                    }
                }
            }

            AddBackgroundZero(0, 0, width, y + 30, Data.GetData(Owner).DefaultBack);
        }