gm 获取满天赋 解锁难度1所有关卡
This commit is contained in:
parent
cd2e9e18ac
commit
d6a821ad55
@ -120,7 +120,7 @@ type (
|
|||||||
CheckJuexingHeroNum(uid string, juexingLv int32, star int32) int32
|
CheckJuexingHeroNum(uid string, juexingLv int32, star int32) int32
|
||||||
|
|
||||||
// 获取所有满星满级满觉醒的英雄
|
// 获取所有满星满级满觉醒的英雄
|
||||||
GetAllMaxHero(session IUserSession) (errdata *pb.ErrorData)
|
GetAllMaxHero(session IUserSession, bTalent bool) (errdata *pb.ErrorData)
|
||||||
|
|
||||||
// 教习登记
|
// 教习登记
|
||||||
RegisterInstructor(session IUserSession, heroOid []string, registerId int32) (errdata *pb.ErrorData)
|
RegisterInstructor(session IUserSession, heroOid []string, registerId int32) (errdata *pb.ErrorData)
|
||||||
|
@ -198,7 +198,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
errdata = module1.(comm.IHero).GetAllMaxHero(session)
|
errdata = module1.(comm.IHero).GetAllMaxHero(session, false)
|
||||||
this.Debug("使用bingo命令:uid = %s ",
|
this.Debug("使用bingo命令:uid = %s ",
|
||||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||||
log.Field{Key: "0", Value: datas[0]},
|
log.Field{Key: "0", Value: datas[0]},
|
||||||
@ -528,6 +528,25 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
log.Field{Key: "param", Value: datas[0]},
|
log.Field{Key: "param", Value: datas[0]},
|
||||||
log.Field{Key: "res", Value: res},
|
log.Field{Key: "res", Value: res},
|
||||||
)
|
)
|
||||||
|
} else if len(datas) == 1 && (datas[0] == "godlike") { // 一键超神
|
||||||
|
module1, err := this.service.GetModule(comm.ModuleHero)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
errdata = module1.(comm.IHero).GetAllMaxHero(session, true)
|
||||||
|
|
||||||
|
module1, err = this.service.GetModule(comm.ModuleMline)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
errdata = module1.(comm.IMline).ModifyMlineDataByNanduID(session, 1101208)
|
||||||
|
|
||||||
|
this.Debug("使用bingo命令:uid = %s ",
|
||||||
|
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||||
|
log.Field{Key: "0", Value: datas[0]},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -491,6 +491,9 @@ func (this *configureComp) GMGetTalentByHeroId(hid string) (data []*cfg.GameHero
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
err = comm.NewNotFoundConfErr(moduleName, hero_talent, hid)
|
if len(data) == 0 {
|
||||||
|
err = comm.NewNotFoundConfErr(moduleName, hero_talent, hid)
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -644,7 +644,10 @@ func (this *Hero) CheckJuexingHeroNum(uid string, juexingLv int32, star int32) i
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取所有满星满级满觉醒的英雄
|
// 获取所有满星满级满觉醒的英雄
|
||||||
func (this *Hero) GetAllMaxHero(session comm.IUserSession) (errdata *pb.ErrorData) {
|
func (this *Hero) GetAllMaxHero(session comm.IUserSession, bTalent bool) (errdata *pb.ErrorData) {
|
||||||
|
if bTalent {
|
||||||
|
this.modelTalent.CleanAllHeroTalent(session.GetUserId())
|
||||||
|
}
|
||||||
data := this.modelHero.module.configure.GetHeroConfigData()
|
data := this.modelHero.module.configure.GetHeroConfigData()
|
||||||
var (
|
var (
|
||||||
changeHero []*pb.DBHero
|
changeHero []*pb.DBHero
|
||||||
@ -703,20 +706,22 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession) (errdata *pb.ErrorDat
|
|||||||
"juexProperty": hero.JuexProperty,
|
"juexProperty": hero.JuexProperty,
|
||||||
}
|
}
|
||||||
|
|
||||||
if true { // 满天赋
|
if bTalent { // 满天赋
|
||||||
//var talent *pb.DBHeroTalent
|
//var talent *pb.DBHeroTalent
|
||||||
talnet, _ := this.modelTalent.GetHerotalent(session.GetUserId())
|
//talent, _ := this.modelTalent.GetHerotalent(session.GetUserId())
|
||||||
this.modelTalent.CleanAllHeroTalent(session.GetUserId())
|
|
||||||
|
talent, _ := this.modelTalent.CreateHeroTalent(session.GetUserId(), hero.HeroID)
|
||||||
data, err := this.configure.GMGetTalentByHeroId(hero.HeroID)
|
data, err := this.configure.GMGetTalentByHeroId(hero.HeroID)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
for _, v := range talnet {
|
for _, v := range data {
|
||||||
if v.HeroId == hero.HeroID {
|
talent.Talent[v.Skillid] = 1
|
||||||
for _, v2 := range data {
|
|
||||||
v.Talent[v2.Skillid] = 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
update := make(map[string]interface{}, 0)
|
||||||
|
update["talent"] = talent.Talent
|
||||||
|
if err = this.modelTalent.ChangeHeroTalent(talent, update); err != nil {
|
||||||
|
this.Errorf("update failed :%v", err)
|
||||||
|
}
|
||||||
// talent.Talent[req.TalentID] = 1
|
// talent.Talent[req.TalentID] = 1
|
||||||
// update := make(map[string]interface{}, 0)
|
// update := make(map[string]interface{}, 0)
|
||||||
// update["talent"] = talent.Talent
|
// update["talent"] = talent.Talent
|
||||||
|
Loading…
Reference in New Issue
Block a user