From 2e0181cc926859ecf7d41c23bdfc811a5cef8a5b Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 14 Sep 2023 14:36:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E9=98=9F=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/robot/modulerobot_caravan.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 }