烹饪的菜吃了增加的好感度 字段调整

This commit is contained in:
meixiongfeng 2023-06-26 23:00:06 +08:00
parent 5d9afc817a
commit f2f2938780
4 changed files with 27 additions and 1 deletions

View File

@ -487,6 +487,7 @@ type (
GetPriceGroupCost(pricegroupId int32, purchase int32) (res []*cfg.Gameatn, err error) GetPriceGroupCost(pricegroupId int32, purchase int32) (res []*cfg.Gameatn, err error)
GetPriceGroupLen(pricegroupId int32) (count int32, err error) GetPriceGroupLen(pricegroupId int32) (count int32, err error)
GetGrormetLlame(id string) (data int32, err error)
} }
IReputation interface { IReputation interface {

View File

@ -120,13 +120,14 @@ func (this *apiComp) UseGift(session comm.IUserSession, req *pb.LibraryUseGiftRe
if errdata = this.module.CheckRes(session, res); errdata != nil { // 道具不够直接返回 if errdata = this.module.CheckRes(session, res); errdata != nil { // 道具不够直接返回
return return
} }
//itemConf, err1 := this.module.ModuleTools.GetGrormetLlame(req.Items)
itemConf, err1 := this.module.configure.GetItemConfigureData(req.Items) // 获取食物的 itemConf, err1 := this.module.configure.GetItemConfigureData(req.Items) // 获取食物的
if err1 != nil { if err1 != nil {
this.module.Errorf("赠送菜品配置没找到:%s", req.Items) this.module.Errorf("赠送菜品配置没找到:%s", req.Items)
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound, Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(), Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: err.Error(), Message: err1.Error(),
} }
return return
} }

View File

@ -29,6 +29,8 @@ const (
game_lottery = "game_lottery.json" game_lottery = "game_lottery.json"
game_price = "game_pricegroup.json" game_price = "game_pricegroup.json"
game_food = "game_breakingbad.json"
) )
///配置管理基础组件 ///配置管理基础组件
@ -66,6 +68,7 @@ func (this *MCompConfigure) Init(service core.IService, module core.IModule, com
err = this.LoadConfigure(game_equip, cfg.NewGameEquip) err = this.LoadConfigure(game_equip, cfg.NewGameEquip)
err = this.LoadConfigure(game_item, cfg.NewGameItem) err = this.LoadConfigure(game_item, cfg.NewGameItem)
err = this.LoadConfigure(game_vip, cfg.NewGameVip) err = this.LoadConfigure(game_vip, cfg.NewGameVip)
err = this.LoadConfigure(game_food, cfg.NewGameBreakingbad)
err = this.LoadConfigure(game_lottery, cfg.NewGameLottery) err = this.LoadConfigure(game_lottery, cfg.NewGameLottery)
this._dropMap = make(map[int32][]*cfg.GameDropData, 0) this._dropMap = make(map[int32][]*cfg.GameDropData, 0)
this._sign = make(map[int32]*cfg.GameSignData, 0) this._sign = make(map[int32]*cfg.GameSignData, 0)
@ -610,3 +613,20 @@ func (this *MCompConfigure) GetPriceGroupLen(pricegroupId int32) (count int32, e
return return
} }
func (this *MCompConfigure) GetGrormetLlame(id string) (data int32, err error) {
var (
v interface{}
)
if v, err = this.GetConfigure(game_food); err == nil {
if conf, ok := v.(*cfg.GameBreakingbad); ok {
_d := conf.Get(id)
if _d != nil {
data = _d.Flame
return
}
}
}
err = comm.NewNotFoundConfErr("gourmet", game_food, id)
return
}

View File

@ -56,3 +56,7 @@ func (this *Tools) GetPriceGroupCost(pricegroupId int32, purchase int32) (res []
func (this *Tools) GetPriceGroupLen(pricegroupId int32) (count int32, err error) { func (this *Tools) GetPriceGroupLen(pricegroupId int32) (count int32, err error) {
return this.configure.GetPriceGroupLen(pricegroupId) return this.configure.GetPriceGroupLen(pricegroupId)
} }
func (this *Tools) GetGrormetLlame(id string) (data int32, err error) {
return this.configure.GetGrormetLlame(id)
}