diff --git a/comm/const.go b/comm/const.go index 85fb801eb..7d3af16a2 100644 --- a/comm/const.go +++ b/comm/const.go @@ -442,12 +442,15 @@ const ( Reddot17102 ReddotType = 17102 // 铁匠铺手册台 Reddot17106 ReddotType = 17106 // 铁匠铺手册台收藏家奖励上 Reddot17107 ReddotType = 17107 // 铁匠铺手册台收藏家奖励按钮上 + //竞技场 + Reddot22100 ReddotType = 22100 //当玩家竞技场可挑战次数到达最大时 + Reddot22102 ReddotType = 22102 //当竞技场npc可以挑战时 Reddot6 ReddotType = 10006 //爬塔----可挑战红点 Reddot7 ReddotType = 10007 //爬塔----奖励红点 Reddot17 ReddotType = 10017 //星座图----红点 Reddot18 ReddotType = 10018 //英雄招募----红点 // 前端处理 - Reddot19 ReddotType = 10019 //竞技场----挑战红点 + Reddot20 ReddotType = 10020 //丛林美食馆----可挂机红点 Reddot21 ReddotType = 10021 //丛林美食馆----可升级红点 Reddot22 ReddotType = 10022 //丛林美食馆----可领取奖励红 diff --git a/modules/arena/modelarena.go b/modules/arena/modelarena.go index 5bbc14bc2..74efe79fe 100644 --- a/modules/arena/modelarena.go +++ b/modules/arena/modelarena.go @@ -459,11 +459,6 @@ func (this *modelArena) reddot(session comm.IUserSession) bool { return false } if ticketitem = this.module.ModuleTools.GetGlobalConf().ArenaTicketCos; ticketitem == nil { - // code = pb.ErrorCode_ConfigNoFound - // data = &pb.ErrorData{ - // Title: code.ToString(), - // Message: comm.NewNotFoundConfErr(moduleName, "global.json", "ArenaTicketCos").Error(), - // } this.module.Error("竞技场配置未找到!", log.Field{Key: "key", Value: "ArenaTicketCos"}) return false } diff --git a/modules/arena/module.go b/modules/arena/module.go index d5f55cdd2..7b9e02cd1 100644 --- a/modules/arena/module.go +++ b/modules/arena/module.go @@ -98,8 +98,8 @@ func (this *Arena) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (re result = make(map[comm.ReddotType]bool) for _, v := range rid { switch v { - case comm.Reddot19: - result[comm.Reddot19] = this.modelArena.reddot(session) + case comm.Reddot22102: + result[comm.Reddot22102] = this.modelArena.reddot(session) break } } diff --git a/modules/equipment/api_equip.go b/modules/equipment/api_equip.go index 3fa7fb5a6..bb936facc 100644 --- a/modules/equipment/api_equip.go +++ b/modules/equipment/api_equip.go @@ -31,6 +31,7 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) suits []*pb.DB_EquipmentSuit suit *pb.DB_EquipmentSuit equipNum int32 + minstar, minlv int32 = int32(99999), int32(99999) hero *pb.DBHero tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0) ) @@ -78,6 +79,12 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) return } + if minstar < confs[i].Color { + minstar = confs[i].Color + } + if minlv < equipments[i].Lv { + minlv = equipments[i].Lv + } if suitconfs[i], err = this.module.configure.getEquipSuit(confs[i].Suittype); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_ConfigNoFound, @@ -85,8 +92,7 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) Message: err.Error(), } } - tasks = append(tasks, comm.GetBuriedParam(comm.Rtype41, 1, confs[i].InitLv)) - tasks = append(tasks, comm.GetBuriedParam(comm.Rtype42, 1, equipments[i].Lv)) + suit = nil for _, suit = range suits { if suit.Suitid == confs[i].Suittype && !suit.Effect { //找到一个未生效的套装 @@ -98,7 +104,7 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) suit = &pb.DB_EquipmentSuit{ Suitid: confs[i].Suittype, Eids: []string{v}, - Str: confs[i].InitLv, + Str: confs[i].Color, Lv: equipments[i].Lv, Effect: false, } @@ -112,8 +118,8 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) suits = append(suits, suit) } else { suit.Eids = append(suit.Eids, v) - if suit.Str < confs[i].InitLv { - suit.Str = confs[i].InitLv + if suit.Str < confs[i].Color { + suit.Str = confs[i].Color } if suit.Lv < equipments[i].Lv { suit.Lv = equipments[i].Lv @@ -202,6 +208,9 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) } return } + + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype41, equipNum, minstar)) + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype42, equipNum, minstar)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype5, equipNum, utils.ToInt32(hero.HeroID))) if len(tasks) > 0 { diff --git a/modules/equipment/api_upgrade.go b/modules/equipment/api_upgrade.go index 3caef6ba1..d98f5e50e 100644 --- a/modules/equipment/api_upgrade.go +++ b/modules/equipment/api_upgrade.go @@ -64,7 +64,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade return } //找到下一个等级的相关配置 - if intensify, err = this.module.configure.GetEquipmentIntensifyConfigureById(conf.EquipId, conf.InitLv, equipment.Lv); err != nil || intensify.Need == nil || len(intensify.Need) == 0 { + if intensify, err = this.module.configure.GetEquipmentIntensifyConfigureById(conf.EquipId, conf.Color, equipment.Lv); err != nil || intensify.Need == nil || len(intensify.Need) == 0 { errdata = &pb.ErrorData{ Code: pb.ErrorCode_EquipmentLvlimitReached, Title: pb.ErrorCode_EquipmentLvlimitReached.ToString(), @@ -238,7 +238,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade suit = &pb.DB_EquipmentSuit{ Suitid: confs[i].Suittype, Eids: []string{v}, - Str: confs[i].InitLv, + Str: confs[i].Color, Lv: equipments[i].Lv, Effect: false, } @@ -249,8 +249,8 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade suits = append(suits, suit) } else { suit.Eids = append(suit.Eids, v) - if suit.Str < confs[i].InitLv { - suit.Str = confs[i].InitLv + if suit.Str < confs[i].Color { + suit.Str = confs[i].Color } if suit.Lv < equipments[i].Lv { suit.Lv = equipments[i].Lv @@ -259,7 +259,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade suit.Effect = true tasks = append(tasks, comm.GetBuriedParam(comm.Rtype93, 1, suit.Suitid, suit.Lv)) tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype43, equipment.Id, equipment.Lv)) - tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype45, equipment.Id, conf.InitLv, suit.Suitid, suit.Lv)) + tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype45, equipment.Id, conf.Color, suit.Suitid, suit.Lv)) } } } diff --git a/modules/equipment/api_wash.go b/modules/equipment/api_wash.go index fff877086..984f64609 100644 --- a/modules/equipment/api_wash.go +++ b/modules/equipment/api_wash.go @@ -49,7 +49,7 @@ func (this *apiComp) Wash(session comm.IUserSession, req *pb.EquipmentWashReq) ( } return } - gole := this.module.ModuleTools.GetGlobalConf().EquipmentConsumption[conf.InitLv-1] + gole := this.module.ModuleTools.GetGlobalConf().EquipmentConsumption[conf.Color-1] if errdata = this.module.ConsumeRes(session, []*cfg.Gameatn{{A: comm.AttrType, T: comm.ResGold, N: gole}}, true); errdata != nil { return } diff --git a/modules/equipment/modelEquipment.go b/modules/equipment/modelEquipment.go index 9d6ebb16e..ea082b0b5 100644 --- a/modules/equipment/modelEquipment.go +++ b/modules/equipment/modelEquipment.go @@ -111,8 +111,8 @@ func (this *modelEquipmentComp) AddEquipments(session comm.IUserSession, cIds ma return nil, err } else { //随机任务 - tasks = append(tasks, comm.GetBuriedParam(comm.Rtype50, 1, c.InitLv)) - tasks = append(tasks, comm.GetBuriedParam(comm.Rtype97, 1, c.Suittype, c.InitLv)) + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype50, 1, c.Color)) + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype97, 1, c.Suittype, c.Color)) unm := int32(1) if equipment.AdverbEntry != nil { unm += int32(len(equipment.AdverbEntry)) @@ -120,11 +120,11 @@ func (this *modelEquipmentComp) AddEquipments(session comm.IUserSession, cIds ma if equipment.Adverbskill != nil { unm += int32(len(equipment.Adverbskill)) } - tasks = append(tasks, comm.GetBuriedParam(comm.Rtype99, 1, unm, c.InitLv)) + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype99, 1, unm, c.Color)) if c.Pos == 7 { - tasks = append(tasks, comm.GetBuriedParam(comm.Rtype103, 1, c.InitLv)) + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype103, 1, c.Color)) } else if c.Pos == 6 { - tasks = append(tasks, comm.GetBuriedParam(comm.Rtype101, 1, c.InitLv)) + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype101, 1, c.Color)) } add[equipment.Id] = equipment change = append(change, equipment) diff --git a/modules/equipment/module.go b/modules/equipment/module.go index 02be154b1..d32331b33 100644 --- a/modules/equipment/module.go +++ b/modules/equipment/module.go @@ -245,8 +245,8 @@ func (this *Equipment) AddEquipment(session comm.IUserSession, equip *pb.DB_Equi } tasks := make([]*pb.BuriedParam, 0) //随机任务 - tasks = append(tasks, comm.GetBuriedParam(comm.Rtype50, 1, configure.InitLv)) - tasks = append(tasks, comm.GetBuriedParam(comm.Rtype97, 1, configure.Suittype, configure.InitLv)) + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype50, 1, configure.Color)) + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype97, 1, configure.Suittype, configure.Color)) unm := int32(1) if equip.AdverbEntry != nil { unm += int32(len(equip.AdverbEntry)) @@ -254,11 +254,11 @@ func (this *Equipment) AddEquipment(session comm.IUserSession, equip *pb.DB_Equi if equip.Adverbskill != nil { unm += int32(len(equip.Adverbskill)) } - tasks = append(tasks, comm.GetBuriedParam(comm.Rtype99, 1, unm, configure.InitLv)) + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype99, 1, unm, configure.Color)) if configure.Pos == 7 { - tasks = append(tasks, comm.GetBuriedParam(comm.Rtype103, 1, configure.InitLv)) + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype103, 1, configure.Color)) } else if configure.Pos == 6 { - tasks = append(tasks, comm.GetBuriedParam(comm.Rtype101, 1, configure.InitLv)) + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype101, 1, configure.Color)) } go this.ModuleBuried.TriggerBuried(session.GetUserId(), tasks...) this.equipmentsChangePush(session, []*pb.DB_Equipment{equip}) @@ -474,7 +474,7 @@ func (this *Equipment) GetForgeEquip(session comm.IUserSession, suiteId int32, p } if pos != -1 { for _, v := range configures { - if v.Pos == pos && v.InitLv == lv { + if v.Pos == pos && v.Color == lv { if eruip, err = this.modelEquipment.newEquipment(session.GetUserId(), v, dyweight, isepic); err == nil { errdata = this.AddEquipment(session, eruip) // this.equipmentsChangePush(session, []*pb.DB_Equipment{eruip}) @@ -498,7 +498,7 @@ func (this *Equipment) GetForgeEquip(session comm.IUserSession, suiteId int32, p } else { lvs = make([]*cfg.GameEquipData, 0) for _, v := range configures { - if v.InitLv == lv { + if v.Color == lv { lvs = append(lvs, v) } } diff --git a/modules/hunting/api_challengeover.go b/modules/hunting/api_challengeover.go index 00071e5fe..296ff5dbe 100644 --- a/modules/hunting/api_challengeover.go +++ b/modules/hunting/api_challengeover.go @@ -120,7 +120,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha if v.A == "equp" { for _, star := range req.Star { cfg := this.configure.GetEquipmentConfigureById(v.T) - if cfg != nil && star == cfg.InitLv { // 自动出售 转换成其他道具 + if cfg != nil && star == cfg.Color { // 自动出售 转换成其他道具 if len(cfg.Sale) != 0 { bFound = true del = append(del, cfg.Id) diff --git a/modules/reddot/api_get.go b/modules/reddot/api_get.go index df96ec12a..766314507 100644 --- a/modules/reddot/api_get.go +++ b/modules/reddot/api_get.go @@ -42,12 +42,13 @@ func (this *apiComp) Get(session comm.IUserSession, req *pb.ReddotGetReq) (errda for k, v := range this.module.ModuleSociaty.Reddot(session, _rid) { reddot[int32(k)] = v } - case comm.Reddot17: - for k, v := range this.module.horoscope.Reddot(session, _rid) { + //竞技场 + case comm.Reddot22102: + for k, v := range this.module.arena.Reddot(session, _rid) { reddot[int32(k)] = v } - case comm.Reddot19: - for k, v := range this.module.arena.Reddot(session, _rid) { + case comm.Reddot17: + for k, v := range this.module.horoscope.Reddot(session, _rid) { reddot[int32(k)] = v } case comm.Reddot20, comm.Reddot21, comm.Reddot22: diff --git a/modules/reddot/api_getall.go b/modules/reddot/api_getall.go index 5da0546b3..fb420038e 100644 --- a/modules/reddot/api_getall.go +++ b/modules/reddot/api_getall.go @@ -40,16 +40,17 @@ func (this *apiComp) GetAll(session comm.IUserSession, req *pb.ReddotGetAllReq) ) { reddot[int32(k)] = v } - + //竞技场 + for k, v := range this.module.arena.Reddot(session, comm.Reddot22102) { + reddot[int32(k)] = v + } for k, v := range this.module.pagoda.Reddot(session, comm.Reddot6) { reddot[int32(k)] = v } for k, v := range this.module.horoscope.Reddot(session, comm.Reddot17) { reddot[int32(k)] = v } - for k, v := range this.module.arena.Reddot(session, comm.Reddot19) { - reddot[int32(k)] = v - } + for k, v := range this.module.gourmet.Reddot(session, comm.Reddot20, comm.Reddot21, comm.Reddot22) { reddot[int32(k)] = v } diff --git a/modules/smithy/model_atlas.go b/modules/smithy/model_atlas.go index ed3a8731a..67486b3a2 100644 --- a/modules/smithy/model_atlas.go +++ b/modules/smithy/model_atlas.go @@ -71,7 +71,7 @@ func (this *modelAtlas) CheckActivateEquipAtlas(uid string, Equip []*pb.DB_Equip err error ) id := v.CId - lv := equipConf.InitLv + lv := equipConf.Color quality := int32(len(v.AdverbEntry)) // 装备id 转图鉴id if conf := this.module.configure.GetEquipmentConfigureById(id); conf != nil { diff --git a/modules/viking/api_challengeover.go b/modules/viking/api_challengeover.go index 50f1cc963..b5bd8fa01 100644 --- a/modules/viking/api_challengeover.go +++ b/modules/viking/api_challengeover.go @@ -115,7 +115,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal if v.A == "equp" { for _, star := range req.Star { cfg := this.configure.GetEquipmentConfigureById(v.T) - if cfg != nil && star == cfg.InitLv { // 自动出售 转换成其他道具 + if cfg != nil && star == cfg.Color { // 自动出售 转换成其他道具 if len(cfg.Sale) != 0 { bFound = true del = append(del, cfg.Id)