From 5ce7e72a8baca170b0cf7bc90eaffa1e98310a06 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 12 Sep 2023 09:48:03 +0800 Subject: [PATCH] update --- modules/robot/modulerobot_caravan.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/robot/modulerobot_caravan.go b/modules/robot/modulerobot_caravan.go index 5cea4ac6a..79a490d9c 100644 --- a/modules/robot/modulerobot_caravan.go +++ b/modules/robot/modulerobot_caravan.go @@ -48,6 +48,7 @@ func (this *ModuleRobot_Caravan) DoPipeline(robot IRobot) (err error) { resp proto.Message errdata *pb.ErrorData ) + this.curCity += 1 if resp, errdata = robot.SendMessage("caravan", "gotocity", &pb.CaravanGotoCityReq{ City: this.curCity, Ticket: 1, @@ -67,6 +68,9 @@ func (this *ModuleRobot_Caravan) DoPipeline(robot IRobot) (err error) { } } //CaravanBuyOrSellReq + if _, ok := data.City[this.curCity]; !ok { + return + } var item string for _, v := range data.City[this.curCity].Special { item = v