英雄叠加
This commit is contained in:
parent
251526932d
commit
c81e76b1d6
@ -171,15 +171,6 @@ func (this *Hero) AddCardExp(uid string, heroId string, exp int32) (newhero *pb.
|
|||||||
if _hero.SameCount == 0 {
|
if _hero.SameCount == 0 {
|
||||||
this.modelHero.consumeHeroCard(uid, _hero.Id, 1)
|
this.modelHero.consumeHeroCard(uid, _hero.Id, 1)
|
||||||
}
|
}
|
||||||
// else {
|
|
||||||
// update := map[string]interface{}{
|
|
||||||
// "sameCount": _hero.SameCount,
|
|
||||||
// }
|
|
||||||
// if err := this.modelHero.modifyHeroData(uid, heroId, update); err != nil {
|
|
||||||
// code = pb.ErrorCode_DBError
|
|
||||||
// } // 修改英雄数据
|
|
||||||
// }
|
|
||||||
// 新增英雄
|
|
||||||
update1 := map[string]interface{}{
|
update1 := map[string]interface{}{
|
||||||
"lv": curLv,
|
"lv": curLv,
|
||||||
"exp": curExp,
|
"exp": curExp,
|
||||||
@ -198,10 +189,10 @@ func (this *Hero) AddCardExp(uid string, heroId string, exp int32) (newhero *pb.
|
|||||||
update := map[string]interface{}{
|
update := map[string]interface{}{
|
||||||
"sameCount": curCount,
|
"sameCount": curCount,
|
||||||
}
|
}
|
||||||
if err := this.modelHero.modifyHeroData(uid, _hero.Id, update); err != nil {
|
if err := this.modelHero.modifyHeroData(uid, _hero.Id, update1); err != nil {
|
||||||
code = pb.ErrorCode_DBError
|
code = pb.ErrorCode_DBError
|
||||||
}
|
}
|
||||||
if err := this.modelHero.modifyHeroData(uid, newhero.Id, update1); err != nil {
|
if err := this.modelHero.modifyHeroData(uid, newhero.Id, update); err != nil {
|
||||||
code = pb.ErrorCode_DBError
|
code = pb.ErrorCode_DBError
|
||||||
}
|
}
|
||||||
oldhero = _hero
|
oldhero = _hero
|
||||||
|
Loading…
Reference in New Issue
Block a user