性能优化 部分逻辑携程处理
优化熟练度技能接口
This commit is contained in:
parent
83a5083a93
commit
ab74f3599c
@ -757,4 +757,5 @@ const (
|
|||||||
SmithyToolsSkill3 = 3 // 所有图纸炉温消耗减少
|
SmithyToolsSkill3 = 3 // 所有图纸炉温消耗减少
|
||||||
SmithyToolsSkill4 = 4 // 每日顾客数量提升至{0}人
|
SmithyToolsSkill4 = 4 // 每日顾客数量提升至{0}人
|
||||||
SmithyToolsSkill5 = 5 // 顾客购买装备数量上限提高至{0}件
|
SmithyToolsSkill5 = 5 // 顾客购买装备数量上限提高至{0}件
|
||||||
|
|
||||||
)
|
)
|
||||||
|
@ -33,6 +33,7 @@ func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.SmithyCreate
|
|||||||
code = pb.ErrorCode_DBError
|
code = pb.ErrorCode_DBError
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
_skillCfg := this.module.configure.GetSmithyStoveConfigData(_smithy.StoveLv)
|
_skillCfg := this.module.configure.GetSmithyStoveConfigData(_smithy.StoveLv)
|
||||||
needTime := _skillCfg.Time // 订单需要的时间
|
needTime := _skillCfg.Time // 订单需要的时间
|
||||||
for _, order := range req.Order {
|
for _, order := range req.Order {
|
||||||
|
@ -202,9 +202,10 @@ func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEq
|
|||||||
// 更新图鉴信息
|
// 更新图鉴信息
|
||||||
for _, v := range rsp.Equip {
|
for _, v := range rsp.Equip {
|
||||||
if equipConf := this.module.configure.GetEquipmentConfigureById(v.CId); equipConf != nil { // 获取装备等级
|
if equipConf := this.module.configure.GetEquipmentConfigureById(v.CId); equipConf != nil { // 获取装备等级
|
||||||
this.module.modelAtlas.CheckActivateAtlas(session.GetUserId(), v.CId, equipConf.Star, int32(len(v.AdverbEntry)+1), stove.Forge[req.ReelId])
|
go func(cid string, star int32, AdverbEntry int32) {
|
||||||
|
this.module.modelAtlas.CheckActivateAtlas(session.GetUserId(), cid, star, AdverbEntry, stove.Forge[req.ReelId])
|
||||||
|
}(v.CId, equipConf.Star, int32(len(v.AdverbEntry)+1)) // 品质按副词条数+1 来算
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import (
|
|||||||
"go_dreamfactory/modules"
|
"go_dreamfactory/modules"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
"go_dreamfactory/sys/configure"
|
"go_dreamfactory/sys/configure"
|
||||||
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
|
|
||||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||||
"go.mongodb.org/mongo-driver/mongo"
|
"go.mongodb.org/mongo-driver/mongo"
|
||||||
@ -58,12 +59,15 @@ func (this *modelAtlas) modifySmithyAtlasList(uid string, data map[string]interf
|
|||||||
|
|
||||||
// 检查是否激活图鉴
|
// 检查是否激活图鉴
|
||||||
func (this *modelAtlas) CheckActivateAtlas(uid string, id string, lv int32, quality int32, forgeCount int32) bool {
|
func (this *modelAtlas) CheckActivateAtlas(uid string, id string, lv int32, quality int32, forgeCount int32) bool {
|
||||||
atlasConf := this.module.configure.GetSmithyAtlasConf(id)
|
var (
|
||||||
if atlasConf == nil {
|
atlasConf *cfg.GameSmithyAtlasData
|
||||||
|
list *pb.DBAtlas
|
||||||
|
err error
|
||||||
|
)
|
||||||
|
if atlasConf = this.module.configure.GetSmithyAtlasConf(id); atlasConf == nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
list, err := this.module.modelAtlas.getSmithyAtlasList(uid)
|
if list, err = this.module.modelAtlas.getSmithyAtlasList(uid); err != nil {
|
||||||
if err != nil {
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if atlasConf.TypeId == 1 { // 装备收藏图鉴信息
|
if atlasConf.TypeId == 1 { // 装备收藏图鉴信息
|
||||||
|
@ -230,3 +230,14 @@ func (this *modelStove) CheckUnlockSuid(reelId, lv, dropid int32) int32 {
|
|||||||
}
|
}
|
||||||
return dropid
|
return dropid
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取工具台数据加成
|
||||||
|
func (this *modelStove) getStoveToolSkill(uid string, skillType int32) int32 {
|
||||||
|
|
||||||
|
if stove, err := this.module.modelStove.getSmithyStoveList(uid); err == nil {
|
||||||
|
if conf := this.module.configure.GetSmithySkill(skillType, stove.Skill[skillType]); conf != nil {
|
||||||
|
return conf.Value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user