From 7106ae27f431a0830dd48b3448619ad74296224f Mon Sep 17 00:00:00 2001 From: zhaocy Date: Thu, 30 Jun 2022 20:20:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A3=85=E5=A4=87=E5=B1=9E=E6=80=A7=E8=AE=A1?= =?UTF-8?q?=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hero/module.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/hero/module.go b/modules/hero/module.go index e51cf5afb..f16e9cde2 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -79,10 +79,13 @@ func (this *Hero) GetHero(uid, heroId string) (*pb.DBHero, pb.ErrorCode) { //佩戴装备 func (this *Hero) UpdateEquipment(hero *pb.DBHero, equip []*pb.DB_Equipment) (code pb.ErrorCode) { equipIds := make([]string, 4) + property := make(map[string]int32) for _, v := range equip { equipIds = append(equipIds, v.Id) + property[v.MainEntry.AttrName] = v.MainEntry.Value } + this.modelHero.mergeProperty(hero.Uid, hero.Id, property) return this.modelHero.setEquipment(hero.Uid, hero.Id, equipIds) }