穿戴装备重新计算英雄战力
This commit is contained in:
parent
a29fc82bf9
commit
c130575fb8
@ -448,10 +448,10 @@ const (
|
|||||||
TableIntegralRank = "integralrank" //排名
|
TableIntegralRank = "integralrank" //排名
|
||||||
|
|
||||||
// 助战信息列表
|
// 助战信息列表
|
||||||
TableAssist = "assist"
|
TableAssist = "assist"
|
||||||
TablePlunder = "plunder" // 掠夺
|
TablePlunder = "plunder" // 掠夺
|
||||||
TablePlunderLand = "plunderland" // 掠夺岛
|
TablePlunderLand = "plunderland" // 掠夺岛
|
||||||
|
TablePlunderRecord = "plunderrecord" // 掠夺岛记录
|
||||||
///工会远征
|
///工会远征
|
||||||
TableExpedition = "expedition"
|
TableExpedition = "expedition"
|
||||||
)
|
)
|
||||||
|
@ -57,13 +57,7 @@ func (this *ModelHero) calFigthValue(hero *pb.DBHero) (addValue int32, err error
|
|||||||
skillStar *cfg.GameFightingSkillStarData
|
skillStar *cfg.GameFightingSkillStarData
|
||||||
)
|
)
|
||||||
tmpHero = new(pb.DBHero)
|
tmpHero = new(pb.DBHero)
|
||||||
//tmpHero = this.copyPoint(hero)
|
|
||||||
*tmpHero = *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.Property = this.cloneTags(hero.Property)
|
||||||
tmpHero.AddProperty = this.cloneTags(hero.AddProperty)
|
tmpHero.AddProperty = this.cloneTags(hero.AddProperty)
|
||||||
tmpHero.JuexProperty = this.cloneTags(hero.JuexProperty)
|
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) {
|
func (this *ModelHero) mergeAddProperty(uid string, hero *pb.DBHero, data map[int32]int32, skills []*pb.SkillData) {
|
||||||
hero.AddProperty = data
|
hero.AddProperty = data
|
||||||
|
|
||||||
|
this.calFigthValue(hero)
|
||||||
if err := this.ChangeList(uid, hero.Id, map[string]interface{}{
|
if err := this.ChangeList(uid, hero.Id, map[string]interface{}{
|
||||||
"addProperty": data,
|
"addProperty": data,
|
||||||
"equipSkill": skills,
|
"equipSkill": skills,
|
||||||
|
"fightvalue": hero.Fightvalue,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
this.module.Errorf("mergeAddProperty err %v", err)
|
this.module.Errorf("mergeAddProperty err %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user