Gogs 4 mēneši atpakaļ
vecāks
revīzija
820165a57d

+ 4 - 0
bin/client_msg/common.proto

@@ -179,4 +179,8 @@ message MsgError {
 
 message Hello {
   string name = 1;
+}
+
+message ReqRoomTipsMessage {
+  string message = 1;
 }

+ 1 - 0
bin/client_msg/msg.ts

@@ -20,4 +20,5 @@ export enum MsgID {
     ReqBet = 17,
     ReqPlayerList = 18,
     ReqResult = 19,
+    ReqRoomTipsMessage = 20,
 }

+ 66 - 3
src/server/msg/common.pb.go

@@ -1699,6 +1699,53 @@ func (x *Hello) GetName() string {
 	return ""
 }
 
+type ReqRoomTipsMessage struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
+}
+
+func (x *ReqRoomTipsMessage) Reset() {
+	*x = ReqRoomTipsMessage{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_common_proto_msgTypes[26]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ReqRoomTipsMessage) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReqRoomTipsMessage) ProtoMessage() {}
+
+func (x *ReqRoomTipsMessage) ProtoReflect() protoreflect.Message {
+	mi := &file_common_proto_msgTypes[26]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReqRoomTipsMessage.ProtoReflect.Descriptor instead.
+func (*ReqRoomTipsMessage) Descriptor() ([]byte, []int) {
+	return file_common_proto_rawDescGZIP(), []int{26}
+}
+
+func (x *ReqRoomTipsMessage) GetMessage() string {
+	if x != nil {
+		return x.Message
+	}
+	return ""
+}
+
 var File_common_proto protoreflect.FileDescriptor
 
 var file_common_proto_rawDesc = []byte{
@@ -1867,7 +1914,10 @@ var file_common_proto_rawDesc = []byte{
 	0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01,
 	0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x1b, 0x0a, 0x05,
 	0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x2a, 0x84, 0x01, 0x0a, 0x0d, 0x50, 0x6c,
+	0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2e, 0x0a, 0x12, 0x52, 0x65, 0x71,
+	0x52, 0x6f, 0x6f, 0x6d, 0x54, 0x69, 0x70, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
+	0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2a, 0x84, 0x01, 0x0a, 0x0d, 0x50, 0x6c,
 	0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4f,
 	0x50, 0x54, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54,
 	0x5f, 0x53, 0x45, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x54, 0x5f, 0x50,
@@ -1893,7 +1943,7 @@ func file_common_proto_rawDescGZIP() []byte {
 }
 
 var file_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
-var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 26)
+var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 27)
 var file_common_proto_goTypes = []interface{}{
 	(PlayerOptType)(0),         // 0: PlayerOptType
 	(*ResLogin)(nil),           // 1: ResLogin
@@ -1922,6 +1972,7 @@ var file_common_proto_goTypes = []interface{}{
 	(*ReqRound)(nil),           // 24: ReqRound
 	(*MsgError)(nil),           // 25: MsgError
 	(*Hello)(nil),              // 26: Hello
+	(*ReqRoomTipsMessage)(nil), // 27: ReqRoomTipsMessage
 }
 var file_common_proto_depIdxs = []int32{
 	25, // 0: ReqLogin.error:type_name -> MsgError
@@ -2263,6 +2314,18 @@ func file_common_proto_init() {
 				return nil
 			}
 		}
+		file_common_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ReqRoomTipsMessage); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
 	}
 	file_common_proto_msgTypes[12].OneofWrappers = []interface{}{}
 	file_common_proto_msgTypes[18].OneofWrappers = []interface{}{}
@@ -2273,7 +2336,7 @@ func file_common_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_common_proto_rawDesc,
 			NumEnums:      1,
-			NumMessages:   26,
+			NumMessages:   27,
 			NumExtensions: 0,
 			NumServices:   0,
 		},

+ 1 - 0
src/server/msg/msg.go

@@ -43,6 +43,7 @@ func init() {
 	// Processor.Register(&MsgError{})
 	Processor.Register(&ReqPlayerList{})
 	Processor.Register(&ReqResult{})
+	Processor.Register(&ReqRoomTipsMessage{})
 	Processor.Range(func(id uint16, t reflect.Type) {
 		log.Debug("消息ID: %d, 消息类型: %s\n", id, t.Elem().Name())
 		msgList = append(msgList, MsgInfo{