穿戴装备重新计算英雄战力

This commit is contained in:
meixiongfeng 2024-01-23 17:05:09 +08:00
parent a29fc82bf9
commit c130575fb8
2 changed files with 6 additions and 10 deletions

View File

@ -451,7 +451,7 @@ const (
TableAssist = "assist"
TablePlunder = "plunder" // 掠夺
TablePlunderLand = "plunderland" // 掠夺岛
TablePlunderRecord = "plunderrecord" // 掠夺岛记录
///工会远征
TableExpedition = "expedition"
)

View File

@ -57,13 +57,7 @@ func (this *ModelHero) calFigthValue(hero *pb.DBHero) (addValue int32, err error
skillStar *cfg.GameFightingSkillStarData
)
tmpHero = new(pb.DBHero)
//tmpHero = this.copyPoint(hero)
*tmpHero = *hero // 克隆一个对象
// tmpHero.Property = make(map[int32]int32)
// tmpHero.AddProperty = make(map[int32]int32)
// tmpHero.JuexProperty = make(map[int32]int32)
// tmpHero.HoroscopeProperty = make(map[int32]int32)
// tmpHero.TalentProperty = make(map[int32]int32)
tmpHero.Property = this.cloneTags(hero.Property)
tmpHero.AddProperty = this.cloneTags(hero.AddProperty)
tmpHero.JuexProperty = this.cloneTags(hero.JuexProperty)
@ -460,9 +454,11 @@ func (this *ModelHero) setEquipment(uid string, hero *pb.DBHero) (newHero *pb.DB
func (this *ModelHero) mergeAddProperty(uid string, hero *pb.DBHero, data map[int32]int32, skills []*pb.SkillData) {
hero.AddProperty = data
this.calFigthValue(hero)
if err := this.ChangeList(uid, hero.Id, map[string]interface{}{
"addProperty": data,
"equipSkill": skills,
"fightvalue": hero.Fightvalue,
}); err != nil {
this.module.Errorf("mergeAddProperty err %v", err)
}