diff --git a/bin/json/game_worldtask.json b/bin/json/game_worldtask.json index b9f7bc50c..5ebd83749 100644 --- a/bin/json/game_worldtask.json +++ b/bin/json/game_worldtask.json @@ -2,7 +2,7 @@ { "key": 10100, "lock": 1, - "ontxe": 0, + "ontxe": 999999, "id_after": 10101, "group": 1, "des": 2, @@ -17,7 +17,7 @@ 1001 ], "completetask": 0, - "auto_accept": 1, + "auto_accept": 0, "overtips": 1, "reword": [ { @@ -1730,9 +1730,9 @@ }, { "key": 30001, - "lock": 999, + "lock": 1, "ontxe": 0, - "id_after": 0, + "id_after": 30002, "group": 101, "des": 3, "icon": "", @@ -1775,7 +1775,7 @@ { "key": 30003, "lock": 1, - "ontxe": 30001, + "ontxe": 0, "id_after": 0, "group": 101, "des": 3, @@ -1796,7 +1796,7 @@ }, { "key": 30004, - "lock": 999, + "lock": 1, "ontxe": 0, "id_after": 0, "group": 101, @@ -1818,7 +1818,7 @@ }, { "key": 30005, - "lock": 999, + "lock": 1, "ontxe": 0, "id_after": 0, "group": 101, @@ -1840,7 +1840,7 @@ }, { "key": 30006, - "lock": 999, + "lock": 1, "ontxe": 0, "id_after": 0, "group": 101, @@ -1856,13 +1856,13 @@ 300011 ], "completetask": 0, - "auto_accept": 1, + "auto_accept": 0, "overtips": 1, "reword": [] }, { "key": 30007, - "lock": 999, + "lock": 1, "ontxe": 0, "id_after": 0, "group": 101, @@ -1884,7 +1884,7 @@ }, { "key": 30008, - "lock": 999, + "lock": 1, "ontxe": 0, "id_after": 0, "group": 101, @@ -1906,7 +1906,7 @@ }, { "key": 30009, - "lock": 999, + "lock": 1, "ontxe": 0, "id_after": 0, "group": 101, @@ -1928,7 +1928,7 @@ }, { "key": 30010, - "lock": 999, + "lock": 1, "ontxe": 0, "id_after": 0, "group": 101, @@ -1950,7 +1950,7 @@ }, { "key": 30011, - "lock": 999, + "lock": 1, "ontxe": 0, "id_after": 0, "group": 101, diff --git a/modules/user/module.go b/modules/user/module.go index 902c201ca..760ea61e1 100644 --- a/modules/user/module.go +++ b/modules/user/module.go @@ -165,8 +165,10 @@ func (this *User) CleanSession(session comm.IUserSession) { // 在线玩家列表 func (this *User) UserOnlineList() ([]*pb.CacheUser, error) { var cache []*pb.CacheUser - if err := this.modelSession.GetList(comm.RDS_EMPTY, &cache); err != nil { - return nil, err + if !this.IsCross() { + if err := this.modelSession.GetList(comm.RDS_EMPTY, &cache); err != nil { + return nil, err + } } return cache, nil } diff --git a/modules/worldtask/api_finish.go b/modules/worldtask/api_finish.go index c1d8a0978..f19e45a1b 100644 --- a/modules/worldtask/api_finish.go +++ b/modules/worldtask/api_finish.go @@ -50,7 +50,7 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe } // 判断玩家等级要求 - if user.Lv < curTaskConf.Lock { + if curTaskConf.Des == 2 && user.Lv < curTaskConf.Lock { code = pb.ErrorCode_WorldtaskLvNotEnough return } @@ -80,15 +80,14 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe hero = make([]string, 0) newhero = make([]string, 0) var nextTaskId int32 - nextTaskId = curTaskConf.IdAfter + finishRsp := func() { if err := session.SendMsg(string(this.module.GetType()), WorldtaskSubtypeFinish, rsp); err != nil { code = pb.ErrorCode_SystemError return } - - // 世界任务类型 - if curTaskConf.Des == 2 { + if curTaskConf.IdAfter != 0 { + nextTaskId = curTaskConf.IdAfter // 任务完成推送 if err := session.SendMsg(string(this.module.GetType()), WorldtaskNexttaskPush, &pb.WorldtaskNexttaskPush{ NextTaskId: nextTaskId, @@ -97,6 +96,7 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe return } } + } finishCall := func() {