王虎 3 lat temu
rodzic
commit
ad814c1d81
3 zmienionych plików z 30 dodań i 0 usunięć
  1. 4 0
      README.md
  2. 25 0
      protos/chat.proto
  3. 1 0
      protos/user.proto

+ 4 - 0
README.md

@@ -45,6 +45,10 @@
 | 11 | LoginResponse | s -> c | 服务器响应登陆请求 |
 | 12 | HeartbeatRequest | c -> s | 客户端心跳 |
 | 13 | HeartbeatResponse | s -> c | 服务器心跳 |
+| 14 | ChatNotify | c -> s | 发送聊天消息 |
+| 15 | ChatPush | s -> c | 推送聊天消息 |
+| 16 | SwitchWorldReques | c -> s | 发送切换世界请求 |
+| 17 | SwitchWorldResponse | s -> c | 服务器响应切换世界结果 |
 | 100 | LobbyJoinPush | s -> c | 用户加入大厅 |
 | 101 | LobbyLeavePush | s -> c | 用户离开大厅 |
 | 120 | RoomCreateRequest | c -> s | 客户端请求创建房间 |

+ 25 - 0
protos/chat.proto

@@ -0,0 +1,25 @@
+syntax = "proto3";
+package protos;
+
+import "userinfo.proto";
+import "result.proto";
+
+message ChatNotify {
+    uint32 Type = 1; // 0=世界;1=大厅;2=队伍;3=派对;4=好友(私聊)
+    uint64 Target = 2; // 对象id, 对应Type字段的世界id,roomid partyid, 好友id
+    string Msg = 3; // 消息正文, 客户端自行编码解码
+}
+
+message ChatPush {
+    uint32 Type = 1; // 0=世界;1=大厅;2=队伍;3=派对;4=好友(私聊)
+    uint64 Target = 2; // 对象id, 对应Type字段的世界id,roomid partyid, 好友id
+    string Msg = 3; // 消息正文, 客户端自行编码解码
+    UserInfo Sender = 4;
+}
+
+message SwitchWorldRequest {
+    uint32 WorldID = 1;
+}
+message SwitchWorldResponse {
+    Result Result = 1;
+}

+ 1 - 0
protos/user.proto

@@ -35,4 +35,5 @@ message LoginResponse {
     string Errmsg=6;
     uint64 T = 7;
     bool Master = 8;
+    uint32 WorldID = 9;
 }