获取指定装备接口
This commit is contained in:
parent
45e97a5927
commit
d6a8833394
@ -6,7 +6,7 @@
|
|||||||
"star": 3,
|
"star": 3,
|
||||||
"race": 1,
|
"race": 1,
|
||||||
"id": "35006",
|
"id": "35006",
|
||||||
"weight": 1000
|
"weight": 10000
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 2,
|
"key": 2,
|
||||||
|
@ -153,6 +153,13 @@ type (
|
|||||||
GetActionableEquipments(uid string) (code pb.ErrorCode, eruips []*pb.DB_Equipment)
|
GetActionableEquipments(uid string) (code pb.ErrorCode, eruips []*pb.DB_Equipment)
|
||||||
//获取可用套装 (铁匠铺使用)
|
//获取可用套装 (铁匠铺使用)
|
||||||
GetActionableSuit(uid string) (code pb.ErrorCode, Suit []int32)
|
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 {
|
IMainline interface {
|
||||||
ModifyMainlineDataByNanduID(uid string, nandu, id int32) (code pb.ErrorCode)
|
ModifyMainlineDataByNanduID(uid string, nandu, id int32) (code pb.ErrorCode)
|
||||||
|
@ -136,12 +136,9 @@ func (this *configureComp) SetHeroDrawConfig() {
|
|||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
if v, err = this.GetConfigure(hero_drawcard); err == nil {
|
if v, err = this.GetConfigure(hero_drawcard); err == nil {
|
||||||
if _configure, ok := v.(*cfg.GameDrawCard); !ok {
|
if _configure, ok := v.(*cfg.GameDrawCard); ok {
|
||||||
err = fmt.Errorf("%T no is *cfg.Game_drawCard", v)
|
|
||||||
return
|
|
||||||
} else {
|
|
||||||
this.hlock.Lock()
|
this.hlock.Lock()
|
||||||
defer this.hlock.Unlock()
|
this.drawCardCfg = make(map[string]map[int32][]*cfg.GameDrawCardData, 0)
|
||||||
for _, v := range _configure.GetDataList() {
|
for _, v := range _configure.GetDataList() {
|
||||||
if _, ok := this.drawCardCfg[v.CardPoolType]; !ok {
|
if _, ok := this.drawCardCfg[v.CardPoolType]; !ok {
|
||||||
this.drawCardCfg[v.CardPoolType] = make(map[int32][]*cfg.GameDrawCardData, 0)
|
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.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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *configureComp) GetPollByType(poosType string) map[int32][]*cfg.GameDrawCardData {
|
func (this *configureComp) GetPollByType(poosType string) map[int32][]*cfg.GameDrawCardData {
|
||||||
return this.drawCardCfg[poosType]
|
return this.drawCardCfg[poosType]
|
||||||
}
|
}
|
||||||
|
@ -26,12 +26,12 @@ func (this *apiComp) AtlasAward(session comm.IUserSession, req *pb.SmithyAtlasAw
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
conf := this.module.configure.GetSmithyAtlasLvConf(atlas.Reward)
|
conf := this.module.configure.GetSmithyAtlasLvConf(atlas.Award)
|
||||||
if conf == nil {
|
if conf == nil {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
nexLv := this.module.configure.GetSmithyAtlasLvConf(atlas.Reward + 1)
|
nexLv := this.module.configure.GetSmithyAtlasLvConf(atlas.Award + 1)
|
||||||
if nexLv == nil { //满级
|
if nexLv == nil { //满级
|
||||||
code = pb.ErrorCode_SmithyAtlasMaxLv
|
code = pb.ErrorCode_SmithyAtlasMaxLv
|
||||||
return
|
return
|
||||||
|
@ -34,7 +34,7 @@ func (this *modelAtlas) getSmithyAtlasList(uid string) (result *pb.DBAtlas, err
|
|||||||
result.Id = primitive.NewObjectID().Hex()
|
result.Id = primitive.NewObjectID().Hex()
|
||||||
result.Uid = uid
|
result.Uid = uid
|
||||||
result.Atlas = make(map[string]*pb.ForgeData, 0)
|
result.Atlas = make(map[string]*pb.ForgeData, 0)
|
||||||
result.Reward = 1 // 初始1级
|
result.Award = 1 // 初始1级
|
||||||
this.Add(uid, result)
|
this.Add(uid, result)
|
||||||
err = nil
|
err = nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user