Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
c0e0ec5119
@ -180,7 +180,7 @@ type (
|
||||
IMline interface {
|
||||
ModifyMlineDataByNanduID(session IUserSession, id int32) (code pb.ErrorCode)
|
||||
/// 查询章节ID
|
||||
GetUsermLineData(uid string, chapterType int32) (chapterId int32)
|
||||
GetUserMlineData(uid string, chapterType int32) (chapterId int32)
|
||||
|
||||
// 校验主线是否通关
|
||||
CheckCommpleteStage(uid string, stageId int32) (b bool)
|
||||
|
@ -5,7 +5,6 @@ import (
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
"sort"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
)
|
||||
@ -154,19 +153,13 @@ func (this *Mline) ModifyMlineDataByNanduID(session comm.IUserSession, id int32)
|
||||
}
|
||||
return
|
||||
}
|
||||
func (this *Mline) GetUsermLineData(uid string, chapterType int32) (chapterId int32) {
|
||||
var sz []*pb.DBMline
|
||||
_szData, err := this.modelMline.getMainlineList(uid)
|
||||
if err == nil {
|
||||
for _, v := range _szData {
|
||||
if v.ChapterId == chapterId {
|
||||
sz = append(sz, _szData...)
|
||||
}
|
||||
func (this *Mline) GetUserMlineData(uid string, chapterType int32) (chapterId int32) {
|
||||
if rst, err := this.ModuleUser.GetUserExpand(uid); err == nil { // 统计主线进度
|
||||
_mp := rst.Mline
|
||||
if v, ok := _mp[chapterType]; ok {
|
||||
chapterId = v
|
||||
return
|
||||
}
|
||||
|
||||
sort.SliceStable(sz, func(i, j int) bool { // 排序
|
||||
return sz[i].ChapterId > sz[j].ChapterId
|
||||
})
|
||||
}
|
||||
|
||||
return
|
||||
|
@ -128,7 +128,7 @@ func (this *ModelRtask) verifyRtype2(uid string, cfg *cfg.GameRdtaskCondiData) (
|
||||
}
|
||||
|
||||
if ml, y := m.(comm.IMline); y {
|
||||
qjId := ml.GetUsermLineData(uid, 1)
|
||||
qjId := ml.GetUserMlineData(uid, 1)
|
||||
return soEqual(qjId, cfg.Data1)
|
||||
}
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user