上传代码
This commit is contained in:
parent
4e8ad41f96
commit
b686fb6de3
@ -149,7 +149,6 @@ func (this *Battle) CreatePveBattle(session comm.IUserSession, req *pb.BattlePVE
|
|||||||
conn, err = db.Local()
|
conn, err = db.Local()
|
||||||
stag = this.service.GetTag()
|
stag = this.service.GetTag()
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
conn, err = db.ServerDBConn(session.GetServiecTag())
|
conn, err = db.ServerDBConn(session.GetServiecTag())
|
||||||
stag = session.GetServiecTag()
|
stag = session.GetServiecTag()
|
||||||
}
|
}
|
||||||
@ -697,7 +696,8 @@ func (this *Battle) RunServerBattle(session comm.IUserSession, req *pb.BattleRun
|
|||||||
ctx context.Context
|
ctx context.Context
|
||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
if this.options.OpenCheck {
|
// if this.options.OpenCheck {
|
||||||
|
if false {
|
||||||
stime := time.Now()
|
stime := time.Now()
|
||||||
ctx, _ = context.WithTimeout(context.Background(), time.Second*5)
|
ctx, _ = context.WithTimeout(context.Background(), time.Second*5)
|
||||||
if reply, err = this.clientmgr.RunBattle(ctx, req); err != nil {
|
if reply, err = this.clientmgr.RunBattle(ctx, req); err != nil {
|
||||||
|
@ -70,7 +70,7 @@ func (this *apiComp) Sweep(session comm.IUserSession, req *pb.VikingSweepReq) (e
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if req.Difficulty <= viking.Boss[req.BossId] {
|
if req.Difficulty > viking.Boss[req.BossId] {
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
Code: pb.ErrorCode_VikingLvErr,
|
Code: pb.ErrorCode_VikingLvErr,
|
||||||
Title: pb.ErrorCode_VikingLvErr.ToString(),
|
Title: pb.ErrorCode_VikingLvErr.ToString(),
|
||||||
@ -184,10 +184,10 @@ func (this *apiComp) Sweep(session comm.IUserSession, req *pb.VikingSweepReq) (e
|
|||||||
if vikingCfg.Heroexp > 0 {
|
if vikingCfg.Heroexp > 0 {
|
||||||
var heroObjs []string
|
var heroObjs []string
|
||||||
if v != nil && v.Info != nil && len(v.Info.Redflist) > 0 {
|
if v != nil && v.Info != nil && len(v.Info.Redflist) > 0 {
|
||||||
for _, v := range v.Info.Redflist[0].Team {
|
for _, v1 := range v.Info.Redflist[0].Team {
|
||||||
if v.HeroID != "" {
|
if v1 != nil && v1.HeroID != "" {
|
||||||
if !v.Ishelp { // 助战英雄不加经验
|
if !v1.Ishelp { // 助战英雄不加经验
|
||||||
heroObjs = append(heroObjs, v.Oid)
|
heroObjs = append(heroObjs, v1.Oid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -229,7 +229,7 @@ func (this *apiComp) Sweep(session comm.IUserSession, req *pb.VikingSweepReq) (e
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
session.SendMsg(string(this.module.GetType()), VikingChallengeOverResp, &pb.VikingSweepResp{
|
session.SendMsg(string(this.module.GetType()), "sweep", &pb.VikingSweepResp{
|
||||||
Result: result,
|
Result: result,
|
||||||
})
|
})
|
||||||
if len(tasks) > 0 {
|
if len(tasks) > 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user