Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
aef30ba083
@ -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 {
|
||||
code = pb.ErrorCode_DBError
|
||||
data = &pb.ErrorData{
|
||||
Title: pb.GetErrorCodeMsg(code),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "info", &pb.AcademyInfoResp{Info: info})
|
||||
|
@ -30,6 +30,10 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.AcademyReceiveRe
|
||||
if iswin {
|
||||
if info, err = this.module.modelAcademy.queryInfo(session.GetUserId()); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
data = &pb.ErrorData{
|
||||
Title: pb.GetErrorCodeMsg(code),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
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 {
|
||||
code = pb.ErrorCode_DBError
|
||||
data = &pb.ErrorData{
|
||||
Title: pb.GetErrorCodeMsg(code),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
cd = pb.ErrorCode_ConfigNoFound
|
||||
data = &pb.ErrorData{
|
||||
Title: pb.GetErrorCodeMsg(code),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
cd, record = this.module.battle.CreateEveBattle(session, &pb.BattleEVEReq{
|
||||
|
@ -1,6 +1,7 @@
|
||||
package academy
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
@ -18,8 +19,7 @@ func (this *apiComp) TeachingReceive(session comm.IUserSession, req *pb.AcademyT
|
||||
iswin bool
|
||||
level *cfg.GameHeroStrategyData
|
||||
info *pb.DBAcademy
|
||||
// group []*cfg.GameTeachingData
|
||||
err error
|
||||
err error
|
||||
)
|
||||
if code = this.TeachingReceiveCheck(session, req); code != pb.ErrorCode_Success {
|
||||
return
|
||||
@ -30,14 +30,26 @@ func (this *apiComp) TeachingReceive(session comm.IUserSession, req *pb.AcademyT
|
||||
if iswin {
|
||||
if info, err = this.module.modelAcademy.queryInfo(session.GetUserId()); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
data = &pb.ErrorData{
|
||||
Title: pb.GetErrorCodeMsg(code),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
if level, err = this.module.configure.getGameHeroTeaching(req.HeroId); err != nil {
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
data = &pb.ErrorData{
|
||||
Title: pb.GetErrorCodeMsg(code),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
if req.Report.Completetask == nil || len(req.Report.Completetask) != len(level.Task) {
|
||||
code = pb.ErrorCode_AcademyTaskNoCompleteTask
|
||||
data = &pb.ErrorData{
|
||||
Title: pb.GetErrorCodeMsg(code),
|
||||
Message: fmt.Sprintf("目标任务:%v 完成任务:%v", level.Task, req.Report.Completetask),
|
||||
}
|
||||
return
|
||||
}
|
||||
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 {
|
||||
code = pb.ErrorCode_DBError
|
||||
data = &pb.ErrorData{
|
||||
Title: pb.GetErrorCodeMsg(code),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
this.module.DispenseRes(session, level.Award, true)
|
||||
|
@ -1,7 +1,6 @@
|
||||
package academy
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
@ -71,7 +70,7 @@ func (this *configureComp) getGameHeroTeaching(id string) (result *cfg.GameHeroS
|
||||
this.module.Errorln(err)
|
||||
} else {
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package arena
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/sys/mgo"
|
||||
"go_dreamfactory/pb"
|
||||
@ -25,16 +26,28 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ArenaBuyReq) (code p
|
||||
err error
|
||||
)
|
||||
if code = this.BuyCheck(session, req); code != pb.ErrorCode_Success {
|
||||
data = &pb.ErrorData{
|
||||
Title: pb.GetErrorCodeMsg(code),
|
||||
Message: fmt.Sprintf("请求参数:%+v", req),
|
||||
}
|
||||
return
|
||||
}
|
||||
if info, err = this.module.modelArena.queryPlayerInfo(session.GetUserId()); err != nil && err != mgo.MongodbNil {
|
||||
code = pb.ErrorCode_CacheReadError
|
||||
data = &pb.ErrorData{
|
||||
Title: pb.GetErrorCodeMsg(code),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
this.module.modelArena.recoverTicket(session, info)
|
||||
|
||||
if maxbuy, err = this.module.ModuleTools.GetPriceGroupLen(comm.ArenaBuyType); err != nil {
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
data = &pb.ErrorData{
|
||||
Title: pb.GetErrorCodeMsg(code),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
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
|
||||
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...)
|
||||
} else {
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
data = &pb.ErrorData{
|
||||
Title: pb.GetErrorCodeMsg(code),
|
||||
Message: err.Error(),
|
||||
}
|
||||
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 {
|
||||
@ -67,6 +79,10 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ArenaBuyReq) (code p
|
||||
// info.Ticket += req.BuyNum
|
||||
if err = this.module.modelArena.updateArenaUserInfo(info); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
data = &pb.ErrorData{
|
||||
Title: pb.GetErrorCodeMsg(code),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "buy", &pb.MoonfantasyBuyResp{Issucc: true, BattleNum: info.Buynum})
|
||||
|
@ -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 {
|
||||
cd = pb.ErrorCode_DBError
|
||||
data = &pb.ErrorData{
|
||||
Title: pb.GetErrorCodeMsg(code),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
this.module.modelArena.recoverTicket(session, red)
|
||||
if cd = this.module.ConsumeRes(session, []*cfg.Gameatn{this.module.ModuleTools.GetGlobalConf().ArenaTicketCos}, true); cd != pb.ErrorCode_Success {
|
||||
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 {
|
||||
for i, v := range req.Battle.Format {
|
||||
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 heros, err = this.module.modelArena.queryUserHeros(session.GetUserId(), req.Battle.Format); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
data = &pb.ErrorData{
|
||||
Title: pb.GetErrorCodeMsg(code),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
if red.Defend == nil {
|
||||
@ -96,11 +97,19 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallenge
|
||||
if !req.Isai {
|
||||
if bule, err = this.module.modelArena.queryArenaPlayer(req.Playerid); err != nil {
|
||||
cd = pb.ErrorCode_DBError
|
||||
data = &pb.ErrorData{
|
||||
Title: pb.GetErrorCodeMsg(code),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if bule, err = this.module.modelArena.getAI(req.MformatId); err != nil {
|
||||
cd = pb.ErrorCode_DBError
|
||||
data = &pb.ErrorData{
|
||||
Title: pb.GetErrorCodeMsg(code),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
@ -118,6 +127,10 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallenge
|
||||
red.Prededuction = -1 * redplay.Changeintegral
|
||||
if err = this.module.modelArena.updateArenaUserInfo(red); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
data = &pb.ErrorData{
|
||||
Title: pb.GetErrorCodeMsg(code),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
cd, record = this.module.battle.CreatePvpBattle(session, &pb.BattlePVPReq{
|
||||
|
@ -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 {
|
||||
code = pb.ErrorCode_DBError
|
||||
data = &pb.ErrorData{
|
||||
Title: pb.GetErrorCodeMsg(code),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
if req.Iswin {
|
||||
@ -44,7 +48,12 @@ func (this *apiComp) ChallengeReward(session comm.IUserSession, req *pb.ArenaCha
|
||||
}
|
||||
info.Streak++
|
||||
if reward, err = this.module.configure.getActiveRewardById(info.Dan); err != nil {
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
this.module.Errorln(err)
|
||||
data = &pb.ErrorData{
|
||||
Title: pb.GetErrorCodeMsg(code),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
if code = this.module.DispenseRes(session, reward.WinReward, true); code != pb.ErrorCode_Success {
|
||||
|
@ -2,6 +2,7 @@ package arena
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/sys/configure"
|
||||
@ -90,7 +91,7 @@ func (this *configureComp) getActiveRewardById(lv int32) (result *cfg.GameArenaA
|
||||
this.module.Errorln(err)
|
||||
} else {
|
||||
if result, ok = v.(*cfg.GameArenaActiveReward).GetDataMap()[lv]; !ok {
|
||||
err = fmt.Errorf("未找到段位:%d配置", lv)
|
||||
err = comm.NewNotFoundConfErr("", game_arenaactivereward, lv)
|
||||
this.module.Errorln(err)
|
||||
}
|
||||
}
|
||||
|
@ -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.trigger(args.Uid, args.Burieds...)
|
||||
return
|
||||
}
|
||||
|
||||
//激活数据采集点
|
||||
@ -201,6 +202,7 @@ func (this *Buried) TriggerBuried(uid string, burieds ...*pb.BuriedParam) {
|
||||
comm.Service_Worker,
|
||||
string(comm.Rpc_ModuleBuriedTrigger),
|
||||
pb.Rpc_ModuleBuriedTriggerReq{
|
||||
Uid: uid,
|
||||
Burieds: burieds,
|
||||
},
|
||||
nil); err != nil {
|
||||
|
@ -28,7 +28,7 @@ func (this *Options) GetLog() log.ILogger {
|
||||
}
|
||||
|
||||
func (this *Options) LoadConfig(settings map[string]interface{}) (err error) {
|
||||
this.Debug = true
|
||||
this.Debug = false
|
||||
if settings != nil {
|
||||
err = mapstructure.Decode(settings, this)
|
||||
}
|
||||
|
@ -24,7 +24,8 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
|
||||
user := a.module.ModuleUser.GetUser(uid)
|
||||
if user == nil {
|
||||
code = pb.ErrorCode_UserSessionNobeing
|
||||
data.Title = code.String()
|
||||
data.Title = code.ToString()
|
||||
data.Datastring = uid
|
||||
return
|
||||
}
|
||||
|
||||
@ -32,7 +33,7 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
|
||||
myWorldtask, err := a.module.modelWorldtask.getWorldtask(uid)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
data.Title = code.String()
|
||||
data.Title = code.ToString()
|
||||
data.Datastring = uid
|
||||
return
|
||||
}
|
||||
@ -41,7 +42,7 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
|
||||
curTaskConf, err := a.module.configure.getWorldtaskById(req.TaskId)
|
||||
if err != nil || curTaskConf == nil {
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
data.Title = code.String()
|
||||
data.Title = code.ToString()
|
||||
data.Message = err.Error()
|
||||
return
|
||||
}
|
||||
@ -49,7 +50,7 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
|
||||
// 判断玩家等级要求
|
||||
if user.Lv < curTaskConf.Lock {
|
||||
code = pb.ErrorCode_WorldtaskLvNotEnough
|
||||
data.Title = code.String()
|
||||
data.Title = code.ToString()
|
||||
data.Message = fmt.Sprintf("实际等级:%d 期望等级:%d", user.Lv, curTaskConf.Lock)
|
||||
return
|
||||
}
|
||||
@ -57,6 +58,7 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
|
||||
// 前置任务ID 只有世界任务才校验前置
|
||||
if !a.module.modelWorldtask.IsPreFinished(req.GroupId, myWorldtask, curTaskConf) {
|
||||
code = pb.ErrorCode_WorldtaskLastUnFinished
|
||||
data.Title = code.ToString()
|
||||
data.Message = fmt.Sprintf("%v前置任务%v未完成", curTaskConf.Key, curTaskConf.Ontxe)
|
||||
return
|
||||
}
|
||||
@ -91,7 +93,6 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
|
||||
if err == nil {
|
||||
a.module.ModuleBuried.ActiveCondition(uid, utils.NoContain(rsp.CondiIds, curTaskConf.Completetask)...)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
a.sendMsg(session, WorldtaskSubtypeAccept, rsp)
|
||||
|
@ -31,10 +31,8 @@ func (this *apiComp) Battlefinish(session comm.IUserSession, req *pb.WorldtaskBa
|
||||
taskConf, err := this.module.configure.getWorldtaskById(req.TaskId)
|
||||
if err != nil || taskConf == nil {
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
log.Error("世界任务配置未找到",
|
||||
log.Field{Key: "uid", Value: uid},
|
||||
log.Field{Key: "taskId", Value: req.TaskId},
|
||||
)
|
||||
data.Title = code.ToString()
|
||||
data.Message = err.Error()
|
||||
return
|
||||
}
|
||||
|
||||
@ -50,10 +48,8 @@ func (this *apiComp) Battlefinish(session comm.IUserSession, req *pb.WorldtaskBa
|
||||
if len(taskConf.Completetask) == 0 {
|
||||
if err := this.module.modelWorldtask.finishTask(taskConf.Group, req.TaskId, userTask); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
this.module.Error("世界任务战斗结果",
|
||||
log.Field{Key: "uid", Value: uid},
|
||||
log.Field{Key: "err", Value: err.Error()},
|
||||
)
|
||||
data.Title = code.ToString()
|
||||
data.Message = err.Error()
|
||||
return
|
||||
}
|
||||
|
||||
@ -102,17 +98,11 @@ func (this *apiComp) Battlefinish(session comm.IUserSession, req *pb.WorldtaskBa
|
||||
}
|
||||
|
||||
} else {
|
||||
data.Title = code.String()
|
||||
this.sendMsg(session, WorldtaskBattleFinish, rsp)
|
||||
data.Title = code.ToString()
|
||||
data.Message = "战报校验错误"
|
||||
return
|
||||
}
|
||||
|
||||
this.module.Debug("校验战报",
|
||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||
log.Field{Key: "taskId", Value: req.TaskId},
|
||||
log.Field{Key: "战斗结果", Value: isWin},
|
||||
)
|
||||
|
||||
//判断是否配置了通知module
|
||||
if len(taskConf.Module) == 0 {
|
||||
// 发奖
|
||||
|
@ -47,12 +47,14 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
|
||||
if curTaskConf.Group != req.GroupId {
|
||||
code = pb.ErrorCode_WorldtaskGroupIdNosame
|
||||
data.Title = code.ToString()
|
||||
data.Message = fmt.Sprintf("组ID一致,实际:%d 期望:%d", curTaskConf.Group, req.GroupId)
|
||||
return
|
||||
}
|
||||
|
||||
if curTaskConf.DeliverNpc == 0 {
|
||||
code = pb.ErrorCode_WorldtaskNoProcess
|
||||
data.Title = code.ToString()
|
||||
data.Message = "配置DeliverNpc字段是0"
|
||||
return
|
||||
}
|
||||
|
||||
@ -68,6 +70,8 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
|
||||
userTask, err := this.module.modelWorldtask.getWorldtask(uid)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
data.Title = code.ToString()
|
||||
data.Message = err.Error()
|
||||
return
|
||||
}
|
||||
if userTask.Uid == "" {
|
||||
@ -76,9 +80,9 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
|
||||
|
||||
// 前置任务ID 只有世界任务才校验前置
|
||||
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
|
||||
this.sendMsg(session, WorldtaskSubtypeFinish, rsp)
|
||||
data.Title = code.ToString()
|
||||
data.Message = fmt.Sprintf("任务[%v]的前置任务 [%v] 未完成", curTaskConf.Key, curTaskConf.Ontxe)
|
||||
return
|
||||
}
|
||||
|
||||
@ -90,6 +94,7 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
|
||||
log.Field{Key: "taskId", Value: req.TaskId},
|
||||
)
|
||||
this.module.modelWorldtask.taskFinishPush(session, req.GroupId, userTask, curTaskConf)
|
||||
this.sendMsg(session, WorldtaskSubtypeFinish, rsp)
|
||||
return
|
||||
}
|
||||
}
|
||||
@ -102,7 +107,7 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
|
||||
for _, condId := range curTaskConf.Completetask {
|
||||
if v, ok := userTask.CurrentTask[req.GroupId]; ok {
|
||||
if _, ok := utils.Findx(v.CondiIds, condId); !ok {
|
||||
//
|
||||
//
|
||||
conIds, err := this.module.ModuleBuried.CheckCondition(uid, condId)
|
||||
if err == nil && len(conIds) > 0 {
|
||||
condiFlag = true
|
||||
@ -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 {
|
||||
code = pb.ErrorCode_WorldtaskFinish
|
||||
this.module.Error("完成任务失败",
|
||||
log.Field{Key: "uid", Value: uid},
|
||||
log.Field{Key: "groupId", Value: req.GroupId},
|
||||
log.Field{Key: "taskId", Value: req.TaskId},
|
||||
log.Field{Key: "err", Value: err.Error()},
|
||||
)
|
||||
data.Title = code.ToString()
|
||||
data.Message = err.Error()
|
||||
return
|
||||
}
|
||||
// 发奖
|
||||
|
@ -15,6 +15,7 @@ import (
|
||||
var _ comm.IWorldtask = (*Worldtask)(nil)
|
||||
|
||||
var moduleName_cn = "世界任务"
|
||||
|
||||
type Worldtask struct {
|
||||
modules.ModuleBase
|
||||
api *apiComp
|
||||
@ -36,7 +37,7 @@ func (this *Worldtask) Init(service core.IService, module core.IModule, options
|
||||
|
||||
func (this *Worldtask) OnInstallComp() {
|
||||
this.ModuleBase.OnInstallComp()
|
||||
event.RegisterGO(comm.EventBuriedComplete, this.TCondFinishNotify)
|
||||
event.Register(comm.EventBuriedComplete, this.TCondFinishNotify)
|
||||
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
|
||||
this.modelWorldtask = this.RegisterComp(new(ModelWorldtask)).(*ModelWorldtask)
|
||||
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) {
|
||||
this.Debug("世界任务完成条件通知", log.Field{Key: "uid", Value: uid}, log.Field{Key: "condIds", Value: conids})
|
||||
|
||||
session, ok := this.GetUserSession(uid)
|
||||
defer func() {
|
||||
session.Push()
|
||||
this.PutUserSession(session)
|
||||
}()
|
||||
if !ok {
|
||||
this.Errorln("获取session失败")
|
||||
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)
|
||||
if err != nil {
|
||||
@ -77,7 +81,7 @@ func (this *Worldtask) TCondFinishNotify(uid string, conids []int32) {
|
||||
|
||||
var groupId, taskId int32
|
||||
// 检索condId是否是世界任务的完成条件
|
||||
finishedTaskIds := make(map[int32]int32) //达成的任务条件
|
||||
|
||||
finishedCondIds := []int32{}
|
||||
for _, c := range this.worldtaskConf.GetDataList() {
|
||||
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.NpcStatus == 1 && c.Key == task.TaskId {
|
||||
finishedTaskIds[c.Group] = c.Key
|
||||
groupId = c.Group
|
||||
taskId = c.Key
|
||||
finishedCondIds = append(finishedCondIds, condId)
|
||||
@ -98,10 +101,11 @@ func (this *Worldtask) TCondFinishNotify(uid string, conids []int32) {
|
||||
}
|
||||
}
|
||||
|
||||
if len(finishedTaskIds) == 0 {
|
||||
// this.Debug("未找到当前世界任务",
|
||||
// log.Field{Key: "uid", Value: uid},
|
||||
// log.Field{Key: "finishedTaskIds", Value: finishedTaskIds})
|
||||
this.Debug("完成条件",
|
||||
log.Field{Key: "taskId", Value: taskId},
|
||||
log.Field{Key: "condIds", Value: finishedCondIds})
|
||||
|
||||
if len(finishedCondIds) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
@ -132,9 +136,9 @@ func (this *Worldtask) TCondFinishNotify(uid string, conids []int32) {
|
||||
TaskId: taskId,
|
||||
CondiIds: wt.CondiIds,
|
||||
})
|
||||
// this.Debug("推送完成条件",
|
||||
// log.Field{Key: "condiIds", Value: wt.CondiIds},
|
||||
// log.Field{Key: "taskId", Value: taskId})
|
||||
this.Debug("当前任务所有条件完成",
|
||||
log.Field{Key: "condiIds", Value: wt.CondiIds},
|
||||
log.Field{Key: "taskId", Value: taskId})
|
||||
|
||||
// 当前任务配置
|
||||
curTaskConf, err := this.configure.getWorldtaskById(taskId)
|
||||
|
@ -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,
|
||||
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,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64,
|
||||
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x12, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6c, 0x64,
|
||||
0x74, 0x61, 0x73, 0x6b, 0x4d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x22, 0x35, 0x0a, 0x11, 0x57,
|
||||
0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||
0x12, 0x20, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c,
|
||||
0x2e, 0x44, 0x42, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x74, 0x61,
|
||||
0x73, 0x6b, 0x22, 0x46, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x41,
|
||||
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,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x12, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74,
|
||||
0x61, 0x73, 0x6b, 0x4d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x22, 0x35, 0x0a, 0x11, 0x57, 0x6f,
|
||||
0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12,
|
||||
0x20, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e,
|
||||
0x44, 0x42, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x74, 0x61, 0x73,
|
||||
0x6b, 0x22, 0x46, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x41, 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, 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, 0x22, 0x4e, 0x0a, 0x1a, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b,
|
||||
0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 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, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e,
|
||||
0x64, 0x69, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x64,
|
||||
0x69, 0x49, 0x64, 0x22, 0x46, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b,
|
||||
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, 0x22, 0x2d, 0x0a, 0x13, 0x57,
|
||||
0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 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, 0xcc, 0x01, 0x0a, 0x15, 0x57,
|
||||
0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x65, 0x78, 0x74, 0x74, 0x61, 0x73, 0x6b,
|
||||
0x50, 0x75, 0x73, 0x68, 0x12, 0x40, 0x0a, 0x08, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x61, 0x73, 0x6b,
|
||||
0x18, 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,
|
||||
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, 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, 0x22, 0x4e, 0x0a, 0x1a, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x43,
|
||||
0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 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,
|
||||
0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x64,
|
||||
0x69, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69,
|
||||
0x49, 0x64, 0x22, 0x46, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 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, 0x22, 0x2d, 0x0a, 0x13, 0x57, 0x6f,
|
||||
0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 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, 0xcc, 0x01, 0x0a, 0x15, 0x57, 0x6f,
|
||||
0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x65, 0x78, 0x74, 0x74, 0x61, 0x73, 0x6b, 0x50,
|
||||
0x75, 0x73, 0x68, 0x12, 0x40, 0x0a, 0x08, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x18,
|
||||
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 (
|
||||
@ -1084,7 +1083,6 @@ func file_worldtask_worldtask_msg_proto_init() {
|
||||
}
|
||||
file_battle_battle_msg_proto_init()
|
||||
file_worldtask_worldtask_db_proto_init()
|
||||
file_errorcode_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_worldtask_worldtask_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WorldtaskMineReq); i {
|
||||
|
Loading…
Reference in New Issue
Block a user