上传竞技场战报写入

This commit is contained in:
liwei1dao 2024-01-27 01:45:33 +08:00
parent a19e60a9b2
commit 3ffb67314e
2 changed files with 15 additions and 8 deletions

View File

@ -5,6 +5,7 @@ import (
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs"
"time"
)
// 参数校验
@ -300,6 +301,7 @@ func (this *apiComp) ChallengeReward(session comm.IUserSession, req *pb.ArenaCha
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.battlerecord.WrietBattleRecord(session.GetUserId(), req.Report, time.Now().Add(time.Hour*24*8))
if bReward {
this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "ArenaChallengeRewardReq", atno)
}

View File

@ -29,14 +29,15 @@ func NewModule() core.IModule {
type Arena struct {
modules.ModuleBase
service base.IRPCXService
mail comm.Imail
battle comm.IBattle
privilege comm.IPrivilege
api *apiComp
configure *configureComp
modelArena *modelArena
modelRank *modelRank
service base.IRPCXService
mail comm.Imail
battle comm.IBattle
privilege comm.IPrivilege
api *apiComp
configure *configureComp
modelArena *modelArena
modelRank *modelRank
battlerecord comm.IBattleRecord // 战报模块
}
// 模块名
@ -69,6 +70,10 @@ func (this *Arena) Start() (err error) {
return
}
this.privilege = module.(comm.IPrivilege)
if module, err = this.service.GetModule(comm.ModuleBattleRecord); err != nil {
return
}
this.battlerecord = module.(comm.IBattleRecord)
this.service.RegisterFunctionName(string(comm.Rpc_ModuleArenaRaceSettlement), this.Rpc_ModuleArenaRaceSettlement)
this.service.RegisterFunctionName(string(comm.Rpc_ModuleArenaModifyIntegral), this.Rpc_ModuleArenaModifyIntegral)
return