上传竞技场战报写入
This commit is contained in:
parent
a19e60a9b2
commit
3ffb67314e
@ -5,6 +5,7 @@ import (
|
|||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
"go_dreamfactory/sys/configure"
|
"go_dreamfactory/sys/configure"
|
||||||
cfg "go_dreamfactory/sys/configure/structs"
|
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) {
|
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||||
|
this.module.battlerecord.WrietBattleRecord(session.GetUserId(), req.Report, time.Now().Add(time.Hour*24*8))
|
||||||
if bReward {
|
if bReward {
|
||||||
this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "ArenaChallengeRewardReq", atno)
|
this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "ArenaChallengeRewardReq", atno)
|
||||||
}
|
}
|
||||||
|
@ -29,14 +29,15 @@ func NewModule() core.IModule {
|
|||||||
|
|
||||||
type Arena struct {
|
type Arena struct {
|
||||||
modules.ModuleBase
|
modules.ModuleBase
|
||||||
service base.IRPCXService
|
service base.IRPCXService
|
||||||
mail comm.Imail
|
mail comm.Imail
|
||||||
battle comm.IBattle
|
battle comm.IBattle
|
||||||
privilege comm.IPrivilege
|
privilege comm.IPrivilege
|
||||||
api *apiComp
|
api *apiComp
|
||||||
configure *configureComp
|
configure *configureComp
|
||||||
modelArena *modelArena
|
modelArena *modelArena
|
||||||
modelRank *modelRank
|
modelRank *modelRank
|
||||||
|
battlerecord comm.IBattleRecord // 战报模块
|
||||||
}
|
}
|
||||||
|
|
||||||
// 模块名
|
// 模块名
|
||||||
@ -69,6 +70,10 @@ func (this *Arena) Start() (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.privilege = module.(comm.IPrivilege)
|
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_ModuleArenaRaceSettlement), this.Rpc_ModuleArenaRaceSettlement)
|
||||||
this.service.RegisterFunctionName(string(comm.Rpc_ModuleArenaModifyIntegral), this.Rpc_ModuleArenaModifyIntegral)
|
this.service.RegisterFunctionName(string(comm.Rpc_ModuleArenaModifyIntegral), this.Rpc_ModuleArenaModifyIntegral)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user