#28744 子任务 【梦工场系统】 <-后端-> 【英雄回响】回响配置调整

This commit is contained in:
meixiongfeng 2023-07-19 09:41:41 +08:00
parent 3b33ec34a9
commit 438dda8e45

View File

@ -672,42 +672,9 @@ func (this *ModelHero) setTalentProperty(hero *pb.DBHero, conf *cfg.GameHeroTale
if hero.TalentProperty == nil {
hero.TalentProperty = make(map[string]int32)
}
if conf.Hp != -1 {
if _, ok := hero.TalentProperty[comm.Hp]; ok {
hero.TalentProperty[comm.Hp] += int32(math.Floor((float64(conf.Hp) / 1000) * float64(hero.Property[comm.Hp])))
} else {
hero.TalentProperty[comm.Hp] = int32(math.Floor((float64(conf.Hp) / 1000) * float64(hero.Property[comm.Hp])))
}
}
if conf.Atk != -1 {
if _, ok := hero.TalentProperty[comm.Atk]; ok {
hero.TalentProperty[comm.Atk] += int32(math.Floor((float64(conf.Atk) / 1000) * float64(hero.Property[comm.Atk])))
} else {
hero.TalentProperty[comm.Atk] = int32(math.Floor((float64(conf.Atk) / 1000) * float64(hero.Property[comm.Atk])))
}
}
if conf.Def != -1 {
if _, ok := hero.TalentProperty[comm.Def]; ok {
hero.TalentProperty[comm.Def] += int32(math.Floor((float64(conf.Def) / 1000) * float64(hero.Property[comm.Def])))
} else {
hero.TalentProperty[comm.Def] = int32(math.Floor((float64(conf.Def) / 1000) * float64(hero.Property[comm.Def])))
}
}
if conf.Cri != -1 {
if _, ok := hero.TalentProperty[comm.Cri]; ok {
hero.TalentProperty[comm.Cri] += int32(math.Floor((float64(conf.Cri) / 1000) * float64(hero.Property[comm.Cri])))
} else {
hero.TalentProperty[comm.Cri] = int32(math.Floor((float64(conf.Cri) / 1000) * float64(hero.Property[comm.Cri])))
}
}
if conf.Speed != -1 {
if _, ok := hero.TalentProperty[comm.Speed]; ok {
hero.TalentProperty[comm.Speed] += int32(math.Floor((float64(conf.Speed) / 1000) * float64(hero.Property[comm.Speed])))
} else {
hero.TalentProperty[comm.Speed] = int32(math.Floor((float64(conf.Speed) / 1000) * float64(hero.Property[comm.Speed])))
}
}
hero.TalentProperty[conf.Attrkey] += int32(math.Floor((float64(conf.Attrvar) / 1000) * float64(hero.Property[conf.Attrkey])))
_heroMap := make(map[string]interface{}, 0)
if conf.Skill != 0 {
hero.NormalSkill = append(hero.NormalSkill, &pb.SkillData{