上传武器饰品

This commit is contained in:
liwei1dao 2022-11-01 17:22:44 +08:00
parent a8550ef827
commit f1ea5f08d3
6 changed files with 535 additions and 65 deletions

View File

@ -0,0 +1,330 @@
[
{
"key": "1",
"attribute_text": {
"key": "attribute_text1",
"text": "对直觉属性英雄伤害增加"
},
"skill_id": 125004011
},
{
"key": "2",
"attribute_text": {
"key": "attribute_text2",
"text": "对真诚属性英雄伤害增加"
},
"skill_id": 125004011
},
{
"key": "3",
"attribute_text": {
"key": "attribute_text3",
"text": "对共情属性英雄伤害增加"
},
"skill_id": 125004011
},
{
"key": "4",
"attribute_text": {
"key": "attribute_text4",
"text": "对责任属性英雄伤害增加"
},
"skill_id": 125004011
},
{
"key": "5",
"attribute_text": {
"key": "attribute_text5",
"text": "减少受到的直觉属性英雄伤害"
},
"skill_id": 125004011
},
{
"key": "6",
"attribute_text": {
"key": "attribute_text6",
"text": "减少受到的真诚属性英雄伤害"
},
"skill_id": 125004011
},
{
"key": "7",
"attribute_text": {
"key": "attribute_text7",
"text": "减少受到的共情属性英雄伤害"
},
"skill_id": 125004011
},
{
"key": "8",
"attribute_text": {
"key": "attribute_text8",
"text": "减少受到的责任属性英雄伤害"
},
"skill_id": 125004011
},
{
"key": "9",
"attribute_text": {
"key": "attribute_text9",
"text": "提升自身失去生命值百分比*系数的攻击"
},
"skill_id": 125004011
},
{
"key": "10",
"attribute_text": {
"key": "attribute_text10",
"text": "提升自身失去生命值百分比*系数的防御"
},
"skill_id": 125004011
},
{
"key": "11",
"attribute_text": {
"key": "attribute_text11",
"text": "提升自身失去生命值百分比*系数的速度"
},
"skill_id": 125004011
},
{
"key": "12",
"attribute_text": {
"key": "attribute_text12",
"text": "提升自身失去生命值百分比*系数的暴击"
},
"skill_id": 125004011
},
{
"key": "13",
"attribute_text": {
"key": "attribute_text13",
"text": "提升自身失去生命值百分比*系数的暴击伤害"
},
"skill_id": 125004011
},
{
"key": "14",
"attribute_text": {
"key": "attribute_text14",
"text": "提升自身失去生命值百分比*系数的命中"
},
"skill_id": 125004011
},
{
"key": "15",
"attribute_text": {
"key": "attribute_text15",
"text": "提升自身失去生命值百分比*系数的效果抵抗"
},
"skill_id": 125004011
},
{
"key": "16",
"attribute_text": {
"key": "attribute_text16",
"text": "攻击敌人时,增加敌人失去生命值比例*系数的暴击伤害"
},
"skill_id": 125004011
},
{
"key": "17",
"attribute_text": {
"key": "attribute_text17",
"text": "攻击敌人时,增加敌人拥有生命值比例*系数的暴击伤害"
},
"skill_id": 125004011
},
{
"key": "18",
"attribute_text": {
"key": "attribute_text18",
"text": "增加相当于A%攻击的追加伤害"
},
"skill_id": 125004011
},
{
"key": "19",
"attribute_text": {
"key": "attribute_text19",
"text": "增加相当于A%防御的追加伤害"
},
"skill_id": 125004011
},
{
"key": "20",
"attribute_text": {
"key": "attribute_text20",
"text": "增加相当于A%生命的追加伤害"
},
"skill_id": 125004011
},
{
"key": "21",
"attribute_text": {
"key": "attribute_text21",
"text": "增加相当于A%速度的追加伤害"
},
"skill_id": 125004011
},
{
"key": "22",
"attribute_text": {
"key": "attribute_text22",
"text": "攻击强化效果增加"
},
"skill_id": 125004011
},
{
"key": "23",
"attribute_text": {
"key": "attribute_text23",
"text": "反击造成的伤害增加"
},
"skill_id": 125004011
},
{
"key": "24",
"attribute_text": {
"key": "attribute_text24",
"text": "复活时行动值增加"
},
"skill_id": 125004011
},
{
"key": "25",
"attribute_text": {
"key": "attribute_text25",
"text": "复活时体力值增加"
},
"skill_id": 125004011
},
{
"key": "26",
"attribute_text": {
"key": "attribute_text26",
"text": "吸血量增加"
},
"skill_id": 125004011
},
{
"key": "27",
"attribute_text": {
"key": "attribute_text27",
"text": "围剿造成的伤害增加"
},
"skill_id": 125004011
},
{
"key": "28",
"attribute_text": {
"key": "attribute_text28",
"text": "炸弹造成的伤害增加"
},
"skill_id": 125004011
},
{
"key": "29",
"attribute_text": {
"key": "attribute_text29",
"text": "被暴击时减少A%的伤害"
},
"skill_id": 125004011
},
{
"key": "30",
"attribute_text": {
"key": "attribute_text30",
"text": "[1号技能]的回复量提升"
},
"skill_id": 125004011
},
{
"key": "31",
"attribute_text": {
"key": "attribute_text31",
"text": "[1号技能]的暴击伤害提升"
},
"skill_id": 125004011
},
{
"key": "32",
"attribute_text": {
"key": "attribute_text32",
"text": "[1号技能]的命中提升"
},
"skill_id": 125004011
},
{
"key": "33",
"attribute_text": {
"key": "attribute_text33",
"text": "[2号技能]的回复量提升"
},
"skill_id": 125004011
},
{
"key": "34",
"attribute_text": {
"key": "attribute_text34",
"text": "[2号技能]的暴击伤害提升"
},
"skill_id": 125004011
},
{
"key": "35",
"attribute_text": {
"key": "attribute_text35",
"text": "[2号技能]的命中提升"
},
"skill_id": 125004011
},
{
"key": "36",
"attribute_text": {
"key": "attribute_text36",
"text": "[3号技能]的回复量提升"
},
"skill_id": 125004011
},
{
"key": "37",
"attribute_text": {
"key": "attribute_text37",
"text": "[3号技能]的暴击伤害提升"
},
"skill_id": 125004011
},
{
"key": "38",
"attribute_text": {
"key": "attribute_text38",
"text": "[3号技能]的命中提升"
},
"skill_id": 125004011
},
{
"key": "39",
"attribute_text": {
"key": "attribute_text39",
"text": "[4号技能]的回复量提升"
},
"skill_id": 125004011
},
{
"key": "40",
"attribute_text": {
"key": "attribute_text40",
"text": "[4号技能]的暴击伤害提升"
},
"skill_id": 125004011
},
{
"key": "41",
"attribute_text": {
"key": "attribute_text41",
"text": "[4号技能]的命中提升"
},
"skill_id": 125004011
}
]

