Esempio n. 1
0
        private void HandleBetBroadcastRequest(GamePeer gamePeer, OperationRequest operationRequest, SendParameters sendParameters)
        {
            var room = FindPeerRoom(gamePeer) as BaccaratGameRoom;

            var betBroadcast = new BroadcastBetRequest(gamePeer.Protocol, operationRequest);

            if (room != null)
            {
                room.BroadcastBet(gamePeer, betBroadcast);
            }
        }
Esempio n. 2
0
        private void HandleBetBroadcastRequest(GamePeer gamePeer, OperationRequest operationRequest, SendParameters sendParameters)
        {
            var room = FindPeerRoom(gamePeer) as BaccaratGameRoom;

            var betBroadcast = new BroadcastBetRequest(gamePeer.Protocol, operationRequest);

            if (room != null)
            {
                room.BroadcastBet(gamePeer, betBroadcast);
            }
        }
Esempio n. 3
0
        public void BroadcastBet(GamePeer peer, BroadcastBetRequest broadcastBet)
        {
            broadcastBet.Actor = playerManager.GetPlayer(peer).key.ID;
            var eventData = new EventData(EventCode.BaccaratBroadcastBet) { Parameters = broadcastBet.OperationRequest.Parameters };

            lock (syncRoot)
            {
                BroadcastMessage(peer, eventData, new SendParameters());
            }

            var response = new OperationResponse(CommonOperationCode.BaccaratBroadcastBet, new Dictionary<byte, object> { { (byte)CommonParameterKey.Success, true } });
            peer.SendOperationResponse(response, new SendParameters());
        }
Esempio n. 4
0
        public void BroadcastBet(GamePeer peer, BroadcastBetRequest broadcastBet)
        {
            broadcastBet.Actor = playerManager.GetPlayer(peer).key.ID;
            var eventData = new EventData(EventCode.BaccaratBroadcastBet)
            {
                Parameters = broadcastBet.OperationRequest.Parameters
            };

            lock (syncRoot)
            {
                BroadcastMessage(peer, eventData, new SendParameters());
            }

            var response = new OperationResponse(CommonOperationCode.BaccaratBroadcastBet, new Dictionary <byte, object> {
                { (byte)CommonParameterKey.Success, true }
            });

            peer.SendOperationResponse(response, new SendParameters());
        }