工具台 获取打造两件装备的接口

This commit is contained in:
meixiongfeng 2023-02-17 11:58:38 +08:00
parent ada84d90e2
commit 97f426ff35
4 changed files with 57 additions and 282 deletions

View File

@ -5,7 +5,7 @@
"card_pool_type": "base_pool1",
"star": 3,
"race": 1,
"id": "24004",
"id": "15005",
"weight": 1000
},
{
@ -14,7 +14,7 @@
"card_pool_type": "base_pool1",
"star": 4,
"race": 1,
"id": "24004",
"id": "15005",
"weight": 1000
},
{
@ -23,7 +23,7 @@
"card_pool_type": "base_pool1",
"star": 5,
"race": 1,
"id": "24004",
"id": "15005",
"weight": 1000
},
{
@ -32,7 +32,7 @@
"card_pool_type": "base_pool2",
"star": 3,
"race": 1,
"id": "25001",
"id": "24005",
"weight": 1000
},
{
@ -41,7 +41,7 @@
"card_pool_type": "base_pool2",
"star": 4,
"race": 1,
"id": "25001",
"id": "24005",
"weight": 1000
},
{
@ -50,7 +50,7 @@
"card_pool_type": "base_pool2",
"star": 5,
"race": 1,
"id": "25001",
"id": "24005",
"weight": 1000
},
{
@ -59,7 +59,7 @@
"card_pool_type": "base_pool3",
"star": 3,
"race": 1,
"id": "25004",
"id": "14001",
"weight": 1000
},
{
@ -68,7 +68,7 @@
"card_pool_type": "base_pool3",
"star": 4,
"race": 1,
"id": "25004",
"id": "14001",
"weight": 1000
},
{
@ -77,7 +77,7 @@
"card_pool_type": "base_pool3",
"star": 5,
"race": 1,
"id": "25004",
"id": "14001",
"weight": 1000
},
{
@ -86,7 +86,7 @@
"card_pool_type": "base_pool4",
"star": 3,
"race": 1,
"id": "24008",
"id": "14003",
"weight": 1000
},
{
@ -95,7 +95,7 @@
"card_pool_type": "base_pool4",
"star": 4,
"race": 1,
"id": "24008",
"id": "14003",
"weight": 1000
},
{
@ -104,7 +104,7 @@
"card_pool_type": "base_pool4",
"star": 5,
"race": 1,
"id": "24008",
"id": "14003",
"weight": 1000
},
{
@ -113,7 +113,7 @@
"card_pool_type": "base_pool5",
"star": 3,
"race": 1,
"id": "24003",
"id": "35006",
"weight": 1000
},
{
@ -122,7 +122,7 @@
"card_pool_type": "base_pool5",
"star": 4,
"race": 1,
"id": "24003",
"id": "35006",
"weight": 1000
},
{
@ -131,7 +131,7 @@
"card_pool_type": "base_pool5",
"star": 5,
"race": 1,
"id": "24003",
"id": "35006",
"weight": 1000
},
{
@ -140,7 +140,7 @@
"card_pool_type": "base_pool6",
"star": 3,
"race": 1,
"id": "44002",
"id": "34007",
"weight": 1000
},
{
@ -149,7 +149,7 @@
"card_pool_type": "base_pool6",
"star": 4,
"race": 1,
"id": "44002",
"id": "34007",
"weight": 1000
},
{
@ -158,268 +158,7 @@
"card_pool_type": "base_pool6",
"star": 5,
"race": 1,
"id": "44002",
"weight": 1000
},
{
"key": 19,
"recruitment_type": 1,
"card_pool_type": "base_pool2",
"star": 4,
"race": 3,
"id": "34006",
"weight": 1000
},
{
"key": 20,
"recruitment_type": 1,
"card_pool_type": "base_pool2",
"star": 5,
"race": 4,
"id": "45003",
"weight": 1000
},
{
"key": 21,
"recruitment_type": 1,
"card_pool_type": "base_pool2",
"star": 4,
"race": 4,
"id": "44005",
"weight": 1000
},
{
"key": 22,
"recruitment_type": 1,
"card_pool_type": "base_pool2",
"star": 4,
"race": 1,
"id": "14003",
"weight": 1000
},
{
"key": 23,
"recruitment_type": 1,
"card_pool_type": "base_pool2",
"star": 5,
"race": 1,
"id": "15005",
"weight": 1000
},
{
"key": 24,
"recruitment_type": 1,
"card_pool_type": "base_pool2",
"star": 4,
"race": 2,
"id": "24003",
"weight": 1000
},
{
"key": 25,
"recruitment_type": 1,
"card_pool_type": "base_pool2",
"star": 4,
"race": 2,
"id": "24008",
"weight": 1000
},
{
"key": 26,
"recruitment_type": 1,
"card_pool_type": "base_pool2",
"star": 5,
"race": 2,
"id": "25001",
"weight": 1000
},
{
"key": 27,
"recruitment_type": 1,
"card_pool_type": "base_pool2",
"star": 5,
"race": 2,
"id": "25004",
"weight": 1000
},
{
"key": 28,
"recruitment_type": 1,
"card_pool_type": "base_pool2",
"star": 5,
"race": 3,
"id": "35006",
"weight": 1000
},
{
"key": 29,
"recruitment_type": 1,
"card_pool_type": "base_pool2",
"star": 4,
"race": 4,
"id": "44002",
"weight": 1000
},
{
"key": 30,
"recruitment_type": 1,
"card_pool_type": "base_pool2",
"star": 3,
"race": 2,
"id": "24002",
"weight": 1000
},
{
"key": 31,
"recruitment_type": 1,
"card_pool_type": "base_pool2",
"star": 4,
"race": 2,
"id": "24004",
"weight": 1000
},
{
"key": 32,
"recruitment_type": 1,
"card_pool_type": "base_pool2",
"star": 5,
"race": 2,
"id": "35001",
"weight": 1000
},
{
"key": 33,
"recruitment_type": 1,
"card_pool_type": "base_pool6",
"star": 3,
"race": 1,
"id": "13003",
"weight": 1000
},
{
"key": 34,
"recruitment_type": 1,
"card_pool_type": "base_pool6",
"star": 4,
"race": 4,
"id": "44006",
"weight": 1000
},
{
"key": 35,
"recruitment_type": 1,
"card_pool_type": "base_pool6",
"star": 5,
"race": 2,
"id": "35001",
"weight": 1000
},
{
"key": 36,
"recruitment_type": 1,
"card_pool_type": "base_pool6",
"star": 4,
"race": 4,
"id": "44005",
"weight": 1000
},
{
"key": 37,
"recruitment_type": 1,
"card_pool_type": "base_pool6",
"star": 5,
"race": 1,
"id": "15004",
"weight": 1000
},
{
"key": 38,
"recruitment_type": 1,
"card_pool_type": "base_pool6",
"star": 3,
"race": 2,
"id": "24002",
"weight": 1000
},
{
"key": 39,
"recruitment_type": 1,
"card_pool_type": "base_pool6",
"star": 4,
"race": 4,
"id": "45003",
"weight": 1000
},
{
"key": 40,
"recruitment_type": 1,
"card_pool_type": "base_pool6",
"star": 4,
"race": 1,
"id": "14003",
"weight": 1000
},
{
"key": 41,
"recruitment_type": 1,
"card_pool_type": "base_pool6",
"star": 5,
"race": 1,
"id": "15005",
"weight": 1000
},
{
"key": 42,
"recruitment_type": 1,
"card_pool_type": "base_pool6",
"star": 4,
"race": 2,
"id": "24003",
"weight": 1000
},
{
"key": 43,
"recruitment_type": 1,
"card_pool_type": "base_pool6",
"star": 4,
"race": 2,
"id": "24004",
"weight": 1000
},
{
"key": 44,
"recruitment_type": 1,
"card_pool_type": "base_pool6",
"star": 5,
"race": 2,
"id": "25004",
"weight": 1000
},
{
"key": 45,
"recruitment_type": 1,
"card_pool_type": "base_pool6",
"star": 4,
"race": 3,
"id": "34006",
"weight": 1000
},
{
"key": 46,
"recruitment_type": 1,
"card_pool_type": "base_pool6",
"star": 5,
"race": 2,
"id": "25001",
"weight": 1000
},
{
"key": 47,
"recruitment_type": 1,
"card_pool_type": "base_pool6",
"star": 4,
"race": 1,
"id": "14007",
"id": "34007",
"weight": 1000
},
{

View File

@ -732,4 +732,13 @@ const (
SmithyReelType2 = 2 // 材料消耗减少
SmithyReelType3 = 3 // 解锁图纸【紫金雷神锤】
SmithyReelType4 = 4
SmithyReelType5 = 5 // 概率制造两件装备
)
const (
SmithyToolsSkill1 = 1 // 史诗品质概率提升
SmithyToolsSkill2 = 2 // 所有装备售价提升
SmithyToolsSkill3 = 3 // 所有图纸炉温消耗减少
SmithyToolsSkill4 = 4 // 每日顾客数量提升至{0}人
SmithyToolsSkill5 = 5 // 顾客购买装备数量上限提高至{0}件
)

View File

@ -140,6 +140,8 @@ func (this *configureComp) SetHeroDrawConfig() {
err = fmt.Errorf("%T no is *cfg.Game_drawCard", v)
return
} else {
this.hlock.Lock()
defer this.hlock.Unlock()
for _, v := range _configure.GetDataList() {
if _, ok := this.drawCardCfg[v.CardPoolType]; !ok {
this.drawCardCfg[v.CardPoolType] = make(map[int32][]*cfg.GameDrawCardData, 0)

View File

@ -8,7 +8,9 @@ import (
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs"
"math/rand"
"strconv"
"time"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
@ -66,15 +68,38 @@ func (this *modelStove) updateSmithyStove(uid string, update map[string]interfac
func (this *modelStove) CheckTemperature(reelId int32, lv int32) (t int32) {
var index int32
for index = 1; index <= lv; index++ {
if cfg := this.module.configure.GetSmithyProficileData(reelId, index); cfg != nil {
if cfg.Type == comm.SmithyReelType1 {
t += cfg.Value1
if cfgData := this.module.configure.GetSmithyProficileData(reelId, index); cfgData != nil {
if cfgData.Type == comm.SmithyReelType1 {
t += cfgData.Value1
}
}
}
return
}
// 检查额外概率制造两件装备
func (this *modelStove) CheckForgetwoEquip(reelId int32, lv int32) (b bool) {
var (
index int32
value int32
)
for index = 1; index <= lv; index++ {
if cfgData := this.module.configure.GetSmithyProficileData(reelId, index); cfgData != nil {
if cfgData.Type == comm.SmithyReelType5 {
value += cfgData.Value1
}
}
}
if value > 0 {
rand.Seed(time.Now().UnixNano())
if value < int32(rand.Intn(100)) {
return true
}
}
return false
}
// 检查消耗减少
func (this *modelStove) CheckForgeConsume(reelId int32, lv int32) (atn []*cfg.Gameatn) {
var index int32