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 +}