Пример #1
0
        private static void EventSink_Login(LoginEventArgs args)
        {
            Mobile  mobile = args.Mobile;
            Account a      = args.Mobile.Account as Account;

            if (m_NegTimers.ContainsKey(mobile.Account.Username.ToString()))
            {
                NegotiateTimer timer = m_NegTimers[mobile.Account.Username.ToString()];
                if (timer != null)
                {
                    timer.Stop();
                }
                m_NegTimers.Remove(mobile.Account.Username.ToString());
            }
            if (mobile.AccessLevel == AccessLevel.Player && (a == null || a.GetTag("RazorSystemDebug") == null))
            {
                args.Mobile.NetState.Send(new RazorFeatures());
                (new LightTimer(args.Mobile)).Start();
                NegotiateTimer negtimer = new NegotiateTimer(mobile, m_NegTimers);
                negtimer.Start();
                m_NegTimers.Add(mobile.Account.Username.ToString(), negtimer);
            }
        }
Пример #2
0
 private static void EventSink_Login( LoginEventArgs args )
 {
     Mobile mobile = args.Mobile;
     Account a = args.Mobile.Account as Account;
     if(m_NegTimers.ContainsKey(mobile.Account.Username.ToString()))
     {
         NegotiateTimer timer = m_NegTimers[mobile.Account.Username.ToString()];
         if(timer != null)
             timer.Stop();
         m_NegTimers.Remove(mobile.Account.Username.ToString());
     }
     if(mobile.AccessLevel == AccessLevel.Player && (a == null || a.GetTag("RazorSystemDebug") == null))
     {
         args.Mobile.NetState.Send(new RazorFeatures());
         (new LightTimer(args.Mobile)).Start();
         NegotiateTimer negtimer = new NegotiateTimer(mobile, m_NegTimers);
         negtimer.Start();
         m_NegTimers.Add(mobile.Account.Username.ToString(),negtimer);
     }
 }