上传竞技场战报写入
This commit is contained in:
parent
a19e60a9b2
commit
3ffb67314e
@ -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)
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ type Arena struct {
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user