View File

@ -14,6 +14,7 @@ const (
equip_intensify = "game_equipintensify.json" //装备等级消耗表
equip_suit = "game_equipsuit.json" //装备套装表
game_equipcompose = "game_equipcompose.json" //装备锻造
game_equipattribute = "game_equipattribute.json" //装备技能列表
)
///背包配置管理组件
@ -31,6 +32,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
this.LoadConfigure(equip_intensify, cfg.NewGameEquipIntensify)
this.LoadConfigure(equip_suit, cfg.NewGameEquipSuit)
this.LoadConfigure(game_equipcompose, cfg.NewGameEquipCompose)
this.LoadConfigure(game_equipattribute, cfg.NewGameEquipAttribute)
return
}
@ -214,3 +216,22 @@ func (this *configureComp) GetEquipCompose(id int32) (result *cfg.GameEquipCompo
}
return
}
//获取装备锻造数据
func (this *configureComp) getEquipAttribute(sid string) (result *cfg.GameEquipAttributeData, err error) {
var (
v interface{}
ok bool
)
if v, err = this.GetConfigure(game_equipcompose); err != nil {
this.module.Errorf("err:%v", err)
return
} else {
if result, ok = v.(*cfg.GameEquipAttribute).GetDataMap()[sid]; !ok {
err = fmt.Errorf("on found getEquipAttribute id:%s", sid)
this.module.Errorf("err:%v", err)
return
}
}
return
}

