商队测试
This commit is contained in:
parent
65524b7008
commit
2e0181cc92
@ -17,7 +17,7 @@ type ModuleRobot_Caravan struct {
|
||||
|
||||
func (this *ModuleRobot_Caravan) Init() (err error) {
|
||||
this.caravan = &pb.DBCaravan{}
|
||||
this.curCity = 101
|
||||
this.curCity = 102
|
||||
return
|
||||
}
|
||||
|
||||
@ -49,6 +49,9 @@ func (this *ModuleRobot_Caravan) DoPipeline(robot IRobot) (err error) {
|
||||
errdata *pb.ErrorData
|
||||
)
|
||||
this.curCity += 1
|
||||
if this.curCity >= 113 {
|
||||
this.curCity = 102
|
||||
}
|
||||
if resp, errdata = robot.SendMessage("caravan", "gotocity", &pb.CaravanGotoCityReq{
|
||||
City: this.curCity,
|
||||
Ticket: 1,
|
||||
@ -87,10 +90,6 @@ func (this *ModuleRobot_Caravan) DoPipeline(robot IRobot) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
this.curCity += 1
|
||||
if this.curCity >= 113 {
|
||||
this.curCity = 101
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user