diff --git a/bin/json/game_drawcard.json b/bin/json/game_drawcard.json index a3892dfaa..c132def9a 100644 --- a/bin/json/game_drawcard.json +++ b/bin/json/game_drawcard.json @@ -6,7 +6,7 @@ "star": 3, "race": 1, "id": "35006", - "weight": 1000 + "weight": 10000 }, { "key": 2, diff --git a/comm/imodule.go b/comm/imodule.go index e6019a038..8dbb887ff 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -153,6 +153,13 @@ type ( GetActionableEquipments(uid string) (code pb.ErrorCode, eruips []*pb.DB_Equipment) //获取可用套装 (铁匠铺使用) GetActionableSuit(uid string) (code pb.ErrorCode, Suit []int32) + // 随机获得一件N级的装备装备 + /* + suiteId: 套装id + pos: 位置(-1 表示随机位置 大于0 表示获得指定位置 ) + lv: 装备等级 + */ + GetForgeEquip(suiteId int32, pos int32, lv int32) (eruip *pb.DB_Equipment, code pb.ErrorCode) } IMainline interface { ModifyMainlineDataByNanduID(uid string, nandu, id int32) (code pb.ErrorCode) diff --git a/modules/hero/configure_comp.go b/modules/hero/configure_comp.go index 37baee464..5c9f96175 100644 --- a/modules/hero/configure_comp.go +++ b/modules/hero/configure_comp.go @@ -136,12 +136,9 @@ func (this *configureComp) SetHeroDrawConfig() { err error ) if v, err = this.GetConfigure(hero_drawcard); err == nil { - if _configure, ok := v.(*cfg.GameDrawCard); !ok { - err = fmt.Errorf("%T no is *cfg.Game_drawCard", v) - return - } else { + if _configure, ok := v.(*cfg.GameDrawCard); ok { this.hlock.Lock() - defer this.hlock.Unlock() + this.drawCardCfg = make(map[string]map[int32][]*cfg.GameDrawCardData, 0) for _, v := range _configure.GetDataList() { if _, ok := this.drawCardCfg[v.CardPoolType]; !ok { this.drawCardCfg[v.CardPoolType] = make(map[int32][]*cfg.GameDrawCardData, 0) @@ -151,13 +148,15 @@ func (this *configureComp) SetHeroDrawConfig() { } this.drawCardCfg[v.CardPoolType][v.Star] = append(this.drawCardCfg[v.CardPoolType][v.Star], v) } + this.hlock.Unlock() + this.module.Debug("update cfg.Game_drawCard over") + return } - } else { - err = fmt.Errorf("%T no is *cfg.Game_drawCard", v) } - + err = fmt.Errorf("%T no is *cfg.Game_drawCard", v) return } + func (this *configureComp) GetPollByType(poosType string) map[int32][]*cfg.GameDrawCardData { return this.drawCardCfg[poosType] } diff --git a/modules/smithy/api_atlasaward.go b/modules/smithy/api_atlasaward.go index af9bdd41a..118983fd6 100644 --- a/modules/smithy/api_atlasaward.go +++ b/modules/smithy/api_atlasaward.go @@ -26,12 +26,12 @@ func (this *apiComp) AtlasAward(session comm.IUserSession, req *pb.SmithyAtlasAw return } - conf := this.module.configure.GetSmithyAtlasLvConf(atlas.Reward) + conf := this.module.configure.GetSmithyAtlasLvConf(atlas.Award) if conf == nil { code = pb.ErrorCode_ConfigNoFound return } - nexLv := this.module.configure.GetSmithyAtlasLvConf(atlas.Reward + 1) + nexLv := this.module.configure.GetSmithyAtlasLvConf(atlas.Award + 1) if nexLv == nil { //满级 code = pb.ErrorCode_SmithyAtlasMaxLv return diff --git a/modules/smithy/model_atlas.go b/modules/smithy/model_atlas.go index 2f84be35e..99f4530a7 100644 --- a/modules/smithy/model_atlas.go +++ b/modules/smithy/model_atlas.go @@ -34,7 +34,7 @@ func (this *modelAtlas) getSmithyAtlasList(uid string) (result *pb.DBAtlas, err result.Id = primitive.NewObjectID().Hex() result.Uid = uid result.Atlas = make(map[string]*pb.ForgeData, 0) - result.Reward = 1 // 初始1级 + result.Award = 1 // 初始1级 this.Add(uid, result) err = nil }