diff --git a/modules/story/model_story.go b/modules/story/model_story.go index 98d05aa26..057297d7b 100644 --- a/modules/story/model_story.go +++ b/modules/story/model_story.go @@ -23,13 +23,10 @@ func (this *ModelStory) Init(service core.IService, module core.IModule, comp co } // 获取章节信息 -func (this *ModelStory) getStoryList(uid string) ([]*pb.DBStory, error) { - storys := make([]*pb.DBStory, 0) - err := this.GetList(uid, &storys) - if err != nil { - return nil, err - } - return storys, nil +func (this *ModelStory) getStoryList(uid string) (storys []*pb.DBStory, err error) { + storys = make([]*pb.DBStory, 0) + err = this.GetList(uid, &storys) + return } // 修改章节信息 diff --git a/modules/story/module.go b/modules/story/module.go index 4e9014a06..5ae4f3b40 100644 --- a/modules/story/module.go +++ b/modules/story/module.go @@ -74,6 +74,10 @@ func (this *Story) CheckChallengeChapter(stroyId int32, uid string, zhangjieID i code = pb.ErrorCode_ConfigNoFound return } + // 如果这一关是路线二的话 + if configData.Area == 2 && curChapter.ChapterId > stroyId { // 当前的关卡ID 大于路线2的ID 即可 + return + } // 判断下一关是不是当前传入的值 if configData.Nextid != stroyId { code = pb.ErrorCode_StoryIDFailed @@ -82,8 +86,19 @@ func (this *Story) CheckChallengeChapter(stroyId int32, uid string, zhangjieID i } break case 2: + configData := this.configure.GetStoryHardChapter(curChapter.StoryId) + if configData != nil { // 校验章节 + if configData.Zhangshu != zhangjieID { + code = pb.ErrorCode_ConfigNoFound + return + } + // 判断下一关是不是当前传入的值 + if configData.Nextid != stroyId { + code = pb.ErrorCode_StoryIDFailed + return + } + } break - } return } diff --git a/pb/proto/hero/hero_msg.proto b/pb/proto/hero/hero_msg.proto index 275938431..bdbc9b2d6 100644 --- a/pb/proto/hero/hero_msg.proto +++ b/pb/proto/hero/hero_msg.proto @@ -117,7 +117,7 @@ message HeroProperty { } // 英雄锁定 -message HeroLockReq{ +message HeroLockReq{ string heroid = 1; }