我方队伍队列数据初始化时指定长度

This commit is contained in:
meixiongfeng 2023-01-10 14:25:23 +08:00
parent 5bcccf25d2
commit e388f4df99
3 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@ func (this *Enchant) CheckRank(uid string, boosID int32, report *pb.BattleReport
model := db.NewDBModel(comm.TableEnchantRank, 0, conn_)
costTime := report.Costtime
szLine := make([]*pb.LineUp, 5)
szLine := make([]*pb.LineUp, len(report.Info.Redflist[0].Team))
Leadpos := 0
if report != nil && report.Info != nil && len(report.Info.Redflist) > 0 {
costTime = report.Costtime

View File

@ -86,7 +86,7 @@ func (this *Hunting) CheckRank(uid string, boosID int32, difficulty int32, repor
model := db.NewDBModel(comm.TableHuntingRank, time.Hour, conn_)
costTime := report.Costtime
szLine := make([]*pb.LineUp, 5)
szLine := make([]*pb.LineUp, len(report.Info.Redflist[0].Team))
Leadpos := 0
if report != nil && report.Info != nil && len(report.Info.Redflist) > 0 {
costTime = report.Costtime

View File

@ -92,7 +92,7 @@ func (this *Viking) CheckRank(uid string, boosID int32, difficulty int32, report
model := db.NewDBModel(comm.TableVikingRank, 0, conn_)
costTime := report.Costtime
szLine := make([]*pb.LineUp, 5)
szLine := make([]*pb.LineUp, len(report.Info.Redflist[0].Team))
Leadpos := 0
if report != nil && report.Info != nil && len(report.Info.Redflist) > 0 {
costTime = report.Costtime