赛季塔 主线红点检测
This commit is contained in:
parent
f059dd5ca5
commit
a8347ef0af
@ -120,6 +120,8 @@ type (
|
|||||||
ModifyMainlineData(uid string, id int32) (code pb.ErrorCode)
|
ModifyMainlineData(uid string, id int32) (code pb.ErrorCode)
|
||||||
/// 查询章节ID
|
/// 查询章节ID
|
||||||
GetUsermainLineData(uid string) (mainlineId int32)
|
GetUsermainLineData(uid string) (mainlineId int32)
|
||||||
|
|
||||||
|
Reddot(uid string, rid ...ReddotType) map[ReddotType]bool
|
||||||
}
|
}
|
||||||
//任务
|
//任务
|
||||||
ITask interface {
|
ITask interface {
|
||||||
@ -199,6 +201,8 @@ type (
|
|||||||
IPagoda interface {
|
IPagoda interface {
|
||||||
ModifyPagodaFloor(session IUserSession, level int32) (code pb.ErrorCode)
|
ModifyPagodaFloor(session IUserSession, level int32) (code pb.ErrorCode)
|
||||||
CheckUserBasePagodaInfo(uid string) (data *pb.DBPagodaRecord) // 查询玩家最佳通关记录
|
CheckUserBasePagodaInfo(uid string) (data *pb.DBPagodaRecord) // 查询玩家最佳通关记录
|
||||||
|
|
||||||
|
Reddot(uid string, rid ...ReddotType) map[ReddotType]bool
|
||||||
}
|
}
|
||||||
|
|
||||||
IHeroFetter interface {
|
IHeroFetter interface {
|
||||||
|
@ -98,3 +98,42 @@ func (this *Mainline) Start() (err error) {
|
|||||||
this.battle = module.(comm.IBattle)
|
this.battle = module.(comm.IBattle)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//红点查询
|
||||||
|
func (this *Mainline) Reddot(uid string, rid ...comm.ReddotType) (reddot map[comm.ReddotType]bool) {
|
||||||
|
reddot = make(map[comm.ReddotType]bool)
|
||||||
|
for _, v := range rid {
|
||||||
|
if v == comm.Reddot5 {
|
||||||
|
reddot[comm.Reddot5] = this.CheckPoint(uid)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 红点检测
|
||||||
|
func (this *Mainline) CheckPoint(uid string) bool {
|
||||||
|
list, err := this.modelMainline.getMainlineList(uid)
|
||||||
|
if err != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
for _, v := range list {
|
||||||
|
conf := this.configure.GetMainlineChapter(v.ChapterId)
|
||||||
|
if conf == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
bFind := false
|
||||||
|
for _, v1 := range conf.Episode {
|
||||||
|
for _, banch := range v.BranchID {
|
||||||
|
if banch == v1 {
|
||||||
|
bFind = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !bFind { // 没找到 显示红点
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
@ -139,3 +139,33 @@ func (this *Pagoda) SetPagodaRankList(tableName string, score int32, uid string)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//红点查询
|
||||||
|
func (this *Pagoda) Reddot(uid string, rid ...comm.ReddotType) (reddot map[comm.ReddotType]bool) {
|
||||||
|
reddot = make(map[comm.ReddotType]bool)
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 红点检测
|
||||||
|
func (this *Pagoda) CheckPoint(uid string) bool {
|
||||||
|
list, err := this.modelPagoda.getPagodaList(uid)
|
||||||
|
if err != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
maxFloor := this.configure.GetPagodaFloor(list.Type)
|
||||||
|
if list.PagodaId < maxFloor { // 层数不够 显示红点
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检测赛季塔
|
||||||
|
season, err := this.modelSeasonPagoda.getSeasonPagodaList(uid)
|
||||||
|
if err != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
maxFloor = this.configure.GetPagodaFloor(list.Type)
|
||||||
|
if season.PagodaId < maxFloor { // 层数不够 显示红点
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user