This commit is contained in:
meixiongfeng 2023-02-08 18:33:04 +08:00
parent 9e9ac61de5
commit 6261d32f8a
2 changed files with 13 additions and 15 deletions

View File

@ -59,19 +59,19 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (c
if code != pb.ErrorCode_Success {
return
}
if _hero.SameCount > 1 { //有堆叠的情况
// 克隆一个新的
_hero.SameCount -= 1
_hero.JuexProperty = map[string]int32{}
// if _hero.SameCount > 1 { //有堆叠的情况
// // 克隆一个新的
// _hero.SameCount -= 1
// _hero.JuexProperty = map[string]int32{}
newHero := this.module.modelHero.CloneNewHero(session.GetUserId(), _hero)
_hero.JuexProperty = map[string]int32{}
chanegCard = append(chanegCard, newHero)
// newHero := this.module.modelHero.CloneNewHero(session.GetUserId(), _hero)
// _hero.JuexProperty = map[string]int32{}
// chanegCard = append(chanegCard, newHero)
_heroMap["sameCount"] = 1
_heroMap["horoscopeProperty"] = _hero.HoroscopeProperty
}
_hero.SameCount = 1
// _heroMap["sameCount"] = 1
// _heroMap["horoscopeProperty"] = _hero.HoroscopeProperty
// }
//_hero.SameCount = 1
// 加属性 awakenData
if len(awakenData.Phasebonus) != 2 {
code = pb.ErrorCode_ConfigNoFound

View File

@ -351,11 +351,9 @@ func (this *Hero) KungFuHero(session comm.IUserSession, heroObjID string, bKongf
// }
_heroMap := map[string]interface{}{
"status": pb.HeroType_HeroTypeKongFu,
"sameCount": 1,
//"horoscopeProperty": _hero.HoroscopeProperty,
}
_hero.Status = pb.HeroType_HeroTypeKongFu
_hero.SameCount = 1
//_hero.SameCount = 1
err1 := this.modelHero.ChangeList(session.GetUserId(), heroObjID, _heroMap) // 修改英雄信息
if err1 != nil {
this.Errorf("update hero skill failed:%v", err1)