Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
171e4798ca
@ -61,7 +61,7 @@ func (this *GM) OnInstallComp() {
|
||||
|
||||
//bingo:Iamyoudad
|
||||
func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorCode) {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
|
||||
cmd = strings.Replace(cmd, " ", "", -1) // 去空格
|
||||
keys := strings.Split(cmd, ":")
|
||||
if len(keys) == 2 {
|
||||
|
@ -30,6 +30,11 @@ func (this *apiComp) CompleteCondi(session comm.IUserSession, req *pb.WorldtaskC
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
return
|
||||
}
|
||||
if (len(curTaskConf.Completetask) == 1 && curTaskConf.Completetask[0] == 0 ||
|
||||
len(curTaskConf.Completetask) == 0) && curTaskConf.DeliverNpc == 0 {
|
||||
code = pb.ErrorCode_WorldtaskNoProcess
|
||||
return
|
||||
}
|
||||
|
||||
myWorldtask, err := this.module.modelWorldtask.getWorldtask(uid)
|
||||
if err != nil {
|
||||
@ -74,6 +79,5 @@ func (this *apiComp) CompleteCondi(session comm.IUserSession, req *pb.WorldtaskC
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "completecondi", rsp)
|
||||
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -47,6 +47,11 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
|
||||
return
|
||||
}
|
||||
|
||||
if curTaskConf.DeliverNpc == 0 {
|
||||
code = pb.ErrorCode_WorldtaskNoProcess
|
||||
return
|
||||
}
|
||||
|
||||
// 判断玩家等级要求
|
||||
if user.Lv < curTaskConf.Lock {
|
||||
code = pb.ErrorCode_WorldtaskLvNotEnough
|
||||
@ -171,6 +176,7 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
|
||||
// 任务完成推送
|
||||
if err := session.SendMsg(string(this.module.GetType()), WorldtaskNexttaskPush, &pb.WorldtaskNexttaskPush{
|
||||
NextTask: nextTask,
|
||||
FinishedTaskIds: []int32{curTaskConf.Key},
|
||||
}); err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
|
@ -100,7 +100,7 @@ func (this *ModelWorldtask) finishTask(groupId, taskId int32, task *pb.DBWorldta
|
||||
task.CurrentTask = make(map[int32]*pb.Worldtask)
|
||||
}
|
||||
|
||||
//判断是否有下个任务
|
||||
//有下个任务
|
||||
if taskConf.IdAfter != 0 {
|
||||
wt.NpcStatus = 0
|
||||
wt.DeliverNpc = 0
|
||||
@ -245,6 +245,7 @@ func (this *ModelWorldtask) taskFinishPush(session comm.IUserSession, groupId in
|
||||
// 任务完成推送
|
||||
session.SendMsg(string(this.moduleWorldtask.GetType()), WorldtaskNexttaskPush, &pb.WorldtaskNexttaskPush{
|
||||
NextTask: nextTask,
|
||||
FinishedTaskIds: []int32{curTaskConf.Key},
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -322,7 +322,7 @@ const (
|
||||
ErrorCode_WorldtaskGroupIdNosame ErrorCode = 3807 //组ID不一致
|
||||
ErrorCode_WorldtaskChapterUnFinished ErrorCode = 3808 //章节任务未完成
|
||||
ErrorCode_WorldtaskChapterReceived ErrorCode = 3809 //章节奖励已领取
|
||||
ErrorCode_WorldtaskNoDeliver ErrorCode = 3810 //无需交付
|
||||
ErrorCode_WorldtaskNoProcess ErrorCode = 3810 //无需处理
|
||||
// academy
|
||||
ErrorCode_AcademyTaskNoCompleteTask ErrorCode = 3901 //未完成任务
|
||||
// AutoBattle
|
||||
@ -634,7 +634,7 @@ var (
|
||||
3807: "WorldtaskGroupIdNosame",
|
||||
3808: "WorldtaskChapterUnFinished",
|
||||
3809: "WorldtaskChapterReceived",
|
||||
3810: "WorldtaskNoDeliver",
|
||||
3810: "WorldtaskNoProcess",
|
||||
3901: "AcademyTaskNoCompleteTask",
|
||||
4001: "AutoBattleNoData",
|
||||
4002: "AutoBattleStatesErr",
|
||||
@ -938,7 +938,7 @@ var (
|
||||
"WorldtaskGroupIdNosame": 3807,
|
||||
"WorldtaskChapterUnFinished": 3808,
|
||||
"WorldtaskChapterReceived": 3809,
|
||||
"WorldtaskNoDeliver": 3810,
|
||||
"WorldtaskNoProcess": 3810,
|
||||
"AcademyTaskNoCompleteTask": 3901,
|
||||
"AutoBattleNoData": 4001,
|
||||
"AutoBattleStatesErr": 4002,
|
||||
@ -1394,7 +1394,7 @@ var file_errorcode_proto_rawDesc = []byte{
|
||||
0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xe0, 0x1d, 0x12, 0x1d, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6c,
|
||||
0x64, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x52, 0x65, 0x63, 0x65,
|
||||
0x69, 0x76, 0x65, 0x64, 0x10, 0xe1, 0x1d, 0x12, 0x17, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6c, 0x64,
|
||||
0x74, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x10, 0xe2, 0x1d,
|
||||
0x74, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x10, 0xe2, 0x1d,
|
||||
0x12, 0x1e, 0x0a, 0x19, 0x41, 0x63, 0x61, 0x64, 0x65, 0x6d, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x4e,
|
||||
0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x10, 0xbd, 0x1e,
|
||||
0x12, 0x15, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x6f, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4e, 0x6f,
|
||||
|
Loading…
Reference in New Issue
Block a user