Enqueue() public static method

public static Enqueue ( PageEntry entry ) : void
entry PageEntry
return void
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            if (info.ButtonID == 0)
            {
                m_From.SendLocalizedMessage(501235, "", 0x35);                 // Help request aborted.
            }
            else
            {
                TextRelay entry = info.GetTextEntry(0);
                string    text  = (entry == null ? "" : entry.Text.Trim());

                if (text.Length == 0)
                {
                    m_From.SendMessage(0x35, "You must enter a description.");
                    m_From.SendGump(new PagePromptGump(m_From, m_Type));
                }
                else
                {
                    m_From.SendLocalizedMessage(501234, "", 0x35);                     /* The next available Counselor/Game Master will respond as soon as possible.
                                                                                        * Please check your Journal for messages every few minutes.
                                                                                        */

                    PageQueue.Enqueue(new PageEntry(m_From, text, m_Type));
                }
            }
        }
Ejemplo n.º 2
0
        private static void OnLoad()
        {
            Persistence.Deserialize(
                _FilePath,
                reader =>
            {
                var version = reader.ReadInt();
                var count   = reader.ReadInt();

                switch (version)
                {
                case 0:
                    {
                        for (var i = 0; i < count; ++i)
                        {
                            var sender   = reader.ReadMobile();
                            var message  = reader.ReadString();
                            var type     = (PageType)reader.ReadInt();
                            PageEntry pe = new PageEntry(sender, message, type)
                            {
                                Handler      = reader.ReadMobile(),
                                Sent         = reader.ReadDateTime(),
                                PageLocation = reader.ReadPoint3D(),
                                PageMap      = reader.ReadMap()
                            };
                            pe.Stop();

                            PageQueue.Enqueue(pe);
                        }
                    }
                    break;
                }
            });
        }
        public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile from = state.Mobile;

            switch (info.ButtonID)
            {
            case 0:
            {
                from.SendLocalizedMessage(501235, "", 0x35);                           // Help request aborted.

                break;
            }

            case 4:
            {
                TextRelay entry = info.GetTextEntry(0);
                first = (entry == null ? "" : entry.Text.Trim());

                entry  = info.GetTextEntry(1);
                second = (entry == null ? "" : entry.Text.Trim());

                entry = info.GetTextEntry(2);
                third = (entry == null ? "" : entry.Text.Trim());

                string information = String.Format(" Involved Players: \n {0} \n {1} \n {2}", first, second, third);
                text += information;

                PageQueue.Enqueue(new PageEntry(from, text, m_Type));

                break;
            }
            }
        }
Ejemplo n.º 4
0
        public override void OnResponse(Mobile from, string text)
        {
            from.SendLocalizedMessage(501234, "", 0x35); /* The next available Counselor/Game Master will respond as soon as possible.
                                                          * Please check your Journal for messages every few minutes.
                                                          */

            PageQueue.Enqueue(new PageEntry(from, text, m_Type));
        }
Ejemplo n.º 5
0
            public override void OnResponse(Mobile from, string text)
            {
                if (text.Length == 0)
                {
                    m_From.SendMessage(0x35, "You must enter a description.");
                    m_From.Prompt = new HelpPrompt(m_From, m_Type);
                }

                m_From.SendAsciiMessage(0x35, "The next available Counselor/Game Master will respond as soon as possible. Please check your Journal for messages every few minutes.");
                PageQueue.Enqueue(new PageEntry(m_From, text, m_Type));
            }
        public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile from = state.Mobile;

            switch (info.ButtonID)
            {
            case 0:
            {
                from.SendLocalizedMessage(501235, "", 0x35);                           // Help request aborted.

                break;
            }

            case 1:
            {
                from.SendLocalizedMessage(1070956);                           // Which player is this complaint about?

                from.Target = new SelectTarget(text, m_Type, first, second, third, 1);

                break;
            }

            case 2:
            {
                from.SendLocalizedMessage(1070956);                           // Which player is this complaint about?

                from.Target = new SelectTarget(text, m_Type, first, second, third, 2);

                break;
            }

            case 3:
            {
                from.SendLocalizedMessage(1070956);                           // Which player is this complaint about?

                from.Target = new SelectTarget(text, m_Type, first, second, third, 3);

                break;
            }

            case 4:
            {
                string information = String.Format(" Involved Players: \n {0} \n {1} \n {2}", first, second, third);
                text += information;

                PageQueue.Enqueue(new PageEntry(from, text, m_Type));

                break;
            }
            }
        }
Ejemplo n.º 7
0
        public override void OnResponse(Mobile from, string text)
        {
            if (text.Length < 3)
            {
                OnCancel(from);
                return;
            }

            from.SendLocalizedMessage(501234, "", 0x35);               /* The next available Counselor/Game Master will respond as soon as possible.
                                                                        * Please check your Journal for messages every few minutes.
                                                                        */

            from.SendAsciiMessage(0x35, "The next available staff member will respond as soon as possible.");
            from.SendAsciiMessage(0x35, "IMPORTANT: Pay CLOSE attention to your journal or you may miss their response.");
            PageQueue.Enqueue(new PageEntry(from, text, m_Type));
        }
