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次友情点