From 641a4b543ba87833c4dd7d84717bf12a585aa9d8 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 2 Feb 2024 17:19:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A0=E5=A4=BA=E5=88=B0=E8=BE=BE=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/plunder/api_challengeover.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/plunder/api_challengeover.go b/modules/plunder/api_challengeover.go index 8eb466e92..2a19ab957 100644 --- a/modules/plunder/api_challengeover.go +++ b/modules/plunder/api_challengeover.go @@ -43,6 +43,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PlunderCha heros []*pb.DBHero hids []string lock *redis.RedisMutex + addTime int32 ) update = make(map[string]interface{}) changExp = make(map[string]int32, 0) @@ -152,14 +153,20 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PlunderCha _id := primitive.NewObjectID().Hex() // 创建一条船的信息 + if req.Itype == 0 { // 普通运输走普通到达时间 + addTime = conf.Extime + } else { + addTime = conf.Extime + } shipData = &pb.ShipData{ Uid: session.GetUserId(), Line: &pb.PlunderLine{ Itype: req.Itype, - Etime: configure.Now().Unix() + int64(conf.Extime), + Etime: configure.Now().Unix() + int64(addTime), Cid: conf.Id, Oid: _id, }, + Index: req.Pos, Status: 0, Cd: 0,