private void PlayerOrderServiceOnOrdersChanged(object sender, EventArgs eventArgs) { ServiceClient serviceClient; lock (_clientLock) { if (!_isConnected) { return; } serviceClient = Interlocked.CompareExchange(ref _serviceClient, null, null); } if (serviceClient == null) { return; } try { var messageOrder = new PlayerOrdersMessage(_playerOrderService.Orders, _playerOrderService.AutoTurn); serviceClient.EndTurn(messageOrder); } catch (Exception e) { GameLog.Client.General.ErrorFormat("Exception occurred while submitting end-of-turn orders: {0}", e.Message); throw; } }
public void EndTurn(PlayerOrdersMessage orders) //not combat orders, see below sendCombatOrders { try { Channel.EndTurn(orders); } catch (FaultException) {} }