附魔移除不需要的配置
This commit is contained in:
parent
6c44a4632e
commit
27d02a32cc
@ -44,6 +44,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.EnchantChallen
|
|||||||
code = pb.ErrorCode_ItemsNoEnough
|
code = pb.ErrorCode_ItemsNoEnough
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
_, ok := enchant.Boss[req.BossType]
|
_, ok := enchant.Boss[req.BossType]
|
||||||
if !ok { // 类型校验
|
if !ok { // 类型校验
|
||||||
enchant.Boss[req.BossType] = 0
|
enchant.Boss[req.BossType] = 0
|
||||||
|
@ -30,10 +30,6 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.EnchantGetListRe
|
|||||||
list.Boss = make(map[int32]int64)
|
list.Boss = make(map[int32]int64)
|
||||||
list.BossTime = make(map[int32]int32)
|
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)
|
this.module.modelEnchant.Add(session.GetUserId(), list)
|
||||||
}
|
}
|
||||||
if session.GetUserId() != "" { // 恢复时间
|
if session.GetUserId() != "" { // 恢复时间
|
||||||
|
@ -68,25 +68,6 @@ func (this *configureComp) GetConfigure(name string) (v interface{}, err error)
|
|||||||
return configure.GetConfigure(name)
|
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) {
|
func (this *configureComp) GetBuyChallengeCount(index int32) (data *cfg.GameEnchantShopData) {
|
||||||
if v, err := this.GetConfigure(game_enchantshop); err == nil {
|
if v, err := this.GetConfigure(game_enchantshop); err == nil {
|
||||||
if configure, ok := v.(*cfg.GameEnchantShop); ok {
|
if configure, ok := v.(*cfg.GameEnchantShop); ok {
|
||||||
|
Loading…
Reference in New Issue
Block a user