Пример #1
0
 public override void Execute(Level level)
 {
     if (level.GetAccountPrivileges() >= GetRequiredAccountPrivileges())
     {
         if (m_vArgs.Length >= 2)
         {
             try
             {
                 var id = Convert.ToInt64(m_vArgs[1]);
                 var l  = ResourcesManager.GetPlayer(id);
                 if (l != null)
                 {
                     l.Tick();
                     var p = new VisitedHomeDataMessage(level.GetClient(), l, level);
                     PacketManager.ProcessOutgoingPacket(p);
                 }
                 else
                 {
                     Debugger.WriteLine("Visit failed: id " + id + " not found");
                 }
             }
             catch (Exception ex)
             {
                 Debugger.WriteLine("Visit failed with error: " + ex);
             }
         }
     }
     else
     {
         SendCommandFailedMessage(level.GetClient());
     }
 }
 public override void Execute(Level level)
 {
     if(level.GetAccountPrivileges() >= GetRequiredAccountPrivileges())
     {
         if(m_vArgs.Length >= 2)
         {
             try
             {
                 long id = Convert.ToInt64(m_vArgs[1]);
                 var l = ResourcesManager.GetPlayer(id);
                 if(l != null)
                 {
                     l.Tick();
                     var p = new VisitedHomeDataMessage(level.GetClient(), l, level);
                     PacketManager.ProcessOutgoingPacket(p);
                 }
                 else
                 {
                     Debugger.WriteLine("Visit failed: id " + id + " not found");
                 }
             }
             catch(Exception ex)
             {
                 Debugger.WriteLine("Visit failed with error: " + ex.ToString()); 
             }
         }
     }
     else
     {
         SendCommandFailedMessage(level.GetClient());
     }
 }