星阵图属性加成
This commit is contained in:
parent
2ea491b859
commit
ebbc32e297
@ -339,22 +339,22 @@ func (this *ModelHero) setEquipment(uid string, hero *pb.DBHero) (newHero *pb.DB
|
||||
suite2Star := hero.Suite2Star
|
||||
suite1Lv := hero.Suite1Lv
|
||||
suite2Lv := hero.Suite2Lv
|
||||
if hero.SameCount > 1 {
|
||||
// 克隆一个新的
|
||||
hero.SameCount -= 1
|
||||
hero.Suite1Star = 0
|
||||
hero.Suite2Star = 0
|
||||
hero.Suite1Lv = 0
|
||||
hero.Suite2Lv = 0
|
||||
hero.SuiteId = 0
|
||||
hero.SuiteExtId = 0
|
||||
hero.EquipID = make([]string, 8)
|
||||
newHero = this.CloneNewHero(uid, hero)
|
||||
hero.EquipID = make([]string, 8)
|
||||
hero.SameCount = 1
|
||||
update["sameCount"] = 1
|
||||
update["horoscopeProperty"] = hero.HoroscopeProperty
|
||||
}
|
||||
// if hero.SameCount > 1 {
|
||||
// // 克隆一个新的
|
||||
// hero.SameCount -= 1
|
||||
// hero.Suite1Star = 0
|
||||
// hero.Suite2Star = 0
|
||||
// hero.Suite1Lv = 0
|
||||
// hero.Suite2Lv = 0
|
||||
// hero.SuiteId = 0
|
||||
// hero.SuiteExtId = 0
|
||||
// hero.EquipID = make([]string, 8)
|
||||
// newHero = this.CloneNewHero(uid, hero)
|
||||
// hero.EquipID = make([]string, 8)
|
||||
// hero.SameCount = 1
|
||||
// update["sameCount"] = 1
|
||||
// update["horoscopeProperty"] = hero.HoroscopeProperty
|
||||
// }
|
||||
// 修改装备属性 并更新
|
||||
update["suiteId"] = _suiteId
|
||||
update["suiteExtId"] = _suiteExtId
|
||||
@ -456,6 +456,7 @@ func (this *ModelHero) PropertyCompute(hero *pb.DBHero) {
|
||||
|
||||
if hero.Id != "" { // objID 为空表示是怪物对象 不享受天赋属性加成
|
||||
this.resetTalentProperty(hero)
|
||||
this.moduleHero.moduleHoroscope.ComputeHeroNumeric(hero.Uid, hero)
|
||||
}
|
||||
this.resetJuexingProperty(hero)
|
||||
}
|
||||
@ -464,9 +465,10 @@ func (this *ModelHero) PropertyCompute(hero *pb.DBHero) {
|
||||
func (this *ModelHero) ChangeHeroProperty(session comm.IUserSession, hero *pb.DBHero) (err error) {
|
||||
this.PropertyCompute(hero) //重新计算 property 的值
|
||||
update := map[string]interface{}{
|
||||
"property": hero.Property,
|
||||
"talentProperty": hero.TalentProperty,
|
||||
"juexProperty": hero.JuexProperty,
|
||||
"property": hero.Property,
|
||||
"talentProperty": hero.TalentProperty,
|
||||
"juexProperty": hero.JuexProperty,
|
||||
"horoscopeProperty": hero.HoroscopeProperty,
|
||||
}
|
||||
|
||||
if err = this.ChangeList(session.GetUserId(), hero.Id, update); err != nil {
|
||||
|
@ -344,15 +344,15 @@ func (this *Hero) KungFuHero(session comm.IUserSession, heroObjID string, bKongf
|
||||
session.SendMsg(string(this.GetType()), "change", &pb.HeroChangePush{List: _changeHero})
|
||||
return
|
||||
}
|
||||
if _hero.SameCount > 1 {
|
||||
_hero.SameCount -= 1
|
||||
newHero := this.modelHero.CloneNewHero(session.GetUserId(), _hero)
|
||||
_changeHero = append(_changeHero, newHero)
|
||||
}
|
||||
// if _hero.SameCount > 1 {
|
||||
// _hero.SameCount -= 1
|
||||
// newHero := this.modelHero.CloneNewHero(session.GetUserId(), _hero)
|
||||
// _changeHero = append(_changeHero, newHero)
|
||||
// }
|
||||
_heroMap := map[string]interface{}{
|
||||
"status": pb.HeroType_HeroTypeKongFu,
|
||||
"sameCount": 1,
|
||||
"horoscopeProperty": _hero.HoroscopeProperty,
|
||||
"status": pb.HeroType_HeroTypeKongFu,
|
||||
"sameCount": 1,
|
||||
//"horoscopeProperty": _hero.HoroscopeProperty,
|
||||
}
|
||||
_hero.Status = pb.HeroType_HeroTypeKongFu
|
||||
_hero.SameCount = 1
|
||||
@ -660,13 +660,15 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession) (code pb.ErrorCode) {
|
||||
hero.SameCount = 1
|
||||
this.modelHero.PropertyCompute(hero) // 重新计算属性
|
||||
_heroMap := map[string]interface{}{
|
||||
"lv": hero.Lv,
|
||||
"star": hero.Star,
|
||||
"juexingLv": hero.JuexingLv,
|
||||
"sameCount": 1,
|
||||
"normalSkill": hero.NormalSkill,
|
||||
"talentProperty": hero.TalentProperty,
|
||||
"property": hero.Property,
|
||||
"lv": hero.Lv,
|
||||
"star": hero.Star,
|
||||
"juexingLv": hero.JuexingLv,
|
||||
"sameCount": 1,
|
||||
"normalSkill": hero.NormalSkill,
|
||||
"talentProperty": hero.TalentProperty,
|
||||
"property": hero.Property,
|
||||
"horoscopeProperty": hero.HoroscopeProperty,
|
||||
"juexProperty": hero.JuexProperty,
|
||||
}
|
||||
|
||||
// 保存数据
|
||||
|
Loading…
Reference in New Issue
Block a user