列表中初始属性

This commit is contained in:
zhaocy 2022-07-12 10:34:06 +08:00
parent cf5ce2712c
commit c1b506f25e

View File

@ -81,12 +81,10 @@ func (this *Hero) UpdateEquipment(hero *pb.DBHero, equip []*pb.DB_Equipment) (co
//英雄列表
func (this *Hero) GetHeroList(uid string) []*pb.DBHero {
// data := []*pb.DBHero{}
heroes := this.modelHero.getHeroList(uid)
// for _, h := range heroes {
// h.Property = this.modelHero.PropertyCompute(uid, h.Id)
// data = append(data, h)
// }
for _, h := range heroes {
h.Property = this.modelHero.PropertyCompute(uid, h.Id)
}
return heroes
}