diff --git a/modules/equipment/api_equip.go b/modules/equipment/api_equip.go index d039e8549..4f87e03bf 100644 --- a/modules/equipment/api_equip.go +++ b/modules/equipment/api_equip.go @@ -25,8 +25,9 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) equipments []*pb.DB_Equipment updatequipment []*pb.DB_Equipment equipNum int32 - equipStr map[int32]int32 = make(map[int32]int32) + // equipStr map[int32]int32 = make(map[int32]int32) // equipLv map[int32]int32 = make(map[int32]int32) + minstr int32 = 9999 minlv int32 = 9999 hero *pb.DBHero suite1Str, suite1Lv, suite2Str, suite2Lv int32 = math.MaxInt32, math.MaxInt32, math.MaxInt32, math.MaxInt32 @@ -66,7 +67,11 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) code = pb.ErrorCode_ConfigNoFound return } - equipStr[confs[i].Star]++ + if minstr > confs[i].Star { + minlv = confs[i].Star + } + + // equipStr[confs[i].Star]++ if i < 4 { if confs[i].Star < suite1Str { @@ -173,10 +178,11 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) } tasks = append(tasks, comm.GettaskParam(comm.Rtype5, equipNum, utils.ToInt32(hero.HeroID))) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype5, utils.ToInt32(hero.HeroID), equipNum) - for k, v := range equipStr { - tasks = append(tasks, comm.GettaskParam(comm.Rtype41, 1, v, k)) - // this.module.ModuleRtask.SendToRtask(session, comm.Rtype41, utils.ToInt32(hero.HeroID), v, k) - } + // for k, v := range equipStr { + // tasks = append(tasks, comm.GettaskParam(comm.Rtype41, 1, v, k)) + // // this.module.ModuleRtask.SendToRtask(session, comm.Rtype41, utils.ToInt32(hero.HeroID), v, k) + // } + tasks = append(tasks, comm.GettaskParam(comm.Rtype41, 1, equipNum, minstr)) tasks = append(tasks, comm.GettaskParam(comm.Rtype42, 1, equipNum, minlv)) // for k, v := range equipLv { // tasks = append(tasks, comm.GettaskParam(comm.Rtype42, 1, v, k)) diff --git a/modules/hero/model_hero.go b/modules/hero/model_hero.go index d3c7056b0..7e3f200a3 100644 --- a/modules/hero/model_hero.go +++ b/modules/hero/model_hero.go @@ -588,7 +588,7 @@ func (this *ModelHero) AddCardExp(session comm.IUserSession, hero *pb.DBHero, ex szTask = append(szTask, comm.GettaskParam(comm.Rtype4, hero.Lv, utils.ToInt32(hero.HeroID))) szTask = append(szTask, comm.GettaskParam(comm.Rtype23, 1, hero.Star, hero.Lv)) szTask = append(szTask, comm.GettaskParam(comm.Rtype24, 1)) - szTask = append(szTask, comm.GettaskParam(comm.Rtype29, 1, hero.Lv, utils.ToInt32(hero.HeroID))) + // szTask = append(szTask, comm.GettaskParam(comm.Rtype29, 1, hero.Lv, utils.ToInt32(hero.HeroID))) if cfg := this.moduleHero.configure.GetHeroConfig(hero.HeroID); cfg != nil { szTask = append(szTask, comm.GettaskParam(comm.Rtype32, 1, cfg.Color, hero.Lv)) diff --git a/modules/items/api_useItem.go b/modules/items/api_useItem.go index f9639abed..b6b1b46e0 100644 --- a/modules/items/api_useItem.go +++ b/modules/items/api_useItem.go @@ -4,7 +4,6 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/pb" cfg "go_dreamfactory/sys/configure/structs" - "go_dreamfactory/utils" ) //参数校验 @@ -61,7 +60,7 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq) //随机任务 // this.module.ModuleRtask.SendToRtask(session, comm.Rtype21, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype22, utils.ToInt32(sale.Prize[0].T)) - go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype21, 1), comm.GettaskParam(comm.Rtype22, utils.ToInt32(sale.Prize[0].T))) + // go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype21, 1), comm.GettaskParam(comm.Rtype22, utils.ToInt32(sale.Prize[0].T))) case 4: //自选宝箱 if prop = this.module.configure.GetDropData(itemcf.BoxId); prop == nil { diff --git a/modules/mline/api_challengeover.go b/modules/mline/api_challengeover.go index 0642dc564..4de93416b 100644 --- a/modules/mline/api_challengeover.go +++ b/modules/mline/api_challengeover.go @@ -185,7 +185,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MlineChall // this.module.ModuleRtask.SendToRtask(session, comm.Rtype60, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype61, int32(req.StageId)) tasks = append(tasks, comm.GettaskParam(comm.Rtype60, 1)) - tasks = append(tasks, comm.GettaskParam(comm.Rtype61, int32(req.StageId))) + tasks = append(tasks, comm.GettaskParam(comm.Rtype61, 1, int32(req.StageId))) var ( ChapterStar int32 bAll3Star bool