From a2e890eefdf204474b32d1434440a5119f4f9739 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 14 Jul 2023 18:52:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E9=9C=80=E6=B1=82=20?= =?UTF-8?q?=E7=82=B9=E8=B5=9E=E7=BB=99=E5=A5=BD=E5=8F=8B=E5=8A=A0=E5=8F=8B?= =?UTF-8?q?=E6=83=85=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/friend/api_cross_zan.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/friend/api_cross_zan.go b/modules/friend/api_cross_zan.go index fcf76f902..b2b461fe9 100644 --- a/modules/friend/api_cross_zan.go +++ b/modules/friend/api_cross_zan.go @@ -4,6 +4,7 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/lego/sys/log" "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" "go_dreamfactory/utils" ) @@ -118,6 +119,16 @@ func (this *apiComp) Zan(session comm.IUserSession, req *pb.FriendZanReq) (errda Flag: true, } + // 给好友发友情点 + if s, ok := this.module.GetUserSession(target.Uid); ok { // 后面走配置 + res := &cfg.Gameatn{ + A: "attr", + T: "friendPoint", + N: 1, + } + this.module.DispenseRes(s, []*cfg.Gameatn{res}, true) + } + session.SendMsg(string(this.module.GetType()), FriendSubTypeZan, rsp) // 赠送X次友情点