铁匠铺升级台子缩短总订单时长

This commit is contained in:
meixiongfeng 2022-10-10 10:47:07 +08:00
parent 5d0e95b627
commit a7777dc379
10 changed files with 51 additions and 37 deletions

View File

@ -35,7 +35,7 @@
{
"a": "equi",
"t": "10051",
"n": 100
"n": 10
}
]
},
@ -45,7 +45,7 @@
{
"a": "equi",
"t": "10052",
"n": 100
"n": 10
}
]
},
@ -55,7 +55,7 @@
{
"a": "equi",
"t": "10053",
"n": 100
"n": 10
}
]
},
@ -65,7 +65,7 @@
{
"a": "equi",
"t": "10054",
"n": 100
"n": 10
}
]
},
@ -75,7 +75,7 @@
{
"a": "equi",
"t": "10055",
"n": 100
"n": 10
}
]
},
@ -85,7 +85,7 @@
{
"a": "equi",
"t": "10056",
"n": 100
"n": 10
}
]
},
@ -225,7 +225,7 @@
{
"a": "item",
"t": "50001",
"n": 200
"n": 2000
}
]
},
@ -235,7 +235,7 @@
{
"a": "item",
"t": "50002",
"n": 200
"n": 2000
}
]
},
@ -245,7 +245,7 @@
{
"a": "item",
"t": "50003",
"n": 200
"n": 2000
}
]
},

View File

@ -60,7 +60,7 @@
"type": 4,
"opentime": [
1,
7
0
],
"name": {
"key": "hunting_boss_1004",

View File

@ -209,7 +209,7 @@
"key": "num_1004",
"text": "武馆入口"
},
"main": 999,
"main": 1,
"optional": "",
"wkqbx": 0,
"kqbx": 0,
@ -464,7 +464,7 @@
"key": "num_1017",
"text": "美食馆"
},
"main": 999,
"main": 1,
"optional": "",
"wkqbx": 0,
"kqbx": 0,
@ -481,7 +481,7 @@
"key": "num_1018",
"text": "戈伯铁匠铺"
},
"main": 999,
"main": 1,
"optional": "",
"wkqbx": 0,
"kqbx": 0,

View File

@ -1165,7 +1165,7 @@
"key": "skill_buffdes_390001209",
"text": ""
},
"BuffType": 0,
"BuffType": 39,
"EffectArgu": [],
"BufParNum": 1,
"RelyCheckArgu": [],
@ -1863,7 +1863,7 @@
},
"BuffType": 31,
"EffectArgu": [
400
40
],
"BufParNum": 1,
"RelyCheckArgu": [],

View File

@ -46,7 +46,7 @@
],
"probability": 100,
"floors": 1,
"time": 300,
"time": 290,
"desk": ""
},
{
@ -71,7 +71,7 @@
],
"probability": 100,
"floors": 1,
"time": 300,
"time": 280,
"desk": ""
},
{
@ -96,7 +96,7 @@
],
"probability": 100,
"floors": 2,
"time": 300,
"time": 270,
"desk": ""
},
{
@ -121,7 +121,7 @@
],
"probability": 100,
"floors": 3,
"time": 300,
"time": 260,
"desk": ""
},
{
@ -146,7 +146,7 @@
],
"probability": 100,
"floors": 4,
"time": 300,
"time": 250,
"desk": ""
},
{
@ -171,7 +171,7 @@
],
"probability": 100,
"floors": 5,
"time": 300,
"time": 240,
"desk": ""
},
{
@ -196,7 +196,7 @@
],
"probability": 100,
"floors": 5,
"time": 300,
"time": 230,
"desk": ""
},
{
@ -221,7 +221,7 @@
],
"probability": 100,
"floors": 5,
"time": 300,
"time": 220,
"desk": ""
},
{
@ -235,7 +235,7 @@
"starupneed": [],
"probability": 100,
"floors": -1,
"time": 300,
"time": 210,
"desk": ""
}
]

View File

@ -8577,7 +8577,7 @@
"place": 0,
"speak": "45003",
"listen": "",
"des": "Maybe we should go to the Tower of Evil, where the villains gather. The[color=#6dba00] mini globe[/color] must have been stolen by them.",
"des": "Maybe we should go to the GUARD, where the villains gather. The[color=#6dba00] mini globe[/color] must have been stolen by them.",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
@ -8745,7 +8745,7 @@
"place": 0,
"speak": "45003",
"listen": "",
"des": "Click Recruit on the left to find a friend, or I can take you directly to Recruit and find a new friend.",
"des": "Click [color=#6dba00]Echo [/color]on the left to find a friend, or I can take you directly to Recruit and find a new friend.",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
@ -8913,7 +8913,7 @@
"place": 1,
"speak": "44005",
"listen": "",
"des": "Wow, it's Gristle! It's great that you can help. Let's go to the[color=#6dba00] Tower of Evil[/color].",
"des": "Wow, it's Gristle! It's great that you can help. Let's go to the[color=#6dba00] GUARD[/color].",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
@ -8969,7 +8969,7 @@
"place": 0,
"speak": "14007",
"listen": "",
"des": "Wait, the[color=#6dba00] Tower of Evil [/color]is filled with dark energy, let's level up to 10 first!",
"des": "Wait, the[color=#6dba00] GUARD [/color]is filled with dark energy, let's level up to 10 first!",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
@ -9193,7 +9193,7 @@
"place": 0,
"speak": "14007",
"listen": "",
"des": "Great, we can go to the [color=#6dba00]Tower of Evil[/color] now!",
"des": "Great, we can go to the [color=#6dba00]GUARD[/color] now!",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
@ -10313,7 +10313,7 @@
"place": 0,
"speak": "44005",
"listen": "",
"des": "[color=#6dba00]Click Recruit on the left to find a friend[/color], or I can take you directly to Recruit. Up to you!",
"des": "[color=#6dba00]Click Echo on the left to find a friend[/color], or I can take you directly to Recruit. Up to you!",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",

