Gogs 3 months ago
parent
commit
984d797367
2 changed files with 26 additions and 21 deletions
  1. 23 19
      bin/client_msg/common.proto
  2. 3 2
      bin/client_msg/msg.ts

+ 23 - 19
bin/client_msg/common.proto

@@ -7,6 +7,15 @@ message ResLogin {
   string userId = 1;
   string nikeName = 2;
 }
+message SiteShowRequest {
+  int32 InitiatorSitPos = 1;  // 发起比牌请求的玩家
+  int32 OpponentSitPos = 2;   // 和谁比
+}
+message ReqUserInfo {
+  string UserId = 1;
+  int32 Points = 2;
+  string RoomId = 3;
+}
 //登录 响应
 message ReqLogin {
   string nikeName = 1;
@@ -16,13 +25,7 @@ message ReqLogin {
   int32 points = 5;
 
 }
-//用户信息
-message UserInfo {
-  string nikeName = 1;
-  string userId = 2;
-  int32 points = 3;
 
-}
 
 //进入大厅
 message EnterHall {
@@ -33,15 +36,23 @@ message EnterHall {
 message LeaveHall {
   string userId = 1;
 }
+//离开房间
+//leaveReason 0 不满足房间条件,1主动离开.
+message ReqLeaveRoom {
+  string gameId = 1;
+  string roomId = 2;
+  string userId = 3;
+  string leaveReason = 4; //1.
+}
 
 //加入房间
 message ResJoinRoom {
   string userId = 1;
-  string roomId = 2;
+  string confId = 2;
   string gameId = 3;
 }
 
-//加入房间
+//房间相应房间信息
 message ReqJoinRoom {
   string userId = 1;
   string roomId = 2;
@@ -78,16 +89,7 @@ message ReqRoomID {
   string roomId = 2;
   string userId = 3;
 }
-message ResLeaveRoom {
-  string gameId = 1;
-  string roomId = 2;
-  string userId = 3;
-}
-message ReqLeaveRoom {
-  string gameId = 1;
-  string roomId = 2;
-  string userId = 3;
-}
+
 message ResBet {
   int32 minBlindBet =1;
   int32 maxBlindBet =2;
@@ -152,7 +154,9 @@ enum PlayerOptType {
     OPT_SELECT      = 5;  // 选择操作
     OPT_SHOW         = 6;  // 亮牌
     OPT_ANTE         = 7;  // 底注
-    OPT_SITESHOW         =8;  // 底注
+    OPT_SITESHOW         =8;  // 发起上家比牌
+    OPT_REFUSESITESHOW         =9;  // 拒绝与上家比牌
+    OPT_AGREESITESHOW =10;//同意与上家比牌
 }
 
 message PlayerOpt {

+ 3 - 2
bin/client_msg/msg.ts

@@ -24,6 +24,7 @@ export enum MsgID {
     ReqHeartBeat = 21,
     ResHeartBeat = 22,
     NextRound = 23,
-    ResRoomID = 24,
-    ResLeaveRoom = 25,
+    ReqLeaveRoom = 24,
+    ReqUserInfo = 25,
+    SiteShowRequest = 26,
 }