上传任务进度推送
This commit is contained in:
parent
70c2816242
commit
76685f3a37
@ -58,6 +58,7 @@ func (this *apiComp) Accept(session comm.IUserSession, req *pb.WTaskAcceptReq) (
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
Message: fmt.Sprintf("task:%d no fund in Activations:%v", req.Tid, wtask.Activations),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
for i, v := range wtask.Activations {
|
||||
|
@ -42,7 +42,7 @@ func (this *apiComp) BattleFinish(session comm.IUserSession, req *pb.WTaskBattle
|
||||
return
|
||||
}
|
||||
|
||||
if errdata, isWin = this.module.modelBattle.CheckBattleReport(session, req.Report); errdata == nil {
|
||||
if errdata, isWin = this.module.modelBattle.CheckBattleReport(session, req.Report); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ func (this *apiComp) BattleStart(session comm.IUserSession, req *pb.WTaskBattleS
|
||||
}); err != nil {
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "battle", &pb.WTaskBattleStartResp{
|
||||
session.SendMsg(string(this.module.GetType()), "battlestart", &pb.WTaskBattleStartResp{
|
||||
BattleConfId: req.BattleConfId,
|
||||
Info: &pb.BattleInfo{
|
||||
Id: record.Id,
|
||||
|
@ -29,7 +29,7 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.WTaskInfoReq) (errd
|
||||
}
|
||||
return
|
||||
}
|
||||
if progress, errdata = this.module.fishtask(session, wtask, false); errdata != nil {
|
||||
if _, errdata = this.module.fishtask(session, wtask, false); errdata != nil {
|
||||
return
|
||||
}
|
||||
if progress, errdata = this.module.pushtaskprogress(session, wtask, false); errdata != nil {
|
||||
|
@ -97,7 +97,7 @@ func (this *WTask) BuriedsNotify(uid string, condis []*pb.ConIProgress) {
|
||||
if temptasks, ok = condlTask[v.Conid]; ok {
|
||||
for _, task := range temptasks {
|
||||
if _, ok = accepttaskMap[task.Key]; ok { //任务列表进度有变化
|
||||
if _, ok = changetasks[task.Key]; ok {
|
||||
if _, ok = changetasks[task.Key]; !ok {
|
||||
changetasks[task.Key] = task
|
||||
for _, cid := range task.Completetask {
|
||||
if _, ok = checkcondlsMap[cid]; !ok {
|
||||
@ -448,15 +448,15 @@ func (this *WTask) inquireActivations(session comm.IUserSession, wtask *pb.DBWTa
|
||||
if v.Des == 5 { //商队任务不主动触发
|
||||
continue
|
||||
}
|
||||
|
||||
if v.AutoAccept == 0 {
|
||||
wtask.Activations = append(wtask.Activations, v.Key)
|
||||
changeActiva = true
|
||||
|
||||
} else if v.AutoAccept == 1 { //自动接取任务
|
||||
wtask.Accepts = append(wtask.Accepts, v.Key)
|
||||
changeAccept = true
|
||||
}
|
||||
// if v.AutoAccept == 0 {
|
||||
// wtask.Activations = append(wtask.Activations, v.Key)
|
||||
// changeActiva = true
|
||||
// } else if v.AutoAccept == 1 { //自动接取任务
|
||||
// wtask.Accepts = append(wtask.Accepts, v.Key)
|
||||
// changeAccept = true
|
||||
// }
|
||||
if v.Des == 2 { //主线任务
|
||||
wtask.Currchapter = v.Group
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user