diff --git a/modules/atlas/comp_configure.go b/modules/atlas/comp_configure.go index 6b9422d44..5785b465e 100644 --- a/modules/atlas/comp_configure.go +++ b/modules/atlas/comp_configure.go @@ -2,6 +2,7 @@ package atlas import ( "fmt" + "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/lego/sys/log" "go_dreamfactory/modules" @@ -52,11 +53,14 @@ func (this *configureComp) GetConfigure(name string) (v interface{}, err error) } // 获取教习数据 -func (this *configureComp) GetPandoJxConf(id string) (conf *cfg.GamePandamasJxData) { +func (this *configureComp) GetPandoJxConf(id string) (conf *cfg.GamePandamasJxData, err error) { if v, err := this.GetConfigure(pandaJx); err == nil { if configure, ok := v.(*cfg.GamePandamasJx); ok { - return configure.Get(id) + if conf = configure.Get(id); conf == nil { + err = comm.NewNotFoundConfErr("atlas", pandaJx, id) + this.module.Errorln(err) + } } } else { err = fmt.Errorf("%T no is *cfg.GamePandamasJxData", v) diff --git a/modules/smithy/api_atlasactivate.go b/modules/smithy/api_atlasactivate.go index 2d5b58747..75382f81d 100644 --- a/modules/smithy/api_atlasactivate.go +++ b/modules/smithy/api_atlasactivate.go @@ -17,6 +17,7 @@ func (this *apiComp) AtlasActivateCheck(session comm.IUserSession, req *pb.Smith func (this *apiComp) AtlasActivate(session comm.IUserSession, req *pb.SmithyAtlasActivateReq) (code pb.ErrorCode, data *pb.ErrorData) { var ( addScore int32 // 更新图鉴增加的积分 + szTask []*comm.TaskParam ) code = this.AtlasActivateCheck(session, req) if code != pb.ErrorCode_Success { @@ -59,7 +60,7 @@ func (this *apiComp) AtlasActivate(session comm.IUserSession, req *pb.SmithyAtla code = pb.ErrorCode_SmithyNoFoundAtlas return } - this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype166, 1)) + szTask = append(szTask, comm.GettaskParam(comm.Rtype166, 1)) } else if conf.TypeId == 2 { if v, ok := atlas.Collect[req.Id]; ok { if !v.Activate { // 激活 @@ -75,10 +76,10 @@ func (this *apiComp) AtlasActivate(session comm.IUserSession, req *pb.SmithyAtla code = pb.ErrorCode_SmithyNoFoundAtlas return } - - this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype165, 1)) + szTask = append(szTask, comm.GettaskParam(comm.Rtype165, 1)) } - this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype167, atlas.Score)) + szTask = append(szTask, comm.GettaskParam(comm.Rtype167, atlas.Score)) + this.module.ModuleRtask.TriggerTask(session.GetUserId(), szTask...) session.SendMsg(string(this.module.GetType()), "atlasactivate", &pb.SmithyAtlasActivateResp{Data: atlas}) return }