diff --git a/modules/robot/modulerobot_caravan.go b/modules/robot/modulerobot_caravan.go index 79a490d9c..5b7e15b55 100644 --- a/modules/robot/modulerobot_caravan.go +++ b/modules/robot/modulerobot_caravan.go @@ -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 }