This commit is contained in:
meixiongfeng 2023-05-30 17:21:18 +08:00
commit aef30ba083
16 changed files with 220 additions and 154 deletions

View File

@ -22,6 +22,10 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.AcademyInfoReq) (co
} }
if info, err = this.module.modelAcademy.queryInfo(session.GetUserId()); err != nil { if info, err = this.module.modelAcademy.queryInfo(session.GetUserId()); err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
data = &pb.ErrorData{
Title: pb.GetErrorCodeMsg(code),
Message: err.Error(),
}
return return
} }
session.SendMsg(string(this.module.GetType()), "info", &pb.AcademyInfoResp{Info: info}) session.SendMsg(string(this.module.GetType()), "info", &pb.AcademyInfoResp{Info: info})

View File

@ -30,6 +30,10 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.AcademyReceiveRe
if iswin { if iswin {
if info, err = this.module.modelAcademy.queryInfo(session.GetUserId()); err != nil { if info, err = this.module.modelAcademy.queryInfo(session.GetUserId()); err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
data = &pb.ErrorData{
Title: pb.GetErrorCodeMsg(code),
Message: err.Error(),
}
return return
} }
if level, err = this.module.configure.getGameTeaching(req.Level); err != nil { if level, err = this.module.configure.getGameTeaching(req.Level); err != nil {
@ -50,6 +54,10 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.AcademyReceiveRe
} }
if err = this.module.modelAcademy.updateInfo(info); err != nil { if err = this.module.modelAcademy.updateInfo(info); err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
data = &pb.ErrorData{
Title: pb.GetErrorCodeMsg(code),
Message: err.Error(),
}
return return
} }

View File

