版署服同步 点赞赠送友情点

This commit is contained in:
meixiongfeng 2023-07-14 19:05:12 +08:00
parent 8f5141b5e9
commit 372271e236

View File

@ -4,6 +4,7 @@ import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/sys/log" "go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb" "go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
"go_dreamfactory/utils" "go_dreamfactory/utils"
) )
@ -117,7 +118,14 @@ func (this *apiComp) Zan(session comm.IUserSession, req *pb.FriendZanReq) (errda
rsp := &pb.FriendZanResp{ rsp := &pb.FriendZanResp{
Flag: true, 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) session.SendMsg(string(this.module.GetType()), FriendSubTypeZan, rsp)
// 赠送X次友情点 // 赠送X次友情点