#28091 缺陷 【梦工场系统】 【玩家信息】玩家信息中的功夫塔维京狩猎的功能更记录都是无记录,实际上我是有通关过的

This commit is contained in:
meixiongfeng 2023-07-12 18:19:17 +08:00
parent fa8e950733
commit 5d38eef5b9
7 changed files with 60 additions and 21 deletions

View File

@ -387,7 +387,7 @@
"battleScenes": [
"bossfight_spinymandrilla_02"
],
"disableAiCamera": 1,
"disableAiCamera": 0,
"ChoseCamp": [],
"DisableCamp": [],
"DefaultHero": 0,
@ -425,7 +425,7 @@
"battleScenes": [
"bossfight_spinymandrilla_02"
],
"disableAiCamera": 1,
"disableAiCamera": 0,
"ChoseCamp": [],
"DisableCamp": [],
"DefaultHero": 0,

View File

@ -52,7 +52,7 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
}
// 准备数据
/////////////////////////////////////
drawConf, err = this.module.configure.GetHeroDrawConfigByType(req.DrawType) // 获取新的抽卡配置
drawConf, err = this.module.configure.GetHeroDrawConfigByType(req.DrawType + comm.DrawCardType0) // 获取新的抽卡配置
if err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,

View File

@ -48,13 +48,31 @@ func (this *ModelRank) getHuntingRankList(uid string) []*pb.DBHuntingRank {
func (this *ModelRank) getHuntingRankListByBossType(uid string, bossType int32) *pb.DBHuntingRank {
ranks := make([]*pb.DBHuntingRank, 0)
err := this.GetList(uid, &ranks)
if err != nil {
return nil
}
for _, v := range ranks {
if v.Bosstype == bossType {
return v
if db.IsCross() {
err := this.GetList(uid, &ranks)
if err != nil {
return nil
}
for _, v := range ranks {
if v.Bosstype == bossType {
return v
}
}
} else {
conn, err := db.Cross()
if err != nil {
return nil
}
model := db.NewDBModel(comm.TableHuntingRank, 0, conn)
err = model.GetList(uid, &ranks)
if err != nil {
return nil
}
for _, v := range ranks {
if v.Bosstype == bossType {
return v
}
}
}
return nil

View File

@ -74,7 +74,7 @@ func (this *Hunting) ModifyHuntingData(uid string, data map[string]interface{})
func (this *Hunting) CheckUserBaseHuntingInfo(uid string) (data []*pb.DBHuntingRank) {
list, err := this.modelHunting.getHuntingList(uid)
if err != nil {
if err == nil {
for k := range list.Boss {
_d := this.modulerank.getHuntingRankListByBossType(uid, k)
if _d != nil {

View File

@ -44,7 +44,7 @@ func (this *ModelRank) getPagodaRankListByFloorid(uid string, cid int32) *pb.DBP
} else {
if conn, err := db.Cross(); err == nil {
dbModel := db.NewDBModel(comm.TablePagodaRecord, 0, conn)
if err = dbModel.GetList(uid, &pagodaRank); err == nil {
if err = dbModel.GetList(uid, &pagodaRank); err != nil {
return nil
}
}

View File

@ -5,6 +5,7 @@ import (
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go_dreamfactory/sys/db"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/x/bsonx"
@ -43,15 +44,35 @@ func (this *ModelRank) getVikingRankList(uid string) []*pb.DBVikingRank {
}
func (this *ModelRank) getVikingRankListByBossType(uid string, bossType int32) *pb.DBVikingRank {
ranks := make([]*pb.DBVikingRank, 0)
err := this.GetList(uid, &ranks)
if err != nil {
return nil
}
for _, v := range ranks {
if v.Bosstype == bossType {
return v
if db.IsCross() {
ranks := make([]*pb.DBVikingRank, 0)
err := this.GetList(uid, &ranks)
if err != nil {
return nil
}
for _, v := range ranks {
if v.Bosstype == bossType {
return v
}
}
} else {
conn, err := db.Cross()
if err != nil {
return nil
}
model := db.NewDBModel(comm.TableVikingRank, 0, conn)
ranks := make([]*pb.DBVikingRank, 0)
err = model.GetList(uid, &ranks)
if err != nil {
return nil
}
for _, v := range ranks {
if v.Bosstype == bossType {
return v
}
}
}
return nil
}

View File

@ -89,7 +89,7 @@ func (this *Viking) Start() (err error) {
func (this *Viking) CheckUserBaseVikingInfo(uid string) (data []*pb.DBVikingRank) {
list, err := this.modelViking.getVikingList(uid)
if err != nil {
if err == nil {
for k := range list.Boss {
_d := this.modulerank.getVikingRankListByBossType(uid, k)
if _d != nil {