Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
217530b674
@ -75,7 +75,7 @@ func (this *apiComp) BoosChallenge(session comm.IUserSession, req *pb.MainlineBo
|
|||||||
if errdata != nil {
|
if errdata != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
session.SendMsg(string(this.module.GetType()), "challenge", &pb.MainlineBoosChallengeResp{
|
session.SendMsg(string(this.module.GetType()), "booschallenge", &pb.MainlineBoosChallengeResp{
|
||||||
Info: &pb.BattleInfo{
|
Info: &pb.BattleInfo{
|
||||||
Id: record.Id,
|
Id: record.Id,
|
||||||
Title: record.Title,
|
Title: record.Title,
|
||||||
|
@ -46,6 +46,7 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.MainlineInfoReq) (e
|
|||||||
}
|
}
|
||||||
if err = this.module.modelMline.Change(session.GetUserId(), map[string]interface{}{
|
if err = this.module.modelMline.Change(session.GetUserId(), map[string]interface{}{
|
||||||
"currbooschapter": info.Currbooschapter,
|
"currbooschapter": info.Currbooschapter,
|
||||||
|
"currboosmodel": info.Currboosmodel,
|
||||||
"lastboosrefresh": info.Lastboosrefresh,
|
"lastboosrefresh": info.Lastboosrefresh,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
|
@ -178,6 +178,9 @@ func (this *ModelMline) randomboos(data *pb.DBMainline) (err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if !ok {
|
||||||
|
continue
|
||||||
|
}
|
||||||
chapters = append(chapters, k)
|
chapters = append(chapters, k)
|
||||||
}
|
}
|
||||||
if len(chapters) == 0 {
|
if len(chapters) == 0 {
|
||||||
|
@ -74,6 +74,7 @@ func (this *ModuleRobot_Sys) funcactivate(tid, sid int32, robot IRobot, cid stri
|
|||||||
|
|
||||||
if _, errdata = robot.SendTaskMessage(tid, sid, "sys", "funcactivate", &pb.SysFuncActivateReq{Cid: cid}); errdata != nil {
|
if _, errdata = robot.SendTaskMessage(tid, sid, "sys", "funcactivate", &pb.SysFuncActivateReq{Cid: cid}); errdata != nil {
|
||||||
if errdata.Code == pb.ErrorCode_OpenCondActivate {
|
if errdata.Code == pb.ErrorCode_OpenCondActivate {
|
||||||
|
this.cmd[cid] = 2
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
|
err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
|
||||||
|
@ -13,6 +13,7 @@ type (
|
|||||||
RobotTotalNum int32 //机器人总数
|
RobotTotalNum int32 //机器人总数
|
||||||
RobotSingleNum int32 //单词机器人进入数量
|
RobotSingleNum int32 //单词机器人进入数量
|
||||||
Intervals int32 //间隔时间 单位秒
|
Intervals int32 //间隔时间 单位秒
|
||||||
|
RobotName string //机器人名称
|
||||||
Pipeline []string //执行流水线
|
Pipeline []string //执行流水线
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -43,7 +43,7 @@ locp:
|
|||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-timer.C:
|
case <-timer.C:
|
||||||
if this.currRobotNum < this.module.options.RobotSingleNum {
|
if this.currRobotNum < this.module.options.RobotTotalNum {
|
||||||
for i := 0; i < int(this.module.options.RobotSingleNum); i++ {
|
for i := 0; i < int(this.module.options.RobotSingleNum); i++ {
|
||||||
this.createRobot(this.currRobotNum)
|
this.createRobot(this.currRobotNum)
|
||||||
this.currRobotNum++
|
this.currRobotNum++
|
||||||
@ -63,7 +63,7 @@ func (this *robotmgrComp) createRobot(index int32) {
|
|||||||
robot = &Robot{
|
robot = &Robot{
|
||||||
robotmgrComp: this,
|
robotmgrComp: this,
|
||||||
index: index,
|
index: index,
|
||||||
account: fmt.Sprintf("it_%d", index),
|
account: fmt.Sprintf("%s_%d", this.module.options.RobotName, index),
|
||||||
serverId: this.module.options.ServerID,
|
serverId: this.module.options.ServerID,
|
||||||
pipeline: this.module.options.Pipeline,
|
pipeline: this.module.options.Pipeline,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user