From 11ddfb26dd8a2cc478d4d0e1d17fe8467fabbf75 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 1 Nov 2022 17:28:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=AD=A6=E5=99=A8=E9=A5=B0?= =?UTF-8?q?=E5=93=81=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/equipment/modelEquipment.go | 28 +++++------------- pb/equipment_db.pb.go | 46 +++++++++++------------------ 2 files changed, 24 insertions(+), 50 deletions(-) diff --git a/modules/equipment/modelEquipment.go b/modules/equipment/modelEquipment.go index c9f611bac..493b63a40 100644 --- a/modules/equipment/modelEquipment.go +++ b/modules/equipment/modelEquipment.go @@ -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 { return } - if conf.EquipId == 1 { - equipment.MainEntry = &pb.EquipmentAttributeEntry{ - Id: mattr[0].Key, - Libraryid: mattr[0].Libraryid, - Lv: 1, - AttrName: mattr[0].Attrkey, - Value: 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, - } + equipment.MainEntry = &pb.EquipmentAttributeEntry{ + Id: mattr[0].Key, + Libraryid: mattr[0].Libraryid, + Lv: 1, + AttrName: mattr[0].Attrkey, + Value: mattr[0].Attrvar, + BaseValue: mattr[0].Attrvar, } - if sattr, err = this.module.configure.GetEquipmentAttrlibraryConfigureById(conf.Addlibrary); err != nil || len(mattr) == 0 { return } diff --git a/pb/equipment_db.pb.go b/pb/equipment_db.pb.go index 92213bf06..3bf0d1e75 100644 --- a/pb/equipment_db.pb.go +++ b/pb/equipment_db.pb.go @@ -206,8 +206,7 @@ type DB_Equipment struct { 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"` //是否初始状态 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,14,rep,name=adverbskill,proto3" json:"adverbskill" bson:"adverbskill"` //装备副技能 + Adverbskill []*EquipmentSkillEntry `protobuf:"bytes,13,rep,name=adverbskill,proto3" json:"adverbskill" bson:"adverbskill"` //装备副技能 } func (x *DB_Equipment) Reset() { @@ -326,13 +325,6 @@ func (x *DB_Equipment) GetIslock() bool { return false } -func (x *DB_Equipment) GetMainskill() *EquipmentSkillEntry { - if x != nil { - return x.Mainskill - } - return nil -} - func (x *DB_Equipment) GetAdverbskill() []*EquipmentSkillEntry { if x != nil { 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, 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, + 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, 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, @@ -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, 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, + 0x6f, 0x63, 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x64, 0x76, 0x65, 0x72, 0x62, 0x73, 0x6b, 0x69, + 0x6c, 0x6c, 0x18, 0x0d, 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 ( @@ -427,13 +416,12 @@ var file_equipment_equipment_db_proto_depIdxs = []int32{ 0, // 0: DB_Equipment.mainEntry:type_name -> EquipmentAttributeEntry 0, // 1: DB_Equipment.adverbEntry:type_name -> EquipmentAttributeEntry 3, // 2: DB_Equipment.enchEntry:type_name -> DB_Equipment.EnchEntryEntry - 1, // 3: DB_Equipment.mainskill:type_name -> EquipmentSkillEntry - 1, // 4: DB_Equipment.adverbskill:type_name -> EquipmentSkillEntry - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 1, // 3: DB_Equipment.adverbskill:type_name -> EquipmentSkillEntry + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_equipment_equipment_db_proto_init() }