protected void SendMessageToEveryone(BgoProtocolWriter bw) { if (enabled) { } else { Log.Add(LogSeverity.ERROR, string.Format("Trying to send message to everyone for disabled protocol \"{0}\"", protocolID)); } bw.Dispose(); }
/// <summary> /// Sends the message to the sector by getting the client[index].sector id /// </summary> /// <param name="index"></param> /// <param name="bw"></param> protected void SendMessageToSector(int index, BgoProtocolWriter bw) { if (enabled) { Server.SendDataToSector(Server.GetClientByIndex(index).Character.PlayerShip.sectorId, bw); DebugMessage(bw); } else { Log.Add(LogSeverity.ERROR, string.Format("Trying to send message to the Sector \"{0}\" for disabled protocol \"{1}\"", Server.GetSectorById(Server.GetClientByIndex(index).Character.PlayerShip.sectorId).Name, protocolID)); } bw.Dispose(); }
protected void SendMessageToSectorButUser(int index, BgoProtocolWriter bw) { if (enabled) { Server.SendDataToSectorButClient(index, bw); DebugMessage(bw); } else { Log.Add(LogSeverity.ERROR, string.Format("Trying to send message to \"{0}\" for disabled protocol \"{1}\"", index, protocolID)); } bw.Dispose(); }