diff --git a/comm/const.go b/comm/const.go index 99a58bf8e..c71e4fae4 100644 --- a/comm/const.go +++ b/comm/const.go @@ -628,12 +628,7 @@ const ( const ( MaxRankList = 50 // 赛季塔 排行榜人数 MaxMailCount = 50 // 当前邮件最大数量 -) - -const ( - MaxMainlineIntensity = 3 // 最大难度 - MaxRankNum = 3 - MainLineBoss = 3 + MaxRankNum = 3 ) // /聊天消息公告类型 diff --git a/modules/hero/module.go b/modules/hero/module.go index fa07f2299..d7cc10f1f 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -923,7 +923,7 @@ func (this *Hero) DrawCardContinuousRestrictionCamp(cardId string, race map[int3 // 获取阵营 if heroConf := this.configure.GetHeroConfig(cardId); heroConf != nil { if v1, ok := race[heroConf.Race]; ok && v1 > iMaxCount { // 满足条件 再随机获取一个英雄 - for i := 0; i < 10; i++ { + for i := 0; i < int(iMaxCount); i++ { // 最多循环次数 randomIndex := this.modelHero.GetRandW(sz) if int32(len(sz)) > randomIndex { if v1, ok := race[heroConf.Race]; !ok && v1 <= iMaxCount { diff --git a/modules/smithy/api_toolsup.go b/modules/smithy/api_toolsup.go index 529931530..95ea5d7a5 100644 --- a/modules/smithy/api_toolsup.go +++ b/modules/smithy/api_toolsup.go @@ -9,7 +9,10 @@ import ( //参数校验 func (this *apiComp) ToolsUpCheck(session comm.IUserSession, req *pb.SmithyToolsUpReq) (code pb.ErrorCode) { - + if req.Id == 0 { + code = pb.ErrorCode_ReqParameterError + return + } return } diff --git a/modules/smithy/model_stove.go b/modules/smithy/model_stove.go index c6e00af4e..a2b674239 100644 --- a/modules/smithy/model_stove.go +++ b/modules/smithy/model_stove.go @@ -45,9 +45,9 @@ func (this *modelStove) getSmithyStoveList(uid string) (result *pb.DBStove, err result.Skill = make(map[int32]int32, 0) result.Forge = make(map[int32]int32, 0) result.Lv = 1 - result.Temperature = 2000 // 配置 + result.RecoveTime = 0 - if conf := this.module.configure.GetSmithyStoveConf(1); conf != nil { // 获取1级炉子温度配置 + if conf := this.module.configure.GetSmithyStoveConf(result.Lv); conf != nil { // 获取1级炉子温度配置 result.Temperature = conf.MaxTemperature } if err = this.Add(uid, result); err != nil { @@ -95,7 +95,6 @@ func (this *modelStove) CheckForgetwoEquip(reelId int32, lv int32) (b bool) { } if value > 0 { n, _ := rand.Int(rand.Reader, big.NewInt(1000)) // 千分比 - if value < int32(n.Int64()) { return true } @@ -226,14 +225,3 @@ func (this *modelStove) CheckUnlockSuid(reelId, lv, dropid int32) int32 { 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 -} diff --git a/modules/smithy/module.go b/modules/smithy/module.go index 1164f0e0d..1b7b10201 100644 --- a/modules/smithy/module.go +++ b/modules/smithy/module.go @@ -47,21 +47,9 @@ func (this *Smithy) OnInstallComp() { this.modelTask = this.RegisterComp(new(modelTask)).(*modelTask) } -func (this *Smithy) SendRdTask(session comm.IUserSession, Items []*pb.UserAssets) { - var equip map[int32]int32 // key xingji value 数量 - equip = make(map[int32]int32, 0) - for _, v := range Items { - if cfg := this.configure.GetEquipmentConfigureById(v.T); cfg == nil { - equip[cfg.Star]++ - } - } - for k, v := range equip { - this.ModuleRtask.SendToRtask(session, comm.Rtype51, v, k) - } -} func (this *Smithy) CheckActivateAtlasCollect(uid string, id string) (code pb.ErrorCode) { atlasConf := this.configure.GetSmithyAtlasConf(id) - if atlasConf != nil && atlasConf.TypeId == 2 { + if atlasConf != nil && atlasConf.TypeId == 2 { //类型为2表示特殊类型图鉴 if list, err := this.modelAtlas.getSmithyAtlasList(uid); err == nil { if _, ok := list.Collect[id]; !ok { list.Collect[id] = &pb.CollectData{ @@ -82,3 +70,16 @@ func (this *Smithy) CheckActivateAtlasCollect(uid string, id string) (code pb.Er code = pb.ErrorCode_SmithyNoFoundAtlas return } + +func (this *Smithy) SendRdTask(session comm.IUserSession, Items []*pb.UserAssets) { + var equip map[int32]int32 // key xingji value 数量 + equip = make(map[int32]int32, 0) + for _, v := range Items { + if cfg := this.configure.GetEquipmentConfigureById(v.T); cfg == nil { + equip[cfg.Star]++ + } + } + for k, v := range equip { + this.ModuleRtask.SendToRtask(session, comm.Rtype51, v, k) + } +}