From f7a16aac3e94673dea09915134a2275bc781ac32 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Mon, 7 Nov 2022 19:56:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A3=85=E5=A4=87=E5=B1=9E=E6=80=A7=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/equipment/api_wash.go | 2 +- modules/equipment/modelEquipment.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/equipment/api_wash.go b/modules/equipment/api_wash.go index 1e92f2ff5..b8631a3bd 100644 --- a/modules/equipment/api_wash.go +++ b/modules/equipment/api_wash.go @@ -53,7 +53,7 @@ func (this *apiComp) Wash(session comm.IUserSession, req *pb.EquipmentWashReq) ( return } for i, v := range attrlibrarys { //移除主属性 - if v.Key == equip.MainEntry.Id { + if v.Attrkey == equip.MainEntry.AttrName { attrlibrarys = append(attrlibrarys[0:i], attrlibrarys[i+1:]...) break } diff --git a/modules/equipment/modelEquipment.go b/modules/equipment/modelEquipment.go index eb40af57a..641eb1c5a 100644 --- a/modules/equipment/modelEquipment.go +++ b/modules/equipment/modelEquipment.go @@ -258,7 +258,7 @@ func (this *modelEquipmentComp) newEquipment(uid string, conf *cfg.GameEquipData } for i, v := range sattr { //移除主属性 - if v.Key == equipment.MainEntry.Id { + if v.Attrkey == equipment.MainEntry.AttrName { sattr = append(sattr[0:i], sattr[i+1:]...) break } @@ -329,11 +329,11 @@ func (this *modelEquipmentComp) upgradeEquipment(equipment *pb.DB_Equipment, equ for _, v := range temp { iskeep := false for _, v1 := range equipment.AdverbEntry { - if v.Key == v1.Id { + if v.Attrkey == v1.AttrName { iskeep = true } } - if v.Key == equipment.MainEntry.Id { + if v.Attrkey == equipment.MainEntry.AttrName { iskeep = true } if !iskeep {