上传武器代码优化
This commit is contained in:
parent
4c11b17184
commit
12c321c4b3
@ -15,7 +15,7 @@ func (r *Robot) handlePackMsg(msg *pb.UserMessage) {
|
|||||||
|
|
||||||
//添加好友
|
//添加好友
|
||||||
func (r *Robot) QueryUserPack() {
|
func (r *Robot) QueryUserPack() {
|
||||||
req := &pb.Pack_Getlist_Req{IType: 1}
|
req := &pb.Items_Getlist_Req{IType: 1}
|
||||||
head := &pb.UserMessage{MainType: "pack", SubType: "queryuserpackreq"}
|
head := &pb.UserMessage{MainType: "pack", SubType: "queryuserpackreq"}
|
||||||
defer traceFunc(head.MainType, head.SubType, r.user.GetUid(), req)
|
defer traceFunc(head.MainType, head.SubType, r.user.GetUid(), req)
|
||||||
err := r.SendToClient(head, req)
|
err := r.SendToClient(head, req)
|
||||||
@ -25,7 +25,7 @@ func (r *Robot) QueryUserPack() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (r *Robot) handleQueryUserPack(msg *pb.UserMessage) {
|
func (r *Robot) handleQueryUserPack(msg *pb.UserMessage) {
|
||||||
rsp := &pb.Pack_Getlist_Resp{}
|
rsp := &pb.Items_Getlist_Resp{}
|
||||||
if !comm.ProtoUnmarshal(msg, rsp) {
|
if !comm.ProtoUnmarshal(msg, rsp) {
|
||||||
return
|
return
|
||||||
}
|
}
|
@ -1,12 +1,20 @@
|
|||||||
package comm
|
package comm
|
||||||
|
|
||||||
import "go_dreamfactory/pb"
|
import (
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
业务模块 对外接口定义处
|
业务模块 对外接口定义处
|
||||||
*/
|
*/
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
IModuleCallSource struct {
|
||||||
|
Module string //来源模块
|
||||||
|
FuncName string //来源方法
|
||||||
|
Describe string //调用描述
|
||||||
|
}
|
||||||
|
|
||||||
//邮件业务模块对外接口定义 提供给其他模块使用的
|
//邮件业务模块对外接口定义 提供给其他模块使用的
|
||||||
Imail interface {
|
Imail interface {
|
||||||
CreateNewMail(uId string)
|
CreateNewMail(uId string)
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package modules
|
package modules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go_dreamfactory/comm"
|
|
||||||
"go_dreamfactory/lego/core"
|
"go_dreamfactory/lego/core"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
cfg "go_dreamfactory/sys/configure/structs"
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
@ -18,6 +17,6 @@ type (
|
|||||||
//向多个用户发送消息
|
//向多个用户发送消息
|
||||||
SendMsgToUsers(mainType, subType string, msg proto.Message, user ...*pb.Cache_UserData) (err error)
|
SendMsgToUsers(mainType, subType string, msg proto.Message, user ...*pb.Cache_UserData) (err error)
|
||||||
//校验消耗资源
|
//校验消耗资源
|
||||||
CheckConsumeRes(uid string, res []*cfg.Game_atn) (code comm.ErrorCode)
|
CheckConsumeRes(uid string, res []*cfg.Game_atn) (code pb.ErrorCode)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -97,7 +97,7 @@ func (this *Configure_Comp) GetEquipmentAttrlibraryConfigureById(Id int32) (conf
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取装备属性表
|
//获取武器等级消耗表
|
||||||
func (this *Configure_Comp) GetEquipmentIntensifyConfigure() (configure *cfg.Game_equipIntensify, err error) {
|
func (this *Configure_Comp) GetEquipmentIntensifyConfigure() (configure *cfg.Game_equipIntensify, err error) {
|
||||||
var (
|
var (
|
||||||
v interface{}
|
v interface{}
|
||||||
@ -114,7 +114,7 @@ func (this *Configure_Comp) GetEquipmentIntensifyConfigure() (configure *cfg.Gam
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取属性词列表
|
//获取武器等级消耗表
|
||||||
func (this *Configure_Comp) GetEquipmentIntensifyConfigureById(Id int32) (configure *cfg.Game_equipIntensifyData, err error) {
|
func (this *Configure_Comp) GetEquipmentIntensifyConfigureById(Id int32) (configure *cfg.Game_equipIntensifyData, err error) {
|
||||||
var (
|
var (
|
||||||
v interface{}
|
v interface{}
|
||||||
|
@ -9,8 +9,6 @@ func CloneEquipment(equipment *pb.DB_Equipment) *pb.DB_Equipment {
|
|||||||
HeroId: equipment.HeroId,
|
HeroId: equipment.HeroId,
|
||||||
Lv: equipment.Lv,
|
Lv: equipment.Lv,
|
||||||
KeepFailNum: equipment.KeepFailNum,
|
KeepFailNum: equipment.KeepFailNum,
|
||||||
MainEntry: make(map[uint32]int32),
|
|
||||||
AdverbEntry: make(map[uint32]int32),
|
|
||||||
OverlayNum: equipment.OverlayNum,
|
OverlayNum: equipment.OverlayNum,
|
||||||
IsInitialState: equipment.IsInitialState,
|
IsInitialState: equipment.IsInitialState,
|
||||||
}
|
}
|
||||||
|
@ -72,16 +72,11 @@ func (this *Model_Equipment_Comp) Equipment_AddEquipmentsToPack(uId string, cIds
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !iskeep {
|
if !iskeep {
|
||||||
if _, ok := configure.GetDataMap()[k]; ok {
|
if c, ok := configure.GetDataMap()[k]; ok {
|
||||||
id := primitive.NewObjectID().Hex()
|
if equipment, err := this.newEquipment(uId, c, v); err != nil {
|
||||||
add[id] = &pb.DB_Equipment{
|
return err
|
||||||
Id: id,
|
} else {
|
||||||
CId: k,
|
add[equipment.Id] = equipment
|
||||||
UId: uId,
|
|
||||||
MainEntry: make(map[uint32]int32),
|
|
||||||
AdverbEntry: make(map[uint32]int32),
|
|
||||||
OverlayNum: v,
|
|
||||||
IsInitialState: true,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -110,3 +105,28 @@ func (this *Model_Equipment_Comp) Equipment_UpdateIsEquip(uid string, equipments
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//创建新的武器对象
|
||||||
|
func (this *Model_Equipment_Comp) newEquipment(uid string, conf *cfg.Game_equipData, num uint32) (equipment *pb.DB_Equipment, err error) {
|
||||||
|
var (
|
||||||
|
mattr []*cfg.Game_equipAttrlibraryData
|
||||||
|
)
|
||||||
|
equipment = &pb.DB_Equipment{
|
||||||
|
Id: primitive.NewObjectID().Hex(),
|
||||||
|
CId: conf.Id,
|
||||||
|
UId: uid,
|
||||||
|
OverlayNum: num,
|
||||||
|
IsInitialState: true,
|
||||||
|
}
|
||||||
|
if mattr, err = this.module.configure_comp.GetEquipmentAttrlibraryConfigureById(conf.Leadlibrary); err != nil || len(mattr) == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
equipment.MainEntry = &pb.EquipmentAttributeEntry{
|
||||||
|
Id: mattr[0].Key,
|
||||||
|
Libraryid: mattr[0].Libraryid,
|
||||||
|
Lv: 0,
|
||||||
|
AttrName: mattr[0].Attr[0],
|
||||||
|
Value: 0,
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -48,7 +48,7 @@ func (this *Items) OnInstallComp() {
|
|||||||
|
|
||||||
//IPack-------------------------------------------------------------------------------------------------------------------------------
|
//IPack-------------------------------------------------------------------------------------------------------------------------------
|
||||||
///查询用户背包物品数量
|
///查询用户背包物品数量
|
||||||
func (this *Items) QueryUserPackItemAmount(uId string, itemid int32) (amount uint32) {
|
func (this *Items) QueryUserItemAmount(uId string, itemid int32) (amount uint32) {
|
||||||
defer log.Debugf("获取物品 uId:%s itemid:%d addnum:%d ", uId, itemid, amount)
|
defer log.Debugf("获取物品 uId:%s itemid:%d addnum:%d ", uId, itemid, amount)
|
||||||
amount = 0
|
amount = 0
|
||||||
if result := this.model_pack_comp.Pack_QueryUserPackItemsAmount(uId, itemid); result != nil && len(result) > 0 {
|
if result := this.model_pack_comp.Pack_QueryUserPackItemsAmount(uId, itemid); result != nil && len(result) > 0 {
|
||||||
@ -58,13 +58,13 @@ func (this *Items) QueryUserPackItemAmount(uId string, itemid int32) (amount uin
|
|||||||
}
|
}
|
||||||
|
|
||||||
///查询用户背包多个物品数量
|
///查询用户背包多个物品数量
|
||||||
func (this *Items) QueryUserPackItemsAmount(uId string, itemid ...int32) (result map[int32]uint32) {
|
func (this *Items) QueryUserItemsAmount(uId string, itemid ...int32) (result map[int32]uint32) {
|
||||||
result = this.model_pack_comp.Pack_QueryUserPackItemsAmount(uId, itemid...)
|
result = this.model_pack_comp.Pack_QueryUserPackItemsAmount(uId, itemid...)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
///添加单个物品到背包 (可以加物品和减物品)
|
///添加单个物品到背包 (可以加物品和减物品)
|
||||||
func (this *Items) AddItemToUserPack(uId string, itemid, addnum int32) (code pb.ErrorCode) {
|
func (this *Items) AddItem(uId string, itemid, addnum int32) (code pb.ErrorCode) {
|
||||||
var err error
|
var err error
|
||||||
defer log.Debugf("给用户添加物品 uId:%s itemid:%d addnum:%d issucc:%v", uId, itemid, addnum, err == nil)
|
defer log.Debugf("给用户添加物品 uId:%s itemid:%d addnum:%d issucc:%v", uId, itemid, addnum, err == nil)
|
||||||
if err = this.model_pack_comp.Pack_AddItemToUserPack(uId, itemid, addnum); err != nil {
|
if err = this.model_pack_comp.Pack_AddItemToUserPack(uId, itemid, addnum); err != nil {
|
||||||
@ -81,7 +81,7 @@ func (this *Items) AddItemToUserPack(uId string, itemid, addnum int32) (code pb.
|
|||||||
}
|
}
|
||||||
|
|
||||||
///添加多个物品到背包 (可以加物品和减物品)
|
///添加多个物品到背包 (可以加物品和减物品)
|
||||||
func (this *Items) AddItemsToUserPack(uId string, items map[int32]int32) (code pb.ErrorCode) {
|
func (this *Items) AddItems(uId string, items map[int32]int32) (code pb.ErrorCode) {
|
||||||
var err error
|
var err error
|
||||||
defer log.Debugf("给用户添加物品 uId:%s items:%d items:%v", uId, items, err == nil)
|
defer log.Debugf("给用户添加物品 uId:%s items:%d items:%v", uId, items, err == nil)
|
||||||
if err = this.model_pack_comp.Pack_AddItemsToUserPack(uId, items); err != nil {
|
if err = this.model_pack_comp.Pack_AddItemsToUserPack(uId, items); err != nil {
|
||||||
|
105
pb/comm.pb.go
105
pb/comm.pb.go
@ -21,6 +21,62 @@ const (
|
|||||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//英雄属性类型
|
||||||
|
type HeroAttributesType int32
|
||||||
|
|
||||||
|
const (
|
||||||
|
HeroAttributesType_Hp HeroAttributesType = 0 //血量
|
||||||
|
HeroAttributesType_Atk HeroAttributesType = 1 //攻击
|
||||||
|
HeroAttributesType_Def HeroAttributesType = 2 //防御
|
||||||
|
HeroAttributesType_Speed HeroAttributesType = 3 //速度
|
||||||
|
HeroAttributesType_Crit HeroAttributesType = 4 //暴击
|
||||||
|
)
|
||||||
|
|
||||||
|
// Enum value maps for HeroAttributesType.
|
||||||
|
var (
|
||||||
|
HeroAttributesType_name = map[int32]string{
|
||||||
|
0: "Hp",
|
||||||
|
1: "Atk",
|
||||||
|
2: "Def",
|
||||||
|
3: "Speed",
|
||||||
|
4: "Crit",
|
||||||
|
}
|
||||||
|
HeroAttributesType_value = map[string]int32{
|
||||||
|
"Hp": 0,
|
||||||
|
"Atk": 1,
|
||||||
|
"Def": 2,
|
||||||
|
"Speed": 3,
|
||||||
|
"Crit": 4,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
func (x HeroAttributesType) Enum() *HeroAttributesType {
|
||||||
|
p := new(HeroAttributesType)
|
||||||
|
*p = x
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x HeroAttributesType) String() string {
|
||||||
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (HeroAttributesType) Descriptor() protoreflect.EnumDescriptor {
|
||||||
|
return file_comm_proto_enumTypes[0].Descriptor()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (HeroAttributesType) Type() protoreflect.EnumType {
|
||||||
|
return &file_comm_proto_enumTypes[0]
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x HeroAttributesType) Number() protoreflect.EnumNumber {
|
||||||
|
return protoreflect.EnumNumber(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use HeroAttributesType.Descriptor instead.
|
||||||
|
func (HeroAttributesType) EnumDescriptor() ([]byte, []int) {
|
||||||
|
return file_comm_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
//用户消息流结构
|
//用户消息流结构
|
||||||
type UserMessage struct {
|
type UserMessage struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
@ -739,8 +795,12 @@ var file_comm_proto_rawDesc = []byte{
|
|||||||
0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x2c, 0x0a, 0x12, 0x4e, 0x6f,
|
0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x2c, 0x0a, 0x12, 0x4e, 0x6f,
|
||||||
0x74, 0x69, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x71,
|
0x74, 0x69, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x71,
|
||||||
0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
|
0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x2a, 0x43, 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f,
|
||||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x06,
|
||||||
|
0x0a, 0x02, 0x48, 0x70, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x74, 0x6b, 0x10, 0x01, 0x12,
|
||||||
|
0x07, 0x0a, 0x03, 0x44, 0x65, 0x66, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x70, 0x65, 0x65,
|
||||||
|
0x64, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x72, 0x69, 0x74, 0x10, 0x04, 0x42, 0x06, 0x5a,
|
||||||
|
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -755,28 +815,30 @@ func file_comm_proto_rawDescGZIP() []byte {
|
|||||||
return file_comm_proto_rawDescData
|
return file_comm_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var file_comm_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||||
var file_comm_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
var file_comm_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
||||||
var file_comm_proto_goTypes = []interface{}{
|
var file_comm_proto_goTypes = []interface{}{
|
||||||
(*UserMessage)(nil), // 0: UserMessage
|
(HeroAttributesType)(0), // 0: HeroAttributesType
|
||||||
(*AgentMessage)(nil), // 1: AgentMessage
|
(*UserMessage)(nil), // 1: UserMessage
|
||||||
(*RPCMessageReply)(nil), // 2: RPCMessageReply
|
(*AgentMessage)(nil), // 2: AgentMessage
|
||||||
(*AgentBuildReq)(nil), // 3: AgentBuildReq
|
(*RPCMessageReply)(nil), // 3: RPCMessageReply
|
||||||
(*AgentUnBuildReq)(nil), // 4: AgentUnBuildReq
|
(*AgentBuildReq)(nil), // 4: AgentBuildReq
|
||||||
(*AgentSendMessageReq)(nil), // 5: AgentSendMessageReq
|
(*AgentUnBuildReq)(nil), // 5: AgentUnBuildReq
|
||||||
(*BatchMessageReq)(nil), // 6: BatchMessageReq
|
(*AgentSendMessageReq)(nil), // 6: AgentSendMessageReq
|
||||||
(*BroadCastMessageReq)(nil), // 7: BroadCastMessageReq
|
(*BatchMessageReq)(nil), // 7: BatchMessageReq
|
||||||
(*AgentCloseeReq)(nil), // 8: AgentCloseeReq
|
(*BroadCastMessageReq)(nil), // 8: BroadCastMessageReq
|
||||||
(*NoticeUserCloseReq)(nil), // 9: NoticeUserCloseReq
|
(*AgentCloseeReq)(nil), // 9: AgentCloseeReq
|
||||||
(*anypb.Any)(nil), // 10: google.protobuf.Any
|
(*NoticeUserCloseReq)(nil), // 10: NoticeUserCloseReq
|
||||||
(ErrorCode)(0), // 11: ErrorCode
|
(*anypb.Any)(nil), // 11: google.protobuf.Any
|
||||||
|
(ErrorCode)(0), // 12: ErrorCode
|
||||||
}
|
}
|
||||||
var file_comm_proto_depIdxs = []int32{
|
var file_comm_proto_depIdxs = []int32{
|
||||||
10, // 0: UserMessage.data:type_name -> google.protobuf.Any
|
11, // 0: UserMessage.data:type_name -> google.protobuf.Any
|
||||||
10, // 1: AgentMessage.Message:type_name -> google.protobuf.Any
|
11, // 1: AgentMessage.Message:type_name -> google.protobuf.Any
|
||||||
11, // 2: RPCMessageReply.Code:type_name -> ErrorCode
|
12, // 2: RPCMessageReply.Code:type_name -> ErrorCode
|
||||||
10, // 3: AgentSendMessageReq.Data:type_name -> google.protobuf.Any
|
11, // 3: AgentSendMessageReq.Data:type_name -> google.protobuf.Any
|
||||||
10, // 4: BatchMessageReq.Data:type_name -> google.protobuf.Any
|
11, // 4: BatchMessageReq.Data:type_name -> google.protobuf.Any
|
||||||
10, // 5: BroadCastMessageReq.Data:type_name -> google.protobuf.Any
|
11, // 5: BroadCastMessageReq.Data:type_name -> google.protobuf.Any
|
||||||
6, // [6:6] is the sub-list for method output_type
|
6, // [6:6] is the sub-list for method output_type
|
||||||
6, // [6:6] is the sub-list for method input_type
|
6, // [6:6] is the sub-list for method input_type
|
||||||
6, // [6:6] is the sub-list for extension type_name
|
6, // [6:6] is the sub-list for extension type_name
|
||||||
@ -917,13 +979,14 @@ func file_comm_proto_init() {
|
|||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_comm_proto_rawDesc,
|
RawDescriptor: file_comm_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 1,
|
||||||
NumMessages: 10,
|
NumMessages: 10,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
GoTypes: file_comm_proto_goTypes,
|
GoTypes: file_comm_proto_goTypes,
|
||||||
DependencyIndexes: file_comm_proto_depIdxs,
|
DependencyIndexes: file_comm_proto_depIdxs,
|
||||||
|
EnumInfos: file_comm_proto_enumTypes,
|
||||||
MessageInfos: file_comm_proto_msgTypes,
|
MessageInfos: file_comm_proto_msgTypes,
|
||||||
}.Build()
|
}.Build()
|
||||||
File_comm_proto = out.File
|
File_comm_proto = out.File
|
||||||
|
@ -20,94 +20,87 @@ const (
|
|||||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
)
|
)
|
||||||
|
|
||||||
//装备主词条
|
//装备属性词条
|
||||||
type EquipmentMainEntry int32
|
type EquipmentAttributeEntry struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
const (
|
Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id"` //属性词条主键id 唯一
|
||||||
EquipmentMainEntry_Hp EquipmentMainEntry = 0
|
Libraryid int32 `protobuf:"varint,2,opt,name=libraryid,proto3" json:"libraryid"` //属性词条id 非唯一
|
||||||
)
|
AttrName string `protobuf:"bytes,3,opt,name=AttrName,proto3" json:"AttrName"` //属性名
|
||||||
|
Lv int32 `protobuf:"varint,4,opt,name=Lv,proto3" json:"Lv"` //属性等级
|
||||||
|
Value int32 `protobuf:"varint,5,opt,name=Value,proto3" json:"Value"` //属性值
|
||||||
|
}
|
||||||
|
|
||||||
// Enum value maps for EquipmentMainEntry.
|
func (x *EquipmentAttributeEntry) Reset() {
|
||||||
var (
|
*x = EquipmentAttributeEntry{}
|
||||||
EquipmentMainEntry_name = map[int32]string{
|
if protoimpl.UnsafeEnabled {
|
||||||
0: "Hp",
|
mi := &file_equipment_equipment_db_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
EquipmentMainEntry_value = map[string]int32{
|
}
|
||||||
"Hp": 0,
|
|
||||||
|
func (x *EquipmentAttributeEntry) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*EquipmentAttributeEntry) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *EquipmentAttributeEntry) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_equipment_equipment_db_proto_msgTypes[0]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
)
|
return ms
|
||||||
|
}
|
||||||
func (x EquipmentMainEntry) Enum() *EquipmentMainEntry {
|
return mi.MessageOf(x)
|
||||||
p := new(EquipmentMainEntry)
|
|
||||||
*p = x
|
|
||||||
return p
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x EquipmentMainEntry) String() string {
|
// Deprecated: Use EquipmentAttributeEntry.ProtoReflect.Descriptor instead.
|
||||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
func (*EquipmentAttributeEntry) Descriptor() ([]byte, []int) {
|
||||||
}
|
|
||||||
|
|
||||||
func (EquipmentMainEntry) Descriptor() protoreflect.EnumDescriptor {
|
|
||||||
return file_equipment_equipment_db_proto_enumTypes[0].Descriptor()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (EquipmentMainEntry) Type() protoreflect.EnumType {
|
|
||||||
return &file_equipment_equipment_db_proto_enumTypes[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x EquipmentMainEntry) Number() protoreflect.EnumNumber {
|
|
||||||
return protoreflect.EnumNumber(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use EquipmentMainEntry.Descriptor instead.
|
|
||||||
func (EquipmentMainEntry) EnumDescriptor() ([]byte, []int) {
|
|
||||||
return file_equipment_equipment_db_proto_rawDescGZIP(), []int{0}
|
return file_equipment_equipment_db_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
//装备副词条
|
func (x *EquipmentAttributeEntry) GetId() int32 {
|
||||||
type EquipmentAdverbEntry int32
|
if x != nil {
|
||||||
|
return x.Id
|
||||||
const (
|
|
||||||
EquipmentAdverbEntry_Crit EquipmentAdverbEntry = 0
|
|
||||||
)
|
|
||||||
|
|
||||||
// Enum value maps for EquipmentAdverbEntry.
|
|
||||||
var (
|
|
||||||
EquipmentAdverbEntry_name = map[int32]string{
|
|
||||||
0: "Crit",
|
|
||||||
}
|
}
|
||||||
EquipmentAdverbEntry_value = map[string]int32{
|
return 0
|
||||||
"Crit": 0,
|
}
|
||||||
|
|
||||||
|
func (x *EquipmentAttributeEntry) GetLibraryid() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Libraryid
|
||||||
}
|
}
|
||||||
)
|
return 0
|
||||||
|
|
||||||
func (x EquipmentAdverbEntry) Enum() *EquipmentAdverbEntry {
|
|
||||||
p := new(EquipmentAdverbEntry)
|
|
||||||
*p = x
|
|
||||||
return p
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x EquipmentAdverbEntry) String() string {
|
func (x *EquipmentAttributeEntry) GetAttrName() string {
|
||||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
if x != nil {
|
||||||
|
return x.AttrName
|
||||||
|
}
|
||||||
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (EquipmentAdverbEntry) Descriptor() protoreflect.EnumDescriptor {
|
func (x *EquipmentAttributeEntry) GetLv() int32 {
|
||||||
return file_equipment_equipment_db_proto_enumTypes[1].Descriptor()
|
if x != nil {
|
||||||
|
return x.Lv
|
||||||
|
}
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (EquipmentAdverbEntry) Type() protoreflect.EnumType {
|
func (x *EquipmentAttributeEntry) GetValue() int32 {
|
||||||
return &file_equipment_equipment_db_proto_enumTypes[1]
|
if x != nil {
|
||||||
}
|
return x.Value
|
||||||
|
}
|
||||||
func (x EquipmentAdverbEntry) Number() protoreflect.EnumNumber {
|
return 0
|
||||||
return protoreflect.EnumNumber(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use EquipmentAdverbEntry.Descriptor instead.
|
|
||||||
func (EquipmentAdverbEntry) EnumDescriptor() ([]byte, []int) {
|
|
||||||
return file_equipment_equipment_db_proto_rawDescGZIP(), []int{1}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//武器数据
|
||||||
type DB_Equipment struct {
|
type DB_Equipment struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@ -119,8 +112,8 @@ type DB_Equipment struct {
|
|||||||
HeroId string `protobuf:"bytes,5,opt,name=heroId,proto3" json:"heroId" bson:"heroId"` // 挂在的英雄卡片id 未装备 填 ''
|
HeroId string `protobuf:"bytes,5,opt,name=heroId,proto3" json:"heroId" bson:"heroId"` // 挂在的英雄卡片id 未装备 填 ''
|
||||||
Lv int32 `protobuf:"zigzag32,6,opt,name=lv,proto3" json:"lv" bson:"lv"` //装备强化等级
|
Lv int32 `protobuf:"zigzag32,6,opt,name=lv,proto3" json:"lv" bson:"lv"` //装备强化等级
|
||||||
KeepFailNum int32 `protobuf:"zigzag32,7,opt,name=keepFailNum,proto3" json:"keepFailNum" bson:"keepFailNum"` // 连续强化失败次数
|
KeepFailNum int32 `protobuf:"zigzag32,7,opt,name=keepFailNum,proto3" json:"keepFailNum" bson:"keepFailNum"` // 连续强化失败次数
|
||||||
MainEntry map[uint32]int32 `protobuf:"bytes,8,rep,name=mainEntry,proto3" json:"mainEntry" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"mainEntry"` // 装备主词条
|
MainEntry *EquipmentAttributeEntry `protobuf:"bytes,8,opt,name=mainEntry,proto3" json:"mainEntry" bson:"mainEntry"` // 装备主词条
|
||||||
AdverbEntry map[uint32]int32 `protobuf:"bytes,9,rep,name=adverbEntry,proto3" json:"adverbEntry" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"adverbEntry"` //装备副词条
|
AdverbEntry []*EquipmentAttributeEntry `protobuf:"bytes,9,rep,name=adverbEntry,proto3" json:"adverbEntry" bson:"adverbEntry"` //装备副词条
|
||||||
OverlayNum uint32 `protobuf:"varint,10,opt,name=overlayNum,proto3" json:"overlayNum" bson:"overlayNum"` //叠加数量
|
OverlayNum uint32 `protobuf:"varint,10,opt,name=overlayNum,proto3" json:"overlayNum" bson:"overlayNum"` //叠加数量
|
||||||
IsInitialState bool `protobuf:"varint,11,opt,name=isInitialState,proto3" json:"isInitialState" bson:"isInitialState"` //是否初始状态
|
IsInitialState bool `protobuf:"varint,11,opt,name=isInitialState,proto3" json:"isInitialState" bson:"isInitialState"` //是否初始状态
|
||||||
}
|
}
|
||||||
@ -128,7 +121,7 @@ type DB_Equipment struct {
|
|||||||
func (x *DB_Equipment) Reset() {
|
func (x *DB_Equipment) Reset() {
|
||||||
*x = DB_Equipment{}
|
*x = DB_Equipment{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_equipment_equipment_db_proto_msgTypes[0]
|
mi := &file_equipment_equipment_db_proto_msgTypes[1]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -141,7 +134,7 @@ func (x *DB_Equipment) String() string {
|
|||||||
func (*DB_Equipment) ProtoMessage() {}
|
func (*DB_Equipment) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *DB_Equipment) ProtoReflect() protoreflect.Message {
|
func (x *DB_Equipment) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_equipment_equipment_db_proto_msgTypes[0]
|
mi := &file_equipment_equipment_db_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -154,7 +147,7 @@ func (x *DB_Equipment) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use DB_Equipment.ProtoReflect.Descriptor instead.
|
// Deprecated: Use DB_Equipment.ProtoReflect.Descriptor instead.
|
||||||
func (*DB_Equipment) Descriptor() ([]byte, []int) {
|
func (*DB_Equipment) Descriptor() ([]byte, []int) {
|
||||||
return file_equipment_equipment_db_proto_rawDescGZIP(), []int{0}
|
return file_equipment_equipment_db_proto_rawDescGZIP(), []int{1}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DB_Equipment) GetId() string {
|
func (x *DB_Equipment) GetId() string {
|
||||||
@ -199,14 +192,14 @@ func (x *DB_Equipment) GetKeepFailNum() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DB_Equipment) GetMainEntry() map[uint32]int32 {
|
func (x *DB_Equipment) GetMainEntry() *EquipmentAttributeEntry {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.MainEntry
|
return x.MainEntry
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DB_Equipment) GetAdverbEntry() map[uint32]int32 {
|
func (x *DB_Equipment) GetAdverbEntry() []*EquipmentAttributeEntry {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.AdverbEntry
|
return x.AdverbEntry
|
||||||
}
|
}
|
||||||
@ -231,42 +224,38 @@ var File_equipment_equipment_db_proto protoreflect.FileDescriptor
|
|||||||
|
|
||||||
var file_equipment_equipment_db_proto_rawDesc = []byte{
|
var file_equipment_equipment_db_proto_rawDesc = []byte{
|
||||||
0x0a, 0x1c, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x65, 0x71, 0x75, 0x69,
|
0x0a, 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, 0xd0,
|
0x70, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89,
|
||||||
0x03, 0x0a, 0x0c, 0x44, 0x42, 0x5f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x12,
|
0x01, 0x0a, 0x17, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72,
|
||||||
0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x12,
|
0x69, 0x62, 0x75, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64,
|
||||||
0x10, 0x0a, 0x03, 0x63, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x11, 0x52, 0x03, 0x63, 0x49,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x69,
|
||||||
0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
0x62, 0x72, 0x61, 0x72, 0x79, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6c,
|
||||||
0x75, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x18, 0x05, 0x20,
|
0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x41, 0x74, 0x74, 0x72,
|
||||||
0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c,
|
0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x41, 0x74, 0x74, 0x72,
|
||||||
0x76, 0x18, 0x06, 0x20, 0x01, 0x28, 0x11, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x20, 0x0a, 0x0b, 0x6b,
|
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x4c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
|
||||||
0x65, 0x65, 0x70, 0x46, 0x61, 0x69, 0x6c, 0x4e, 0x75, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x11,
|
0x52, 0x02, 0x4c, 0x76, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20,
|
||||||
0x52, 0x0b, 0x6b, 0x65, 0x65, 0x70, 0x46, 0x61, 0x69, 0x6c, 0x4e, 0x75, 0x6d, 0x12, 0x3a, 0x0a,
|
0x01, 0x28, 0x05, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xc8, 0x02, 0x0a, 0x0c, 0x44,
|
||||||
0x09, 0x6d, 0x61, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b,
|
0x42, 0x5f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x49,
|
||||||
0x32, 0x1c, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x2e,
|
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63,
|
||||||
0x4d, 0x61, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09,
|
0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x11, 0x52, 0x03, 0x63, 0x49, 0x64, 0x12, 0x10, 0x0a,
|
||||||
0x6d, 0x61, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x64, 0x76,
|
0x03, 0x75, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x49, 0x64, 0x12,
|
||||||
0x65, 0x72, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e,
|
0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
0x2e, 0x44, 0x42, 0x5f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x64,
|
0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x06, 0x20,
|
||||||
0x76, 0x65, 0x72, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b,
|
0x01, 0x28, 0x11, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x20, 0x0a, 0x0b, 0x6b, 0x65, 0x65, 0x70, 0x46,
|
||||||
0x61, 0x64, 0x76, 0x65, 0x72, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x6f,
|
0x61, 0x69, 0x6c, 0x4e, 0x75, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x11, 0x52, 0x0b, 0x6b, 0x65,
|
||||||
0x76, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x4e, 0x75, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
0x65, 0x70, 0x46, 0x61, 0x69, 0x6c, 0x4e, 0x75, 0x6d, 0x12, 0x36, 0x0a, 0x09, 0x6d, 0x61, 0x69,
|
||||||
0x0a, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x4e, 0x75, 0x6d, 0x12, 0x26, 0x0a, 0x0e, 0x69,
|
0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x45,
|
||||||
0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20,
|
0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
|
||||||
0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74,
|
0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x72,
|
||||||
0x61, 0x74, 0x65, 0x1a, 0x3c, 0x0a, 0x0e, 0x4d, 0x61, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
0x79, 0x12, 0x3a, 0x0a, 0x0b, 0x61, 0x64, 0x76, 0x65, 0x72, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
|
0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65,
|
||||||
0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
|
0x52, 0x0b, 0x61, 0x64, 0x76, 0x65, 0x72, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1e, 0x0a,
|
||||||
0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x64, 0x76, 0x65, 0x72, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
0x0a, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x4e, 0x75, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28,
|
||||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
|
0x0d, 0x52, 0x0a, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x4e, 0x75, 0x6d, 0x12, 0x26, 0x0a,
|
||||||
0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
0x0e, 0x69, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18,
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
|
0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c,
|
||||||
0x01, 0x2a, 0x1c, 0x0a, 0x12, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x61,
|
0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
|
||||||
0x69, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x06, 0x0a, 0x02, 0x48, 0x70, 0x10, 0x00, 0x2a,
|
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
0x20, 0x0a, 0x14, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x76, 0x65,
|
|
||||||
0x72, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x72, 0x69, 0x74, 0x10,
|
|
||||||
0x00, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
|
||||||
0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -281,18 +270,14 @@ func file_equipment_equipment_db_proto_rawDescGZIP() []byte {
|
|||||||
return file_equipment_equipment_db_proto_rawDescData
|
return file_equipment_equipment_db_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_equipment_equipment_db_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
var file_equipment_equipment_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||||
var file_equipment_equipment_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
|
||||||
var file_equipment_equipment_db_proto_goTypes = []interface{}{
|
var file_equipment_equipment_db_proto_goTypes = []interface{}{
|
||||||
(EquipmentMainEntry)(0), // 0: EquipmentMainEntry
|
(*EquipmentAttributeEntry)(nil), // 0: EquipmentAttributeEntry
|
||||||
(EquipmentAdverbEntry)(0), // 1: EquipmentAdverbEntry
|
(*DB_Equipment)(nil), // 1: DB_Equipment
|
||||||
(*DB_Equipment)(nil), // 2: DB_Equipment
|
|
||||||
nil, // 3: DB_Equipment.MainEntryEntry
|
|
||||||
nil, // 4: DB_Equipment.AdverbEntryEntry
|
|
||||||
}
|
}
|
||||||
var file_equipment_equipment_db_proto_depIdxs = []int32{
|
var file_equipment_equipment_db_proto_depIdxs = []int32{
|
||||||
3, // 0: DB_Equipment.mainEntry:type_name -> DB_Equipment.MainEntryEntry
|
0, // 0: DB_Equipment.mainEntry:type_name -> EquipmentAttributeEntry
|
||||||
4, // 1: DB_Equipment.adverbEntry:type_name -> DB_Equipment.AdverbEntryEntry
|
0, // 1: DB_Equipment.adverbEntry:type_name -> EquipmentAttributeEntry
|
||||||
2, // [2:2] is the sub-list for method output_type
|
2, // [2:2] is the sub-list for method output_type
|
||||||
2, // [2:2] is the sub-list for method input_type
|
2, // [2:2] is the sub-list for method input_type
|
||||||
2, // [2:2] is the sub-list for extension type_name
|
2, // [2:2] is the sub-list for extension type_name
|
||||||
@ -307,6 +292,18 @@ func file_equipment_equipment_db_proto_init() {
|
|||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_equipment_equipment_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_equipment_equipment_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*EquipmentAttributeEntry); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_equipment_equipment_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*DB_Equipment); i {
|
switch v := v.(*DB_Equipment); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -324,14 +321,13 @@ func file_equipment_equipment_db_proto_init() {
|
|||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_equipment_equipment_db_proto_rawDesc,
|
RawDescriptor: file_equipment_equipment_db_proto_rawDesc,
|
||||||
NumEnums: 2,
|
NumEnums: 0,
|
||||||
NumMessages: 3,
|
NumMessages: 2,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
GoTypes: file_equipment_equipment_db_proto_goTypes,
|
GoTypes: file_equipment_equipment_db_proto_goTypes,
|
||||||
DependencyIndexes: file_equipment_equipment_db_proto_depIdxs,
|
DependencyIndexes: file_equipment_equipment_db_proto_depIdxs,
|
||||||
EnumInfos: file_equipment_equipment_db_proto_enumTypes,
|
|
||||||
MessageInfos: file_equipment_equipment_db_proto_msgTypes,
|
MessageInfos: file_equipment_equipment_db_proto_msgTypes,
|
||||||
}.Build()
|
}.Build()
|
||||||
File_equipment_equipment_db_proto = out.File
|
File_equipment_equipment_db_proto = out.File
|
||||||
|
@ -66,3 +66,12 @@ message AgentCloseeReq { string UserSessionId = 1; }
|
|||||||
|
|
||||||
//通知用户离线
|
//通知用户离线
|
||||||
message NoticeUserCloseReq { string UserId = 1; }
|
message NoticeUserCloseReq { string UserId = 1; }
|
||||||
|
|
||||||
|
//英雄属性类型
|
||||||
|
enum HeroAttributesType{
|
||||||
|
Hp = 0; //血量
|
||||||
|
Atk = 1; //攻击
|
||||||
|
Def = 2; //防御
|
||||||
|
Speed = 3; //速度
|
||||||
|
Crit = 4; //暴击
|
||||||
|
}
|
@ -1,16 +1,16 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
option go_package = ".;pb";
|
option go_package = ".;pb";
|
||||||
|
|
||||||
//装备主词条
|
//装备属性词条
|
||||||
enum EquipmentMainEntry {
|
message EquipmentAttributeEntry {
|
||||||
Hp = 0;
|
int32 Id = 1; //属性词条主键id 唯一
|
||||||
}
|
int32 libraryid = 2; //属性词条id 非唯一
|
||||||
|
string AttrName = 3; //属性名
|
||||||
//装备副词条
|
int32 Lv = 4; //属性等级
|
||||||
enum EquipmentAdverbEntry {
|
int32 Value = 5; //属性值
|
||||||
Crit = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//武器数据
|
||||||
message DB_Equipment {
|
message DB_Equipment {
|
||||||
string Id = 1; //@go_tags(`bson:"_id"`) 装备id
|
string Id = 1; //@go_tags(`bson:"_id"`) 装备id
|
||||||
sint32 cId = 2; //@go_tags(`bson:"cId"`) 配置Id
|
sint32 cId = 2; //@go_tags(`bson:"cId"`) 配置Id
|
||||||
@ -18,8 +18,8 @@ message DB_Equipment {
|
|||||||
string heroId = 5; //@go_tags(`bson:"heroId"`) 挂在的英雄卡片id 未装备 填 ''
|
string heroId = 5; //@go_tags(`bson:"heroId"`) 挂在的英雄卡片id 未装备 填 ''
|
||||||
sint32 lv = 6; //@go_tags(`bson:"lv"`) 装备强化等级
|
sint32 lv = 6; //@go_tags(`bson:"lv"`) 装备强化等级
|
||||||
sint32 keepFailNum = 7; //@go_tags(`bson:"keepFailNum"`) 连续强化失败次数
|
sint32 keepFailNum = 7; //@go_tags(`bson:"keepFailNum"`) 连续强化失败次数
|
||||||
map<uint32,int32> mainEntry = 8; //@go_tags(`bson:"mainEntry"`) 装备主词条
|
EquipmentAttributeEntry mainEntry = 8; //@go_tags(`bson:"mainEntry"`) 装备主词条
|
||||||
map<uint32,int32> adverbEntry = 9; //@go_tags(`bson:"adverbEntry"`) 装备副词条
|
repeated EquipmentAttributeEntry adverbEntry = 9; //@go_tags(`bson:"adverbEntry"`) 装备副词条
|
||||||
uint32 overlayNum = 10; //@go_tags(`bson:"overlayNum"`) 叠加数量
|
uint32 overlayNum = 10; //@go_tags(`bson:"overlayNum"`) 叠加数量
|
||||||
bool isInitialState = 11; //@go_tags(`bson:"isInitialState"`) 是否初始状态
|
bool isInitialState = 11; //@go_tags(`bson:"isInitialState"`) 是否初始状态
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user