捏脸埋点
This commit is contained in:
parent
ccb28422c4
commit
261988250a
@ -7,7 +7,6 @@ import (
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/configure"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
"go_dreamfactory/sys/db"
|
||||
"go_dreamfactory/utils"
|
||||
|
||||
@ -123,16 +122,19 @@ func (this *Privilege) CreatePrivilegeCard(session comm.IUserSession, cId string
|
||||
this.SendDailyMail(session, session.GetUserId(), 1)
|
||||
}
|
||||
|
||||
if code = this.DispenseRes(session, []*cfg.Gameatn{conf.DisposableReward}, true); code != pb.ErrorCode_Success {
|
||||
if code = this.DispenseRes(session, conf.DisposableReward, true); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
atn.T = conf.Id
|
||||
res = append(res, atn) // 加资源
|
||||
res = append(res, &pb.UserAssets{
|
||||
A: conf.DisposableReward.A,
|
||||
T: conf.DisposableReward.T,
|
||||
N: conf.DisposableReward.N,
|
||||
})
|
||||
for _, v := range conf.DisposableReward {
|
||||
res = append(res, &pb.UserAssets{
|
||||
A: v.A,
|
||||
T: v.T,
|
||||
N: v.N,
|
||||
})
|
||||
}
|
||||
|
||||
// 推送
|
||||
session.SendMsg(string(this.GetType()), PrivilegeGetListResp, &pb.PrivilegeGetListResp{Data: []*pb.DBPrivilege{data}})
|
||||
return
|
||||
@ -163,18 +165,21 @@ func (this *Privilege) RenewPrivilegeCard(session comm.IUserSession, cId string)
|
||||
mapData["eTime"] = v.ETime
|
||||
this.modelPrivilege.modifyPrivilegeData(session.GetUserId(), v.Id, mapData)
|
||||
// 发放奖励
|
||||
if code = this.DispenseRes(session, []*cfg.Gameatn{conf.DisposableReward}, true); code != pb.ErrorCode_Success {
|
||||
if code = this.DispenseRes(session, conf.DisposableReward, true); code != pb.ErrorCode_Success {
|
||||
break
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.GetType()), PrivilegeGetListResp, &pb.PrivilegeGetListResp{Data: []*pb.DBPrivilege{v}})
|
||||
atn.T = conf.Id
|
||||
res = append(res, atn) // 加资源
|
||||
res = append(res, &pb.UserAssets{
|
||||
A: conf.DisposableReward.A,
|
||||
T: conf.DisposableReward.T,
|
||||
N: conf.DisposableReward.N,
|
||||
})
|
||||
for _, v := range conf.DisposableReward {
|
||||
res = append(res, &pb.UserAssets{
|
||||
A: v.A,
|
||||
T: v.T,
|
||||
N: v.N,
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
code = pb.ErrorCode_PrivilegeRenewTime
|
||||
}
|
||||
|
@ -82,5 +82,9 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (c
|
||||
if err := session.SendMsg(string(this.module.GetType()), UserSubTypeCreate, &pb.UserCreateResp{IsSucc: true}); err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
}
|
||||
|
||||
if req.Figure != 0 {
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype72, 1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user