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 EnemyHomeDataMessage(level.GetClient(), l, level); PacketManager.ProcessOutgoingPacket(p); } else { Debugger.WriteLine("Attack failed: id " + id + " not found"); } } catch (Exception ex) { Debugger.WriteLine("Attack failed with error: " + ex.ToString()); } } } 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 EnemyHomeDataMessage(level.GetClient(), l, level); PacketManager.ProcessOutgoingPacket(p); } else { Debugger.WriteLine("Attack failed: id " + id + " not found"); } } catch(Exception ex) { Debugger.WriteLine("Attack failed with error: " + ex.ToString()); } } } else { SendCommandFailedMessage(level.GetClient()); } }
//00 00 00 00 00 00 00 00 00 00 00 97 public override void Execute(Level level) { var l = ObjectManager.GetRandomPlayer(); if (l != null && l != level) { l.Tick(); var p = new EnemyHomeDataMessage(level.GetClient(), l, level); PacketManager.ProcessOutgoingPacket(p); } }
//00 00 00 00 00 00 00 00 00 00 00 97 public override void Execute(Level level) { var l = ObjectManager.GetRandomOnlinePlayer(); if (l != null) { l.Tick(); var p = new EnemyHomeDataMessage(level.GetClient(), l, level); PacketManager.ProcessOutgoingPacket(p); } }
//00 00 00 00 00 00 00 00 00 00 00 97 public override void Execute(Level level) { //PlaceHolder to disable attack var l = ObjectManager.GetRandomPlayerFromAll(); if (l != null) { l.Tick(); var p = new EnemyHomeDataMessage(level.GetClient(), l, level); PacketManager.ProcessOutgoingPacket(p); } }