IndexOf() public static method

public static IndexOf ( PageEntry e ) : int
e PageEntry
return int
Example #1
0
            protected override void OnTick()
            {
                int index = PageQueue.IndexOf(m_Entry);

                if (m_Entry.Sender.NetState != null && index != -1)
                {
                    //Message automatique annoncant la position du page au joueur
                    m_Entry.Sender.SendMessage("Veuillez patienter, un MJ répondra à votre page dès que possible.");
                    if (index == 0)
                    {
                        m_Entry.Sender.SendMessage("Vous êtes le prochain sur la liste de pages.");
                    }
                    else
                    {
                        m_Entry.Sender.SendMessage("Vous êtes le " + (index + 1) + "e dans la liste de pages");
                    }
                }
                else
                {
                    if (index != -1)
                    {
                        m_Entry.AddResponse(m_Entry.Sender, "[Logout]");
                    }

                    PageQueue.Remove(m_Entry);
                }
            }
Example #2
0
            protected override void OnTick()
            {
                int index = PageQueue.IndexOf(m_Entry);

                if (m_Entry.Sender.NetState != null && index != -1)
                {
                    m_Entry.Sender.SendLocalizedMessage(1008077, true, (index + 1).ToString());
                    // Thank you for paging. Queue status :
                    if (SupportEmail == null || SupportWebsite == null)
                    {
                        m_Entry.Sender.SendLocalizedMessage(1008084);
                        // You can reference our website at www.uo.com or contact us at [email protected]. To cancel your page, please select the help button again and select cancel.
                    }
                    else
                    {
                        m_Entry.Sender.SendMessage("You can reference our website at " + SupportWebsite + " or contact us at " + SupportEmail + ". To cancel your page, please select the help button again and select cancel.");
                    }

                    if (m_Entry.Handler != null && m_Entry.Handler.NetState == null)
                    {
                        m_Entry.Handler = null;
                    }
                }
                else
                {
                    if (index != -1)
                    {
                        m_Entry.AddResponse(m_Entry.Sender, "[Logout]");
                    }

                    PageQueue.Remove(m_Entry);
                }
            }
Example #3
0
            protected override void OnTick()
            {
                int index = PageQueue.IndexOf(m_Entry);

                if (m_Entry.Sender.NetState != null && index != -1)
                {
                    m_Entry.Sender.SendLocalizedMessage(1008077, true, (index + 1).ToString());                     // Thank you for paging. Queue status :
                    //m_Entry.Sender.SendLocalizedMessage( 1008084 ); // You can reference our website [...]

                    int iNumberOfGMsOnline = 0;
                    foreach (NetState ns in NetState.Instances)
                    {
                        Mobile m = ns.Mobile;

                        if (m != null && m.AccessLevel >= AccessLevel.Counselor && m.AutoPageNotify)
                        {
                            iNumberOfGMsOnline++;
                        }
                    }

                    if (iNumberOfGMsOnline == 0 || (Server.Commands.PageEnableCommand.Enabled == false))
                    {
                        m_Entry.Sender.SendMessage("We regret to inform you that there are no Angel Island staff online to handle your page.");
                    }

                    m_Entry.Sender.SendMessage("To cancel your page, select the help button again and select cancel.");
                }
                else
                {
                    PageQueue.Remove(m_Entry);
                }
            }
Example #4
0
            protected override void OnTick()
            {
                int index = PageQueue.IndexOf(m_Entry);

                if (m_Entry.Sender.NetState != null && index != -1)
                {
                    m_Entry.Sender.SendLocalizedMessage(1008077, true, (index + 1).ToString()); // Thank you for paging. Queue status :
                    m_Entry.Sender.SendLocalizedMessage(1008084);                               // You can reference our website at www.uo.com or contact us at [email protected]. To cancel your page, please select the help button again and select cancel.
                }
                else
                {
                    PageQueue.Remove(m_Entry);
                }
            }
Example #5
0
            protected override void OnTick()
            {
                int index = PageQueue.IndexOf(m_Entry);

                if (m_Entry.Sender.NetState != null && index != -1)
                {
                    m_Entry.Sender.SendLocalizedMessage(1008077, true, (index + 1).ToString());                       // Thank you for paging. Queue status :
                    //m_Entry.Sender.SendLocalizedMessage( 1008084 ); // You can reference our website [...]
                }
                else
                {
                    PageQueue.Remove(m_Entry);
                }
            }
Example #6
0
            protected override void OnTick()
            {
                int index = PageQueue.IndexOf(m_Entry);

                if (m_Entry.Sender.NetState != null && index != -1)
                {
                    m_Entry.Sender.SendLocalizedMessage(1008077, true, (index + 1).ToString());                       // Thank you for paging. Queue status :
                    //m_Entry.Sender.SendLocalizedMessage( 1008084 ); // You can reference our website at www.uo.com or contact us at [email protected]. To cancel your page, please select the help button again and select cancel.
                    m_Entry.Sender.SendMessage("You can reference our website at https://github.com/msturgill/divinity. To cancel your page, please select the help button again and select cancel.");
                }
                else
                {
                    if (index != -1)
                    {
                        m_Entry.AddResponse(m_Entry.Sender, "[Logout]");
                    }

                    PageQueue.Remove(m_Entry);
                }
            }
Example #7
0
            protected override void OnTick()
            {
                int index = PageQueue.IndexOf(m_Entry);

                if (m_Entry.Sender.NetState != null && index != -1)
                {
                    m_Entry.Sender.SendLocalizedMessage(1008077, false, (index + 1).ToString());// Thank you for paging. Queue status :
                    m_Entry.Sender.SendMessage("You can reference our website at www.in-uo.net. To cancel your page, please select the help button again and select cancel.");

                    if (m_Entry.Handler != null && m_Entry.Handler.NetState == null)
                    {
                        m_Entry.Handler = null;
                    }
                }

/* Don't delete pages on logout
 *                              else
 *                              {
 *                                      PageQueue.Remove( m_Entry );
 *                              }
 */
            }