上传好感度

This commit is contained in:
meixiongfeng 2023-05-04 12:02:11 +08:00
parent 62d1dfccc6
commit 495d7172b4

View File

@ -67,8 +67,8 @@ func (this *apiComp) UseGift(session comm.IUserSession, req *pb.LibraryUseGiftRe
}
// 校验是否是自己喜欢的食物
_c := this.module.configure.GetFavorability(req.Heroid, _heroObj.Favorlv)
if _c != nil {
_c := this.module.configure.GetFavorability(_heroObj.Heroid, _heroObj.Favorlv)
if _c == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
@ -138,9 +138,9 @@ func (this *apiComp) UseGift(session comm.IUserSession, req *pb.LibraryUseGiftRe
// 任务统计
//赠送英雄礼物并增加N点好感度
if upLv > 0 {
this.module.Errorf("英雄好感度等级提升,英雄ID:%s,增加经验:%s,提升的等级:%d", req.Heroid, addExp, upLv)
this.module.Errorf("英雄好感度等级提升,英雄ID:%s,增加经验:%s,提升的等级:%d", _heroObj.Heroid, addExp, upLv)
if rst, err := this.module.ModuleUser.GetUserExpand(session.GetUserId()); err == nil { // 修改阵营累计好感度
if heroCfg := this.module.configure.GetHeroConfig(req.Heroid); heroCfg != nil {
if heroCfg := this.module.configure.GetHeroConfig(_heroObj.Heroid); heroCfg != nil {
rst.Race[heroCfg.Race] += upLv
this.module.ModuleUser.ChangeUserExpand(session.GetUserId(), map[string]interface{}{
"race": rst.Race,