工具台技能数据加成

This commit is contained in:
meixiongfeng 2023-02-17 16:35:45 +08:00
parent b22acf2f35
commit 4de830806d
2 changed files with 61 additions and 0 deletions

View File

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

View File

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