Merge branch 'meixiongfeng' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
b4281c9c84
@ -35,6 +35,7 @@ func (this *apiComp) StrengthenUplv(session comm.IUserSession, req *pb.HeroStren
|
|||||||
_expHero *pb.DBHero // 消耗英雄
|
_expHero *pb.DBHero // 消耗英雄
|
||||||
minAddExp int32
|
minAddExp int32
|
||||||
_costHero []*pb.DBHero // 删除的英雄
|
_costHero []*pb.DBHero // 删除的英雄
|
||||||
|
bLvUp bool // 是否升级
|
||||||
)
|
)
|
||||||
|
|
||||||
code = this.StrengthenUplvCheck(session, req) // check
|
code = this.StrengthenUplvCheck(session, req) // check
|
||||||
@ -126,6 +127,7 @@ func (this *apiComp) StrengthenUplv(session comm.IUserSession, req *pb.HeroStren
|
|||||||
curLv -= 1
|
curLv -= 1
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
bLvUp = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -179,5 +181,9 @@ func (this *apiComp) StrengthenUplv(session comm.IUserSession, req *pb.HeroStren
|
|||||||
_hero.Property = m
|
_hero.Property = m
|
||||||
session.SendMsg(string(this.module.GetType()), "change", &pb.HeroChangePush{List: []*pb.DBHero{_hero}})
|
session.SendMsg(string(this.module.GetType()), "change", &pb.HeroChangePush{List: []*pb.DBHero{_hero}})
|
||||||
session.SendMsg(string(this.module.GetType()), StrengthenUplv, &pb.HeroStrengthenUplvResp{Hero: _hero})
|
session.SendMsg(string(this.module.GetType()), StrengthenUplv, &pb.HeroStrengthenUplvResp{Hero: _hero})
|
||||||
|
if bLvUp { // 升级了 统计任务
|
||||||
|
this.module.ModuleTask.SendToTask(session.GetUserId(), comm.TaskTypeGetHero, &pb.TaskParam{First: _hero.Lv})
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -25,11 +25,11 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.MainlineGetRew
|
|||||||
}
|
}
|
||||||
|
|
||||||
_obj := this.module.modelMainline.getOneChapterInfo(session.GetUserId(), req.ChapterObj)
|
_obj := this.module.modelMainline.getOneChapterInfo(session.GetUserId(), req.ChapterObj)
|
||||||
if _obj != nil {
|
if _obj == nil {
|
||||||
code = pb.ErrorCode_DBError
|
code = pb.ErrorCode_DBError
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if _obj.AwaredID >= 0 {
|
if _obj.AwaredID > 0 {
|
||||||
code = pb.ErrorCode_MainlineRepeatReward // 重复领奖
|
code = pb.ErrorCode_MainlineRepeatReward // 重复领奖
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,7 @@ func (this *ModelMainline) getOneChapterInfo(uid, obj string) *pb.DBMainline {
|
|||||||
data := &pb.DBMainline{}
|
data := &pb.DBMainline{}
|
||||||
err := this.module.modelMainline.GetListObj(uid, obj, data)
|
err := this.module.modelMainline.GetListObj(uid, obj, data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
this.module.Errorf("%v", err)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return data
|
return data
|
||||||
|
Loading…
Reference in New Issue
Block a user