View File

@ -138,6 +138,8 @@ func (this *modelGourmet) CalculationGourmet(uid string, gourmet *pb.DBGourmet)
if nextDay {
nextDayTime += szTime[order.FoodType]
}
gourmet.Items = this.module.configure.GetMultipleDropReward(_gourmetcfg.Using, _gourmetcfg.Propsgroup, gourmet.Items) // 获取掉落奖励
if curTime > costTime {
// 转时间戳
gourmet.CookingFood.FoodType = order.FoodType
@ -148,11 +150,9 @@ func (this *modelGourmet) CalculationGourmet(uid string, gourmet *pb.DBGourmet)
// 记录下订单时间
gourmet.Ctime = time.Now().Unix()
mapData["ctime"] = gourmet.Ctime
}
gourmet.Items = this.module.configure.GetMultipleDropReward(_gourmetcfg.Using, _gourmetcfg.Propsgroup, gourmet.Items) // 获取掉落奖励
break
}
}
if bCooking { // 分配了正在製作的食物
break

View File

@ -82,7 +82,8 @@ func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.SmithyCreate
if cfgCom == nil {
return
}
if cfgCom.SmithyMaxtime < _smithy.OrderCostTime+costTime { // 大于总时长是不允许的
_smithy.OrderCostTime += costTime
if cfgCom.SmithyMaxtime < _smithy.OrderCostTime { // 大于总时长是不允许的
code = pb.ErrorCode_GourmetMoreOrderTime
return
}

View File

@ -128,6 +128,7 @@ func (this *modelSmithy) CalculationSmithy(uid string, smithy *pb.DBSmithy) {
if nextDay {
nextDayTime += szTime[order.DeskType]
}
smithy.Items = this.module.configure.GetMultipleDropReward(_smithycfg.Using, _smithycfg.Drop, smithy.Items) // 获取掉落奖励
if curTime > costTime {
// 转时间戳
smithy.Clang.DeskType = order.DeskType
@ -141,7 +142,6 @@ func (this *modelSmithy) CalculationSmithy(uid string, smithy *pb.DBSmithy) {
break
}
smithy.Items = this.module.configure.GetMultipleDropReward(_smithycfg.Using, _smithycfg.Drop, smithy.Items) // 获取掉落奖励
}
if bCooking { // 分配了正在製作的食物
@ -187,19 +187,31 @@ func (this *modelSmithy) CalculationDeskSkillLv(uid string, Smithy *pb.DBSmithy)
func (this *modelSmithy) CalculationStoveSkillLv(uid string, Smithy *pb.DBSmithy, stoveSkillLv int32) {
mapData := make(map[string]interface{}, 0)
var totalTime int32
for _, v := range Smithy.Orders {
if v.Count > 0 {
preScaleTime := 0
preSkillConf := this.module.configure.GetSmithyStoveConfigData(stoveSkillLv - 1)
if preSkillConf != nil {
preScaleTime += int(preSkillConf.Time)
}
_skillCfg := this.module.configure.GetSmithyStoveConfigData(stoveSkillLv)
if _skillCfg != nil {
v.NeedTime += _skillCfg.Time * v.Count
scaleTime := (_skillCfg.Time - int32(preScaleTime)) * v.Count
v.NeedTime += scaleTime
totalTime += scaleTime
if v.NeedTime < 0 { // 担心配置错误 为负数情况 所以这里做下判断
v.NeedTime = 0
}
}
}
}
mapData["orders"] = Smithy.Orders
}
}
}
mapData["stoveLv"] = Smithy.StoveLv
mapData["deskFloor"] = Smithy.DeskFloor
Smithy.OrderCostTime += totalTime
mapData["orderCostTime"] = Smithy.OrderCostTime
this.module.ModifySmithyData(uid, mapData)
}

View File

@ -48,4 +48,5 @@ const (
GameBuffType_NOTGAIN = 36
GameBuffType_NOTCONTROL = 37
GameBuffType_SLEEP = 38
GameBuffType_XUANYU = 39
)