铁匠铺升级台子缩短总订单时长
This commit is contained in:
parent
5d0e95b627
commit
a7777dc379
@ -35,7 +35,7 @@
|
|||||||
{
|
{
|
||||||
"a": "equi",
|
"a": "equi",
|
||||||
"t": "10051",
|
"t": "10051",
|
||||||
"n": 100
|
"n": 10
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -45,7 +45,7 @@
|
|||||||
{
|
{
|
||||||
"a": "equi",
|
"a": "equi",
|
||||||
"t": "10052",
|
"t": "10052",
|
||||||
"n": 100
|
"n": 10
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -55,7 +55,7 @@
|
|||||||
{
|
{
|
||||||
"a": "equi",
|
"a": "equi",
|
||||||
"t": "10053",
|
"t": "10053",
|
||||||
"n": 100
|
"n": 10
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -65,7 +65,7 @@
|
|||||||
{
|
{
|
||||||
"a": "equi",
|
"a": "equi",
|
||||||
"t": "10054",
|
"t": "10054",
|
||||||
"n": 100
|
"n": 10
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -75,7 +75,7 @@
|
|||||||
{
|
{
|
||||||
"a": "equi",
|
"a": "equi",
|
||||||
"t": "10055",
|
"t": "10055",
|
||||||
"n": 100
|
"n": 10
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -85,7 +85,7 @@
|
|||||||
{
|
{
|
||||||
"a": "equi",
|
"a": "equi",
|
||||||
"t": "10056",
|
"t": "10056",
|
||||||
"n": 100
|
"n": 10
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -225,7 +225,7 @@
|
|||||||
{
|
{
|
||||||
"a": "item",
|
"a": "item",
|
||||||
"t": "50001",
|
"t": "50001",
|
||||||
"n": 200
|
"n": 2000
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -235,7 +235,7 @@
|
|||||||
{
|
{
|
||||||
"a": "item",
|
"a": "item",
|
||||||
"t": "50002",
|
"t": "50002",
|
||||||
"n": 200
|
"n": 2000
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -245,7 +245,7 @@
|
|||||||
{
|
{
|
||||||
"a": "item",
|
"a": "item",
|
||||||
"t": "50003",
|
"t": "50003",
|
||||||
"n": 200
|
"n": 2000
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
"type": 4,
|
"type": 4,
|
||||||
"opentime": [
|
"opentime": [
|
||||||
1,
|
1,
|
||||||
7
|
0
|
||||||
],
|
],
|
||||||
"name": {
|
"name": {
|
||||||
"key": "hunting_boss_1004",
|
"key": "hunting_boss_1004",
|
||||||
|
@ -209,7 +209,7 @@
|
|||||||
"key": "num_1004",
|
"key": "num_1004",
|
||||||
"text": "武馆入口"
|
"text": "武馆入口"
|
||||||
},
|
},
|
||||||
"main": 999,
|
"main": 1,
|
||||||
"optional": "",
|
"optional": "",
|
||||||
"wkqbx": 0,
|
"wkqbx": 0,
|
||||||
"kqbx": 0,
|
"kqbx": 0,
|
||||||
@ -464,7 +464,7 @@
|
|||||||
"key": "num_1017",
|
"key": "num_1017",
|
||||||
"text": "美食馆"
|
"text": "美食馆"
|
||||||
},
|
},
|
||||||
"main": 999,
|
"main": 1,
|
||||||
"optional": "",
|
"optional": "",
|
||||||
"wkqbx": 0,
|
"wkqbx": 0,
|
||||||
"kqbx": 0,
|
"kqbx": 0,
|
||||||
@ -481,7 +481,7 @@
|
|||||||
"key": "num_1018",
|
"key": "num_1018",
|
||||||
"text": "戈伯铁匠铺"
|
"text": "戈伯铁匠铺"
|
||||||
},
|
},
|
||||||
"main": 999,
|
"main": 1,
|
||||||
"optional": "",
|
"optional": "",
|
||||||
"wkqbx": 0,
|
"wkqbx": 0,
|
||||||
"kqbx": 0,
|
"kqbx": 0,
|
||||||
|
@ -1165,7 +1165,7 @@
|
|||||||
"key": "skill_buffdes_390001209",
|
"key": "skill_buffdes_390001209",
|
||||||
"text": ""
|
"text": ""
|
||||||
},
|
},
|
||||||
"BuffType": 0,
|
"BuffType": 39,
|
||||||
"EffectArgu": [],
|
"EffectArgu": [],
|
||||||
"BufParNum": 1,
|
"BufParNum": 1,
|
||||||
"RelyCheckArgu": [],
|
"RelyCheckArgu": [],
|
||||||
@ -1863,7 +1863,7 @@
|
|||||||
},
|
},
|
||||||
"BuffType": 31,
|
"BuffType": 31,
|
||||||
"EffectArgu": [
|
"EffectArgu": [
|
||||||
400
|
40
|
||||||
],
|
],
|
||||||
"BufParNum": 1,
|
"BufParNum": 1,
|
||||||
"RelyCheckArgu": [],
|
"RelyCheckArgu": [],
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
],
|
],
|
||||||
"probability": 100,
|
"probability": 100,
|
||||||
"floors": 1,
|
"floors": 1,
|
||||||
"time": 300,
|
"time": 290,
|
||||||
"desk": ""
|
"desk": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -71,7 +71,7 @@
|
|||||||
],
|
],
|
||||||
"probability": 100,
|
"probability": 100,
|
||||||
"floors": 1,
|
"floors": 1,
|
||||||
"time": 300,
|
"time": 280,
|
||||||
"desk": ""
|
"desk": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -96,7 +96,7 @@
|
|||||||
],
|
],
|
||||||
"probability": 100,
|
"probability": 100,
|
||||||
"floors": 2,
|
"floors": 2,
|
||||||
"time": 300,
|
"time": 270,
|
||||||
"desk": ""
|
"desk": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -121,7 +121,7 @@
|
|||||||
],
|
],
|
||||||
"probability": 100,
|
"probability": 100,
|
||||||
"floors": 3,
|
"floors": 3,
|
||||||
"time": 300,
|
"time": 260,
|
||||||
"desk": ""
|
"desk": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -146,7 +146,7 @@
|
|||||||
],
|
],
|
||||||
"probability": 100,
|
"probability": 100,
|
||||||
"floors": 4,
|
"floors": 4,
|
||||||
"time": 300,
|
"time": 250,
|
||||||
"desk": ""
|
"desk": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -171,7 +171,7 @@
|
|||||||
],
|
],
|
||||||
"probability": 100,
|
"probability": 100,
|
||||||
"floors": 5,
|
"floors": 5,
|
||||||
"time": 300,
|
"time": 240,
|
||||||
"desk": ""
|
"desk": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -196,7 +196,7 @@
|
|||||||
],
|
],
|
||||||
"probability": 100,
|
"probability": 100,
|
||||||
"floors": 5,
|
"floors": 5,
|
||||||
"time": 300,
|
"time": 230,
|
||||||
"desk": ""
|
"desk": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -221,7 +221,7 @@
|
|||||||
],
|
],
|
||||||
"probability": 100,
|
"probability": 100,
|
||||||
"floors": 5,
|
"floors": 5,
|
||||||
"time": 300,
|
"time": 220,
|
||||||
"desk": ""
|
"desk": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -235,7 +235,7 @@
|
|||||||
"starupneed": [],
|
"starupneed": [],
|
||||||
"probability": 100,
|
"probability": 100,
|
||||||
"floors": -1,
|
"floors": -1,
|
||||||
"time": 300,
|
"time": 210,
|
||||||
"desk": ""
|
"desk": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -8577,7 +8577,7 @@
|
|||||||
"place": 0,
|
"place": 0,
|
||||||
"speak": "45003",
|
"speak": "45003",
|
||||||
"listen": "",
|
"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": "",
|
"modelstatetarget": "",
|
||||||
"modelstate": 0,
|
"modelstate": 0,
|
||||||
"modelaction": "",
|
"modelaction": "",
|
||||||
@ -8745,7 +8745,7 @@
|
|||||||
"place": 0,
|
"place": 0,
|
||||||
"speak": "45003",
|
"speak": "45003",
|
||||||
"listen": "",
|
"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": "",
|
"modelstatetarget": "",
|
||||||
"modelstate": 0,
|
"modelstate": 0,
|
||||||
"modelaction": "",
|
"modelaction": "",
|
||||||
@ -8913,7 +8913,7 @@
|
|||||||
"place": 1,
|
"place": 1,
|
||||||
"speak": "44005",
|
"speak": "44005",
|
||||||
"listen": "",
|
"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": "",
|
"modelstatetarget": "",
|
||||||
"modelstate": 0,
|
"modelstate": 0,
|
||||||
"modelaction": "",
|
"modelaction": "",
|
||||||
@ -8969,7 +8969,7 @@
|
|||||||
"place": 0,
|
"place": 0,
|
||||||
"speak": "14007",
|
"speak": "14007",
|
||||||
"listen": "",
|
"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": "",
|
"modelstatetarget": "",
|
||||||
"modelstate": 0,
|
"modelstate": 0,
|
||||||
"modelaction": "",
|
"modelaction": "",
|
||||||
@ -9193,7 +9193,7 @@
|
|||||||
"place": 0,
|
"place": 0,
|
||||||
"speak": "14007",
|
"speak": "14007",
|
||||||
"listen": "",
|
"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": "",
|
"modelstatetarget": "",
|
||||||
"modelstate": 0,
|
"modelstate": 0,
|
||||||
"modelaction": "",
|
"modelaction": "",
|
||||||
@ -10313,7 +10313,7 @@
|
|||||||
"place": 0,
|
"place": 0,
|
||||||
"speak": "44005",
|
"speak": "44005",
|
||||||
"listen": "",
|
"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": "",
|
"modelstatetarget": "",
|
||||||
"modelstate": 0,
|
"modelstate": 0,
|
||||||
"modelaction": "",
|
"modelaction": "",
|
||||||
|
@ -138,6 +138,8 @@ func (this *modelGourmet) CalculationGourmet(uid string, gourmet *pb.DBGourmet)
|
|||||||
if nextDay {
|
if nextDay {
|
||||||
nextDayTime += szTime[order.FoodType]
|
nextDayTime += szTime[order.FoodType]
|
||||||
}
|
}
|
||||||
|
gourmet.Items = this.module.configure.GetMultipleDropReward(_gourmetcfg.Using, _gourmetcfg.Propsgroup, gourmet.Items) // 获取掉落奖励
|
||||||
|
|
||||||
if curTime > costTime {
|
if curTime > costTime {
|
||||||
// 转时间戳
|
// 转时间戳
|
||||||
gourmet.CookingFood.FoodType = order.FoodType
|
gourmet.CookingFood.FoodType = order.FoodType
|
||||||
@ -148,11 +150,9 @@ func (this *modelGourmet) CalculationGourmet(uid string, gourmet *pb.DBGourmet)
|
|||||||
// 记录下订单时间
|
// 记录下订单时间
|
||||||
gourmet.Ctime = time.Now().Unix()
|
gourmet.Ctime = time.Now().Unix()
|
||||||
mapData["ctime"] = gourmet.Ctime
|
mapData["ctime"] = gourmet.Ctime
|
||||||
|
|
||||||
}
|
|
||||||
gourmet.Items = this.module.configure.GetMultipleDropReward(_gourmetcfg.Using, _gourmetcfg.Propsgroup, gourmet.Items) // 获取掉落奖励
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if bCooking { // 分配了正在製作的食物
|
if bCooking { // 分配了正在製作的食物
|
||||||
break
|
break
|
||||||
|
@ -82,7 +82,8 @@ func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.SmithyCreate
|
|||||||
if cfgCom == nil {
|
if cfgCom == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if cfgCom.SmithyMaxtime < _smithy.OrderCostTime+costTime { // 大于总时长是不允许的
|
_smithy.OrderCostTime += costTime
|
||||||
|
if cfgCom.SmithyMaxtime < _smithy.OrderCostTime { // 大于总时长是不允许的
|
||||||
code = pb.ErrorCode_GourmetMoreOrderTime
|
code = pb.ErrorCode_GourmetMoreOrderTime
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -128,6 +128,7 @@ func (this *modelSmithy) CalculationSmithy(uid string, smithy *pb.DBSmithy) {
|
|||||||
if nextDay {
|
if nextDay {
|
||||||
nextDayTime += szTime[order.DeskType]
|
nextDayTime += szTime[order.DeskType]
|
||||||
}
|
}
|
||||||
|
smithy.Items = this.module.configure.GetMultipleDropReward(_smithycfg.Using, _smithycfg.Drop, smithy.Items) // 获取掉落奖励
|
||||||
if curTime > costTime {
|
if curTime > costTime {
|
||||||
// 转时间戳
|
// 转时间戳
|
||||||
smithy.Clang.DeskType = order.DeskType
|
smithy.Clang.DeskType = order.DeskType
|
||||||
@ -141,7 +142,6 @@ func (this *modelSmithy) CalculationSmithy(uid string, smithy *pb.DBSmithy) {
|
|||||||
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
smithy.Items = this.module.configure.GetMultipleDropReward(_smithycfg.Using, _smithycfg.Drop, smithy.Items) // 获取掉落奖励
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if bCooking { // 分配了正在製作的食物
|
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) {
|
func (this *modelSmithy) CalculationStoveSkillLv(uid string, Smithy *pb.DBSmithy, stoveSkillLv int32) {
|
||||||
mapData := make(map[string]interface{}, 0)
|
mapData := make(map[string]interface{}, 0)
|
||||||
|
|
||||||
|
var totalTime int32
|
||||||
for _, v := range Smithy.Orders {
|
for _, v := range Smithy.Orders {
|
||||||
if v.Count > 0 {
|
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)
|
_skillCfg := this.module.configure.GetSmithyStoveConfigData(stoveSkillLv)
|
||||||
if _skillCfg != nil {
|
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 { // 担心配置错误 为负数情况 所以这里做下判断
|
if v.NeedTime < 0 { // 担心配置错误 为负数情况 所以这里做下判断
|
||||||
v.NeedTime = 0
|
v.NeedTime = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
mapData["orders"] = Smithy.Orders
|
mapData["orders"] = Smithy.Orders
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mapData["stoveLv"] = Smithy.StoveLv
|
mapData["stoveLv"] = Smithy.StoveLv
|
||||||
mapData["deskFloor"] = Smithy.DeskFloor
|
mapData["deskFloor"] = Smithy.DeskFloor
|
||||||
|
Smithy.OrderCostTime += totalTime
|
||||||
|
mapData["orderCostTime"] = Smithy.OrderCostTime
|
||||||
this.module.ModifySmithyData(uid, mapData)
|
this.module.ModifySmithyData(uid, mapData)
|
||||||
}
|
}
|
||||||
|
@ -48,4 +48,5 @@ const (
|
|||||||
GameBuffType_NOTGAIN = 36
|
GameBuffType_NOTGAIN = 36
|
||||||
GameBuffType_NOTCONTROL = 37
|
GameBuffType_NOTCONTROL = 37
|
||||||
GameBuffType_SLEEP = 38
|
GameBuffType_SLEEP = 38
|
||||||
|
GameBuffType_XUANYU = 39
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user