掠夺高级奖励

This commit is contained in:
meixiongfeng 2024-02-18 15:47:33 +08:00
parent 646d475c96
commit 8987508794

View File

@ -47,7 +47,7 @@ func (this *apiComp) Reach(session comm.IUserSession, req *pb.PlunderReachReq) (
return
}
lock, err = this.module.modelLand.landMutexLock(list.Landid)
lock.Lock()
err = lock.Lock()
if err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
@ -111,10 +111,16 @@ func (this *apiComp) Reach(session comm.IUserSession, req *pb.PlunderReachReq) (
this.module.ModuleUser.AddUserHidenum(session, conf.Hidenum)
} else {
res = append(res, conf.Exreward...) // 高级奖励
if !bPlunder { // 掠夺成功
res = append(res, conf.Keepreward...)
} else {
list.Score += conf.Numitem.N
land.Score[session.GetUserId()] = list.Score
this.module.ModuleUser.AddUserHidenum(session, conf.Hidenum)
}
}
if !bPlunder { // 掠夺成功
res = append(res, conf.Keepreward...)
}
if errdata, atno = this.module.DispenseAtno(session, res, true); errdata != nil {
return
}