diff --git a/modules/forum/configure_comp.go b/modules/forum/configure.go similarity index 100% rename from modules/forum/configure_comp.go rename to modules/forum/configure.go diff --git a/modules/forum/model_forum_comp.go b/modules/forum/model_forum.go similarity index 100% rename from modules/forum/model_forum_comp.go rename to modules/forum/model_forum.go diff --git a/modules/forum/module.go b/modules/forum/module.go index 36ecd2cf7..7a94afc89 100644 --- a/modules/forum/module.go +++ b/modules/forum/module.go @@ -18,9 +18,9 @@ func NewModule() core.IModule { type Forum struct { modules.ModuleBase - api_comp *apiComp - configure_comp *configureComp - model_forum_comp *modelForumComp + api_comp *apiComp + configure *configureComp + modelForum *modelForumComp } //模块名 @@ -38,6 +38,6 @@ func (this *Forum) Init(service core.IService, module core.IModule, options core func (this *Forum) OnInstallComp() { this.ModuleBase.OnInstallComp() this.api_comp = this.RegisterComp(new(apiComp)).(*apiComp) - this.model_forum_comp = this.RegisterComp(new(modelForumComp)).(*modelForumComp) - this.configure_comp = this.RegisterComp(new(configureComp)).(*configureComp) + this.modelForum = this.RegisterComp(new(modelForumComp)).(*modelForumComp) + this.configure = this.RegisterComp(new(configureComp)).(*configureComp) } diff --git a/modules/items/module_test.go b/modules/items/module_test.go index 14031d9a0..0b1a56790 100644 --- a/modules/items/module_test.go +++ b/modules/items/module_test.go @@ -75,7 +75,7 @@ func TestMain(m *testing.M) { } func Test_Modules(t *testing.T) { - data, _ := ptypes.MarshalAny(&pb.Items_Getlist_Req{}) + data, _ := ptypes.MarshalAny(&pb.ItemsGetlistReq{}) s_gateComp.ReceiveMsg(context.Background(), &pb.AgentMessage{MainType: "pack", SubType: "getlist", Message: data}, &pb.RPCMessageReply{}) // items, err := module.db_comp.Pack_QueryUserPack("liwei1dao") // log.Debugf("item:%v err:%v", items, err) diff --git a/modules/modulebase.go b/modules/modulebase.go index 15eb8d30a..573d36081 100644 --- a/modules/modulebase.go +++ b/modules/modulebase.go @@ -167,3 +167,52 @@ func (this *ModuleBase) CheckConsumeRes(uid string, res []*cfg.Game_atn) (code p return } + +//发放资源 +func (this *ModuleBase) DispenseRes(uid string, res []*cfg.Game_atn) (code pb.ErrorCode) { + var ( + module core.IModule + err error + resID int + user comm.IUser //用户模块 + items comm.IItems //道具背包模块 + hero comm.IHero //英雄模块 + equipment comm.IEquipment //装备模块 + ) + if module, err = this.service.GetModule(comm.ModuleUser); err == nil { + return + } + user = module.(comm.IUser) + if module, err = this.service.GetModule(comm.ModuleItems); err == nil { + return + } + items = module.(comm.IItems) + if module, err = this.service.GetModule(comm.ModuleHero); err == nil { + return + } + hero = module.(comm.IHero) + if module, err = this.service.GetModule(comm.ModuleEquipment); err == nil { + return + } + equipment = module.(comm.IEquipment) + source := &comm.ModuleCallSource{ + Module: string(this.module.GetType()), + FuncName: "DispenseRes", + Describe: "发放资源", + } + for _, v := range res { + if v.A == comm.AttrType { //用户属性资源 + user.AddAttributeValue(uid, v.T, v.N) + } else if v.A == comm.ItemType { //道具资源 + resID, _ = strconv.Atoi(v.T) + items.AddItem(source, uid, int32(resID), v.N) + } else if v.A == comm.CardType { //卡片资源 + resID, _ = strconv.Atoi(v.T) + hero.ChangeCard(uid, int32(resID), v.N) + } else if v.A == comm.EquipmentType { + resID, _ = strconv.Atoi(v.T) + equipment.AddNewEquipments(source, uid, map[int32]uint32{int32(resID): uint32(v.N)}) + } + } + return +} diff --git a/pb/equipment_msg.pb.go b/pb/equipment_msg.pb.go index 9128b73ac..f5928e36e 100644 --- a/pb/equipment_msg.pb.go +++ b/pb/equipment_msg.pb.go @@ -21,14 +21,14 @@ const ( ) //获取装备列表请求 -type Equipment_GetList_Req struct { +type EquipmentGetListReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *Equipment_GetList_Req) Reset() { - *x = Equipment_GetList_Req{} +func (x *EquipmentGetListReq) Reset() { + *x = EquipmentGetListReq{} if protoimpl.UnsafeEnabled { mi := &file_equipment_equipment_msg_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -36,13 +36,13 @@ func (x *Equipment_GetList_Req) Reset() { } } -func (x *Equipment_GetList_Req) String() string { +func (x *EquipmentGetListReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Equipment_GetList_Req) ProtoMessage() {} +func (*EquipmentGetListReq) ProtoMessage() {} -func (x *Equipment_GetList_Req) ProtoReflect() protoreflect.Message { +func (x *EquipmentGetListReq) ProtoReflect() protoreflect.Message { mi := &file_equipment_equipment_msg_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -54,13 +54,13 @@ func (x *Equipment_GetList_Req) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Equipment_GetList_Req.ProtoReflect.Descriptor instead. -func (*Equipment_GetList_Req) Descriptor() ([]byte, []int) { +// Deprecated: Use EquipmentGetListReq.ProtoReflect.Descriptor instead. +func (*EquipmentGetListReq) Descriptor() ([]byte, []int) { return file_equipment_equipment_msg_proto_rawDescGZIP(), []int{0} } //获取装备列表请求 回应 -type Equipment_GetList_Resp struct { +type EquipmentGetListResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -68,8 +68,8 @@ type Equipment_GetList_Resp struct { Equipments []*DB_Equipment `protobuf:"bytes,1,rep,name=Equipments,proto3" json:"Equipments"` //装备列表 } -func (x *Equipment_GetList_Resp) Reset() { - *x = Equipment_GetList_Resp{} +func (x *EquipmentGetListResp) Reset() { + *x = EquipmentGetListResp{} if protoimpl.UnsafeEnabled { mi := &file_equipment_equipment_msg_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -77,13 +77,13 @@ func (x *Equipment_GetList_Resp) Reset() { } } -func (x *Equipment_GetList_Resp) String() string { +func (x *EquipmentGetListResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Equipment_GetList_Resp) ProtoMessage() {} +func (*EquipmentGetListResp) ProtoMessage() {} -func (x *Equipment_GetList_Resp) ProtoReflect() protoreflect.Message { +func (x *EquipmentGetListResp) ProtoReflect() protoreflect.Message { mi := &file_equipment_equipment_msg_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -95,12 +95,12 @@ func (x *Equipment_GetList_Resp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Equipment_GetList_Resp.ProtoReflect.Descriptor instead. -func (*Equipment_GetList_Resp) Descriptor() ([]byte, []int) { +// Deprecated: Use EquipmentGetListResp.ProtoReflect.Descriptor instead. +func (*EquipmentGetListResp) Descriptor() ([]byte, []int) { return file_equipment_equipment_msg_proto_rawDescGZIP(), []int{1} } -func (x *Equipment_GetList_Resp) GetEquipments() []*DB_Equipment { +func (x *EquipmentGetListResp) GetEquipments() []*DB_Equipment { if x != nil { return x.Equipments } @@ -108,7 +108,7 @@ func (x *Equipment_GetList_Resp) GetEquipments() []*DB_Equipment { } //装备挂在到英雄上 -type Equipment_Equip_Req struct { +type EquipmentEquipReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -117,8 +117,8 @@ type Equipment_Equip_Req struct { EquipmentId []string `protobuf:"bytes,2,rep,name=EquipmentId,proto3" json:"EquipmentId"` //装备Id 固定长度的数组 0-5 对应的装备栏 } -func (x *Equipment_Equip_Req) Reset() { - *x = Equipment_Equip_Req{} +func (x *EquipmentEquipReq) Reset() { + *x = EquipmentEquipReq{} if protoimpl.UnsafeEnabled { mi := &file_equipment_equipment_msg_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -126,13 +126,13 @@ func (x *Equipment_Equip_Req) Reset() { } } -func (x *Equipment_Equip_Req) String() string { +func (x *EquipmentEquipReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Equipment_Equip_Req) ProtoMessage() {} +func (*EquipmentEquipReq) ProtoMessage() {} -func (x *Equipment_Equip_Req) ProtoReflect() protoreflect.Message { +func (x *EquipmentEquipReq) ProtoReflect() protoreflect.Message { mi := &file_equipment_equipment_msg_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -144,19 +144,19 @@ func (x *Equipment_Equip_Req) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Equipment_Equip_Req.ProtoReflect.Descriptor instead. -func (*Equipment_Equip_Req) Descriptor() ([]byte, []int) { +// Deprecated: Use EquipmentEquipReq.ProtoReflect.Descriptor instead. +func (*EquipmentEquipReq) Descriptor() ([]byte, []int) { return file_equipment_equipment_msg_proto_rawDescGZIP(), []int{2} } -func (x *Equipment_Equip_Req) GetHeroCardId() string { +func (x *EquipmentEquipReq) GetHeroCardId() string { if x != nil { return x.HeroCardId } return "" } -func (x *Equipment_Equip_Req) GetEquipmentId() []string { +func (x *EquipmentEquipReq) GetEquipmentId() []string { if x != nil { return x.EquipmentId } @@ -164,14 +164,14 @@ func (x *Equipment_Equip_Req) GetEquipmentId() []string { } //装备挂在到英雄上 回应 -type Equipment_Equip_Resp struct { +type EquipmentEquipResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *Equipment_Equip_Resp) Reset() { - *x = Equipment_Equip_Resp{} +func (x *EquipmentEquipResp) Reset() { + *x = EquipmentEquipResp{} if protoimpl.UnsafeEnabled { mi := &file_equipment_equipment_msg_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -179,13 +179,13 @@ func (x *Equipment_Equip_Resp) Reset() { } } -func (x *Equipment_Equip_Resp) String() string { +func (x *EquipmentEquipResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Equipment_Equip_Resp) ProtoMessage() {} +func (*EquipmentEquipResp) ProtoMessage() {} -func (x *Equipment_Equip_Resp) ProtoReflect() protoreflect.Message { +func (x *EquipmentEquipResp) ProtoReflect() protoreflect.Message { mi := &file_equipment_equipment_msg_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -197,13 +197,13 @@ func (x *Equipment_Equip_Resp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Equipment_Equip_Resp.ProtoReflect.Descriptor instead. -func (*Equipment_Equip_Resp) Descriptor() ([]byte, []int) { +// Deprecated: Use EquipmentEquipResp.ProtoReflect.Descriptor instead. +func (*EquipmentEquipResp) Descriptor() ([]byte, []int) { return file_equipment_equipment_msg_proto_rawDescGZIP(), []int{3} } //装备升级 -type Equipment_Upgrade_Req struct { +type EquipmentUpgradeReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -211,8 +211,8 @@ type Equipment_Upgrade_Req struct { EquipmentId string `protobuf:"bytes,1,opt,name=EquipmentId,proto3" json:"EquipmentId"` //装备Id } -func (x *Equipment_Upgrade_Req) Reset() { - *x = Equipment_Upgrade_Req{} +func (x *EquipmentUpgradeReq) Reset() { + *x = EquipmentUpgradeReq{} if protoimpl.UnsafeEnabled { mi := &file_equipment_equipment_msg_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -220,13 +220,13 @@ func (x *Equipment_Upgrade_Req) Reset() { } } -func (x *Equipment_Upgrade_Req) String() string { +func (x *EquipmentUpgradeReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Equipment_Upgrade_Req) ProtoMessage() {} +func (*EquipmentUpgradeReq) ProtoMessage() {} -func (x *Equipment_Upgrade_Req) ProtoReflect() protoreflect.Message { +func (x *EquipmentUpgradeReq) ProtoReflect() protoreflect.Message { mi := &file_equipment_equipment_msg_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -238,12 +238,12 @@ func (x *Equipment_Upgrade_Req) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Equipment_Upgrade_Req.ProtoReflect.Descriptor instead. -func (*Equipment_Upgrade_Req) Descriptor() ([]byte, []int) { +// Deprecated: Use EquipmentUpgradeReq.ProtoReflect.Descriptor instead. +func (*EquipmentUpgradeReq) Descriptor() ([]byte, []int) { return file_equipment_equipment_msg_proto_rawDescGZIP(), []int{4} } -func (x *Equipment_Upgrade_Req) GetEquipmentId() string { +func (x *EquipmentUpgradeReq) GetEquipmentId() string { if x != nil { return x.EquipmentId } @@ -251,14 +251,14 @@ func (x *Equipment_Upgrade_Req) GetEquipmentId() string { } //装备升级 回应 -type Equipment_Upgrade_Resp struct { +type EquipmentUpgradeResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *Equipment_Upgrade_Resp) Reset() { - *x = Equipment_Upgrade_Resp{} +func (x *EquipmentUpgradeResp) Reset() { + *x = EquipmentUpgradeResp{} if protoimpl.UnsafeEnabled { mi := &file_equipment_equipment_msg_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -266,13 +266,13 @@ func (x *Equipment_Upgrade_Resp) Reset() { } } -func (x *Equipment_Upgrade_Resp) String() string { +func (x *EquipmentUpgradeResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Equipment_Upgrade_Resp) ProtoMessage() {} +func (*EquipmentUpgradeResp) ProtoMessage() {} -func (x *Equipment_Upgrade_Resp) ProtoReflect() protoreflect.Message { +func (x *EquipmentUpgradeResp) ProtoReflect() protoreflect.Message { mi := &file_equipment_equipment_msg_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -284,8 +284,8 @@ func (x *Equipment_Upgrade_Resp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Equipment_Upgrade_Resp.ProtoReflect.Descriptor instead. -func (*Equipment_Upgrade_Resp) Descriptor() ([]byte, []int) { +// Deprecated: Use EquipmentUpgradeResp.ProtoReflect.Descriptor instead. +func (*EquipmentUpgradeResp) Descriptor() ([]byte, []int) { return file_equipment_equipment_msg_proto_rawDescGZIP(), []int{5} } @@ -295,27 +295,26 @@ var file_equipment_equipment_msg_proto_rawDesc = []byte{ 0x0a, 0x1d, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x65, 0x71, 0x75, 0x69, 0x70, - 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x17, 0x0a, - 0x15, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x47, 0x65, 0x74, 0x4c, 0x69, - 0x73, 0x74, 0x5f, 0x52, 0x65, 0x71, 0x22, 0x47, 0x0a, 0x16, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, - 0x65, 0x6e, 0x74, 0x5f, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x5f, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x2d, 0x0a, 0x0a, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, - 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, - 0x57, 0x0a, 0x13, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x45, 0x71, 0x75, - 0x69, 0x70, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x61, - 0x72, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x48, 0x65, 0x72, 0x6f, - 0x43, 0x61, 0x72, 0x64, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, - 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x45, 0x71, 0x75, - 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x45, 0x71, 0x75, 0x69, - 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x5f, 0x52, 0x65, 0x73, 0x70, - 0x22, 0x39, 0x0a, 0x15, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x55, 0x70, - 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x71, 0x75, - 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x45, - 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x5f, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x15, 0x0a, + 0x13, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x71, 0x22, 0x45, 0x0a, 0x14, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, + 0x74, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x0a, + 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x0a, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x55, 0x0a, 0x11, 0x45, + 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x71, 0x75, 0x69, 0x70, 0x52, 0x65, 0x71, + 0x12, 0x1e, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x61, 0x72, 0x64, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x61, 0x72, 0x64, 0x49, 0x64, + 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, + 0x49, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x45, + 0x71, 0x75, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x22, 0x37, 0x0a, 0x13, 0x45, 0x71, 0x75, 0x69, + 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x12, + 0x20, 0x0a, 0x0b, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x49, + 0x64, 0x22, 0x16, 0x0a, 0x14, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x55, 0x70, + 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -332,16 +331,16 @@ func file_equipment_equipment_msg_proto_rawDescGZIP() []byte { var file_equipment_equipment_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_equipment_equipment_msg_proto_goTypes = []interface{}{ - (*Equipment_GetList_Req)(nil), // 0: Equipment_GetList_Req - (*Equipment_GetList_Resp)(nil), // 1: Equipment_GetList_Resp - (*Equipment_Equip_Req)(nil), // 2: Equipment_Equip_Req - (*Equipment_Equip_Resp)(nil), // 3: Equipment_Equip_Resp - (*Equipment_Upgrade_Req)(nil), // 4: Equipment_Upgrade_Req - (*Equipment_Upgrade_Resp)(nil), // 5: Equipment_Upgrade_Resp - (*DB_Equipment)(nil), // 6: DB_Equipment + (*EquipmentGetListReq)(nil), // 0: EquipmentGetListReq + (*EquipmentGetListResp)(nil), // 1: EquipmentGetListResp + (*EquipmentEquipReq)(nil), // 2: EquipmentEquipReq + (*EquipmentEquipResp)(nil), // 3: EquipmentEquipResp + (*EquipmentUpgradeReq)(nil), // 4: EquipmentUpgradeReq + (*EquipmentUpgradeResp)(nil), // 5: EquipmentUpgradeResp + (*DB_Equipment)(nil), // 6: DB_Equipment } var file_equipment_equipment_msg_proto_depIdxs = []int32{ - 6, // 0: Equipment_GetList_Resp.Equipments:type_name -> DB_Equipment + 6, // 0: EquipmentGetListResp.Equipments:type_name -> DB_Equipment 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 @@ -357,7 +356,7 @@ func file_equipment_equipment_msg_proto_init() { file_equipment_equipment_db_proto_init() if !protoimpl.UnsafeEnabled { file_equipment_equipment_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Equipment_GetList_Req); i { + switch v := v.(*EquipmentGetListReq); i { case 0: return &v.state case 1: @@ -369,7 +368,7 @@ func file_equipment_equipment_msg_proto_init() { } } file_equipment_equipment_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Equipment_GetList_Resp); i { + switch v := v.(*EquipmentGetListResp); i { case 0: return &v.state case 1: @@ -381,7 +380,7 @@ func file_equipment_equipment_msg_proto_init() { } } file_equipment_equipment_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Equipment_Equip_Req); i { + switch v := v.(*EquipmentEquipReq); i { case 0: return &v.state case 1: @@ -393,7 +392,7 @@ func file_equipment_equipment_msg_proto_init() { } } file_equipment_equipment_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Equipment_Equip_Resp); i { + switch v := v.(*EquipmentEquipResp); i { case 0: return &v.state case 1: @@ -405,7 +404,7 @@ func file_equipment_equipment_msg_proto_init() { } } file_equipment_equipment_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Equipment_Upgrade_Req); i { + switch v := v.(*EquipmentUpgradeReq); i { case 0: return &v.state case 1: @@ -417,7 +416,7 @@ func file_equipment_equipment_msg_proto_init() { } } file_equipment_equipment_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Equipment_Upgrade_Resp); i { + switch v := v.(*EquipmentUpgradeResp); i { case 0: return &v.state case 1: diff --git a/pb/items_msg.pb.go b/pb/items_msg.pb.go index e3e5cdabc..2ee494aef 100644 --- a/pb/items_msg.pb.go +++ b/pb/items_msg.pb.go @@ -21,7 +21,7 @@ const ( ) //查询用户背包请求 -type Items_Getlist_Req struct { +type ItemsGetlistReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -29,8 +29,8 @@ type Items_Getlist_Req struct { IType int32 `protobuf:"varint,1,opt,name=IType,proto3" json:"IType"` //道具类型 } -func (x *Items_Getlist_Req) Reset() { - *x = Items_Getlist_Req{} +func (x *ItemsGetlistReq) Reset() { + *x = ItemsGetlistReq{} if protoimpl.UnsafeEnabled { mi := &file_items_items_msg_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -38,13 +38,13 @@ func (x *Items_Getlist_Req) Reset() { } } -func (x *Items_Getlist_Req) String() string { +func (x *ItemsGetlistReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Items_Getlist_Req) ProtoMessage() {} +func (*ItemsGetlistReq) ProtoMessage() {} -func (x *Items_Getlist_Req) ProtoReflect() protoreflect.Message { +func (x *ItemsGetlistReq) ProtoReflect() protoreflect.Message { mi := &file_items_items_msg_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56,12 +56,12 @@ func (x *Items_Getlist_Req) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Items_Getlist_Req.ProtoReflect.Descriptor instead. -func (*Items_Getlist_Req) Descriptor() ([]byte, []int) { +// Deprecated: Use ItemsGetlistReq.ProtoReflect.Descriptor instead. +func (*ItemsGetlistReq) Descriptor() ([]byte, []int) { return file_items_items_msg_proto_rawDescGZIP(), []int{0} } -func (x *Items_Getlist_Req) GetIType() int32 { +func (x *ItemsGetlistReq) GetIType() int32 { if x != nil { return x.IType } @@ -69,7 +69,7 @@ func (x *Items_Getlist_Req) GetIType() int32 { } //查询用户背包请求 回应 -type Items_Getlist_Resp struct { +type ItemsGetlistResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -77,8 +77,8 @@ type Items_Getlist_Resp struct { Grids []*DB_UserItemData `protobuf:"bytes,1,rep,name=Grids,proto3" json:"Grids"` //用户背包列表 } -func (x *Items_Getlist_Resp) Reset() { - *x = Items_Getlist_Resp{} +func (x *ItemsGetlistResp) Reset() { + *x = ItemsGetlistResp{} if protoimpl.UnsafeEnabled { mi := &file_items_items_msg_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -86,13 +86,13 @@ func (x *Items_Getlist_Resp) Reset() { } } -func (x *Items_Getlist_Resp) String() string { +func (x *ItemsGetlistResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Items_Getlist_Resp) ProtoMessage() {} +func (*ItemsGetlistResp) ProtoMessage() {} -func (x *Items_Getlist_Resp) ProtoReflect() protoreflect.Message { +func (x *ItemsGetlistResp) ProtoReflect() protoreflect.Message { mi := &file_items_items_msg_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -104,12 +104,12 @@ func (x *Items_Getlist_Resp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Items_Getlist_Resp.ProtoReflect.Descriptor instead. -func (*Items_Getlist_Resp) Descriptor() ([]byte, []int) { +// Deprecated: Use ItemsGetlistResp.ProtoReflect.Descriptor instead. +func (*ItemsGetlistResp) Descriptor() ([]byte, []int) { return file_items_items_msg_proto_rawDescGZIP(), []int{1} } -func (x *Items_Getlist_Resp) GetGrids() []*DB_UserItemData { +func (x *ItemsGetlistResp) GetGrids() []*DB_UserItemData { if x != nil { return x.Grids } @@ -117,7 +117,7 @@ func (x *Items_Getlist_Resp) GetGrids() []*DB_UserItemData { } //使用物品请求 -type Items_UseItem_Req struct { +type ItemsUseItemReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -127,8 +127,8 @@ type Items_UseItem_Req struct { Amount uint32 `protobuf:"varint,3,opt,name=Amount,proto3" json:"Amount"` //使用数量 } -func (x *Items_UseItem_Req) Reset() { - *x = Items_UseItem_Req{} +func (x *ItemsUseItemReq) Reset() { + *x = ItemsUseItemReq{} if protoimpl.UnsafeEnabled { mi := &file_items_items_msg_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -136,13 +136,13 @@ func (x *Items_UseItem_Req) Reset() { } } -func (x *Items_UseItem_Req) String() string { +func (x *ItemsUseItemReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Items_UseItem_Req) ProtoMessage() {} +func (*ItemsUseItemReq) ProtoMessage() {} -func (x *Items_UseItem_Req) ProtoReflect() protoreflect.Message { +func (x *ItemsUseItemReq) ProtoReflect() protoreflect.Message { mi := &file_items_items_msg_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -154,26 +154,26 @@ func (x *Items_UseItem_Req) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Items_UseItem_Req.ProtoReflect.Descriptor instead. -func (*Items_UseItem_Req) Descriptor() ([]byte, []int) { +// Deprecated: Use ItemsUseItemReq.ProtoReflect.Descriptor instead. +func (*ItemsUseItemReq) Descriptor() ([]byte, []int) { return file_items_items_msg_proto_rawDescGZIP(), []int{2} } -func (x *Items_UseItem_Req) GetGridId() int32 { +func (x *ItemsUseItemReq) GetGridId() int32 { if x != nil { return x.GridId } return 0 } -func (x *Items_UseItem_Req) GetItemId() int32 { +func (x *ItemsUseItemReq) GetItemId() int32 { if x != nil { return x.ItemId } return 0 } -func (x *Items_UseItem_Req) GetAmount() uint32 { +func (x *ItemsUseItemReq) GetAmount() uint32 { if x != nil { return x.Amount } @@ -181,14 +181,14 @@ func (x *Items_UseItem_Req) GetAmount() uint32 { } //使用物品请求 回应 -type Items_UseItem_Resp struct { +type ItemsUseItemResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *Items_UseItem_Resp) Reset() { - *x = Items_UseItem_Resp{} +func (x *ItemsUseItemResp) Reset() { + *x = ItemsUseItemResp{} if protoimpl.UnsafeEnabled { mi := &file_items_items_msg_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -196,13 +196,13 @@ func (x *Items_UseItem_Resp) Reset() { } } -func (x *Items_UseItem_Resp) String() string { +func (x *ItemsUseItemResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Items_UseItem_Resp) ProtoMessage() {} +func (*ItemsUseItemResp) ProtoMessage() {} -func (x *Items_UseItem_Resp) ProtoReflect() protoreflect.Message { +func (x *ItemsUseItemResp) ProtoReflect() protoreflect.Message { mi := &file_items_items_msg_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -214,13 +214,13 @@ func (x *Items_UseItem_Resp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Items_UseItem_Resp.ProtoReflect.Descriptor instead. -func (*Items_UseItem_Resp) Descriptor() ([]byte, []int) { +// Deprecated: Use ItemsUseItemResp.ProtoReflect.Descriptor instead. +func (*ItemsUseItemResp) Descriptor() ([]byte, []int) { return file_items_items_msg_proto_rawDescGZIP(), []int{3} } //出售道具请求sailitem -type Items_SellItem_Req struct { +type ItemsSellItemReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -230,8 +230,8 @@ type Items_SellItem_Req struct { Amount uint32 `protobuf:"varint,3,opt,name=Amount,proto3" json:"Amount"` //使用数量 } -func (x *Items_SellItem_Req) Reset() { - *x = Items_SellItem_Req{} +func (x *ItemsSellItemReq) Reset() { + *x = ItemsSellItemReq{} if protoimpl.UnsafeEnabled { mi := &file_items_items_msg_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -239,13 +239,13 @@ func (x *Items_SellItem_Req) Reset() { } } -func (x *Items_SellItem_Req) String() string { +func (x *ItemsSellItemReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Items_SellItem_Req) ProtoMessage() {} +func (*ItemsSellItemReq) ProtoMessage() {} -func (x *Items_SellItem_Req) ProtoReflect() protoreflect.Message { +func (x *ItemsSellItemReq) ProtoReflect() protoreflect.Message { mi := &file_items_items_msg_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -257,26 +257,26 @@ func (x *Items_SellItem_Req) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Items_SellItem_Req.ProtoReflect.Descriptor instead. -func (*Items_SellItem_Req) Descriptor() ([]byte, []int) { +// Deprecated: Use ItemsSellItemReq.ProtoReflect.Descriptor instead. +func (*ItemsSellItemReq) Descriptor() ([]byte, []int) { return file_items_items_msg_proto_rawDescGZIP(), []int{4} } -func (x *Items_SellItem_Req) GetGridId() int32 { +func (x *ItemsSellItemReq) GetGridId() int32 { if x != nil { return x.GridId } return 0 } -func (x *Items_SellItem_Req) GetItemId() int32 { +func (x *ItemsSellItemReq) GetItemId() int32 { if x != nil { return x.ItemId } return 0 } -func (x *Items_SellItem_Req) GetAmount() uint32 { +func (x *ItemsSellItemReq) GetAmount() uint32 { if x != nil { return x.Amount } @@ -284,14 +284,14 @@ func (x *Items_SellItem_Req) GetAmount() uint32 { } //出售道具请求 回应 -type Items_SellItem_Resp struct { +type ItemsSellItemResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *Items_SellItem_Resp) Reset() { - *x = Items_SellItem_Resp{} +func (x *ItemsSellItemResp) Reset() { + *x = ItemsSellItemResp{} if protoimpl.UnsafeEnabled { mi := &file_items_items_msg_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -299,13 +299,13 @@ func (x *Items_SellItem_Resp) Reset() { } } -func (x *Items_SellItem_Resp) String() string { +func (x *ItemsSellItemResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Items_SellItem_Resp) ProtoMessage() {} +func (*ItemsSellItemResp) ProtoMessage() {} -func (x *Items_SellItem_Resp) ProtoReflect() protoreflect.Message { +func (x *ItemsSellItemResp) ProtoReflect() protoreflect.Message { mi := &file_items_items_msg_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -317,8 +317,8 @@ func (x *Items_SellItem_Resp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Items_SellItem_Resp.ProtoReflect.Descriptor instead. -func (*Items_SellItem_Resp) Descriptor() ([]byte, []int) { +// Deprecated: Use ItemsSellItemResp.ProtoReflect.Descriptor instead. +func (*ItemsSellItemResp) Descriptor() ([]byte, []int) { return file_items_items_msg_proto_rawDescGZIP(), []int{5} } @@ -327,29 +327,29 @@ var File_items_items_msg_proto protoreflect.FileDescriptor var file_items_items_msg_proto_rawDesc = []byte{ 0x0a, 0x15, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x69, - 0x74, 0x65, 0x6d, 0x73, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x29, 0x0a, - 0x11, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x5f, 0x47, 0x65, 0x74, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x52, - 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x49, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x49, 0x54, 0x79, 0x70, 0x65, 0x22, 0x3c, 0x0a, 0x12, 0x49, 0x74, 0x65, 0x6d, - 0x73, 0x5f, 0x47, 0x65, 0x74, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, - 0x0a, 0x05, 0x47, 0x72, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x44, 0x42, 0x5f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x05, 0x47, 0x72, 0x69, 0x64, 0x73, 0x22, 0x5b, 0x0a, 0x11, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x5f, - 0x55, 0x73, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x47, - 0x72, 0x69, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x47, 0x72, 0x69, - 0x64, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x41, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x41, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x5f, 0x55, 0x73, 0x65, - 0x49, 0x74, 0x65, 0x6d, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x22, 0x5c, 0x0a, 0x12, 0x49, 0x74, 0x65, - 0x6d, 0x73, 0x5f, 0x53, 0x65, 0x6c, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x5f, 0x52, 0x65, 0x71, 0x12, - 0x16, 0x0a, 0x06, 0x47, 0x72, 0x69, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x06, 0x47, 0x72, 0x69, 0x64, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, - 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x15, 0x0a, 0x13, 0x49, 0x74, 0x65, 0x6d, 0x73, - 0x5f, 0x53, 0x65, 0x6c, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, - 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x65, 0x6d, 0x73, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x27, 0x0a, + 0x0f, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, 0x65, 0x74, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, + 0x12, 0x14, 0x0a, 0x05, 0x49, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x49, 0x54, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x0a, 0x10, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, + 0x65, 0x74, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x05, 0x47, 0x72, + 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x44, 0x42, 0x5f, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x47, 0x72, 0x69, + 0x64, 0x73, 0x22, 0x59, 0x0a, 0x0f, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x55, 0x73, 0x65, 0x49, 0x74, + 0x65, 0x6d, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x47, 0x72, 0x69, 0x64, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x47, 0x72, 0x69, 0x64, 0x49, 0x64, 0x12, 0x16, 0x0a, + 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, + 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x12, 0x0a, + 0x10, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x55, 0x73, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, + 0x70, 0x22, 0x5a, 0x0a, 0x10, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x53, 0x65, 0x6c, 0x6c, 0x49, 0x74, + 0x65, 0x6d, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x47, 0x72, 0x69, 0x64, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x47, 0x72, 0x69, 0x64, 0x49, 0x64, 0x12, 0x16, 0x0a, + 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, + 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x13, 0x0a, + 0x11, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x53, 0x65, 0x6c, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, + 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -366,16 +366,16 @@ func file_items_items_msg_proto_rawDescGZIP() []byte { var file_items_items_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_items_items_msg_proto_goTypes = []interface{}{ - (*Items_Getlist_Req)(nil), // 0: Items_Getlist_Req - (*Items_Getlist_Resp)(nil), // 1: Items_Getlist_Resp - (*Items_UseItem_Req)(nil), // 2: Items_UseItem_Req - (*Items_UseItem_Resp)(nil), // 3: Items_UseItem_Resp - (*Items_SellItem_Req)(nil), // 4: Items_SellItem_Req - (*Items_SellItem_Resp)(nil), // 5: Items_SellItem_Resp - (*DB_UserItemData)(nil), // 6: DB_UserItemData + (*ItemsGetlistReq)(nil), // 0: ItemsGetlistReq + (*ItemsGetlistResp)(nil), // 1: ItemsGetlistResp + (*ItemsUseItemReq)(nil), // 2: ItemsUseItemReq + (*ItemsUseItemResp)(nil), // 3: ItemsUseItemResp + (*ItemsSellItemReq)(nil), // 4: ItemsSellItemReq + (*ItemsSellItemResp)(nil), // 5: ItemsSellItemResp + (*DB_UserItemData)(nil), // 6: DB_UserItemData } var file_items_items_msg_proto_depIdxs = []int32{ - 6, // 0: Items_Getlist_Resp.Grids:type_name -> DB_UserItemData + 6, // 0: ItemsGetlistResp.Grids:type_name -> DB_UserItemData 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 @@ -391,7 +391,7 @@ func file_items_items_msg_proto_init() { file_items_items_db_proto_init() if !protoimpl.UnsafeEnabled { file_items_items_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Items_Getlist_Req); i { + switch v := v.(*ItemsGetlistReq); i { case 0: return &v.state case 1: @@ -403,7 +403,7 @@ func file_items_items_msg_proto_init() { } } file_items_items_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Items_Getlist_Resp); i { + switch v := v.(*ItemsGetlistResp); i { case 0: return &v.state case 1: @@ -415,7 +415,7 @@ func file_items_items_msg_proto_init() { } } file_items_items_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Items_UseItem_Req); i { + switch v := v.(*ItemsUseItemReq); i { case 0: return &v.state case 1: @@ -427,7 +427,7 @@ func file_items_items_msg_proto_init() { } } file_items_items_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Items_UseItem_Resp); i { + switch v := v.(*ItemsUseItemResp); i { case 0: return &v.state case 1: @@ -439,7 +439,7 @@ func file_items_items_msg_proto_init() { } } file_items_items_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Items_SellItem_Req); i { + switch v := v.(*ItemsSellItemReq); i { case 0: return &v.state case 1: @@ -451,7 +451,7 @@ func file_items_items_msg_proto_init() { } } file_items_items_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Items_SellItem_Resp); i { + switch v := v.(*ItemsSellItemResp); i { case 0: return &v.state case 1: diff --git a/pb/proto/equipment/equipment_msg.proto b/pb/proto/equipment/equipment_msg.proto index 787a8b66a..b37d4d68a 100644 --- a/pb/proto/equipment/equipment_msg.proto +++ b/pb/proto/equipment/equipment_msg.proto @@ -3,31 +3,31 @@ option go_package = ".;pb"; import "equipment/equipment_db.proto"; //获取装备列表请求 -message Equipment_GetList_Req { +message EquipmentGetListReq { } //获取装备列表请求 回应 -message Equipment_GetList_Resp { +message EquipmentGetListResp { repeated DB_Equipment Equipments = 1; //装备列表 } //装备挂在到英雄上 -message Equipment_Equip_Req{ +message EquipmentEquipReq{ string HeroCardId = 1; //英雄卡Id repeated string EquipmentId = 2; //装备Id 固定长度的数组 0-5 对应的装备栏 } //装备挂在到英雄上 回应 -message Equipment_Equip_Resp{ +message EquipmentEquipResp{ } //装备升级 -message Equipment_Upgrade_Req{ +message EquipmentUpgradeReq{ string EquipmentId = 1; //装备Id } //装备升级 回应 -message Equipment_Upgrade_Resp{ +message EquipmentUpgradeResp{ } \ No newline at end of file diff --git a/pb/proto/items/items_msg.proto b/pb/proto/items/items_msg.proto index 5a5da1e19..a6e480837 100644 --- a/pb/proto/items/items_msg.proto +++ b/pb/proto/items/items_msg.proto @@ -3,35 +3,35 @@ option go_package = ".;pb"; import "items/items_db.proto"; //查询用户背包请求 -message Items_Getlist_Req { +message ItemsGetlistReq { int32 IType = 1; //道具类型 } //查询用户背包请求 回应 -message Items_Getlist_Resp { +message ItemsGetlistResp { repeated DB_UserItemData Grids = 1; //用户背包列表 } //使用物品请求 -message Items_UseItem_Req { +message ItemsUseItemReq { int32 GridId = 1; //格子Id int32 ItemId = 2; //物品Id uint32 Amount = 3; //使用数量 } //使用物品请求 回应 -message Items_UseItem_Resp { +message ItemsUseItemResp { } //出售道具请求sailitem -message Items_SellItem_Req { +message ItemsSellItemReq { int32 GridId = 1; //格子Id int32 ItemId = 2; //物品Id uint32 Amount = 3; //使用数量 } //出售道具请求 回应 -message Items_SellItem_Resp { +message ItemsSellItemResp { } \ No newline at end of file