Пример #1
0
        public void EnterEvent(Mobile mobile)
        {
            if (mobile.AccessLevel >= AccessLevel.GameMaster)
            {
                TheHuntGump TheHuntGump = new TheHuntGump(mobile, this);
                mobile.SendGump(TheHuntGump);
                return;
            }

            if (!m_IsAcceptingPlayers)
            {
                mobile.SendMessage(0x35, "TheHunt não está aceitando inscricoes neste momento.");
                return;
            }

            if (m_TheHuntPlayerList.Contains(mobile))
            {
                mobile.SendMessage(0x35, "Voce já está inscrito para o evento.");
                return;
            }

            if (m_TheHuntPlayerList.Count >= m_PlayerSpotList.Count)
            {
                mobile.SendMessage(0x35, string.Format("TheHunt já atingiu o limite máximo de {0} participantes.", m_PlayerSpotList.Count));
                return;
            }

            m_TheHuntPlayerList.Add(mobile);

            // Salva a localizacao no inicio do evento e nao na inscricao
            //m_TheHuntPlayerHomeLocationList.Add(mobile, mobile.Location);
            //m_TheHuntPlayerHomeLocationMapList.Add(mobile, mobile.Map);

            mobile.SendMessage(0x35, "Voce se inscreveu para o TheHunt com sucesso!");
            mobile.SendMessage(0x35, "Aguarde o inicio do evento.. Boa Sorte!");
        }
Пример #2
0
        public void EnterEvent(Mobile mobile)
        {
            if (mobile.AccessLevel >= AccessLevel.GameMaster)
            {
                TheHuntGump TheHuntGump = new TheHuntGump(mobile, this);
                mobile.SendGump(TheHuntGump);
                return;
            }

            if (!m_IsAcceptingPlayers)
            {
                mobile.SendMessage(0x35, "TheHunt não está aceitando inscricoes neste momento.");
                return;
            }

            if (m_TheHuntPlayerList.Contains(mobile))
            {
                mobile.SendMessage(0x35, "Voce já está inscrito para o evento.");
                return;
            }

            if (m_TheHuntPlayerList.Count >= m_PlayerSpotList.Count)
            {
                mobile.SendMessage(0x35, string.Format("TheHunt já atingiu o limite máximo de {0} participantes.", m_PlayerSpotList.Count));
                return;
            }

            m_TheHuntPlayerList.Add(mobile);

            // Salva a localizacao no inicio do evento e nao na inscricao
            //m_TheHuntPlayerHomeLocationList.Add(mobile, mobile.Location);
            //m_TheHuntPlayerHomeLocationMapList.Add(mobile, mobile.Map);

            mobile.SendMessage(0x35, "Voce se inscreveu para o TheHunt com sucesso!");
            mobile.SendMessage(0x35, "Aguarde o inicio do evento.. Boa Sorte!");
        }