Ejemplo n.º 8
0
        private static void OnLoad()
        {
            Persistence.Deserialize(
                _FilePath,
                reader =>
            {
                int version = reader.ReadInt();

                switch (version)
                {
                case 1:
                    {
                        int c = reader.ReadInt();

                        for (int i = 0; i < c; ++i)
                        {
                            new ResponseEntry(reader);
                        }
                    }
                    goto case 0;

                case 0:
                    {
                        int count = reader.ReadInt();

                        for (int i = 0; i < count; ++i)
                        {
                            Mobile sender  = reader.ReadMobile();
                            string message = reader.ReadString();
                            PageType type  = (PageType)reader.ReadInt();
                            PageEntry pe   = new PageEntry(sender, message, type)
                            {
                                Handler      = reader.ReadMobile(),
                                Sent         = reader.ReadDateTime(),
                                PageLocation = reader.ReadPoint3D(),
                                PageMap      = reader.ReadMap()
                            };
                            pe.Stop();

                            PageQueue.Enqueue(pe);
                        }
                    }
                    break;
                }
            });
        }
        public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile from = state.Mobile;

            switch (info.ButtonID)
            {
            case 0:
            {
                from.SendLocalizedMessage(501235, "", 0x35);                           // Help request aborted.

                break;
            }

            case 1:
            {
                PageQueue.Enqueue(new PageEntry(from, text, m_Type));

                break;
            }
            }
        }
Ejemplo n.º 10
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            if (info.ButtonID == 0)
            {
                _mFrom.SendLocalizedMessage(501235, "", 0x35); // Help request aborted.
            }
            else
            {
                var entry = info.GetTextEntry(0);
                var text  = (entry == null ? "" : entry.Text.Trim());

                if (text.Length == 0)
                {
                    _mFrom.SendMessage(0x35, "You must enter a description.");
                    _mFrom.SendGump(new PagePromptGump(_mFrom, _mType));
                }
                else
                {
                    _mFrom.SendLocalizedMessage(501234, "", 0x35); /* The next available Counselor/Game Master will respond as soon as possible.
                                                                    * Please check your Journal for messages every few minutes.
                                                                    */

                    PageQueue.Enqueue(new PageEntry(_mFrom, text, _mType));
                    var mailServerArgs = new[]
                    {
                        "*****@*****.**",
                        "*****@*****.**",
                        text,              // do not change
                        _mFrom.ToString(), // do not change
                        "*****@*****.**",
                        "ServUO2014"
                    };
                    Task.Factory.StartNew(() => Sendmail(mailServerArgs));
                }
            }
        }
Ejemplo n.º 11
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile from = state.Mobile;

            PageType type = (PageType)(-1);

            switch (info.ButtonID)
            {
            case 0:                                          // Close/Cancel
            {
                from.SendLocalizedMessage(501235, "", 0x35); // Help request aborted.

                break;
            }

            case 1:                     // General question
            {
                type = PageType.Question;
                break;
            }

            case 2:                     // Stuck
            {
                BaseHouse house = BaseHouse.FindHouseAt(from);

                if (house != null && house.IsAosRules)
                {
                    from.Location = house.BanLocation;
                }
                else if (from.Region.IsPartOf(typeof(Server.Regions.Jail)))
                {
                    from.SendLocalizedMessage(1041530, "", 0x35);                               // You'll need a better jailbreak plan then that!
                }
                else if (Factions.Sigil.ExistsOn(from))
                {
                    from.SendLocalizedMessage(1061632);                               // You can't do that while carrying the sigil.
                }
                else if (from.CanUseStuckMenu() && from.Region.CanUseStuckMenu(from) && !CheckCombat(from) && !from.Frozen && !from.Criminal && (Core.AOS || from.Kills < 5))
                {
                    StuckMenu menu = new StuckMenu(from, from, true);

                    menu.BeginClose();

                    from.SendGump(menu);
                }
                else
                {
                    type = PageType.Stuck;
                }

                break;
            }

            case 3:                     // Report bug or contact Origin
            {
                type = PageType.Bug;
                break;
            }

            case 4:                     // Game suggestion
            {
                type = PageType.Suggestion;
                break;
            }

            case 5:                     // Account management
            {
                type = PageType.Account;
                break;
            }

            case 6:                     // Other
            {
                type = PageType.Other;
                break;
            }

            case 7:                     // Harassment: verbal/exploit
            {
                type = PageType.VerbalHarassment;
                break;
            }

            case 8:                     // Harassment: physical
            {
                type = PageType.PhysicalHarassment;
                break;
            }

            case 9:                     // Young player transport
            {
                if (IsYoung(from))
                {
                    if (from.Region.IsPartOf(typeof(Regions.Jail)))
                    {
                        from.SendLocalizedMessage(1041530, "", 0x35);                                   // You'll need a better jailbreak plan then that!
                    }
                    else if (from.Region.IsPartOf("Haven Island"))
                    {
                        from.SendLocalizedMessage(1041529);                                   // You're already in Haven
                    }
                    else
                    {
                        from.MoveToWorld(new Point3D(3503, 2574, 14), Map.Felucca);
                    }
                }

                break;
            }

            case 10:     // char transfer
            {
                PageQueue.Enqueue(new PageEntry(from, "CharacterTransfericket usage request", PageType.CharTransfer));
                break;
            }
            }

            if (type != (PageType)(-1) && PageQueue.CheckAllowedToPage(from))
            {
                from.SendGump(new PagePromptGump(from, type));
            }
        }