Esempio n. 1
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is BaseBook)
                {
                    BaseBook       book  = targeted as BaseBook;
                    BookPageInfo[] pages = book.Pages;

                    for (int i = 0; i < pages.Length && i < book.Pages.Length; i++)
                    {
                        BookPageInfo page = pages[i];

                        int length = page.Lines.Length;

                        for (int j = 0; j < length; j++)
                        {
                            m_PG.Lines.Add((page.Lines[j]).Trim());
                        }
                    }

                    m_PG.Post();
                    from.SendMessage("The message has been posted.");

                    if (!m_PG.m_ThreadEntry.StaffMessage)
                    {
                        World.Broadcast(0x482, false, "{0} has just posted a message on the forum! Type [Forum to read it.", from.Name);
                    }
                }
            }
Esempio n. 2
0
            public override void OnCancel(Mobile from)
            {
                if (m_PG.Lines.Count == 0)
                {
                    return;
                }

                if (m_PG.Lines.Count > 0)
                {
                    m_PG.Post();
                    from.SendMessage("Message has been set.");
                }
            }