private void SendRoomGameStatus(UpdateRoomGameStatusEvent e) { var hallRoomId = LongData.Allocate(); hallRoomId.Value = e.HallRoomId; var rStatus = IntData.Allocate(); rStatus.Value = e.Status; var canEnter = IntData.Allocate(); canEnter.Value = e.CanEnter; SendAndReleaseMessage(RpcMessageType.UpdateRoomGameState, hallRoomId, rStatus, canEnter); }
private void SendJoinRoomFail(JoinRoomResponseEvent e) { _logger.ErrorFormat("JoinRoom Error ... Code:{0}", e.JoinRoomResponseInfo.ErrCode); var rCode = IntData.Allocate(); rCode.Value = (int)e.JoinRoomResponseInfo.ErrCode; var rHallRoomId = LongData.Allocate(); rHallRoomId.Value = e.HallRoomId; var loginPlayer = LoginPlayer.Allocate(); loginPlayer.Id = e.JoinRoomResponseInfo.PlayerId; loginPlayer.Token = ""; SendAndReleaseMessage(RpcMessageType.ResponseJoinRoom, rCode, rHallRoomId, loginPlayer); }
private void SendJoinRoomSuccess(JoinRoomResponseEvent e) { _logger.InfoFormat("JoinRoom Successfully Player Id {0} Token {1}", e.JoinRoomResponseInfo.PlayerId, e.JoinRoomResponseInfo.Token); var loginPlayer = LoginPlayer.Allocate(); loginPlayer.Id = e.JoinRoomResponseInfo.PlayerId; loginPlayer.Token = e.JoinRoomResponseInfo.Token; var rCode = IntData.Allocate(); rCode.Value = e.RetCode; var rHallRoomId = LongData.Allocate(); rHallRoomId.Value = e.HallRoomId; SendAndReleaseMessage(RpcMessageType.ResponseJoinRoom, rCode, rHallRoomId, loginPlayer); }
private void SendMandateLogOutMessage(MandatoryLogOutEvent e) { _logger.InfoFormat("Mandatory Logout Message HallRoom Id {0} Room Id {1} PlayerEntityId {2}", e.HallRoomId, e.RoomId, e.PlayerId); LongData hallRoomId = LongData.Allocate(); hallRoomId.Value = e.HallRoomId; IntData roomId = IntData.Allocate(); roomId.Value = e.RoomId; LongData playerId = LongData.Allocate(); playerId.Value = e.PlayerId; SendAndReleaseMessage(RpcMessageType.MandateLogOut, hallRoomId, roomId, playerId); if (e.LogOutReason == MandatoryLogOutEvent.Reason.GameExit) { _statistic.IsGameOverMandateLogOutSend = true; } }