View File

@ -208,6 +208,7 @@ func (this *modelEquipmentComp) newEquipment(uid string, conf *cfg.GameEquipData
var (
mattr []*cfg.GameEquipAttrlibraryData
sattr []*cfg.GameEquipAttrlibraryData
equipatt *cfg.GameEquipAttributeData
total int
satterNum int32
)
@ -232,9 +233,14 @@ func (this *modelEquipmentComp) newEquipment(uid string, conf *cfg.GameEquipData
BaseValue: mattr[0].Attrvar,
}
} else {
if equipatt, err = this.module.configure.getEquipAttribute(sattr[0].Attrkey); err != nil {
return
}
equipment.Mainskill = &pb.EquipmentSkillEntry{
Id: mattr[0].Key,
SkillId: mattr[0].Attrkey,
Libraryid: mattr[0].Libraryid,
AttrName: mattr[0].Attrkey,
SkillId: equipatt.SkillId,
Lv: 1,
}
}
@ -270,9 +276,14 @@ func (this *modelEquipmentComp) newEquipment(uid string, conf *cfg.GameEquipData
} else {
equipment.Adverbskill = make([]*pb.EquipmentSkillEntry, 0)
for _, v := range r.Perm(len(sattr))[:satterNum] {
if equipatt, err = this.module.configure.getEquipAttribute(sattr[v].Attrkey); err != nil {
return
}
equipment.Adverbskill = append(equipment.Adverbskill, &pb.EquipmentSkillEntry{
Id: sattr[v].Key,
SkillId: sattr[v].Attrkey,
Libraryid: sattr[v].Libraryid,
AttrName: sattr[v].Attrkey,
SkillId: equipatt.SkillId,
Lv: 1,
})
}
@ -290,8 +301,11 @@ func (this *modelEquipmentComp) upgradeEquipment(equipment *pb.DB_Equipment, equ
return
}
if len(equipment.AdverbEntry) < 4 { //去随机副词条
var temp []*cfg.GameEquipAttrlibraryData
var sattr []*cfg.GameEquipAttrlibraryData
var (
temp []*cfg.GameEquipAttrlibraryData
sattr []*cfg.GameEquipAttrlibraryData
equipatt *cfg.GameEquipAttributeData
)
if temp, err = this.module.configure.GetEquipmentAttrlibraryConfigureById(equip.Addlibrary); err != nil || len(temp) == 0 {
this.module.Errorf("升级服务错误 读取副词条配置错误!")
return
@ -319,9 +333,14 @@ func (this *modelEquipmentComp) upgradeEquipment(equipment *pb.DB_Equipment, equ
Value: sattr[index].Attrvar,
})
} else {
if equipatt, err = this.module.configure.getEquipAttribute(sattr[index].Attrkey); err != nil {
return
}
equipment.Adverbskill = append(equipment.Adverbskill, &pb.EquipmentSkillEntry{
Id: sattr[index].Key,
SkillId: sattr[index].Attrkey,
Libraryid: sattr[index].Libraryid,
AttrName: sattr[index].Attrkey,
SkillId: equipatt.SkillId,
Lv: 1,
})
}

View File

@ -115,8 +115,10 @@ type EquipmentSkillEntry struct {
unknownFields protoimpl.UnknownFields
Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id"` //属性词条主键id 唯一
SkillId string `protobuf:"bytes,2,opt,name=SkillId,proto3" json:"SkillId"` //属性名
Lv int32 `protobuf:"varint,3,opt,name=Lv,proto3" json:"Lv"` //属性等级
Libraryid int32 `protobuf:"varint,2,opt,name=libraryid,proto3" json:"libraryid"` //属性词条id 非唯一
AttrName string `protobuf:"bytes,3,opt,name=AttrName,proto3" json:"AttrName"` //属性名
SkillId int32 `protobuf:"varint,4,opt,name=SkillId,proto3" json:"SkillId"` //技能id
Lv int32 `protobuf:"varint,5,opt,name=Lv,proto3" json:"Lv"` //属性等级
}
func (x *EquipmentSkillEntry) Reset() {
@ -158,11 +160,25 @@ func (x *EquipmentSkillEntry) GetId() int32 {
return 0
}
func (x *EquipmentSkillEntry) GetSkillId() string {
func (x *EquipmentSkillEntry) GetLibraryid() int32 {
if x != nil {
return x.Libraryid
}
return 0
}
func (x *EquipmentSkillEntry) GetAttrName() string {
if x != nil {
return x.AttrName
}
return ""
}
func (x *EquipmentSkillEntry) GetSkillId() int32 {
if x != nil {
return x.SkillId
}
return ""
return 0
}
func (x *EquipmentSkillEntry) GetLv() int32 {
@ -339,50 +355,53 @@ var file_equipment_equipment_db_proto_rawDesc = []byte{
0x52, 0x02, 0x4c, 0x76, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20,
0x01, 0x28, 0x05, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x42, 0x61,
0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x42,
0x61, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4f, 0x0a, 0x13, 0x45, 0x71, 0x75, 0x69,
0x70, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12,
0x18, 0x0a, 0x07, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x4c, 0x76, 0x18,
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4c, 0x76, 0x22, 0xc6, 0x04, 0x0a, 0x0c, 0x44, 0x42,
0x5f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x49,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03,
0x75, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x49, 0x64, 0x12, 0x16,
0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x05, 0x20, 0x01,
0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x20, 0x0a, 0x0b, 0x6b, 0x65, 0x65, 0x70, 0x46, 0x61,
0x69, 0x6c, 0x4e, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6b, 0x65, 0x65,
0x70, 0x46, 0x61, 0x69, 0x6c, 0x4e, 0x75, 0x6d, 0x12, 0x36, 0x0a, 0x09, 0x6d, 0x61, 0x69, 0x6e,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x45, 0x71,
0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x12, 0x3a, 0x0a, 0x0b, 0x61, 0x64, 0x76, 0x65, 0x72, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x18,
0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e,
0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x0b, 0x61, 0x64, 0x76, 0x65, 0x72, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x3a, 0x0a, 0x09,
0x65, 0x6e, 0x63, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x45,
0x6e, 0x63, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x65,
0x6e, 0x63, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x76, 0x65, 0x72,
0x6c, 0x61, 0x79, 0x4e, 0x75, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6f, 0x76,
0x65, 0x72, 0x6c, 0x61, 0x79, 0x4e, 0x75, 0x6d, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x73, 0x49, 0x6e,
0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08,
0x52, 0x0e, 0x69, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65,
0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08,
0x52, 0x06, 0x69, 0x73, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x32, 0x0a, 0x09, 0x6d, 0x61, 0x69, 0x6e,
0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x45, 0x71,
0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x52, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x36, 0x0a, 0x0b,
0x61, 0x64, 0x76, 0x65, 0x72, 0x62, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x0e, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6b, 0x69,
0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x64, 0x76, 0x65, 0x72, 0x62, 0x73,
0x6b, 0x69, 0x6c, 0x6c, 0x1a, 0x3c, 0x0a, 0x0e, 0x45, 0x6e, 0x63, 0x68, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
0x61, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x13, 0x45, 0x71, 0x75,
0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64,
0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x69, 0x64, 0x18, 0x02, 0x20,
0x01, 0x28, 0x05, 0x52, 0x09, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x69, 0x64, 0x12, 0x1a,
0x0a, 0x08, 0x41, 0x74, 0x74, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x08, 0x41, 0x74, 0x74, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x6b,
0x69, 0x6c, 0x6c, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x53, 0x6b, 0x69,
0x6c, 0x6c, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x4c, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05,
0x52, 0x02, 0x4c, 0x76, 0x22, 0xc6, 0x04, 0x0a, 0x0c, 0x44, 0x42, 0x5f, 0x45, 0x71, 0x75, 0x69,
0x70, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x02, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x03, 0x63, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x49, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72,
0x6f, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49,
0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c,
0x76, 0x12, 0x20, 0x0a, 0x0b, 0x6b, 0x65, 0x65, 0x70, 0x46, 0x61, 0x69, 0x6c, 0x4e, 0x75, 0x6d,
0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6b, 0x65, 0x65, 0x70, 0x46, 0x61, 0x69, 0x6c,
0x4e, 0x75, 0x6d, 0x12, 0x36, 0x0a, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65,
0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x52, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x3a, 0x0a, 0x0b, 0x61,
0x64, 0x76, 0x65, 0x72, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72,
0x69, 0x62, 0x75, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x64, 0x76, 0x65,
0x72, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x3a, 0x0a, 0x09, 0x65, 0x6e, 0x63, 0x68, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x44, 0x42, 0x5f,
0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x6e, 0x63, 0x68, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x65, 0x6e, 0x63, 0x68, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x4e, 0x75,
0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x79,
0x4e, 0x75, 0x6d, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c,
0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x49,
0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69,
0x73, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x6c,
0x6f, 0x63, 0x6b, 0x12, 0x32, 0x0a, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x6b, 0x69, 0x6c, 0x6c,
0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65,
0x6e, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61,
0x69, 0x6e, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x64, 0x76, 0x65, 0x72,
0x62, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x45,
0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x52, 0x0b, 0x61, 0x64, 0x76, 0x65, 0x72, 0x62, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x1a,
0x3c, 0x0a, 0x0e, 0x45, 0x6e, 0x63, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a,
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -0,0 +1,42 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
type GameEquipAttribute struct {
_dataMap map[string]*GameEquipAttributeData
_dataList []*GameEquipAttributeData
}
func NewGameEquipAttribute(_buf []map[string]interface{}) (*GameEquipAttribute, error) {
_dataList := make([]*GameEquipAttributeData, 0, len(_buf))
dataMap := make(map[string]*GameEquipAttributeData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameEquipAttributeData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Key] = _v
}
}
return &GameEquipAttribute{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameEquipAttribute) GetDataMap() map[string]*GameEquipAttributeData {
return table._dataMap
}
func (table *GameEquipAttribute) GetDataList() []*GameEquipAttributeData {
return table._dataList
}
func (table *GameEquipAttribute) Get(key string) *GameEquipAttributeData {
return table._dataMap[key]
}

View File

@ -0,0 +1,39 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
import "errors"
type GameEquipAttributeData struct {
Key string
AttributeText string
SkillId int32
}
const TypeId_GameEquipAttributeData = 1950061970
func (*GameEquipAttributeData) GetTypeId() int32 {
return 1950061970
}
func (_v *GameEquipAttributeData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; if _v.Key, _ok_ = _buf["key"].(string); !_ok_ { err = errors.New("key error"); return } }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["attribute_text"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.AttributeText error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.AttributeText, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["skill_id"].(float64); !_ok_ { err = errors.New("skill_id error"); return }; _v.SkillId = int32(_tempNum_) }
return
}
func DeserializeGameEquipAttributeData(_buf map[string]interface{}) (*GameEquipAttributeData, error) {
v := &GameEquipAttributeData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}