This commit is contained in:
wh_zcy 2023-06-01 15:32:43 +08:00
parent 8603bd6e76
commit e17387c10f
4 changed files with 12 additions and 19 deletions

View File

@ -396,8 +396,6 @@ type (
} }
// 世界任务 // 世界任务
IWorldtask interface { IWorldtask interface {
// 任务条件达成通知
TaskCondFinishNotify(session IUserSession, condIds []int32) error
// bingo任务 // bingo任务
BingoJumpTask(session IUserSession, groupId, rtaskId int32) error BingoJumpTask(session IUserSession, groupId, rtaskId int32) error
// 通过任务ID bingo // 通过任务ID bingo

View File

@ -385,14 +385,14 @@ func (this *ModuleRtask) processTasks(session comm.IUserSession, taskParams ...*
return return
} }
//通知世界任务模块 //通知世界任务模块
module, err := this.service.GetModule(comm.ModuleWorldtask) // module, err := this.service.GetModule(comm.ModuleWorldtask)
if err == nil { // if err == nil {
//世界任务 // //世界任务
if worldtask, ok := module.(comm.IWorldtask); ok { // if worldtask, ok := module.(comm.IWorldtask); ok {
if err := worldtask.TaskCondFinishNotify(session, condIdsForNotify); err != nil { // if err := worldtask.TaskCondFinishNotify(session, condIdsForNotify); err != nil {
} // }
} // }
} // }
// 通知公会任务模块 // 通知公会任务模块
// sociatyModule, err := this.service.GetModule(comm.ModuleSociaty) // sociatyModule, err := this.service.GetModule(comm.ModuleSociaty)
// if err != nil { // if err != nil {

View File

@ -241,10 +241,10 @@ type TaskParams struct {
} }
// 任务条件达成通知 // 任务条件达成通知
func (this *Sociaty) TCondFinishNotify(uid string, condIds []int32) { func (this *Sociaty) TCondFinishNotify(uid string, conds []*pb.ConIProgress) {
log.Debug("公会任务通知", log.Debug("公会任务通知",
log.Field{Key: "uid", Value: uid}, log.Field{Key: "uid", Value: uid},
log.Field{Key: "condIds", Value: condIds}) log.Field{Key: "condIds", Value: conds})
sociaty := this.modelSociaty.getUserSociaty(uid) sociaty := this.modelSociaty.getUserSociaty(uid)
if sociaty == nil { if sociaty == nil {
@ -260,8 +260,8 @@ func (this *Sociaty) TCondFinishNotify(uid string, condIds []int32) {
var flag bool var flag bool
for _, v := range dt.TaskList { for _, v := range dt.TaskList {
for _, condId := range condIds { for _, cond := range conds {
if v.TaskId == condId { if v.TaskId == cond.Conid && cond.State == pb.BuriedItemFinishState_finish {
v.Status = 1 v.Status = 1
flag = true flag = true
} }

View File

@ -155,11 +155,6 @@ func (this *Worldtask) TCondFinishNotify(uid string, conds []*pb.ConIProgress) {
return return
} }
// 任务条件达成通知
func (this *Worldtask) TaskCondFinishNotify(session comm.IUserSession, condIds []int32) error {
return nil
}
// 获取我的世界任务 // 获取我的世界任务
func (this *Worldtask) GetMyWorldtask(uid string) *pb.DBWorldtask { func (this *Worldtask) GetMyWorldtask(uid string) *pb.DBWorldtask {
wt, err := this.modelWorldtask.getWorldtask(uid) wt, err := this.modelWorldtask.getWorldtask(uid)