From f8ce769e9c2d2b8428a194f150f3bd67b23e7544 Mon Sep 17 00:00:00 2001 From: zqj <582132116@qq.com> Date: Thu, 9 Jun 2022 15:16:39 +0800 Subject: [PATCH] fix: rpc = rar + rar / rpc = req + rsp --- cmd/gameserver/action/HeroAction.go | 2 +- cmd/gameserver/action/RoleAction.go | 10 +++++----- cmd/gameserver/action/protocode.go | 6 +++--- cmd/gameserver/plugin/plugin.go | 2 +- cmd/gameserver/service/agent.go | 2 +- cmd/httpserver/action/AccountAction.go | 2 +- cmd/test/action/protocode.go | 6 +++--- cmd/test/service/TestClient.go | 10 +++++----- luban_examples | 2 +- models/roleTest.go | 2 +- pb/account.pb.go | 60 ++++++++++++++++++++++++++++++------------------------------ pb/game.pb.go | 591 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ pb/protocode.pb.go | 68 ++++++++++++++++++++++++++++++++++---------------------------------- tools/generator.py | 37 ++++++++++++++++++++----------------- 14 files changed, 421 insertions(+), 379 deletions(-) diff --git a/cmd/gameserver/action/HeroAction.go b/cmd/gameserver/action/HeroAction.go index 963d825..7cbcb0b 100644 --- a/cmd/gameserver/action/HeroAction.go +++ b/cmd/gameserver/action/HeroAction.go @@ -19,7 +19,7 @@ EquipmentDelRpc 删除装备 2 删除失败 */ func EquipmentDelRpc(role *models.RoleModel, msg components.IMessage) (int32, interface{}) { - req := pb.EquipmentDelReq{} + req := pb.EquipmentDelRar{} if err := proto.Unmarshal(msg.GetData(), &req); err != nil { logger.Error("loginRpc err: %v", err) return 1, nil diff --git a/cmd/gameserver/action/RoleAction.go b/cmd/gameserver/action/RoleAction.go index 6f5fe08..30f137d 100644 --- a/cmd/gameserver/action/RoleAction.go +++ b/cmd/gameserver/action/RoleAction.go @@ -45,7 +45,7 @@ CreateRpc 创建角色请求 2: 角色不存在 */ func CreateRpc(role1 *models.RoleModel, msg components.IMessage) (int32, interface{}) { - req := pb.CreateReq{} + req := pb.CreateRar{} if err := proto.Unmarshal(msg.GetData(), &req); err != nil { logger.Error("CreateRpc err: %v", err) return 1, err @@ -64,7 +64,7 @@ func CreateRpc(role1 *models.RoleModel, msg components.IMessage) (int32, interfa role.Data.Uid = req.Token role.Data.Level = 1 role.Data.Nick = getRandomName() - if err := role.Create(); err != nil { + if err = role.Create(); err != nil { logger.Error("CreateRpc role create err: %v", err) return 4, nil } @@ -74,7 +74,7 @@ func CreateRpc(role1 *models.RoleModel, msg components.IMessage) (int32, interfa // ChangeTeamRpc 阵容变换 func ChangeTeamRpc(role *models.RoleModel, msg components.IMessage) (int32, interface{}) { - req := pb.ChangeTeamReq{} + req := pb.ChangeTeamRar{} if err := proto.Unmarshal(msg.GetData(), &req); err != nil { logger.Error("loginRpc err: %v", err) return 1, nil @@ -89,7 +89,7 @@ HeroEquipReferRpc 穿戴/脱 装备 2: 装备不存在 */ func HeroEquipReferRpc(role *models.RoleModel, msg components.IMessage) (int32, interface{}) { - req := pb.HeroEquipReferReq{} + req := pb.HeroEquipReferRar{} if err := proto.Unmarshal(msg.GetData(), &req); err != nil { logger.Error("loginRpc err: %v", err) return 1, nil @@ -109,7 +109,7 @@ RoleClearItemsRpc 删除物品 2 删除失败 */ func RoleClearItemsRpc(role *models.RoleModel, msg components.IMessage) (int32, interface{}) { - req := pb.RoleClearItemsReq{} + req := pb.RoleClearItemsRar{} if err := proto.Unmarshal(msg.GetData(), &req); err != nil { logger.Error("proto rpc err: %v", err) return 1, nil diff --git a/cmd/gameserver/action/protocode.go b/cmd/gameserver/action/protocode.go index fcb2467..ce4cda2 100644 --- a/cmd/gameserver/action/protocode.go +++ b/cmd/gameserver/action/protocode.go @@ -9,14 +9,14 @@ func GetActionMap() map[interface{}]interface{} { logger.Debug("init protocode...") am := make(map[interface{}]interface{}) am[uint32(pb.ProtoCode_HeartRpc)] = HeartRpc + am[uint32(pb.ProtoCode_RoleStartBattleRpc)] = RoleStartBattleRpc + am[uint32(pb.ProtoCode_RoleEndBattleRpc)] = RoleEndBattleRpc + am[uint32(pb.ProtoCode_HeroUpLevelRpc)] = HeroUpLevelRpc am[uint32(pb.ProtoCode_CreateRpc)] = CreateRpc am[uint32(pb.ProtoCode_ChangeTeamRpc)] = ChangeTeamRpc am[uint32(pb.ProtoCode_HeroEquipReferRpc)] = HeroEquipReferRpc am[uint32(pb.ProtoCode_RoleClearItemsRpc)] = RoleClearItemsRpc - am[uint32(pb.ProtoCode_RoleStartBattleRpc)] = RoleStartBattleRpc - am[uint32(pb.ProtoCode_RoleEndBattleRpc)] = RoleEndBattleRpc am[uint32(pb.ProtoCode_EquipmentDelRpc)] = EquipmentDelRpc - am[uint32(pb.ProtoCode_HeroUpLevelRpc)] = HeroUpLevelRpc return am } diff --git a/cmd/gameserver/plugin/plugin.go b/cmd/gameserver/plugin/plugin.go index 12e654d..d46ef6c 100644 --- a/cmd/gameserver/plugin/plugin.go +++ b/cmd/gameserver/plugin/plugin.go @@ -16,7 +16,7 @@ func init() { func GetActionMap() map[interface{}]interface{} { logger.Debug("init protocode...") am := make(map[interface{}]interface{}) - am[uint32(pb.ProtoCode_LoginRsp)] = LoginRpc + am[uint32(pb.ProtoCode_LoginRpc)] = LoginRpc return am } diff --git a/cmd/gameserver/service/agent.go b/cmd/gameserver/service/agent.go index 55a87fc..9585251 100644 --- a/cmd/gameserver/service/agent.go +++ b/cmd/gameserver/service/agent.go @@ -86,7 +86,7 @@ func (c *Agent) OnLoginQuery(msg components.IMessage) (int32, proto.Message) { return 2, nil } role.SetProperty("Device", req.Device) - protoMsg := &pb.RoleRsp{ + protoMsg := &pb.LoginRsp{ Role: role.Data, Hero: role.GetAllHero(), Team: role.GetAllTeam(), diff --git a/cmd/httpserver/action/AccountAction.go b/cmd/httpserver/action/AccountAction.go index 8409d8a..798dc4c 100644 --- a/cmd/httpserver/action/AccountAction.go +++ b/cmd/httpserver/action/AccountAction.go @@ -85,7 +85,7 @@ func (h *AccountAction) Login(c *gin.Context) (int, interface{}) { return 3, "password error" } - rsp := &pb.LoginRsp{ + rsp := &pb.AccountLogin{ Token: account.Uid, GameService: common.GlobalConf.GameService.ServiceInfo, } diff --git a/cmd/test/action/protocode.go b/cmd/test/action/protocode.go index 1071a0c..0298945 100644 --- a/cmd/test/action/protocode.go +++ b/cmd/test/action/protocode.go @@ -7,14 +7,14 @@ import ( func GetTestActionMap() map[interface{}]interface{} { am := make(map[interface{}]interface{}) am[uint32(pb.ProtoCode_HeartRpc)] = HeartRsp + am[uint32(pb.ProtoCode_RoleStartBattleRpc)] = RoleStartBattleRsp + am[uint32(pb.ProtoCode_RoleEndBattleRpc)] = RoleEndBattleRsp + am[uint32(pb.ProtoCode_HeroUpLevelRpc)] = HeroUpLevelRsp am[uint32(pb.ProtoCode_CreateRpc)] = CreateRsp am[uint32(pb.ProtoCode_ChangeTeamRpc)] = ChangeTeamRsp am[uint32(pb.ProtoCode_HeroEquipReferRpc)] = HeroEquipReferRsp am[uint32(pb.ProtoCode_RoleClearItemsRpc)] = RoleClearItemsRsp - am[uint32(pb.ProtoCode_RoleStartBattleRpc)] = RoleStartBattleRsp - am[uint32(pb.ProtoCode_RoleEndBattleRpc)] = RoleEndBattleRsp am[uint32(pb.ProtoCode_EquipmentDelRpc)] = EquipmentDelRsp - am[uint32(pb.ProtoCode_HeroUpLevelRpc)] = HeroUpLevelRsp am[uint32(pb.ProtoCode_DisConnectNty)] = DisConnectNty am[uint32(pb.ProtoCode_RoleUpdatePropertyNty)] = RoleUpdatePropertyNty am[uint32(pb.ProtoCode_RoleUpdateItemsNty)] = RoleUpdateItemsNty diff --git a/cmd/test/service/TestClient.go b/cmd/test/service/TestClient.go index 939383b..dfa18d0 100644 --- a/cmd/test/service/TestClient.go +++ b/cmd/test/service/TestClient.go @@ -50,17 +50,17 @@ func (t *TestClient) OnLoginQuery(msg components.IMessage) { logger.Error("Login errcode: %d", errCode) if errCode == 2 { - req := &pb.CreateReq{ + req := &pb.CreateRar{ Token: t.Token, Device: "test-create", } r, _ := proto.Marshal(req) - t.GetConn().SendSuccess(uint32(pb.ProtoCode_CreateReq), r) + t.GetConn().SendSuccess(uint32(pb.ProtoCode_CreateRpc), r) return } } - req := pb.RoleRsp{} + req := pb.LoginRsp{} if err := proto.Unmarshal(msg.GetData(), &req); err != nil { logger.Error("loginRpc err: %v", err) return @@ -74,7 +74,7 @@ func (t *TestClient) OnMessage(msg components.IMessage) { logger.Debug("rsp errCode:%d, protocolID: %d", msg.GetHeader().GetErrCode(), msg.GetHeader().GetMsgID()) //login rsp - if msg.GetHeader().GetMsgID() == uint32(pb.ProtoCode_LoginReq) { + if msg.GetHeader().GetMsgID() == uint32(pb.ProtoCode_LoginRpc) { t.OnLoginQuery(msg) return } @@ -107,7 +107,7 @@ func (t *TestClient) Login(token string) { t.Token = token head := &components.PBHead{ Length: 0, - Cmd: uint32(pb.ProtoCode_LoginReq), + Cmd: uint32(pb.ProtoCode_LoginRpc), ErrCode: 0, PreField: 0, } diff --git a/luban_examples b/luban_examples index 64026a9..090af6e 160000 --- a/luban_examples +++ b/luban_examples @@ -1 +1 @@ -Subproject commit 64026a935d29e4baef757b9ef7548ff2082516d6 +Subproject commit 090af6e8d6d03271341d401ab3e73e9c23ef4709 diff --git a/models/roleTest.go b/models/roleTest.go index b0a22af..fe9f21c 100644 --- a/models/roleTest.go +++ b/models/roleTest.go @@ -14,7 +14,7 @@ type RoleTestModel struct { Equipment ProtoMap } -func NewRoleTestModel(rsp pb.RoleRsp) *RoleTestModel { +func NewRoleTestModel(rsp pb.LoginRsp) *RoleTestModel { data := &RoleTestModel{ Role: rsp.Role, Hero: make(ProtoMap), diff --git a/pb/account.pb.go b/pb/account.pb.go index a47f948..9f80c19 100644 --- a/pb/account.pb.go +++ b/pb/account.pb.go @@ -99,7 +99,7 @@ func (x *ServiceInfo) GetGmport() int32 { return 0 } -type LoginRsp struct { +type AccountLogin struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -108,8 +108,8 @@ type LoginRsp struct { GameService []*ServiceInfo `protobuf:"bytes,2,rep,name=game_service,json=gameService,proto3" json:"game_service,omitempty"` } -func (x *LoginRsp) Reset() { - *x = LoginRsp{} +func (x *AccountLogin) Reset() { + *x = AccountLogin{} if protoimpl.UnsafeEnabled { mi := &file_account_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -117,13 +117,13 @@ func (x *LoginRsp) Reset() { } } -func (x *LoginRsp) String() string { +func (x *AccountLogin) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LoginRsp) ProtoMessage() {} +func (*AccountLogin) ProtoMessage() {} -func (x *LoginRsp) ProtoReflect() protoreflect.Message { +func (x *AccountLogin) ProtoReflect() protoreflect.Message { mi := &file_account_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -135,19 +135,19 @@ func (x *LoginRsp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LoginRsp.ProtoReflect.Descriptor instead. -func (*LoginRsp) Descriptor() ([]byte, []int) { +// Deprecated: Use AccountLogin.ProtoReflect.Descriptor instead. +func (*AccountLogin) Descriptor() ([]byte, []int) { return file_account_proto_rawDescGZIP(), []int{1} } -func (x *LoginRsp) GetToken() string { +func (x *AccountLogin) GetToken() string { if x != nil { return x.Token } return "" } -func (x *LoginRsp) GetGameService() []*ServiceInfo { +func (x *AccountLogin) GetGameService() []*ServiceInfo { if x != nil { return x.GameService } @@ -292,23 +292,23 @@ var file_account_proto_rawDesc = []byte{ 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x61, 0x6d, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x67, 0x61, 0x6d, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x06, 0x67, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x59, 0x0a, 0x08, 0x4c, 0x6f, 0x67, - 0x69, 0x6e, 0x52, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x37, 0x0a, 0x0c, 0x67, - 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x67, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x22, 0x50, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x39, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0c, 0x0a, 0x01, 0x69, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x01, 0x69, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, - 0x79, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x05, 0x52, 0x06, 0x67, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x5d, 0x0a, 0x0c, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x37, 0x0a, 0x0c, 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x67, 0x61, 0x6d, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x50, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x39, 0x0a, 0x0d, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0c, 0x0a, 0x01, 0x69, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x69, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x01, 0x79, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -326,12 +326,12 @@ func file_account_proto_rawDescGZIP() []byte { var file_account_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_account_proto_goTypes = []interface{}{ (*ServiceInfo)(nil), // 0: account.ServiceInfo - (*LoginRsp)(nil), // 1: account.LoginRsp + (*AccountLogin)(nil), // 1: account.AccountLogin (*Register)(nil), // 2: account.Register (*UpdateVersion)(nil), // 3: account.UpdateVersion } var file_account_proto_depIdxs = []int32{ - 0, // 0: account.LoginRsp.game_service:type_name -> account.ServiceInfo + 0, // 0: account.AccountLogin.game_service:type_name -> account.ServiceInfo 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -358,7 +358,7 @@ func file_account_proto_init() { } } file_account_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoginRsp); i { + switch v := v.(*AccountLogin); i { case 0: return &v.state case 1: diff --git a/pb/game.pb.go b/pb/game.pb.go index 1d6e250..412e3c1 100644 --- a/pb/game.pb.go +++ b/pb/game.pb.go @@ -20,7 +20,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -//ResponseCmd HeartRsp type HeartReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -115,7 +114,6 @@ func (x *HeartRsp) GetCode() int64 { return 0 } -//ResponseCmd RoleRsp type LoginReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -171,18 +169,19 @@ func (x *LoginReq) GetDevice() string { return "" } -//ResponseCmd CreateReq -type CreateReq struct { +type LoginRsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - Device string `protobuf:"bytes,2,opt,name=device,proto3" json:"device,omitempty"` + Role *Role `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` + Hero []*Hero `protobuf:"bytes,3,rep,name=hero,proto3" json:"hero,omitempty"` + Team []*Team `protobuf:"bytes,4,rep,name=team,proto3" json:"team,omitempty"` + Equipments []*Equipment `protobuf:"bytes,5,rep,name=equipments,proto3" json:"equipments,omitempty"` } -func (x *CreateReq) Reset() { - *x = CreateReq{} +func (x *LoginRsp) Reset() { + *x = LoginRsp{} if protoimpl.UnsafeEnabled { mi := &file_game_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -190,13 +189,13 @@ func (x *CreateReq) Reset() { } } -func (x *CreateReq) String() string { +func (x *LoginRsp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateReq) ProtoMessage() {} +func (*LoginRsp) ProtoMessage() {} -func (x *CreateReq) ProtoReflect() protoreflect.Message { +func (x *LoginRsp) ProtoReflect() protoreflect.Message { mi := &file_game_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -208,33 +207,50 @@ func (x *CreateReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateReq.ProtoReflect.Descriptor instead. -func (*CreateReq) Descriptor() ([]byte, []int) { +// Deprecated: Use LoginRsp.ProtoReflect.Descriptor instead. +func (*LoginRsp) Descriptor() ([]byte, []int) { return file_game_proto_rawDescGZIP(), []int{3} } -func (x *CreateReq) GetToken() string { +func (x *LoginRsp) GetRole() *Role { if x != nil { - return x.Token + return x.Role } - return "" + return nil } -func (x *CreateReq) GetDevice() string { +func (x *LoginRsp) GetHero() []*Hero { if x != nil { - return x.Device + return x.Hero } - return "" + return nil } -type DisConnectNty struct { +func (x *LoginRsp) GetTeam() []*Team { + if x != nil { + return x.Team + } + return nil +} + +func (x *LoginRsp) GetEquipments() []*Equipment { + if x != nil { + return x.Equipments + } + return nil +} + +type CreateRar struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + Device string `protobuf:"bytes,2,opt,name=device,proto3" json:"device,omitempty"` } -func (x *DisConnectNty) Reset() { - *x = DisConnectNty{} +func (x *CreateRar) Reset() { + *x = CreateRar{} if protoimpl.UnsafeEnabled { mi := &file_game_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -242,13 +258,13 @@ func (x *DisConnectNty) Reset() { } } -func (x *DisConnectNty) String() string { +func (x *CreateRar) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DisConnectNty) ProtoMessage() {} +func (*CreateRar) ProtoMessage() {} -func (x *DisConnectNty) ProtoReflect() protoreflect.Message { +func (x *CreateRar) ProtoReflect() protoreflect.Message { mi := &file_game_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -260,22 +276,33 @@ func (x *DisConnectNty) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DisConnectNty.ProtoReflect.Descriptor instead. -func (*DisConnectNty) Descriptor() ([]byte, []int) { +// Deprecated: Use CreateRar.ProtoReflect.Descriptor instead. +func (*CreateRar) Descriptor() ([]byte, []int) { return file_game_proto_rawDescGZIP(), []int{4} } -//ResponseCmd ChangeTeamReq -type ChangeTeamReq struct { +func (x *CreateRar) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *CreateRar) GetDevice() string { + if x != nil { + return x.Device + } + return "" +} + +type DisConnectNty struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Team []*Team `protobuf:"bytes,1,rep,name=team,proto3" json:"team,omitempty"` } -func (x *ChangeTeamReq) Reset() { - *x = ChangeTeamReq{} +func (x *DisConnectNty) Reset() { + *x = DisConnectNty{} if protoimpl.UnsafeEnabled { mi := &file_game_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -283,13 +310,13 @@ func (x *ChangeTeamReq) Reset() { } } -func (x *ChangeTeamReq) String() string { +func (x *DisConnectNty) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ChangeTeamReq) ProtoMessage() {} +func (*DisConnectNty) ProtoMessage() {} -func (x *ChangeTeamReq) ProtoReflect() protoreflect.Message { +func (x *DisConnectNty) ProtoReflect() protoreflect.Message { mi := &file_game_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -301,29 +328,21 @@ func (x *ChangeTeamReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ChangeTeamReq.ProtoReflect.Descriptor instead. -func (*ChangeTeamReq) Descriptor() ([]byte, []int) { +// Deprecated: Use DisConnectNty.ProtoReflect.Descriptor instead. +func (*DisConnectNty) Descriptor() ([]byte, []int) { return file_game_proto_rawDescGZIP(), []int{5} } -func (x *ChangeTeamReq) GetTeam() []*Team { - if x != nil { - return x.Team - } - return nil -} - -type EquipInfo struct { +type ChangeTeamRar struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - EquipId string `protobuf:"bytes,1,opt,name=equipId,proto3" json:"equipId,omitempty"` - Pos int32 `protobuf:"varint,2,opt,name=pos,proto3" json:"pos,omitempty"` + Team []*Team `protobuf:"bytes,1,rep,name=team,proto3" json:"team,omitempty"` } -func (x *EquipInfo) Reset() { - *x = EquipInfo{} +func (x *ChangeTeamRar) Reset() { + *x = ChangeTeamRar{} if protoimpl.UnsafeEnabled { mi := &file_game_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -331,13 +350,13 @@ func (x *EquipInfo) Reset() { } } -func (x *EquipInfo) String() string { +func (x *ChangeTeamRar) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EquipInfo) ProtoMessage() {} +func (*ChangeTeamRar) ProtoMessage() {} -func (x *EquipInfo) ProtoReflect() protoreflect.Message { +func (x *ChangeTeamRar) ProtoReflect() protoreflect.Message { mi := &file_game_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -349,38 +368,29 @@ func (x *EquipInfo) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EquipInfo.ProtoReflect.Descriptor instead. -func (*EquipInfo) Descriptor() ([]byte, []int) { +// Deprecated: Use ChangeTeamRar.ProtoReflect.Descriptor instead. +func (*ChangeTeamRar) Descriptor() ([]byte, []int) { return file_game_proto_rawDescGZIP(), []int{6} } -func (x *EquipInfo) GetEquipId() string { - if x != nil { - return x.EquipId - } - return "" -} - -func (x *EquipInfo) GetPos() int32 { +func (x *ChangeTeamRar) GetTeam() []*Team { if x != nil { - return x.Pos + return x.Team } - return 0 + return nil } -//ResponseCmd HeroEquipReferReq -type HeroEquipReferReq struct { +type EquipInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - EquipIds []*EquipInfo `protobuf:"bytes,1,rep,name=equipIds,proto3" json:"equipIds,omitempty"` - HeroId string `protobuf:"bytes,2,opt,name=hero_id,json=heroId,proto3" json:"hero_id,omitempty"` - Refer bool `protobuf:"varint,3,opt,name=refer,proto3" json:"refer,omitempty"` //true 穿戴, false 脱下 + EquipId string `protobuf:"bytes,1,opt,name=equipId,proto3" json:"equipId,omitempty"` + Pos int32 `protobuf:"varint,2,opt,name=pos,proto3" json:"pos,omitempty"` } -func (x *HeroEquipReferReq) Reset() { - *x = HeroEquipReferReq{} +func (x *EquipInfo) Reset() { + *x = EquipInfo{} if protoimpl.UnsafeEnabled { mi := &file_game_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -388,13 +398,13 @@ func (x *HeroEquipReferReq) Reset() { } } -func (x *HeroEquipReferReq) String() string { +func (x *EquipInfo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*HeroEquipReferReq) ProtoMessage() {} +func (*EquipInfo) ProtoMessage() {} -func (x *HeroEquipReferReq) ProtoReflect() protoreflect.Message { +func (x *EquipInfo) ProtoReflect() protoreflect.Message { mi := &file_game_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -406,45 +416,37 @@ func (x *HeroEquipReferReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use HeroEquipReferReq.ProtoReflect.Descriptor instead. -func (*HeroEquipReferReq) Descriptor() ([]byte, []int) { +// Deprecated: Use EquipInfo.ProtoReflect.Descriptor instead. +func (*EquipInfo) Descriptor() ([]byte, []int) { return file_game_proto_rawDescGZIP(), []int{7} } -func (x *HeroEquipReferReq) GetEquipIds() []*EquipInfo { - if x != nil { - return x.EquipIds - } - return nil -} - -func (x *HeroEquipReferReq) GetHeroId() string { +func (x *EquipInfo) GetEquipId() string { if x != nil { - return x.HeroId + return x.EquipId } return "" } -func (x *HeroEquipReferReq) GetRefer() bool { +func (x *EquipInfo) GetPos() int32 { if x != nil { - return x.Refer + return x.Pos } - return false + return 0 } -type RoleRsp struct { +type HeroEquipReferRar struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Role *Role `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` - Hero []*Hero `protobuf:"bytes,3,rep,name=hero,proto3" json:"hero,omitempty"` - Team []*Team `protobuf:"bytes,4,rep,name=team,proto3" json:"team,omitempty"` - Equipments []*Equipment `protobuf:"bytes,5,rep,name=equipments,proto3" json:"equipments,omitempty"` + EquipIds []*EquipInfo `protobuf:"bytes,1,rep,name=equipIds,proto3" json:"equipIds,omitempty"` + HeroId string `protobuf:"bytes,2,opt,name=hero_id,json=heroId,proto3" json:"hero_id,omitempty"` + Refer bool `protobuf:"varint,3,opt,name=refer,proto3" json:"refer,omitempty"` //true 穿戴, false 脱下 } -func (x *RoleRsp) Reset() { - *x = RoleRsp{} +func (x *HeroEquipReferRar) Reset() { + *x = HeroEquipReferRar{} if protoimpl.UnsafeEnabled { mi := &file_game_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -452,13 +454,13 @@ func (x *RoleRsp) Reset() { } } -func (x *RoleRsp) String() string { +func (x *HeroEquipReferRar) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RoleRsp) ProtoMessage() {} +func (*HeroEquipReferRar) ProtoMessage() {} -func (x *RoleRsp) ProtoReflect() protoreflect.Message { +func (x *HeroEquipReferRar) ProtoReflect() protoreflect.Message { mi := &file_game_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -470,40 +472,32 @@ func (x *RoleRsp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RoleRsp.ProtoReflect.Descriptor instead. -func (*RoleRsp) Descriptor() ([]byte, []int) { +// Deprecated: Use HeroEquipReferRar.ProtoReflect.Descriptor instead. +func (*HeroEquipReferRar) Descriptor() ([]byte, []int) { return file_game_proto_rawDescGZIP(), []int{8} } -func (x *RoleRsp) GetRole() *Role { - if x != nil { - return x.Role - } - return nil -} - -func (x *RoleRsp) GetHero() []*Hero { +func (x *HeroEquipReferRar) GetEquipIds() []*EquipInfo { if x != nil { - return x.Hero + return x.EquipIds } return nil } -func (x *RoleRsp) GetTeam() []*Team { +func (x *HeroEquipReferRar) GetHeroId() string { if x != nil { - return x.Team + return x.HeroId } - return nil + return "" } -func (x *RoleRsp) GetEquipments() []*Equipment { +func (x *HeroEquipReferRar) GetRefer() bool { if x != nil { - return x.Equipments + return x.Refer } - return nil + return false } -//ResponseCmd RoleUpdatePropertyNty type RoleUpdatePropertyNty struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -559,7 +553,6 @@ func (x *RoleUpdatePropertyNty) GetRole() *Role { return nil } -//ResponseCmd RoleUpdateItemsNty type RoleUpdateItemsNty struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -607,8 +600,7 @@ func (x *RoleUpdateItemsNty) GetItems() string { return "" } -//ResponseCmd RoleClearItemsReq -type RoleClearItemsReq struct { +type RoleClearItemsRar struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -616,8 +608,8 @@ type RoleClearItemsReq struct { Items []string `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` } -func (x *RoleClearItemsReq) Reset() { - *x = RoleClearItemsReq{} +func (x *RoleClearItemsRar) Reset() { + *x = RoleClearItemsRar{} if protoimpl.UnsafeEnabled { mi := &file_game_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -625,13 +617,13 @@ func (x *RoleClearItemsReq) Reset() { } } -func (x *RoleClearItemsReq) String() string { +func (x *RoleClearItemsRar) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RoleClearItemsReq) ProtoMessage() {} +func (*RoleClearItemsRar) ProtoMessage() {} -func (x *RoleClearItemsReq) ProtoReflect() protoreflect.Message { +func (x *RoleClearItemsRar) ProtoReflect() protoreflect.Message { mi := &file_game_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -643,12 +635,12 @@ func (x *RoleClearItemsReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RoleClearItemsReq.ProtoReflect.Descriptor instead. -func (*RoleClearItemsReq) Descriptor() ([]byte, []int) { +// Deprecated: Use RoleClearItemsRar.ProtoReflect.Descriptor instead. +func (*RoleClearItemsRar) Descriptor() ([]byte, []int) { return file_game_proto_rawDescGZIP(), []int{11} } -func (x *RoleClearItemsReq) GetItems() []string { +func (x *RoleClearItemsRar) GetItems() []string { if x != nil { return x.Items } @@ -710,7 +702,44 @@ func (x *RoleStartBattleReq) GetCarbonId() int32 { return 0 } -//ResponseCmd RoleEndBattleRsp +type RoleStartBattleRsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RoleStartBattleRsp) Reset() { + *x = RoleStartBattleRsp{} + if protoimpl.UnsafeEnabled { + mi := &file_game_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RoleStartBattleRsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RoleStartBattleRsp) ProtoMessage() {} + +func (x *RoleStartBattleRsp) ProtoReflect() protoreflect.Message { + mi := &file_game_proto_msgTypes[13] + 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 RoleStartBattleRsp.ProtoReflect.Descriptor instead. +func (*RoleStartBattleRsp) Descriptor() ([]byte, []int) { + return file_game_proto_rawDescGZIP(), []int{13} +} + type RoleEndBattleReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -725,7 +754,7 @@ type RoleEndBattleReq struct { func (x *RoleEndBattleReq) Reset() { *x = RoleEndBattleReq{} if protoimpl.UnsafeEnabled { - mi := &file_game_proto_msgTypes[13] + mi := &file_game_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -738,7 +767,7 @@ func (x *RoleEndBattleReq) String() string { func (*RoleEndBattleReq) ProtoMessage() {} func (x *RoleEndBattleReq) ProtoReflect() protoreflect.Message { - mi := &file_game_proto_msgTypes[13] + mi := &file_game_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -751,7 +780,7 @@ func (x *RoleEndBattleReq) ProtoReflect() protoreflect.Message { // Deprecated: Use RoleEndBattleReq.ProtoReflect.Descriptor instead. func (*RoleEndBattleReq) Descriptor() ([]byte, []int) { - return file_game_proto_rawDescGZIP(), []int{13} + return file_game_proto_rawDescGZIP(), []int{14} } func (x *RoleEndBattleReq) GetChapterId() int32 { @@ -782,7 +811,6 @@ func (x *RoleEndBattleReq) GetTeamId() string { return "" } -//ResponseCmd RoleEndBattleRsp type RoleEndBattleRsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -799,7 +827,7 @@ type RoleEndBattleRsp struct { func (x *RoleEndBattleRsp) Reset() { *x = RoleEndBattleRsp{} if protoimpl.UnsafeEnabled { - mi := &file_game_proto_msgTypes[14] + mi := &file_game_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -812,7 +840,7 @@ func (x *RoleEndBattleRsp) String() string { func (*RoleEndBattleRsp) ProtoMessage() {} func (x *RoleEndBattleRsp) ProtoReflect() protoreflect.Message { - mi := &file_game_proto_msgTypes[14] + mi := &file_game_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -825,7 +853,7 @@ func (x *RoleEndBattleRsp) ProtoReflect() protoreflect.Message { // Deprecated: Use RoleEndBattleRsp.ProtoReflect.Descriptor instead. func (*RoleEndBattleRsp) Descriptor() ([]byte, []int) { - return file_game_proto_rawDescGZIP(), []int{14} + return file_game_proto_rawDescGZIP(), []int{15} } func (x *RoleEndBattleRsp) GetRoleLevel() int32 { @@ -870,8 +898,7 @@ func (x *RoleEndBattleRsp) GetHero() []*Hero { return nil } -//ResponseCmd EquipmentDelReq -type EquipmentDelReq struct { +type EquipmentDelRar struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -879,23 +906,23 @@ type EquipmentDelReq struct { Id []string `protobuf:"bytes,1,rep,name=id,proto3" json:"id,omitempty"` } -func (x *EquipmentDelReq) Reset() { - *x = EquipmentDelReq{} +func (x *EquipmentDelRar) Reset() { + *x = EquipmentDelRar{} if protoimpl.UnsafeEnabled { - mi := &file_game_proto_msgTypes[15] + mi := &file_game_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *EquipmentDelReq) String() string { +func (x *EquipmentDelRar) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EquipmentDelReq) ProtoMessage() {} +func (*EquipmentDelRar) ProtoMessage() {} -func (x *EquipmentDelReq) ProtoReflect() protoreflect.Message { - mi := &file_game_proto_msgTypes[15] +func (x *EquipmentDelRar) ProtoReflect() protoreflect.Message { + mi := &file_game_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -906,19 +933,18 @@ func (x *EquipmentDelReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EquipmentDelReq.ProtoReflect.Descriptor instead. -func (*EquipmentDelReq) Descriptor() ([]byte, []int) { - return file_game_proto_rawDescGZIP(), []int{15} +// Deprecated: Use EquipmentDelRar.ProtoReflect.Descriptor instead. +func (*EquipmentDelRar) Descriptor() ([]byte, []int) { + return file_game_proto_rawDescGZIP(), []int{16} } -func (x *EquipmentDelReq) GetId() []string { +func (x *EquipmentDelRar) GetId() []string { if x != nil { return x.Id } return nil } -//ResponseCmd EquipmentAddRsp type EquipmentAddNty struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -930,7 +956,7 @@ type EquipmentAddNty struct { func (x *EquipmentAddNty) Reset() { *x = EquipmentAddNty{} if protoimpl.UnsafeEnabled { - mi := &file_game_proto_msgTypes[16] + mi := &file_game_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -943,7 +969,7 @@ func (x *EquipmentAddNty) String() string { func (*EquipmentAddNty) ProtoMessage() {} func (x *EquipmentAddNty) ProtoReflect() protoreflect.Message { - mi := &file_game_proto_msgTypes[16] + mi := &file_game_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -956,7 +982,7 @@ func (x *EquipmentAddNty) ProtoReflect() protoreflect.Message { // Deprecated: Use EquipmentAddNty.ProtoReflect.Descriptor instead. func (*EquipmentAddNty) Descriptor() ([]byte, []int) { - return file_game_proto_rawDescGZIP(), []int{16} + return file_game_proto_rawDescGZIP(), []int{17} } func (x *EquipmentAddNty) GetEquip() *Equipment { @@ -966,7 +992,6 @@ func (x *EquipmentAddNty) GetEquip() *Equipment { return nil } -//ResponseCmd HeroUpLevelRsp type HeroUpLevelReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -979,7 +1004,7 @@ type HeroUpLevelReq struct { func (x *HeroUpLevelReq) Reset() { *x = HeroUpLevelReq{} if protoimpl.UnsafeEnabled { - mi := &file_game_proto_msgTypes[17] + mi := &file_game_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -992,7 +1017,7 @@ func (x *HeroUpLevelReq) String() string { func (*HeroUpLevelReq) ProtoMessage() {} func (x *HeroUpLevelReq) ProtoReflect() protoreflect.Message { - mi := &file_game_proto_msgTypes[17] + mi := &file_game_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1005,7 +1030,7 @@ func (x *HeroUpLevelReq) ProtoReflect() protoreflect.Message { // Deprecated: Use HeroUpLevelReq.ProtoReflect.Descriptor instead. func (*HeroUpLevelReq) Descriptor() ([]byte, []int) { - return file_game_proto_rawDescGZIP(), []int{17} + return file_game_proto_rawDescGZIP(), []int{18} } func (x *HeroUpLevelReq) GetHeroId() string { @@ -1033,7 +1058,7 @@ type HeroUpLevelRsp struct { func (x *HeroUpLevelRsp) Reset() { *x = HeroUpLevelRsp{} if protoimpl.UnsafeEnabled { - mi := &file_game_proto_msgTypes[18] + mi := &file_game_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1046,7 +1071,7 @@ func (x *HeroUpLevelRsp) String() string { func (*HeroUpLevelRsp) ProtoMessage() {} func (x *HeroUpLevelRsp) ProtoReflect() protoreflect.Message { - mi := &file_game_proto_msgTypes[18] + mi := &file_game_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1059,7 +1084,7 @@ func (x *HeroUpLevelRsp) ProtoReflect() protoreflect.Message { // Deprecated: Use HeroUpLevelRsp.ProtoReflect.Descriptor instead. func (*HeroUpLevelRsp) Descriptor() ([]byte, []int) { - return file_game_proto_rawDescGZIP(), []int{18} + return file_game_proto_rawDescGZIP(), []int{19} } func (x *HeroUpLevelRsp) GetHero() *Hero { @@ -1081,86 +1106,87 @@ var file_game_proto_rawDesc = []byte{ 0x22, 0x38, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x39, 0x0a, 0x09, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, - 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x44, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x4e, 0x74, 0x79, 0x22, 0x31, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x54, - 0x65, 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x37, 0x0a, 0x09, 0x45, 0x71, 0x75, - 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x71, 0x75, 0x69, 0x70, 0x49, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x71, 0x75, 0x69, 0x70, 0x49, 0x64, - 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, - 0x6f, 0x73, 0x22, 0x6f, 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x2b, 0x0a, 0x08, 0x65, 0x71, 0x75, 0x69, 0x70, - 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x61, 0x6d, 0x65, - 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x65, 0x71, 0x75, 0x69, - 0x70, 0x49, 0x64, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, 0x14, 0x0a, - 0x05, 0x72, 0x65, 0x66, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x22, 0xa2, 0x01, 0x0a, 0x07, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x73, 0x70, 0x12, - 0x20, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, - 0x65, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, - 0x65, 0x72, 0x6f, 0x12, 0x20, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, - 0x04, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x31, 0x0a, 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, - 0x6c, 0x73, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x65, 0x71, - 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x49, 0x0a, 0x15, 0x52, 0x6f, 0x6c, 0x65, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x4e, 0x74, - 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x20, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, - 0x6f, 0x6c, 0x65, 0x22, 0x2a, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x65, - 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, - 0x29, 0x0a, 0x11, 0x52, 0x6f, 0x6c, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x49, 0x74, 0x65, 0x6d, - 0x73, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x50, 0x0a, 0x12, 0x52, 0x6f, - 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, - 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x1b, 0x0a, 0x09, 0x63, 0x61, 0x72, 0x62, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x63, 0x61, 0x72, 0x62, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x7b, 0x0a, 0x10, - 0x52, 0x6f, 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, - 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x1b, 0x0a, 0x09, 0x63, 0x61, 0x72, 0x62, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x63, 0x61, 0x72, 0x62, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x70, 0x61, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x70, 0x61, 0x73, 0x73, - 0x12, 0x17, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x22, 0xc1, 0x01, 0x0a, 0x10, 0x52, 0x6f, - 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x73, 0x70, 0x12, 0x1d, - 0x0a, 0x0a, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x09, 0x72, 0x6f, 0x6c, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x19, 0x0a, - 0x08, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x45, 0x78, 0x70, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x6f, 0x6c, 0x65, - 0x5f, 0x65, 0x78, 0x70, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0d, 0x72, 0x6f, 0x6c, 0x65, 0x45, 0x78, 0x70, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x70, 0x61, 0x73, 0x73, 0x12, 0x20, 0x0a, 0x04, 0x68, - 0x65, 0x72, 0x6f, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, - 0x6c, 0x73, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x21, 0x0a, - 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x22, 0x3a, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, - 0x4e, 0x74, 0x79, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x45, 0x71, 0x75, 0x69, - 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x22, 0x3e, 0x0a, 0x0e, - 0x48, 0x65, 0x72, 0x6f, 0x55, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x16, - 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x32, 0x0a, 0x0e, - 0x48, 0x65, 0x72, 0x6f, 0x55, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x73, 0x70, 0x12, 0x20, - 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, - 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x08, 0x4c, + 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, + 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x65, 0x72, + 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, + 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x20, 0x0a, 0x04, 0x74, + 0x65, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x73, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x31, 0x0a, + 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x22, 0x39, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x61, 0x72, 0x12, 0x14, 0x0a, + 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x44, + 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x4e, 0x74, 0x79, 0x22, 0x31, 0x0a, 0x0d, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x61, 0x72, 0x12, 0x20, 0x0a, + 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, + 0x37, 0x0a, 0x09, 0x45, 0x71, 0x75, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, + 0x65, 0x71, 0x75, 0x69, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, + 0x71, 0x75, 0x69, 0x70, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x22, 0x6f, 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f, + 0x45, 0x71, 0x75, 0x69, 0x70, 0x52, 0x65, 0x66, 0x65, 0x72, 0x52, 0x61, 0x72, 0x12, 0x2b, 0x0a, + 0x08, 0x65, 0x71, 0x75, 0x69, 0x70, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x08, 0x65, 0x71, 0x75, 0x69, 0x70, 0x49, 0x64, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x65, + 0x72, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, + 0x6f, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x66, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x66, 0x65, 0x72, 0x22, 0x49, 0x0a, 0x15, 0x52, 0x6f, 0x6c, + 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x4e, + 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x20, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, + 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x2a, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, + 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x22, 0x29, 0x0a, 0x11, 0x52, 0x6f, 0x6c, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x49, 0x74, 0x65, + 0x6d, 0x73, 0x52, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x50, 0x0a, 0x12, 0x52, + 0x6f, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x61, 0x72, 0x62, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x61, 0x72, 0x62, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x14, 0x0a, + 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x52, 0x73, 0x70, 0x22, 0x7b, 0x0a, 0x10, 0x52, 0x6f, 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x42, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x70, 0x74, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x68, 0x61, + 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x61, 0x72, 0x62, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x61, 0x72, 0x62, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x04, 0x70, 0x61, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x5f, + 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, + 0x22, 0xc1, 0x01, 0x0a, 0x10, 0x52, 0x6f, 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x42, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x52, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x6f, 0x6c, 0x65, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x65, 0x78, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x45, 0x78, 0x70, 0x12, + 0x25, 0x0a, 0x0e, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x72, 0x6f, 0x6c, 0x65, 0x45, 0x78, 0x70, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x70, 0x61, + 0x73, 0x73, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, + 0x68, 0x65, 0x72, 0x6f, 0x22, 0x21, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, + 0x74, 0x44, 0x65, 0x6c, 0x52, 0x61, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3a, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, + 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x4e, 0x74, 0x79, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x71, + 0x75, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x73, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x71, + 0x75, 0x69, 0x70, 0x22, 0x3e, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x55, 0x70, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, 0x14, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x74, + 0x65, 0x6d, 0x73, 0x22, 0x32, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x55, 0x70, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x52, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x48, 0x65, 0x72, + 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, + 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1175,42 +1201,43 @@ func file_game_proto_rawDescGZIP() []byte { return file_game_proto_rawDescData } -var file_game_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_game_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_game_proto_goTypes = []interface{}{ (*HeartReq)(nil), // 0: game.HeartReq (*HeartRsp)(nil), // 1: game.HeartRsp (*LoginReq)(nil), // 2: game.LoginReq - (*CreateReq)(nil), // 3: game.CreateReq - (*DisConnectNty)(nil), // 4: game.DisConnectNty - (*ChangeTeamReq)(nil), // 5: game.ChangeTeamReq - (*EquipInfo)(nil), // 6: game.EquipInfo - (*HeroEquipReferReq)(nil), // 7: game.HeroEquipReferReq - (*RoleRsp)(nil), // 8: game.RoleRsp + (*LoginRsp)(nil), // 3: game.LoginRsp + (*CreateRar)(nil), // 4: game.CreateRar + (*DisConnectNty)(nil), // 5: game.DisConnectNty + (*ChangeTeamRar)(nil), // 6: game.ChangeTeamRar + (*EquipInfo)(nil), // 7: game.EquipInfo + (*HeroEquipReferRar)(nil), // 8: game.HeroEquipReferRar (*RoleUpdatePropertyNty)(nil), // 9: game.RoleUpdatePropertyNty (*RoleUpdateItemsNty)(nil), // 10: game.RoleUpdateItemsNty - (*RoleClearItemsReq)(nil), // 11: game.RoleClearItemsReq + (*RoleClearItemsRar)(nil), // 11: game.RoleClearItemsRar (*RoleStartBattleReq)(nil), // 12: game.RoleStartBattleReq - (*RoleEndBattleReq)(nil), // 13: game.RoleEndBattleReq - (*RoleEndBattleRsp)(nil), // 14: game.RoleEndBattleRsp - (*EquipmentDelReq)(nil), // 15: game.EquipmentDelReq - (*EquipmentAddNty)(nil), // 16: game.EquipmentAddNty - (*HeroUpLevelReq)(nil), // 17: game.HeroUpLevelReq - (*HeroUpLevelRsp)(nil), // 18: game.HeroUpLevelRsp - (*Team)(nil), // 19: models.Team + (*RoleStartBattleRsp)(nil), // 13: game.RoleStartBattleRsp + (*RoleEndBattleReq)(nil), // 14: game.RoleEndBattleReq + (*RoleEndBattleRsp)(nil), // 15: game.RoleEndBattleRsp + (*EquipmentDelRar)(nil), // 16: game.EquipmentDelRar + (*EquipmentAddNty)(nil), // 17: game.EquipmentAddNty + (*HeroUpLevelReq)(nil), // 18: game.HeroUpLevelReq + (*HeroUpLevelRsp)(nil), // 19: game.HeroUpLevelRsp (*Role)(nil), // 20: models.Role (*Hero)(nil), // 21: models.Hero - (*Equipment)(nil), // 22: models.Equipment + (*Team)(nil), // 22: models.Team + (*Equipment)(nil), // 23: models.Equipment } var file_game_proto_depIdxs = []int32{ - 19, // 0: game.ChangeTeamReq.team:type_name -> models.Team - 6, // 1: game.HeroEquipReferReq.equipIds:type_name -> game.EquipInfo - 20, // 2: game.RoleRsp.role:type_name -> models.Role - 21, // 3: game.RoleRsp.hero:type_name -> models.Hero - 19, // 4: game.RoleRsp.team:type_name -> models.Team - 22, // 5: game.RoleRsp.equipments:type_name -> models.Equipment + 20, // 0: game.LoginRsp.role:type_name -> models.Role + 21, // 1: game.LoginRsp.hero:type_name -> models.Hero + 22, // 2: game.LoginRsp.team:type_name -> models.Team + 23, // 3: game.LoginRsp.equipments:type_name -> models.Equipment + 22, // 4: game.ChangeTeamRar.team:type_name -> models.Team + 7, // 5: game.HeroEquipReferRar.equipIds:type_name -> game.EquipInfo 20, // 6: game.RoleUpdatePropertyNty.role:type_name -> models.Role 21, // 7: game.RoleEndBattleRsp.hero:type_name -> models.Hero - 22, // 8: game.EquipmentAddNty.equip:type_name -> models.Equipment + 23, // 8: game.EquipmentAddNty.equip:type_name -> models.Equipment 21, // 9: game.HeroUpLevelRsp.hero:type_name -> models.Hero 10, // [10:10] is the sub-list for method output_type 10, // [10:10] is the sub-list for method input_type @@ -1263,7 +1290,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateReq); i { + switch v := v.(*LoginRsp); i { case 0: return &v.state case 1: @@ -1275,7 +1302,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DisConnectNty); i { + switch v := v.(*CreateRar); i { case 0: return &v.state case 1: @@ -1287,7 +1314,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeTeamReq); i { + switch v := v.(*DisConnectNty); i { case 0: return &v.state case 1: @@ -1299,7 +1326,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EquipInfo); i { + switch v := v.(*ChangeTeamRar); i { case 0: return &v.state case 1: @@ -1311,7 +1338,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeroEquipReferReq); i { + switch v := v.(*EquipInfo); i { case 0: return &v.state case 1: @@ -1323,7 +1350,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoleRsp); i { + switch v := v.(*HeroEquipReferRar); i { case 0: return &v.state case 1: @@ -1359,7 +1386,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoleClearItemsReq); i { + switch v := v.(*RoleClearItemsRar); i { case 0: return &v.state case 1: @@ -1383,7 +1410,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoleEndBattleReq); i { + switch v := v.(*RoleStartBattleRsp); i { case 0: return &v.state case 1: @@ -1395,7 +1422,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoleEndBattleRsp); i { + switch v := v.(*RoleEndBattleReq); i { case 0: return &v.state case 1: @@ -1407,7 +1434,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EquipmentDelReq); i { + switch v := v.(*RoleEndBattleRsp); i { case 0: return &v.state case 1: @@ -1419,7 +1446,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EquipmentAddNty); i { + switch v := v.(*EquipmentDelRar); i { case 0: return &v.state case 1: @@ -1431,7 +1458,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeroUpLevelReq); i { + switch v := v.(*EquipmentAddNty); i { case 0: return &v.state case 1: @@ -1443,6 +1470,18 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeroUpLevelReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HeroUpLevelRsp); i { case 0: return &v.state @@ -1461,7 +1500,7 @@ func file_game_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_game_proto_rawDesc, NumEnums: 0, - NumMessages: 19, + NumMessages: 20, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/protocode.pb.go b/pb/protocode.pb.go index a04ca4b..0493189 100644 --- a/pb/protocode.pb.go +++ b/pb/protocode.pb.go @@ -26,14 +26,14 @@ const ( ProtoCode_UNKNOWN ProtoCode = 0 ProtoCode_HeartRpc ProtoCode = 1 ProtoCode_LoginRpc ProtoCode = 2 - ProtoCode_CreateRpc ProtoCode = 3 - ProtoCode_ChangeTeamRpc ProtoCode = 4 - ProtoCode_HeroEquipReferRpc ProtoCode = 5 - ProtoCode_RoleClearItemsRpc ProtoCode = 6 - ProtoCode_RoleStartBattleRpc ProtoCode = 7 - ProtoCode_RoleEndBattleRpc ProtoCode = 8 - ProtoCode_EquipmentDelRpc ProtoCode = 9 - ProtoCode_HeroUpLevelRpc ProtoCode = 10 + ProtoCode_RoleStartBattleRpc ProtoCode = 3 + ProtoCode_RoleEndBattleRpc ProtoCode = 4 + ProtoCode_HeroUpLevelRpc ProtoCode = 5 + ProtoCode_CreateRpc ProtoCode = 6 + ProtoCode_ChangeTeamRpc ProtoCode = 7 + ProtoCode_HeroEquipReferRpc ProtoCode = 8 + ProtoCode_RoleClearItemsRpc ProtoCode = 9 + ProtoCode_EquipmentDelRpc ProtoCode = 10 ProtoCode_DisConnectNty ProtoCode = 11 ProtoCode_RoleUpdatePropertyNty ProtoCode = 12 ProtoCode_RoleUpdateItemsNty ProtoCode = 13 @@ -46,14 +46,14 @@ var ( 0: "UNKNOWN", 1: "HeartRpc", 2: "LoginRpc", - 3: "CreateRpc", - 4: "ChangeTeamRpc", - 5: "HeroEquipReferRpc", - 6: "RoleClearItemsRpc", - 7: "RoleStartBattleRpc", - 8: "RoleEndBattleRpc", - 9: "EquipmentDelRpc", - 10: "HeroUpLevelRpc", + 3: "RoleStartBattleRpc", + 4: "RoleEndBattleRpc", + 5: "HeroUpLevelRpc", + 6: "CreateRpc", + 7: "ChangeTeamRpc", + 8: "HeroEquipReferRpc", + 9: "RoleClearItemsRpc", + 10: "EquipmentDelRpc", 11: "DisConnectNty", 12: "RoleUpdatePropertyNty", 13: "RoleUpdateItemsNty", @@ -63,14 +63,14 @@ var ( "UNKNOWN": 0, "HeartRpc": 1, "LoginRpc": 2, - "CreateRpc": 3, - "ChangeTeamRpc": 4, - "HeroEquipReferRpc": 5, - "RoleClearItemsRpc": 6, - "RoleStartBattleRpc": 7, - "RoleEndBattleRpc": 8, - "EquipmentDelRpc": 9, - "HeroUpLevelRpc": 10, + "RoleStartBattleRpc": 3, + "RoleEndBattleRpc": 4, + "HeroUpLevelRpc": 5, + "CreateRpc": 6, + "ChangeTeamRpc": 7, + "HeroEquipReferRpc": 8, + "RoleClearItemsRpc": 9, + "EquipmentDelRpc": 10, "DisConnectNty": 11, "RoleUpdatePropertyNty": 12, "RoleUpdateItemsNty": 13, @@ -113,17 +113,17 @@ var file_protocode_proto_rawDesc = []byte{ 0x09, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x48, 0x65, 0x61, 0x72, 0x74, 0x52, 0x70, 0x63, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x70, - 0x63, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x70, 0x63, - 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x65, 0x61, 0x6d, - 0x52, 0x70, 0x63, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x71, 0x75, - 0x69, 0x70, 0x52, 0x65, 0x66, 0x65, 0x72, 0x52, 0x70, 0x63, 0x10, 0x05, 0x12, 0x15, 0x0a, 0x11, - 0x52, 0x6f, 0x6c, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x70, - 0x63, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, - 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x70, 0x63, 0x10, 0x07, 0x12, 0x14, 0x0a, 0x10, 0x52, + 0x63, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x70, 0x63, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x6f, 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x70, 0x63, 0x10, - 0x08, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x65, - 0x6c, 0x52, 0x70, 0x63, 0x10, 0x09, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x55, 0x70, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x70, 0x63, 0x10, 0x0a, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x69, + 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x55, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, + 0x52, 0x70, 0x63, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, + 0x70, 0x63, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x65, + 0x61, 0x6d, 0x52, 0x70, 0x63, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f, 0x45, + 0x71, 0x75, 0x69, 0x70, 0x52, 0x65, 0x66, 0x65, 0x72, 0x52, 0x70, 0x63, 0x10, 0x08, 0x12, 0x15, + 0x0a, 0x11, 0x52, 0x6f, 0x6c, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x73, + 0x52, 0x70, 0x63, 0x10, 0x09, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, + 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x52, 0x70, 0x63, 0x10, 0x0a, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x4e, 0x74, 0x79, 0x10, 0x0b, 0x12, 0x19, 0x0a, 0x15, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x4e, 0x74, 0x79, 0x10, 0x0c, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, diff --git a/tools/generator.py b/tools/generator.py index 9123d4e..68eb508 100644 --- a/tools/generator.py +++ b/tools/generator.py @@ -61,6 +61,25 @@ def generatorProto(path): continue GoCodeData += GoProtoCodeLine.format(messageStr[:n1], messageStr[:n1]) GoCodeTestData += GoProtoCodeTestReqLine.format(messageStr[:n1], messageStr[:n1]) + # rar + for line in lines: + if line.find("message") == -1: + continue + sline = line.split(' ') + if len(sline) < 2: + continue + + messageStr = sline[1].replace('\n', '').replace('{', "") + n2 = messageStr.find('Rar') + loginReq = messageStr.find('LoginReq') + if n2 != -1: + code += 1 + ProtoCodeData += ProtoCodeLineReq.format(messageStr[:n2], code) + if loginReq != -1: + continue + GoCodeData += GoProtoCodeLine.format(messageStr[:n2], messageStr[:n2]) + GoCodeTestData += GoProtoCodeTestReqLine.format(messageStr[:n2], messageStr[:n2]) + # nty for line in lines: if line.find("message") == -1: @@ -80,23 +99,7 @@ def generatorProto(path): continue GoCodeTestData += GoProtoCodeTestNtyLine.format(messageStr[:n3], messageStr[:n3]) - # rsp 满足客户端需要 - # for line in lines: - # if line.find("message") == -1: - # continue - # sline = line.split(' ') - # if len(sline) < 2: - # continue - # - # messageStr = sline[1].replace('\n', '').replace('{', "") - # n2 = messageStr.find('Rsp') - # loginReq = messageStr.find('LoginReq') - # if n2 != -1: - # code += 1 - # ProtoCodeData += ProtoCodeLineRsp.format(messageStr[:n2], code) - # if loginReq != -1: - # continue - # GoCodeTestData += GoProtoCodeTestRspLine.format(messageStr[:n2], messageStr[:n2]) + # protocode.go -- libgit2 0.21.2