This commit is contained in:
meixiongfeng 2023-03-16 19:16:46 +08:00
parent 5b25ca43e7
commit fd8055110b
5 changed files with 22 additions and 35 deletions

View File

@ -628,12 +628,7 @@ const (
const (
MaxRankList = 50 // 赛季塔 排行榜人数
MaxMailCount = 50 // 当前邮件最大数量
)
const (
MaxMainlineIntensity = 3 // 最大难度
MaxRankNum = 3
MainLineBoss = 3
MaxRankNum = 3
)
// /聊天消息公告类型

View File

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

View File

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

View File

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

View File

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