上传武器饰品代码

This commit is contained in:
liwei1dao 2022-11-01 17:28:40 +08:00
parent 47728fbcf5
commit 11ddfb26dd
2 changed files with 24 additions and 50 deletions

View File

@ -223,28 +223,14 @@ func (this *modelEquipmentComp) newEquipment(uid string, conf *cfg.GameEquipData
if mattr, err = this.module.configure.GetEquipmentAttrlibraryConfigureById(conf.Leadlibrary); err != nil || len(mattr) == 0 { if mattr, err = this.module.configure.GetEquipmentAttrlibraryConfigureById(conf.Leadlibrary); err != nil || len(mattr) == 0 {
return return
} }
if conf.EquipId == 1 { equipment.MainEntry = &pb.EquipmentAttributeEntry{
equipment.MainEntry = &pb.EquipmentAttributeEntry{ Id: mattr[0].Key,
Id: mattr[0].Key, Libraryid: mattr[0].Libraryid,
Libraryid: mattr[0].Libraryid, Lv: 1,
Lv: 1, AttrName: mattr[0].Attrkey,
AttrName: mattr[0].Attrkey, Value: mattr[0].Attrvar,
Value: mattr[0].Attrvar, BaseValue: mattr[0].Attrvar,
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,
Libraryid: mattr[0].Libraryid,
AttrName: mattr[0].Attrkey,
SkillId: equipatt.SkillId,
Lv: 1,
}
} }
if sattr, err = this.module.configure.GetEquipmentAttrlibraryConfigureById(conf.Addlibrary); err != nil || len(mattr) == 0 { if sattr, err = this.module.configure.GetEquipmentAttrlibraryConfigureById(conf.Addlibrary); err != nil || len(mattr) == 0 {
return return
} }

View File

@ -206,8 +206,7 @@ type DB_Equipment struct {
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"` //是否初始状态
Islock bool `protobuf:"varint,12,opt,name=islock,proto3" json:"islock" bson:"islock"` //是否锁 Islock bool `protobuf:"varint,12,opt,name=islock,proto3" json:"islock" bson:"islock"` //是否锁
Mainskill *EquipmentSkillEntry `protobuf:"bytes,13,opt,name=mainskill,proto3" json:"mainskill" bson:"mainskill"` //主技能 Adverbskill []*EquipmentSkillEntry `protobuf:"bytes,13,rep,name=adverbskill,proto3" json:"adverbskill" bson:"adverbskill"` //装备副技能
Adverbskill []*EquipmentSkillEntry `protobuf:"bytes,14,rep,name=adverbskill,proto3" json:"adverbskill" bson:"adverbskill"` //装备副技能
} }
func (x *DB_Equipment) Reset() { func (x *DB_Equipment) Reset() {
@ -326,13 +325,6 @@ func (x *DB_Equipment) GetIslock() bool {
return false return false
} }
func (x *DB_Equipment) GetMainskill() *EquipmentSkillEntry {
if x != nil {
return x.Mainskill
}
return nil
}
func (x *DB_Equipment) GetAdverbskill() []*EquipmentSkillEntry { func (x *DB_Equipment) GetAdverbskill() []*EquipmentSkillEntry {
if x != nil { if x != nil {
return x.Adverbskill return x.Adverbskill
@ -364,7 +356,7 @@ var file_equipment_equipment_db_proto_rawDesc = []byte{
0x52, 0x08, 0x41, 0x74, 0x74, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x6b, 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, 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, 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, 0x52, 0x02, 0x4c, 0x76, 0x22, 0x92, 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, 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, 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, 0x28, 0x09, 0x52, 0x03, 0x63, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x49, 0x64, 0x18, 0x03,
@ -390,18 +382,15 @@ var file_equipment_equipment_db_proto_rawDesc = []byte{
0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x49, 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, 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, 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, 0x6f, 0x63, 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x64, 0x76, 0x65, 0x72, 0x62, 0x73, 0x6b, 0x69,
0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6c, 0x6c, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70,
0x6e, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b,
0x69, 0x6e, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x64, 0x76, 0x65, 0x72, 0x61, 0x64, 0x76, 0x65, 0x72, 0x62, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x1a, 0x3c, 0x0a, 0x0e, 0x45,
0x62, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x45, 0x6e, 0x63, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
0x72, 0x79, 0x52, 0x0b, 0x61, 0x64, 0x76, 0x65, 0x72, 0x62, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x1a, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
0x3c, 0x0a, 0x0e, 0x45, 0x6e, 0x63, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70,
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
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 ( var (
@ -427,13 +416,12 @@ var file_equipment_equipment_db_proto_depIdxs = []int32{
0, // 0: DB_Equipment.mainEntry:type_name -> EquipmentAttributeEntry 0, // 0: DB_Equipment.mainEntry:type_name -> EquipmentAttributeEntry
0, // 1: DB_Equipment.adverbEntry:type_name -> EquipmentAttributeEntry 0, // 1: DB_Equipment.adverbEntry:type_name -> EquipmentAttributeEntry
3, // 2: DB_Equipment.enchEntry:type_name -> DB_Equipment.EnchEntryEntry 3, // 2: DB_Equipment.enchEntry:type_name -> DB_Equipment.EnchEntryEntry
1, // 3: DB_Equipment.mainskill:type_name -> EquipmentSkillEntry 1, // 3: DB_Equipment.adverbskill:type_name -> EquipmentSkillEntry
1, // 4: DB_Equipment.adverbskill:type_name -> EquipmentSkillEntry 4, // [4:4] is the sub-list for method output_type
5, // [5:5] is the sub-list for method output_type 4, // [4:4] is the sub-list for method input_type
5, // [5:5] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension extendee
5, // [5:5] is the sub-list for extension extendee 0, // [0:4] is the sub-list for field type_name
0, // [0:5] is the sub-list for field type_name
} }
func init() { file_equipment_equipment_db_proto_init() } func init() { file_equipment_equipment_db_proto_init() }