update
This commit is contained in:
parent
04975072bb
commit
a19e485d8d
@ -32,7 +32,6 @@ func (this *apiComp) ChallengeCycleOver(session comm.IUserSession, req *pb.Pagod
|
|||||||
res []*cfg.Gameatn
|
res []*cfg.Gameatn
|
||||||
changExp map[string]int32
|
changExp map[string]int32
|
||||||
costTime int32 // 耗时
|
costTime int32 // 耗时
|
||||||
new bool // 是否首次挑战
|
|
||||||
fresh bool // 刷新记录
|
fresh bool // 刷新记录
|
||||||
)
|
)
|
||||||
changExp = make(map[string]int32, 0)
|
changExp = make(map[string]int32, 0)
|
||||||
@ -116,29 +115,30 @@ func (this *apiComp) ChallengeCycleOver(session comm.IUserSession, req *pb.Pagod
|
|||||||
Leadpos: Leadpos,
|
Leadpos: Leadpos,
|
||||||
Line: szLine,
|
Line: szLine,
|
||||||
}
|
}
|
||||||
if new {
|
|
||||||
if conf.Floors == 1 { // 写数据
|
if conf.Floors == 1 { // 写数据
|
||||||
db := &pb.DBCyclePagodaRecord{
|
db := &pb.DBCyclePagodaRecord{
|
||||||
Id: primitive.NewObjectID().Hex(),
|
Id: primitive.NewObjectID().Hex(),
|
||||||
Uid: session.GetUserId(),
|
Uid: session.GetUserId(),
|
||||||
Uinfo: &pb.BaseUserInfo{},
|
Uinfo: &pb.BaseUserInfo{},
|
||||||
Data: map[int32]*pb.CycleData{},
|
Data: map[int32]*pb.CycleData{},
|
||||||
Maxfloor: 1,
|
Maxfloor: 1,
|
||||||
}
|
|
||||||
user, err := this.module.ModuleUser.GetUser(session.GetUserId())
|
|
||||||
if err == nil {
|
|
||||||
db.Uinfo = comm.GetUserBaseInfo(user)
|
|
||||||
}
|
|
||||||
db.Data[conf.Floors].Line = &pb.LineData{
|
|
||||||
Leadpos: Leadpos,
|
|
||||||
Line: szLine,
|
|
||||||
}
|
|
||||||
this.module.modelCyclePagoda.addCrossPagodaCycle(session.GetUserId(), db)
|
|
||||||
}
|
}
|
||||||
res = append(res, conf.KeyReward...) // 首通奖励
|
user, err := this.module.ModuleUser.GetUser(session.GetUserId())
|
||||||
|
if err == nil {
|
||||||
|
db.Uinfo = comm.GetUserBaseInfo(user)
|
||||||
|
}
|
||||||
|
db.Data[conf.Floors].Line = &pb.LineData{
|
||||||
|
Leadpos: Leadpos,
|
||||||
|
Line: szLine,
|
||||||
|
}
|
||||||
|
this.module.modelCyclePagoda.addCrossPagodaCycle(session.GetUserId(), db)
|
||||||
}
|
}
|
||||||
|
res = append(res, conf.KeyReward...) // 首通奖励
|
||||||
|
|
||||||
// 校验是否刷新记录
|
// 校验是否刷新记录
|
||||||
if fresh || new {
|
if fresh {
|
||||||
|
this.module.modelCyclePagoda.getCrossPagodaCycleList(session.GetUserId())
|
||||||
this.module.modelCyclePagoda.SetCyclePagodaRankList(score, session.GetUserId())
|
this.module.modelCyclePagoda.SetCyclePagodaRankList(score, session.GetUserId())
|
||||||
mapData["data"] = list.Data
|
mapData["data"] = list.Data
|
||||||
user, err := this.module.ModuleUser.GetUser(session.GetUserId())
|
user, err := this.module.ModuleUser.GetUser(session.GetUserId())
|
||||||
|
Loading…
Reference in New Issue
Block a user