掠夺到达时间配置

This commit is contained in:
meixiongfeng 2024-02-02 17:19:40 +08:00
parent 3e268abbfa
commit 641a4b543b

View File

@ -43,6 +43,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PlunderCha
heros []*pb.DBHero heros []*pb.DBHero
hids []string hids []string
lock *redis.RedisMutex lock *redis.RedisMutex
addTime int32
) )
update = make(map[string]interface{}) update = make(map[string]interface{})
changExp = make(map[string]int32, 0) changExp = make(map[string]int32, 0)
@ -152,14 +153,20 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PlunderCha
_id := primitive.NewObjectID().Hex() _id := primitive.NewObjectID().Hex()
// 创建一条船的信息 // 创建一条船的信息
if req.Itype == 0 { // 普通运输走普通到达时间
addTime = conf.Extime
} else {
addTime = conf.Extime
}
shipData = &pb.ShipData{ shipData = &pb.ShipData{
Uid: session.GetUserId(), Uid: session.GetUserId(),
Line: &pb.PlunderLine{ Line: &pb.PlunderLine{
Itype: req.Itype, Itype: req.Itype,
Etime: configure.Now().Unix() + int64(conf.Extime), Etime: configure.Now().Unix() + int64(addTime),
Cid: conf.Id, Cid: conf.Id,
Oid: _id, Oid: _id,
}, },
Index: req.Pos, Index: req.Pos,
Status: 0, Status: 0,
Cd: 0, Cd: 0,