예제 #1
0
        private static void OnCommand_Duel(CommandEventArgs e)
        {
            Mobile m = e.Mobile;

            if (m == null)
            {
                return;
            }


            if (!m_Enabled)
            {
                m.SendMessage("Sorry the duel system is currently offline. Please try again later.");
                return;
            }

            if (!CanDuel(m))
            {
                return;
            }

            Duel duel = new Duel(m);

            if (!m_DuelTable.ContainsKey(m.Serial))
            {
                m_DuelTable.Add(m.Serial, duel);
            }

            DuelStartTimer timer = new DuelStartTimer(duel);

            DuelStartTimeoutTable[m.Serial] = timer;

            m.CloseGump(typeof(DuelConfigGump));
            m.SendGump(new DuelConfigGump(duel));
        }
예제 #2
0
		private static void OnCommand_Duel(CommandEventArgs e)
		{
			Mobile m = e.Mobile;

			if (m == null)
				return;


			if (!m_Enabled)
			{
				m.SendMessage("Sorry the duel system is currently offline. Please try again later.");
				return;
			}

			if (!CanDuel(m))
				return;

			Duel duel = new Duel(m);

			if (!m_DuelTable.ContainsKey(m.Serial))
				m_DuelTable.Add(m.Serial, duel);

			DuelStartTimer timer = new DuelStartTimer(duel);
			DuelStartTimeoutTable[m.Serial] = timer;

			m.CloseGump(typeof(DuelConfigGump));
			m.SendGump(new DuelConfigGump(duel));
		}