临时需求 点赞给好友加友情点

This commit is contained in:
meixiongfeng 2023-07-14 18:52:37 +08:00
parent 96f906ddae
commit a2e890eefd

View File

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