统计阵营总好感度

This commit is contained in:
meixiongfeng 2023-04-20 16:27:59 +08:00
parent 8811db5c1b
commit d8cb4f78af

View File

@ -133,6 +133,14 @@ func (this *apiComp) UseGift(session comm.IUserSession, req *pb.LibraryUseGiftRe
// 任务统计
//赠送英雄礼物并增加N点好感度
if upLv > 0 {
if rst, err := this.module.ModuleUser.GetUserExpand(session.GetUserId()); err == nil { // 修改阵营累计好感度
if heroCfg := this.module.configure.GetHeroConfig(req.Heroid); heroCfg != nil {
rst.Race[heroCfg.Race] += upLv
this.module.ModuleUser.ChangeUserExpand(session.GetUserId(), map[string]interface{}{
"race": rst.Race,
})
}
}
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype134, utils.ToInt32(_heroObj.Heroid), upLv)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype134, utils.ToInt32(_heroObj.Heroid), upLv))
}