From 4de830806d3474241f433f624162c2067129eecf Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 17 Feb 2023 16:35:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=85=B7=E5=8F=B0=E6=8A=80=E8=83=BD?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=8A=A0=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/smithy/comp_configure.go | 2 ++ modules/smithy/model_stove.go | 59 ++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/modules/smithy/comp_configure.go b/modules/smithy/comp_configure.go index 704822656..df5a2f45a 100644 --- a/modules/smithy/comp_configure.go +++ b/modules/smithy/comp_configure.go @@ -61,6 +61,8 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp err = this.LoadConfigure(game_smithystoveold, cfg.NewGameSmithyStove) err = this.LoadConfigure(game_smithycustomer, cfg.NewGameSmithyCustomer) + _d := this.GetSmithProficiencyConf(1) + this.module.Errorf("%v", _d) return } diff --git a/modules/smithy/model_stove.go b/modules/smithy/model_stove.go index 62d0edf41..efffbb945 100644 --- a/modules/smithy/model_stove.go +++ b/modules/smithy/model_stove.go @@ -140,3 +140,62 @@ func (this *modelStove) calculationRecoveryT(uid string, stove *pb.DBStove) { this.module.modelStove.updateSmithyStove(uid, update) } } + +// 通过技能获取额外的提升 +func (this *modelStove) StoveToolsQualityProbability(stove *pb.DBStove) int32 { + if v, ok := stove.Skill[comm.SmithyToolsSkill1]; ok { + if conf := this.module.configure.GetSmithySkill(comm.SmithyToolsSkill1, v); conf != nil { + return conf.Value + } + } + return 0 +} + +// 所有装备售价提升{0}% +func (this *modelStove) StoveToolsSellUp(uid string) int32 { + stove, err := this.module.modelStove.getSmithyStoveList(uid) + if err != nil { + if v, ok := stove.Skill[comm.SmithyToolsSkill2]; ok { + if conf := this.module.configure.GetSmithySkill(comm.SmithyToolsSkill1, v); conf != nil { + return conf.Value + } + } + } + return 0 +} + +// 所有图纸炉温消耗减少 +func (this *modelStove) StoveToolsTemperature(stove *pb.DBStove) int32 { + if v, ok := stove.Skill[comm.SmithyToolsSkill3]; ok { + if conf := this.module.configure.GetSmithySkill(comm.SmithyToolsSkill1, v); conf != nil { + return conf.Value + } + } + return 0 +} + +//每日顾客数量提升至{0}人 +func (this *modelStove) StoveSkillAddCustomer(uid string) int32 { + stove, err := this.module.modelStove.getSmithyStoveList(uid) + if err != nil { + if v, ok := stove.Skill[comm.SmithyToolsSkill4]; ok { + if conf := this.module.configure.GetSmithySkill(comm.SmithyToolsSkill1, v); conf != nil { + return conf.Value + } + } + } + return 0 +} + +//顾客购买装备数量上限提高至{0}件 +func (this *modelStove) StoveSkillBuyEquip(uid string) int32 { + stove, err := this.module.modelStove.getSmithyStoveList(uid) + if err != nil { + if v, ok := stove.Skill[comm.SmithyToolsSkill5]; ok { + if conf := this.module.configure.GetSmithySkill(comm.SmithyToolsSkill1, v); conf != nil { + return conf.Value + } + } + } + return 0 +}