Ejemplo n.º 1
0
        public static void EventSink_ProfileRequest(ProfileRequestEventArgs e)
        {
            Mobile beholder = e.Beholder;
            Mobile beheld   = e.Beheld;

            if (!beheld.Player)
            {
                return;
            }

            if (beholder.Map != beheld.Map || !beholder.InRange(beheld, 12) || !beholder.CanSee(beheld))
            {
                return;
            }

            string header = FameKarmaTitles.ComputeTitle(beholder, beheld, false);

            string footer = "";

            if (beheld.ProfileLocked)
            {
                if (beholder == beheld)
                {
                    footer = "Your profile has been locked.";
                }

                else if (beholder.AccessLevel >= AccessLevel.Counselor)
                {
                    footer = "This profile has been locked.";
                }
            }

            if (footer.Length == 0 && beholder == beheld)
            {
                footer = GetAccountDuration(beheld);
                footer = String.Concat(footer, "\n", GetCharacterAge(beheld));
            }

            //footer = String.Concat(footer, "\n", GetPowerHourTimer(beheld));
            footer = String.Concat(footer, "\n", GetPreviousNames(beheld));

            string body = beheld.Profile;

            if (body == null || body.Length <= 0)
            {
                body = "";
            }

            beholder.Send(new DisplayProfile(beholder != beheld || !beheld.ProfileLocked, beheld, header, body, footer));
        }
Ejemplo n.º 2
0
        public static void EventSink_PaperdollRequest(PaperdollRequestEventArgs e)
        {
            Mobile beholder = e.Beholder;
            Mobile beheld   = e.Beheld;

            beholder.Send(new DisplayPaperdoll(beheld, FameKarmaTitles.ComputeTitle(beholder, beheld, false), beheld.AllowEquipFrom(beholder)));

            if (ObjectPropertyList.Enabled)
            {
                List <Item> items = beheld.Items;

                for (int i = 0; i < items.Count; ++i)
                {
                    beholder.Send(items[i].OPLPacket);
                }

                // NOTE: OSI sends MobileUpdate when opening your own paperdoll.
                // It has a very bad rubber-banding affect. What positive affects does it have?
            }
        }