From d8cb4f78affce66af5547dbb015a500baa17521e Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 20 Apr 2023 16:27:59 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E9=98=B5=E8=90=A5=E6=80=BB?= =?UTF-8?q?=E5=A5=BD=E6=84=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/library/api_usegift.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/library/api_usegift.go b/modules/library/api_usegift.go index 17b73ab13..399229462 100644 --- a/modules/library/api_usegift.go +++ b/modules/library/api_usegift.go @@ -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)) }