@ -44,6 +44,10 @@ func (this *apiComp) Teaching(session comm.IUserSession, req *pb.AcademyTeaching
if level, err = this.module.configure.getGameHeroTeaching(req.HeroId); err != nil { if level, err = this.module.configure.getGameHeroTeaching(req.HeroId); err != nil {
cd = pb.ErrorCode_ConfigNoFound cd = pb.ErrorCode_ConfigNoFound
data = &pb.ErrorData{
Title: pb.GetErrorCodeMsg(code),
Message: err.Error(),
}
return return
} }
cd, record = this.module.battle.CreateEveBattle(session, &pb.BattleEVEReq{ cd, record = this.module.battle.CreateEveBattle(session, &pb.BattleEVEReq{

View File

@ -1,6 +1,7 @@
package academy package academy
import ( import (
"fmt"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/pb" "go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
@ -18,7 +19,6 @@ func (this *apiComp) TeachingReceive(session comm.IUserSession, req *pb.AcademyT
iswin bool iswin bool
level *cfg.GameHeroStrategyData level *cfg.GameHeroStrategyData
info *pb.DBAcademy info *pb.DBAcademy
// group []*cfg.GameTeachingData
err error err error
) )
if code = this.TeachingReceiveCheck(session, req); code != pb.ErrorCode_Success { if code = this.TeachingReceiveCheck(session, req); code != pb.ErrorCode_Success {
@ -30,14 +30,26 @@ func (this *apiComp) TeachingReceive(session comm.IUserSession, req *pb.AcademyT
if iswin { if iswin {
if info, err = this.module.modelAcademy.queryInfo(session.GetUserId()); err != nil { if info, err = this.module.modelAcademy.queryInfo(session.GetUserId()); err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
data = &pb.ErrorData{
Title: pb.GetErrorCodeMsg(code),
Message: err.Error(),
}
return return
} }
if level, err = this.module.configure.getGameHeroTeaching(req.HeroId); err != nil { if level, err = this.module.configure.getGameHeroTeaching(req.HeroId); err != nil {
code = pb.ErrorCode_ConfigNoFound code = pb.ErrorCode_ConfigNoFound
data = &pb.ErrorData{
Title: pb.GetErrorCodeMsg(code),
Message: err.Error(),
}
return return
} }
if req.Report.Completetask == nil || len(req.Report.Completetask) != len(level.Task) { if req.Report.Completetask == nil || len(req.Report.Completetask) != len(level.Task) {
code = pb.ErrorCode_AcademyTaskNoCompleteTask code = pb.ErrorCode_AcademyTaskNoCompleteTask
data = &pb.ErrorData{
Title: pb.GetErrorCodeMsg(code),
Message: fmt.Sprintf("目标任务:%v 完成任务:%v", level.Task, req.Report.Completetask),
}
return return
} }
if !info.Hero[req.HeroId] { if !info.Hero[req.HeroId] {
@ -45,6 +57,10 @@ func (this *apiComp) TeachingReceive(session comm.IUserSession, req *pb.AcademyT
} }
if err = this.module.modelAcademy.updateInfo(info); err != nil { if err = this.module.modelAcademy.updateInfo(info); err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
data = &pb.ErrorData{
Title: pb.GetErrorCodeMsg(code),
Message: err.Error(),
}
return return
} }
this.module.DispenseRes(session, level.Award, true) this.module.DispenseRes(session, level.Award, true)

View File

@ -1,7 +1,6 @@
package academy package academy
import ( import (
"fmt"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/modules" "go_dreamfactory/modules"
@ -71,7 +70,7 @@ func (this *configureComp) getGameHeroTeaching(id string) (result *cfg.GameHeroS
this.module.Errorln(err) this.module.Errorln(err)
} else { } else {
if result, ok = v.(*cfg.GameHeroStrategy).GetDataMap()[id]; !ok { if result, ok = v.(*cfg.GameHeroStrategy).GetDataMap()[id]; !ok {
err = fmt.Errorf("on found GameMonster:%s", id) err = comm.NewNotFoundConfErr(moduleName, game_herostrategy, id)
this.module.Errorln(err) this.module.Errorln(err)
} }
} }

View File

@ -1,6 +1,7 @@
package arena package arena
import ( import (
"fmt"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/sys/mgo" "go_dreamfactory/lego/sys/mgo"
"go_dreamfactory/pb" "go_dreamfactory/pb"
@ -25,16 +26,28 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ArenaBuyReq) (code p
err error err error
) )
if code = this.BuyCheck(session, req); code != pb.ErrorCode_Success { if code = this.BuyCheck(session, req); code != pb.ErrorCode_Success {
data = &pb.ErrorData{
Title: pb.GetErrorCodeMsg(code),
Message: fmt.Sprintf("请求参数:%+v", req),
}
return return
} }
if info, err = this.module.modelArena.queryPlayerInfo(session.GetUserId()); err != nil && err != mgo.MongodbNil { if info, err = this.module.modelArena.queryPlayerInfo(session.GetUserId()); err != nil && err != mgo.MongodbNil {
code = pb.ErrorCode_CacheReadError code = pb.ErrorCode_CacheReadError
data = &pb.ErrorData{
Title: pb.GetErrorCodeMsg(code),
Message: err.Error(),
}
return return
} }
this.module.modelArena.recoverTicket(session, info) this.module.modelArena.recoverTicket(session, info)
if maxbuy, err = this.module.ModuleTools.GetPriceGroupLen(comm.ArenaBuyType); err != nil { if maxbuy, err = this.module.ModuleTools.GetPriceGroupLen(comm.ArenaBuyType); err != nil {
code = pb.ErrorCode_ConfigNoFound code = pb.ErrorCode_ConfigNoFound
data = &pb.ErrorData{
Title: pb.GetErrorCodeMsg(code),
Message: err.Error(),
}
return return
} }
vipbuy = this.module.privilege.GetCountByPrivilegeId(session.GetUserId(), comm.PrivilegeType5) vipbuy = this.module.privilege.GetCountByPrivilegeId(session.GetUserId(), comm.PrivilegeType5)
@ -44,17 +57,16 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ArenaBuyReq) (code p
code = pb.ErrorCode_ArenaTicketBuyUp code = pb.ErrorCode_ArenaTicketBuyUp
return return
} }
if res, _ := this.module.ModuleTools.GetPriceGroupCost(comm.ArenaBuyType, info.Buynum+i+1); len(res) > 0 { if res, err := this.module.ModuleTools.GetPriceGroupCost(comm.ArenaBuyType, info.Buynum+i+1); len(res) > 0 {
need = append(need, res...) need = append(need, res...)
} else { } else {
code = pb.ErrorCode_ConfigNoFound code = pb.ErrorCode_ConfigNoFound
data = &pb.ErrorData{
Title: pb.GetErrorCodeMsg(code),
Message: err.Error(),
}
return return
} }
// if challenge, err = this.module.configure.GetchallengeData(info.Buynum + i + 1); err != nil || challenge == nil {
// code = pb.ErrorCode_ConfigNoFound
// return
// }
// need = append(need, challenge.Need...)
} }
if code = this.module.ConsumeRes(session, need, true); code != pb.ErrorCode_Success { if code = this.module.ConsumeRes(session, need, true); code != pb.ErrorCode_Success {
@ -67,6 +79,10 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ArenaBuyReq) (code p
// info.Ticket += req.BuyNum // info.Ticket += req.BuyNum
if err = this.module.modelArena.updateArenaUserInfo(info); err != nil { if err = this.module.modelArena.updateArenaUserInfo(info); err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
data = &pb.ErrorData{
Title: pb.GetErrorCodeMsg(code),
Message: err.Error(),
}
return return
} }
session.SendMsg(string(this.module.GetType()), "buy", &pb.MoonfantasyBuyResp{Issucc: true, BattleNum: info.Buynum}) session.SendMsg(string(this.module.GetType()), "buy", &pb.MoonfantasyBuyResp{Issucc: true, BattleNum: info.Buynum})

View File

@ -50,19 +50,16 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallenge
} }
if red, err = this.module.modelArena.queryPlayerInfo(session.GetUserId()); err != nil { if red, err = this.module.modelArena.queryPlayerInfo(session.GetUserId()); err != nil {
cd = pb.ErrorCode_DBError cd = pb.ErrorCode_DBError
data = &pb.ErrorData{
Title: pb.GetErrorCodeMsg(code),
Message: err.Error(),
}
return return
} }
this.module.modelArena.recoverTicket(session, red) this.module.modelArena.recoverTicket(session, red)
if cd = this.module.ConsumeRes(session, []*cfg.Gameatn{this.module.ModuleTools.GetGlobalConf().ArenaTicketCos}, true); cd != pb.ErrorCode_Success { if cd = this.module.ConsumeRes(session, []*cfg.Gameatn{this.module.ModuleTools.GetGlobalConf().ArenaTicketCos}, true); cd != pb.ErrorCode_Success {
return return
} }
// if red.Ticket > this.module.ModuleTools.GetGlobalConf().ArenaTicketCos {
// red.Ticket -= this.module.ModuleTools.GetGlobalConf().ArenaTicketCos
// } else {
// code = pb.ErrorCode_ArenaTicketNotEnough
// return
// }
if red.Attack != nil { if red.Attack != nil {
for i, v := range req.Battle.Format { for i, v := range req.Battle.Format {
if red.Attack.Formt[i].Id != v { if red.Attack.Formt[i].Id != v {
@ -76,6 +73,10 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallenge
if red.Defend == nil || change { if red.Defend == nil || change {
if heros, err = this.module.modelArena.queryUserHeros(session.GetUserId(), req.Battle.Format); err != nil { if heros, err = this.module.modelArena.queryUserHeros(session.GetUserId(), req.Battle.Format); err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
data = &pb.ErrorData{
Title: pb.GetErrorCodeMsg(code),
Message: err.Error(),
}
return return
} }
if red.Defend == nil { if red.Defend == nil {
@ -96,11 +97,19 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallenge
if !req.Isai { if !req.Isai {
if bule, err = this.module.modelArena.queryArenaPlayer(req.Playerid); err != nil { if bule, err = this.module.modelArena.queryArenaPlayer(req.Playerid); err != nil {
cd = pb.ErrorCode_DBError cd = pb.ErrorCode_DBError
data = &pb.ErrorData{
Title: pb.GetErrorCodeMsg(code),
Message: err.Error(),
}
return return
} }
} else { } else {
if bule, err = this.module.modelArena.getAI(req.MformatId); err != nil { if bule, err = this.module.modelArena.getAI(req.MformatId); err != nil {
cd = pb.ErrorCode_DBError cd = pb.ErrorCode_DBError
data = &pb.ErrorData{
Title: pb.GetErrorCodeMsg(code),
Message: err.Error(),
}
return return
} }
} }
@ -118,6 +127,10 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallenge
red.Prededuction = -1 * redplay.Changeintegral red.Prededuction = -1 * redplay.Changeintegral
if err = this.module.modelArena.updateArenaUserInfo(red); err != nil { if err = this.module.modelArena.updateArenaUserInfo(red); err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
data = &pb.ErrorData{
Title: pb.GetErrorCodeMsg(code),
Message: err.Error(),
}
return return
} }
cd, record = this.module.battle.CreatePvpBattle(session, &pb.BattlePVPReq{ cd, record = this.module.battle.CreatePvpBattle(session, &pb.BattlePVPReq{

View File

@ -32,6 +32,10 @@ func (this *apiComp) ChallengeReward(session comm.IUserSession, req *pb.ArenaCha
} }
if info, err = this.module.modelArena.queryPlayerInfo(session.GetUserId()); err != nil { if info, err = this.module.modelArena.queryPlayerInfo(session.GetUserId()); err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
data = &pb.ErrorData{
Title: pb.GetErrorCodeMsg(code),
Message: err.Error(),
}
return return
} }
if req.Iswin { if req.Iswin {
@ -44,7 +48,12 @@ func (this *apiComp) ChallengeReward(session comm.IUserSession, req *pb.ArenaCha
} }
info.Streak++ info.Streak++
if reward, err = this.module.configure.getActiveRewardById(info.Dan); err != nil { if reward, err = this.module.configure.getActiveRewardById(info.Dan); err != nil {
code = pb.ErrorCode_ConfigNoFound
this.module.Errorln(err) this.module.Errorln(err)
data = &pb.ErrorData{
Title: pb.GetErrorCodeMsg(code),
Message: err.Error(),
}
return return
} }
if code = this.module.DispenseRes(session, reward.WinReward, true); code != pb.ErrorCode_Success { if code = this.module.DispenseRes(session, reward.WinReward, true); code != pb.ErrorCode_Success {

View File

@ -2,6 +2,7 @@ package arena
import ( import (
"fmt" "fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/sys/configure" "go_dreamfactory/sys/configure"
@ -90,7 +91,7 @@ func (this *configureComp) getActiveRewardById(lv int32) (result *cfg.GameArenaA
this.module.Errorln(err) this.module.Errorln(err)
} else { } else {
if result, ok = v.(*cfg.GameArenaActiveReward).GetDataMap()[lv]; !ok { if result, ok = v.(*cfg.GameArenaActiveReward).GetDataMap()[lv]; !ok {
err = fmt.Errorf("未找到段位:%d配置", lv) err = comm.NewNotFoundConfErr("", game_arenaactivereward, lv)
this.module.Errorln(err) this.module.Errorln(err)
} }
} }

View File

@ -61,9 +61,10 @@ func (this *Buried) OnInstallComp() {
} }
// 跨服埋点触发 // 跨服埋点触发
func (this *Buried) Rpc_ModuleBuriedTrigger(ctx context.Context, args *pb.Rpc_ModuleBuriedTriggerReq, reply *pb.Rpc_ModuleBuriedTriggerResp) { func (this *Buried) Rpc_ModuleBuriedTrigger(ctx context.Context, args *pb.Rpc_ModuleBuriedTriggerReq, reply *pb.Rpc_ModuleBuriedTriggerResp) (err error) {
this.Debug("跨服埋点触发!", log.Field{Key: "uid", Value: args.Uid}, log.Field{Key: "burieds", Value: args.Burieds}) this.Debug("跨服埋点触发!", log.Field{Key: "uid", Value: args.Uid}, log.Field{Key: "burieds", Value: args.Burieds})
this.trigger(args.Uid, args.Burieds...) this.trigger(args.Uid, args.Burieds...)
return
} }
//激活数据采集点 //激活数据采集点
@ -201,6 +202,7 @@ func (this *Buried) TriggerBuried(uid string, burieds ...*pb.BuriedParam) {
comm.Service_Worker, comm.Service_Worker,
string(comm.Rpc_ModuleBuriedTrigger), string(comm.Rpc_ModuleBuriedTrigger),
pb.Rpc_ModuleBuriedTriggerReq{ pb.Rpc_ModuleBuriedTriggerReq{
Uid: uid,
Burieds: burieds, Burieds: burieds,
}, },
nil); err != nil { nil); err != nil {

View File

@ -28,7 +28,7 @@ func (this *Options) GetLog() log.ILogger {
} }
func (this *Options) LoadConfig(settings map[string]interface{}) (err error) { func (this *Options) LoadConfig(settings map[string]interface{}) (err error) {
this.Debug = true this.Debug = false
if settings != nil { if settings != nil {
err = mapstructure.Decode(settings, this) err = mapstructure.Decode(settings, this)
} }

View File

@ -24,7 +24,8 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
user := a.module.ModuleUser.GetUser(uid) user := a.module.ModuleUser.GetUser(uid)
if user == nil { if user == nil {
code = pb.ErrorCode_UserSessionNobeing code = pb.ErrorCode_UserSessionNobeing
data.Title = code.String() data.Title = code.ToString()
data.Datastring = uid
return return
} }
@ -32,7 +33,7 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
myWorldtask, err := a.module.modelWorldtask.getWorldtask(uid) myWorldtask, err := a.module.modelWorldtask.getWorldtask(uid)
if err != nil { if err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
data.Title = code.String() data.Title = code.ToString()
data.Datastring = uid data.Datastring = uid
return return
} }
@ -41,7 +42,7 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
curTaskConf, err := a.module.configure.getWorldtaskById(req.TaskId) curTaskConf, err := a.module.configure.getWorldtaskById(req.TaskId)
if err != nil || curTaskConf == nil { if err != nil || curTaskConf == nil {
code = pb.ErrorCode_ConfigNoFound code = pb.ErrorCode_ConfigNoFound
data.Title = code.String() data.Title = code.ToString()
data.Message = err.Error() data.Message = err.Error()
return return
} }
@ -49,7 +50,7 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
// 判断玩家等级要求 // 判断玩家等级要求
if user.Lv < curTaskConf.Lock { if user.Lv < curTaskConf.Lock {
code = pb.ErrorCode_WorldtaskLvNotEnough code = pb.ErrorCode_WorldtaskLvNotEnough
data.Title = code.String() data.Title = code.ToString()
data.Message = fmt.Sprintf("实际等级:%d 期望等级:%d", user.Lv, curTaskConf.Lock) data.Message = fmt.Sprintf("实际等级:%d 期望等级:%d", user.Lv, curTaskConf.Lock)
return return
} }
@ -57,6 +58,7 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
// 前置任务ID 只有世界任务才校验前置 // 前置任务ID 只有世界任务才校验前置
if !a.module.modelWorldtask.IsPreFinished(req.GroupId, myWorldtask, curTaskConf) { if !a.module.modelWorldtask.IsPreFinished(req.GroupId, myWorldtask, curTaskConf) {
code = pb.ErrorCode_WorldtaskLastUnFinished code = pb.ErrorCode_WorldtaskLastUnFinished
data.Title = code.ToString()
data.Message = fmt.Sprintf("%v前置任务%v未完成", curTaskConf.Key, curTaskConf.Ontxe) data.Message = fmt.Sprintf("%v前置任务%v未完成", curTaskConf.Key, curTaskConf.Ontxe)
return return
} }
@ -91,7 +93,6 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
if err == nil { if err == nil {
a.module.ModuleBuried.ActiveCondition(uid, utils.NoContain(rsp.CondiIds, curTaskConf.Completetask)...) a.module.ModuleBuried.ActiveCondition(uid, utils.NoContain(rsp.CondiIds, curTaskConf.Completetask)...)
} }
} }
a.sendMsg(session, WorldtaskSubtypeAccept, rsp) a.sendMsg(session, WorldtaskSubtypeAccept, rsp)

View File

@ -31,10 +31,8 @@ func (this *apiComp) Battlefinish(session comm.IUserSession, req *pb.WorldtaskBa
taskConf, err := this.module.configure.getWorldtaskById(req.TaskId) taskConf, err := this.module.configure.getWorldtaskById(req.TaskId)
if err != nil || taskConf == nil { if err != nil || taskConf == nil {
code = pb.ErrorCode_ConfigNoFound code = pb.ErrorCode_ConfigNoFound
log.Error("世界任务配置未找到", data.Title = code.ToString()
log.Field{Key: "uid", Value: uid}, data.Message = err.Error()
log.Field{Key: "taskId", Value: req.TaskId},
)
return return
} }
@ -50,10 +48,8 @@ func (this *apiComp) Battlefinish(session comm.IUserSession, req *pb.WorldtaskBa
if len(taskConf.Completetask) == 0 { if len(taskConf.Completetask) == 0 {
if err := this.module.modelWorldtask.finishTask(taskConf.Group, req.TaskId, userTask); err != nil { if err := this.module.modelWorldtask.finishTask(taskConf.Group, req.TaskId, userTask); err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
this.module.Error("世界任务战斗结果", data.Title = code.ToString()
log.Field{Key: "uid", Value: uid}, data.Message = err.Error()
log.Field{Key: "err", Value: err.Error()},
)
return return
} }
@ -102,17 +98,11 @@ func (this *apiComp) Battlefinish(session comm.IUserSession, req *pb.WorldtaskBa
} }
} else { } else {
data.Title = code.String() data.Title = code.ToString()
this.sendMsg(session, WorldtaskBattleFinish, rsp) data.Message = "战报校验错误"
return return
} }
this.module.Debug("校验战报",
log.Field{Key: "uid", Value: session.GetUserId()},
log.Field{Key: "taskId", Value: req.TaskId},
log.Field{Key: "战斗结果", Value: isWin},
)
//判断是否配置了通知module //判断是否配置了通知module
if len(taskConf.Module) == 0 { if len(taskConf.Module) == 0 {
// 发奖 // 发奖

View File

@ -47,12 +47,14 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
if curTaskConf.Group != req.GroupId { if curTaskConf.Group != req.GroupId {
code = pb.ErrorCode_WorldtaskGroupIdNosame code = pb.ErrorCode_WorldtaskGroupIdNosame
data.Title = code.ToString() data.Title = code.ToString()
data.Message = fmt.Sprintf("组ID一致,实际:%d 期望:%d", curTaskConf.Group, req.GroupId)
return return
} }
if curTaskConf.DeliverNpc == 0 { if curTaskConf.DeliverNpc == 0 {
code = pb.ErrorCode_WorldtaskNoProcess code = pb.ErrorCode_WorldtaskNoProcess
data.Title = code.ToString() data.Title = code.ToString()
data.Message = "配置DeliverNpc字段是0"
return return
} }
@ -68,6 +70,8 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
userTask, err := this.module.modelWorldtask.getWorldtask(uid) userTask, err := this.module.modelWorldtask.getWorldtask(uid)
if err != nil { if err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
data.Title = code.ToString()
data.Message = err.Error()
return return
} }
if userTask.Uid == "" { if userTask.Uid == "" {
@ -76,9 +80,9 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
// 前置任务ID 只有世界任务才校验前置 // 前置任务ID 只有世界任务才校验前置
if !this.module.modelWorldtask.IsPreFinished(req.GroupId, userTask, curTaskConf) { if !this.module.modelWorldtask.IsPreFinished(req.GroupId, userTask, curTaskConf) {
this.module.Debug("前置任务未完成", log.Field{Key: "uid", Value: uid}, log.Field{Key: "preTaskId", Value: curTaskConf.Ontxe}, log.Field{Key: "taskId", Value: curTaskConf.Key})
code = pb.ErrorCode_WorldtaskLastUnFinished code = pb.ErrorCode_WorldtaskLastUnFinished
this.sendMsg(session, WorldtaskSubtypeFinish, rsp) data.Title = code.ToString()
data.Message = fmt.Sprintf("任务[%v]的前置任务 [%v] 未完成", curTaskConf.Key, curTaskConf.Ontxe)
return return
} }
@ -90,6 +94,7 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
log.Field{Key: "taskId", Value: req.TaskId}, log.Field{Key: "taskId", Value: req.TaskId},
) )
this.module.modelWorldtask.taskFinishPush(session, req.GroupId, userTask, curTaskConf) this.module.modelWorldtask.taskFinishPush(session, req.GroupId, userTask, curTaskConf)
this.sendMsg(session, WorldtaskSubtypeFinish, rsp)
return return
} }
} }
@ -124,12 +129,8 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
// 完成任务 // 完成任务
if err := this.module.modelWorldtask.finishTask(req.GroupId, req.TaskId, userTask); err != nil { if err := this.module.modelWorldtask.finishTask(req.GroupId, req.TaskId, userTask); err != nil {
code = pb.ErrorCode_WorldtaskFinish code = pb.ErrorCode_WorldtaskFinish
this.module.Error("完成任务失败", data.Title = code.ToString()
log.Field{Key: "uid", Value: uid}, data.Message = err.Error()
log.Field{Key: "groupId", Value: req.GroupId},
log.Field{Key: "taskId", Value: req.TaskId},
log.Field{Key: "err", Value: err.Error()},
)
return return
} }
// 发奖 // 发奖

View File

@ -15,6 +15,7 @@ import (
var _ comm.IWorldtask = (*Worldtask)(nil) var _ comm.IWorldtask = (*Worldtask)(nil)
var moduleName_cn = "世界任务" var moduleName_cn = "世界任务"
type Worldtask struct { type Worldtask struct {
modules.ModuleBase modules.ModuleBase
api *apiComp api *apiComp
@ -36,7 +37,7 @@ func (this *Worldtask) Init(service core.IService, module core.IModule, options
func (this *Worldtask) OnInstallComp() { func (this *Worldtask) OnInstallComp() {
this.ModuleBase.OnInstallComp() this.ModuleBase.OnInstallComp()
event.RegisterGO(comm.EventBuriedComplete, this.TCondFinishNotify) event.Register(comm.EventBuriedComplete, this.TCondFinishNotify)
this.api = this.RegisterComp(new(apiComp)).(*apiComp) this.api = this.RegisterComp(new(apiComp)).(*apiComp)
this.modelWorldtask = this.RegisterComp(new(ModelWorldtask)).(*ModelWorldtask) this.modelWorldtask = this.RegisterComp(new(ModelWorldtask)).(*ModelWorldtask)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp) this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
@ -58,16 +59,19 @@ func (this *Worldtask) Start() (err error) {
} }
func (this *Worldtask) TCondFinishNotify(uid string, conids []int32) { func (this *Worldtask) TCondFinishNotify(uid string, conids []int32) {
this.Debug("世界任务完成条件通知", log.Field{Key: "uid", Value: uid}, log.Field{Key: "condIds", Value: conids})
session, ok := this.GetUserSession(uid) session, ok := this.GetUserSession(uid)
defer func() {
session.Push()
this.PutUserSession(session)
}()
if !ok { if !ok {
this.Errorln("获取session失败")
return return
} }
this.Debug("世界任务完成条件通知", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "condIds", Value: conids}) defer func() {
if ok {
session.Push()
}
this.PutUserSession(session)
}()
// 玩家世界任务 // 玩家世界任务
userTask, err := this.modelWorldtask.getWorldtask(uid) userTask, err := this.modelWorldtask.getWorldtask(uid)
if err != nil { if err != nil {
@ -77,7 +81,7 @@ func (this *Worldtask) TCondFinishNotify(uid string, conids []int32) {
var groupId, taskId int32 var groupId, taskId int32
// 检索condId是否是世界任务的完成条件 // 检索condId是否是世界任务的完成条件
finishedTaskIds := make(map[int32]int32) //达成的任务条件
finishedCondIds := []int32{} finishedCondIds := []int32{}
for _, c := range this.worldtaskConf.GetDataList() { for _, c := range this.worldtaskConf.GetDataList() {
for _, v := range c.Completetask { for _, v := range c.Completetask {
@ -86,7 +90,6 @@ func (this *Worldtask) TCondFinishNotify(uid string, conids []int32) {
//校验任务是否是当前任务 //校验任务是否是当前任务
if task, ok := userTask.CurrentTask[c.Group]; ok { if task, ok := userTask.CurrentTask[c.Group]; ok {
if task.NpcStatus == 1 && c.Key == task.TaskId { if task.NpcStatus == 1 && c.Key == task.TaskId {
finishedTaskIds[c.Group] = c.Key
groupId = c.Group groupId = c.Group
taskId = c.Key taskId = c.Key
finishedCondIds = append(finishedCondIds, condId) finishedCondIds = append(finishedCondIds, condId)
@ -98,10 +101,11 @@ func (this *Worldtask) TCondFinishNotify(uid string, conids []int32) {
} }
} }
if len(finishedTaskIds) == 0 { this.Debug("完成条件",
// this.Debug("未找到当前世界任务", log.Field{Key: "taskId", Value: taskId},
// log.Field{Key: "uid", Value: uid}, log.Field{Key: "condIds", Value: finishedCondIds})
// log.Field{Key: "finishedTaskIds", Value: finishedTaskIds})
if len(finishedCondIds) == 0 {
return return
} }
@ -132,9 +136,9 @@ func (this *Worldtask) TCondFinishNotify(uid string, conids []int32) {
TaskId: taskId, TaskId: taskId,
CondiIds: wt.CondiIds, CondiIds: wt.CondiIds,
}) })
// this.Debug("推送完成条件", this.Debug("当前任务所有条件完成",
// log.Field{Key: "condiIds", Value: wt.CondiIds}, log.Field{Key: "condiIds", Value: wt.CondiIds},
// log.Field{Key: "taskId", Value: taskId}) log.Field{Key: "taskId", Value: taskId})
// 当前任务配置 // 当前任务配置
curTaskConf, err := this.configure.getWorldtaskById(taskId) curTaskConf, err := this.configure.getWorldtaskById(taskId)

View File

@ -932,96 +932,95 @@ var file_worldtask_worldtask_msg_proto_rawDesc = []byte{
0x17, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x17, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d,
0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x74,
0x61, 0x73, 0x6b, 0x2f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x64, 0x62, 0x61, 0x73, 0x6b, 0x2f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x64, 0x62,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x12, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x12, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x61, 0x73, 0x6b, 0x4d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x22, 0x35, 0x0a, 0x11, 0x57, 0x6f,
0x74, 0x61, 0x73, 0x6b, 0x4d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x22, 0x35, 0x0a, 0x11, 0x57, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12,
0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x20, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e,
0x12, 0x20, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x44, 0x42, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x74, 0x61, 0x73,
0x2e, 0x44, 0x42, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x74, 0x61, 0x6b, 0x22, 0x46, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x41, 0x63,
0x73, 0x6b, 0x22, 0x46, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70,
0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75,
0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70,
0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x31, 0x0a, 0x13, 0x57, 0x6f,
0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73,
0x70, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x05, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x73, 0x22, 0x6b, 0x0a,
0x1b, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65,
0x74, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x73, 0x50, 0x75, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07,
0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67,
0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1a,
0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05,
0x52, 0x08, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x73, 0x22, 0x67, 0x0a, 0x19, 0x57, 0x6f,
0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x43,
0x6f, 0x6e, 0x64, 0x69, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70,
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49,
0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x31, 0x0a, 0x13, 0x57, 0x6f, 0x72,
0x64, 0x69, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70,
0x69, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x1a, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03,
0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x52, 0x65, 0x73, 0x28, 0x05, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x73, 0x22, 0x6b, 0x0a, 0x1b,
0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74,
0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x73, 0x50, 0x75, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x67,
0x64, 0x69, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72,
0x69, 0x49, 0x64, 0x22, 0x46, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18,
0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a,
0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x08, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52,
0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x08, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x73, 0x22, 0x67, 0x0a, 0x19, 0x57, 0x6f, 0x72,
0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x2d, 0x0a, 0x13, 0x57, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f,
0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x6e, 0x64, 0x69, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49,
0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64,
0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0xcc, 0x01, 0x0a, 0x15, 0x57, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x65, 0x78, 0x74, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x64,
0x50, 0x75, 0x73, 0x68, 0x12, 0x40, 0x0a, 0x08, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x69, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x1a, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x43,
0x73, 0x6b, 0x4e, 0x65, 0x78, 0x74, 0x74, 0x61, 0x73, 0x6b, 0x50, 0x75, 0x73, 0x68, 0x2e, 0x4e, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x52, 0x65, 0x73, 0x70,
0x65, 0x78, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6e, 0x65,
0x78, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x28, 0x0a, 0x0f, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68,
0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52,
0x0f, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73,
0x1a, 0x47, 0x0a, 0x0d, 0x4e, 0x65, 0x78, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x67, 0x0a, 0x17, 0x57, 0x6f, 0x72,
0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72,
0x74, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f,
0x6e, 0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x62, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x22, 0x3b, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f,
0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22,
0xb1, 0x01, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74,
0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07,
0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67,
0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x18,
0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c,
0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06,
0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70,
0x6f, 0x72, 0x74, 0x22, 0x33, 0x0a, 0x19, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b,
0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70,
0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x40, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6c, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x64,
0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x49, 0x64, 0x73, 0x50, 0x75, 0x69, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69,
0x73, 0x68, 0x12, 0x26, 0x0a, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x49, 0x64, 0x22, 0x46, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75,
0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x35, 0x0a, 0x19, 0x57, 0x6f, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70,
0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x72, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x2d, 0x0a, 0x13, 0x57, 0x6f,
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73,
0x64, 0x22, 0x36, 0x0a, 0x1a, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x61, 0x70, 0x74, 0x65, 0x72, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0xcc, 0x01, 0x0a, 0x15, 0x57, 0x6f,
0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x65, 0x78, 0x74, 0x74, 0x61, 0x73, 0x6b, 0x50,
0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x75, 0x73, 0x68, 0x12, 0x40, 0x0a, 0x08, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x18,
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73,
0x6b, 0x4e, 0x65, 0x78, 0x74, 0x74, 0x61, 0x73, 0x6b, 0x50, 0x75, 0x73, 0x68, 0x2e, 0x4e, 0x65,
0x78, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6e, 0x65, 0x78,
0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x28, 0x0a, 0x0f, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65,
0x64, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0f,
0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x1a,
0x47, 0x0a, 0x0d, 0x4e, 0x65, 0x78, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b,
0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x0a, 0x2e, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x67, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6c,
0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74,
0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e,
0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65,
0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x22, 0x3b, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61,
0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a,
0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61,
0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0xb1,
0x01, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67,
0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72,
0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x18, 0x0a,
0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72,
0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61,
0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f,
0x72, 0x74, 0x22, 0x33, 0x0a, 0x19, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12,
0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x40, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6c, 0x64,
0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x49, 0x64, 0x73, 0x50, 0x75, 0x73,
0x68, 0x12, 0x26, 0x0a, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52,
0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x35, 0x0a, 0x19, 0x57, 0x6f, 0x72,
0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x72, 0x65, 0x77,
0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64,
0x22, 0x36, 0x0a, 0x1a, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x61,
0x70, 0x74, 0x65, 0x72, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18,
0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -1084,7 +1083,6 @@ func file_worldtask_worldtask_msg_proto_init() {
} }
file_battle_battle_msg_proto_init() file_battle_battle_msg_proto_init()
file_worldtask_worldtask_db_proto_init() file_worldtask_worldtask_db_proto_init()
file_errorcode_proto_init()
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_worldtask_worldtask_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_worldtask_worldtask_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WorldtaskMineReq); i { switch v := v.(*WorldtaskMineReq); i {