diff --git a/modules/enchant/api_challenge.go b/modules/enchant/api_challenge.go index 544019ec5..4fa003d1f 100644 --- a/modules/enchant/api_challenge.go +++ b/modules/enchant/api_challenge.go @@ -44,6 +44,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.EnchantChallen code = pb.ErrorCode_ItemsNoEnough return } + _, ok := enchant.Boss[req.BossType] if !ok { // 类型校验 enchant.Boss[req.BossType] = 0 diff --git a/modules/enchant/api_getlist.go b/modules/enchant/api_getlist.go index 2c28f8228..bbc176f38 100644 --- a/modules/enchant/api_getlist.go +++ b/modules/enchant/api_getlist.go @@ -30,10 +30,6 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.EnchantGetListRe list.Boss = make(map[int32]int64) list.BossTime = make(map[int32]int32) - _cfg := this.module.configure.GetEnchantBossTypeConfigData() - for k := range _cfg { - list.BossTime[k] = 0 - } this.module.modelEnchant.Add(session.GetUserId(), list) } if session.GetUserId() != "" { // 恢复时间 diff --git a/modules/enchant/comp_configure.go b/modules/enchant/comp_configure.go index 3a8299874..59132ec37 100644 --- a/modules/enchant/comp_configure.go +++ b/modules/enchant/comp_configure.go @@ -68,25 +68,6 @@ func (this *configureComp) GetConfigure(name string) (v interface{}, err error) return configure.GetConfigure(name) } -// get boss Type -func (this *configureComp) GetEnchantBossTypeConfigData() (mapType map[int32]struct{}) { - - mapType = make(map[int32]struct{}, 0) - if v, err := this.GetConfigure(game_enchantboss); err == nil { - if configure, ok := v.(*cfg.GameEnchantBoss); ok { - this.hlock.Lock() - defer this.hlock.Unlock() - for _, value := range configure.GetDataList() { - if _, ok := mapType[value.Bossid]; !ok { - mapType[value.Bossid] = struct{}{} - } - } - - } - } - return -} - func (this *configureComp) GetBuyChallengeCount(index int32) (data *cfg.GameEnchantShopData) { if v, err := this.GetConfigure(game_enchantshop); err == nil { if configure, ok := v.(*cfg.GameEnchantShop); ok {