Gogs 2 månader sedan
förälder
incheckning
a21f96afce
2 ändrade filer med 26 tillägg och 5 borttagningar
  1. 23 5
      bin/client_msg/common.proto
  2. 3 0
      bin/client_msg/msg.ts

+ 23 - 5
bin/client_msg/common.proto

@@ -20,9 +20,8 @@ message ReqUserInfo {
 message ReqLogin {
   string nikeName = 1;
   string userId = 2;
-  string gameStatus = 3;
-  MsgError error = 4;
-  int32 points = 5;
+  MsgError error = 3;
+  int32 points = 4;
 
 }
 
@@ -63,6 +62,7 @@ message ResJoinRoom {
   string userId = 1;
   string confId = 2;
   string gameId = 3;
+  optional string roomId = 4; // 可选的房间 ID
 }
 
 //房间相应房间信息
@@ -74,6 +74,13 @@ message ReqJoinRoom {
   ReqRoom roomInfo = 5;
 }
 
+message RoomSiteRount {
+  int32 Site = 1;
+  int32 timeout = 2;
+}
+message RoomInfo {
+  ReqRoom roomInfo = 1;
+}
 //下一回合
 message NextRound {
   optional ReqJoinRoom Info = 1;
@@ -135,19 +142,30 @@ message TeenPattiRoom {
   string type = 8; 
 
 }
+message ReqReconnect {
+    string userId = 1;
+    string gameId = 2;
+    string roomId = 3;
+    string confId = 4;
 
+    
+}
+message ResReconnect {
+    string gameId = 1;
+    string status =2;
+    string message =3;
+}
 // 通知客户端发牌
 message ReqDealCard {
   optional int32 sitPos = 1;
   optional int32 index = 2;
 }
 
-// 通知客户端操作
 message ReqPlayerAction {
   int32 sitPos = 1;
   PlayerOpt playerOpt = 2;
   ResBet resBet = 3;
-
+  int32 timeout = 4; // 添加剩余时间字段
 }
 
 // 接到玩家操作

+ 3 - 0
bin/client_msg/msg.ts

@@ -28,4 +28,7 @@ export enum MsgID {
     ReqUserInfo = 25,
     SiteShowResult = 26,
     ReqInsufficientPoints = 27,
+    ReqReconnect = 28,
+    RoomInfo = 29,
+    RoomSiteRount = 30,
 }