GM 满英雄, 删除旧英雄 并追加觉醒技能
This commit is contained in:
parent
c72dac2975
commit
3caf880fdf
@ -419,6 +419,8 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession, bTalent bool) (errdat
|
||||
if bTalent {
|
||||
this.modelTalent.CleanAllHeroTalent(session.GetUserId())
|
||||
}
|
||||
// 清除所有英雄
|
||||
this.modelHero.RemoveUserHeroInfo(session.GetUserId())
|
||||
data := this.modelHero.module.configure.GetHeroConfigData()
|
||||
var (
|
||||
changeHero []*pb.DBHero
|
||||
@ -461,6 +463,22 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession, bTalent bool) (errdat
|
||||
Message: err.Error(),
|
||||
}
|
||||
}
|
||||
// 觉醒技能带入
|
||||
for i := 1; i <= maxJux; i++ {
|
||||
if awakenData, err := this.configure.GetHeroAwakenConfig(cid, int32(i)); err == nil {
|
||||
if awakenData.Skill != 0 {
|
||||
skillMaxLv := this.configure.GetHeroSkillMaxLvConfig(uint32(awakenData.Skill))
|
||||
hero.Awakenskill = append(hero.Awakenskill, &pb.SkillData{
|
||||
SkillID: awakenData.Skill,
|
||||
SkillLv: skillMaxLv,
|
||||
})
|
||||
|
||||
}
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
//this.modelHero.resetJuexingProperty(hero)
|
||||
// 获取满级技能
|
||||
for _, skill := range hero.NormalSkill {
|
||||
skillMaxLv := this.configure.GetHeroSkillMaxLvConfig(uint32(skill.SkillID))
|
||||
@ -482,6 +500,7 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession, bTalent bool) (errdat
|
||||
"property": hero.Property,
|
||||
"horoscopeProperty": hero.HoroscopeProperty,
|
||||
"juexProperty": hero.JuexProperty,
|
||||
"awakenskill": hero.Awakenskill,
|
||||
}
|
||||
|
||||
if bTalent { // 满天赋
|
||||
|
Loading…
Reference in New Issue
Block a user