diff --git a/bin/json/game_global.json b/bin/json/game_global.json index dc86a49b6..4445748d3 100644 --- a/bin/json/game_global.json +++ b/bin/json/game_global.json @@ -338,8 +338,8 @@ ], "run_horsetime1": 3, "run_horsetime2": 10, - "boy_headPortrait": "tx_js_zj", - "girl_headPortrait": "tx_js_zj", + "boy_headPortrait": "ty_tx_nz", + "girl_headPortrait": "ty_tx_nz", "namecolor": "#FFFF00", "skillGetLocation": [ 114 diff --git a/modules/oldtimes/api_enter.go b/modules/oldtimes/api_enter.go index 240c23c09..e4e8e7163 100644 --- a/modules/oldtimes/api_enter.go +++ b/modules/oldtimes/api_enter.go @@ -26,7 +26,7 @@ func (this *apiComp) Enter(session comm.IUserSession, req *pb.OldtimesEnterReq) chapter := this.module.modelOldtimes.getChatper(req.ChapterId, ot) if chapter != nil { - if chapter.Status == 3 { + if chapter.Status == int32(finish) { code = pb.ErrorCode_OldtimesFinished return } @@ -34,11 +34,11 @@ func (this *apiComp) Enter(session comm.IUserSession, req *pb.OldtimesEnterReq) var exist bool for _, l := range chapter.Levels { if l.Lid == req.LevelId { - if l.Status == 3 { + if l.Status == int32(finish) { code = pb.ErrorCode_OldtimesLevelOver return } else { - l.Status = 2 + l.Status = int32(ongoing) } exist = true break @@ -48,7 +48,7 @@ func (this *apiComp) Enter(session comm.IUserSession, req *pb.OldtimesEnterReq) if !exist { chapter.Levels = append(chapter.Levels, &pb.Level{ Lid: req.LevelId, - Status: 1, + Status: int32(unlock), }) } } diff --git a/modules/oldtimes/api_receive.go b/modules/oldtimes/api_receive.go index 6e1795423..1c9debe4c 100644 --- a/modules/oldtimes/api_receive.go +++ b/modules/oldtimes/api_receive.go @@ -6,10 +6,16 @@ import ( ) func (this *apiComp) ReceiveCheck(session comm.IUserSession, req *pb.OldtimesReceiveReq) (code pb.ErrorCode) { + if req.ChapterId <= 0 { + code = pb.ErrorCode_ReqParameterError + } return } func (this *apiComp) Receive(session comm.IUserSession, req *pb.OldtimesReceiveReq) (code pb.ErrorCode, data *pb.ErrorData) { + if code = this.ReceiveCheck(session,req);code!=pb.ErrorCode_Success{ + return + } uid := session.GetUserId() rsp := &pb.OldtimesReceiveResp{} @@ -20,7 +26,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.OldtimesReceiveR if v.Received == 1 { code = pb.ErrorCode_OldtimesReceived return - } else if v.Status != 3 { + } else if v.Status != int32(finish) { code = pb.ErrorCode_OldtimesNoAllFinished return } else {