上传异步优化
This commit is contained in:
parent
e18e23ec95
commit
452d58bfbc
@ -76,8 +76,7 @@ func (this *apiComp) ChallengeReward(session comm.IUserSession, req *pb.ArenaCha
|
||||
redstate = pb.BattleRecordState_AttackWin
|
||||
bulestate = pb.BattleRecordState_DefendLost
|
||||
}
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype131, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype131, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype131, 1))
|
||||
} else {
|
||||
info.Streak = 0
|
||||
if req.Revengeid != "" {
|
||||
|
@ -251,8 +251,11 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
|
||||
// Rtype211 TaskType = 211 // 向指定X城市,贩卖价值X虚拟币以上的对应城市急需货物
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype211, req.City, sellSpValue))
|
||||
}
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
if len(tasks) > 0 {
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -134,7 +134,6 @@ func (this *modelDreamComp) trigger(session comm.IUserSession) {
|
||||
}
|
||||
this.module.modelDream.noticeuserfriend(session, mdata.Id, chat)
|
||||
session.SendMsg(string(this.module.GetType()), "trigger", &pb.MoonfantasyTriggerPush{Issucc: true, Mid: mdata.Id, Monster: mdata.Monster})
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype87, 1)
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype87, 1))
|
||||
})
|
||||
|
@ -98,10 +98,10 @@ func (this *apiComp) EventComplete(session comm.IUserSession, req *pb.WTaskEvent
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype206, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype207, 1, req.Group))
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "eventcomplete", &pb.WTaskEventCompleteResp{Group: req.Group, Event: event, Award: award})
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "eventcomplete", &pb.WTaskEventCompleteResp{Group: req.Group, Event: event, Award: award})
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user