From 372271e2361941e2366496f1eb0f0cf0c03f6b7c Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 14 Jul 2023 19:05:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E7=BD=B2=E6=9C=8D=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=20=E7=82=B9=E8=B5=9E=E8=B5=A0=E9=80=81=E5=8F=8B=E6=83=85?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/friend/api_cross_zan.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/friend/api_cross_zan.go b/modules/friend/api_cross_zan.go index 85d828b5d..1eadeb9e1 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" ) @@ -117,7 +118,14 @@ func (this *apiComp) Zan(session comm.IUserSession, req *pb.FriendZanReq) (errda rsp := &pb.FriendZanResp{ Flag: true, } - + // 给好友发友情点 + s, _ := this.module.GetUserSession(target.Uid) + 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次友情点