void c_ClientCommandInfo(object sender, ClientCommandInfoEventArgs e) { Client c = (Client)sender; CommandInfo ci = e.Info; Client[] nearbyClients = GetNearByClients(c); byte[] bufferSendCommand = PacketManager.SendCommand(c.MyCharacter, ci); SendSpecific(nearbyClients, bufferSendCommand); }
void c_ClientCommandInfo(object sender, ClientCommandInfoEventArgs e) { Client c = (Client)sender; CommandInfo ci = e.Info; MapEngine mapEngine = GetMapEngine(c.MyCharacter.MapId); Client[] clients = GetClientsForChars(mapEngine.GetCharactersInRange(c.MyCharacter.Position, 150).ToArray()); byte[] bufferSendCommand = PacketManager.SendCommand(c.MyCharacter, ci); SendToClients(bufferSendCommand, clients); }