public void SendVoiceRemove(LocalVoice voice, int channelId, int targetPlayerId) { object content = voiceClient.buildVoiceRemoveMessage(voice); var opt = new LoadBalancing.RaiseEventOptions(); opt.SequenceChannel = (byte)channelId; if (targetPlayerId != 0) { opt.TargetActors = new int[] { targetPlayerId }; } lock (sendLock) { this.OpRaiseEvent(VoiceEventCode.GetCode(opt.SequenceChannel), content, true, opt); } }
public void SendVoiceRemove(LocalVoice voice, int channelId, int targetPlayerId) { object content = voiceClient.buildVoiceRemoveMessage(voice); var sendOpt = new SendOptions() { Reliability = true, Channel = (byte)channelId }; var opt = new LoadBalancing.RaiseEventOptions(); if (targetPlayerId != 0) { opt.TargetActors = new int[] { targetPlayerId }; } lock (sendLock) { if (voice.DebugEchoMode) { opt.Receivers = ReceiverGroup.All; } this.OpRaiseEvent(VoiceEventCode.GetCode(channelId), content, opt, sendOpt); } }