This commit is contained in:
wh_zcy 2023-06-12 20:14:43 +08:00
parent 79a94117a4
commit c350ccba90
8 changed files with 144 additions and 229 deletions

View File

@ -1,88 +0,0 @@
package main
import (
"fmt"
"go_dreamfactory/cmd/robot"
"go_dreamfactory/pb"
"os"
"github.com/sirupsen/logrus"
flag "github.com/spf13/pflag"
"go.mongodb.org/mongo-driver/bson/primitive"
"github.com/spf13/cobra"
)
func emptyRun(*cobra.Command, []string) {}
var RootCmd = &cobra.Command{
Use: "robot",
Short: "命令行",
Long: "命令行工具",
Run: emptyRun,
}
func Execute() {
if err := RootCmd.Execute(); err != nil {
fmt.Fprintln(os.Stdin, err)
os.Exit(1)
}
}
func init() {
RootCmd.AddCommand(runCmd)
initLog()
robot.InitDb()
}
var account = flag.String("account", "", "登录账号")
var sid = flag.String("sid", "0", "区服ID")
var create = flag.Bool("create", false, "是否创建新账号") //false 不创建新账号
var role = flag.Bool("role", false, "创角")
func CloneNewHero(hero *pb.DBHero) (newHero *pb.DBHero) {
newHero = &*hero
newHero.Id = primitive.NewObjectID().Hex()
return
}
func main() {
Execute()
}
var runCmd = &cobra.Command{
Use: "run",
Short: "启动",
Run: func(cmd *cobra.Command, args []string) {
opts := robot.DefaultOpts()
opts.Create = *create
opts.Account = *account
opts.ServerId = *sid
opts.Role = *role
r := robot.NewRobot(opts)
r.Run()
},
}
func initLog() {
logrus.New()
logrus.SetFormatter(&logrus.TextFormatter{
ForceColors: false,
FullTimestamp: false,
})
//设置output,默认为stderr,可以为任何io.Writer比如文件*os.File
// file, err := os.OpenFile("robot.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)
// writers := []io.Writer{
// file,
// os.Stdout}
// //同时写文件和屏幕
// fileAndStdoutWriter := io.MultiWriter(writers...)
// if err == nil {
// logrus.SetOutput(fileAndStdoutWriter)
// } else {
// logrus.Info("failed to log to file.")
// }
}

View File

@ -43,7 +43,7 @@ var (
// string(comm.ModuleRtask),
// string(comm.ModuleLinestory),
// string(comm.ModuleGourmet),
// string(comm.ModuleSociaty),
string("sociaty"),
// string(comm.ModuleTroll),
// string(comm.ModuleGrowtask),
string("worldtask"),
@ -134,8 +134,8 @@ var (
"sociaty": {
// common.MF(comm.ModuleSociaty, sociaty.SociatySubTypeList),
// common.MF(comm.ModuleSociaty, sociaty.SociatySubTypeCreate),
// common.MF(comm.ModuleSociaty, sociaty.SociatySubTypeMine),
// common.MF(comm.ModuleSociaty, sociaty.SociatySubTypeTasklist),
common.MF("sociaty", "mine"),
common.MF("sociaty", "tasklist"),
// common.MF(comm.ModuleSociaty, sociaty.SociatySubTypeRank),
// common.MF(comm.ModuleSociaty, "boss"),
},
@ -146,9 +146,9 @@ var (
// common.MF(comm.ModuleGrowtask, growtask.GrowtaskSubTypeList),
},
"worldtask": {
// common.MF(comm.ModuleWorldtask, worldtask.WorldtaskSubtypeMine),
common.MF("worldtask", "mine"),
// common.MF(comm.ModuleWorldtask, "check"),
common.MF("worldtask", "test"),
common.MF("worldtask", "trigger"),
},
"smithy": {
common.MF("smithy", "tasklist"),
@ -701,18 +701,18 @@ var (
// Enabled: true,
// },
// sociaty
// string(comm.ModuleSociaty): {
// NavLabel: "公会",
// MainType: string(comm.ModuleSociaty),
// Enabled: true,
// },
// common.MF(comm.ModuleSociaty, sociaty.SociatySubTypeCreate): {
// NavLabel: "公会创建",
// Desc: "公会创建",
// MainType: string(comm.ModuleSociaty),
// SubType: sociaty.SociatySubTypeCreate,
// Enabled: true,
// },
string("sociaty"): {
NavLabel: "公会",
MainType: "sociaty",
Enabled: true,
},
common.MF("sociaty", "create"): {
NavLabel: "公会创建",
Desc: "公会创建",
MainType: "sociaty",
SubType: "create",
Enabled: true,
},
// common.MF(comm.ModuleSociaty, sociaty.SociatySubTypeList): {
// NavLabel: "公会推荐",
// Desc: "公会列表",
@ -723,20 +723,20 @@ var (
// return "不打印"
// },
// },
// common.MF(comm.ModuleSociaty, sociaty.SociatySubTypeMine): {
// NavLabel: "我的公会",
// Desc: "我的公会",
// MainType: string(comm.ModuleSociaty),
// SubType: sociaty.SociatySubTypeMine,
// Enabled: true,
// },
// common.MF(comm.ModuleSociaty, sociaty.SociatySubTypeTasklist): {
// NavLabel: "任务列表",
// Desc: "任务列表",
// MainType: string(comm.ModuleSociaty),
// SubType: sociaty.SociatySubTypeTasklist,
// Enabled: true,
// },
common.MF("sociaty", "mine"): {
NavLabel: "我的公会",
Desc: "我的公会",
MainType: "sociaty",
SubType: "mine",
Enabled: true,
},
common.MF("sociaty", "tasklist"): {
NavLabel: "任务列表",
Desc: "任务列表",
MainType: "sociaty",
SubType: "tasklist",
Enabled: true,
},
// common.MF(comm.ModuleSociaty, sociaty.SociatySubTypeRank): {
// NavLabel: "排行榜",
// Desc: "排行榜",
@ -778,18 +778,18 @@ var (
// Enabled: true,
// },
// worldtask
// string(comm.ModuleWorldtask): {
// NavLabel: "世界任务",
// MainType: string(comm.ModuleWorldtask),
// Enabled: true,
// },
// common.MF(comm.ModuleWorldtask, worldtask.WorldtaskSubtypeMine): {
// NavLabel: "我的任务",
// Desc: "世界任务剧情",
// MainType: string(comm.ModuleWorldtask),
// SubType: worldtask.WorldtaskSubtypeMine,
// Enabled: true,
// },
string("worldtask"): {
NavLabel: "世界任务",
MainType: "worldtask",
Enabled: true,
},
common.MF("worldtask", "mine"): {
NavLabel: "我的任务",
Desc: "世界任务剧情",
MainType: "worldtask",
SubType: "mine",
Enabled: true,
},
// common.MF(comm.ModuleWorldtask, "check"): {
// NavLabel: "模拟",
// Desc: "世界任务自动执行模拟",
@ -797,11 +797,11 @@ var (
// SubType: "check",
// Enabled: true,
// },
common.MF("worldtask", "test"): {
common.MF("worldtask", "trigger"): {
NavLabel: "触发条件",
Desc: "触发条件",
MainType: "worldtask",
SubType: "test",
SubType: "trigger",
Enabled: true,
},
// smithy

View File

@ -93,7 +93,7 @@ var (
// pagoda
// common.MF(comm.ModulePagoda, "getlist"): &formview.PagodaListView{},
// rtask
common.MF("worldtask", "test"): &formview.RtaskTestView{},
common.MF("worldtask", "trigger"): &formview.RtaskTestView{},
// linestory
// common.MF(comm.ModuleLinestory, linestory.LinestorySubTypeChapter): &formview.LinestoryMineView{},
// common.MF(comm.ModuleLibrary, library.LibraryFetterstoryTaskResp): &formview.FetterstoryView{},
@ -102,8 +102,8 @@ var (
// sociaty
// common.MF(comm.ModuleSociaty, sociaty.SociatySubTypeList): &formview.SociatyListView{},
// common.MF(comm.ModuleSociaty, sociaty.SociatySubTypeCreate): &formview.SociatyCreateView{},
// common.MF(comm.ModuleSociaty, sociaty.SociatySubTypeMine): &formview.SociatyMineView{},
// common.MF(comm.ModuleSociaty, sociaty.SociatySubTypeTasklist): &formview.SociatyTasklistView{},
common.MF("sociaty", "mine"): &formview.SociatyMineView{},
common.MF("sociaty", "tasklist"): &formview.SociatyTasklistView{},
// common.MF(comm.ModuleSociaty, sociaty.SociatySubTypeRank): &formview.SociatyRankView{},
// common.MF(comm.ModuleSociaty, "boss"): &formview.SociatyBossView{},
// troll
@ -111,7 +111,7 @@ var (
// growtask
// common.MF(comm.ModuleGrowtask, growtask.GrowtaskSubTypeList): &formview.GrowtaskListView{},
//worldtask
// common.MF(comm.ModuleWorldtask, worldtask.WorldtaskSubtypeMine): &formview.WorldtaskMineView{},
common.MF("worldtask", "mine"): &formview.WorldtaskMineView{},
// common.MF(comm.ModuleWorldtask, "check"): &formview.CheckWorldtaskView{},
// common.MF(comm.ModuleWorldtask, "test"): &formview.RtaskTestView{},
// //smithy

View File

@ -66,7 +66,7 @@ func (this *RtaskTestView) CreateView(t *model.TestCase) fyne.CanvasObject {
if err := service.GetPttService().SendToClient(
t.MainType,
t.SubType,
&pb.WorldtaskTestReq{
&pb.WorldtaskTriggerReq{
RtaskType: cast.ToInt32(rtaskTypeInput.Text),
Params: utils.TrInt32(paramsInput.Text),
CondiId: cast.ToInt32(condiInput.Text),

View File

@ -8,6 +8,7 @@ import (
"go_dreamfactory/cmd/v2/service"
"go_dreamfactory/cmd/v2/service/observer"
"go_dreamfactory/comm"
// "go_dreamfactory/modules/sociaty"
"go_dreamfactory/pb"
"go_dreamfactory/utils"
@ -83,7 +84,7 @@ func (this *SociatyMineView) CreateView(t *model.TestCase) fyne.CanvasObject {
this.loadSociaty = func() {
if err := service.GetPttService().SendToClient(
t.MainType,
"",
"mine",
&pb.SociatyMineReq{},
); err != nil {
logrus.Error(err)
@ -107,7 +108,7 @@ func (this *SociatyMineView) CreateView(t *model.TestCase) fyne.CanvasObject {
}
if err := service.GetPttService().SendToClient(
t.MainType,
"",
"quit",
&pb.SociatyQuitReq{},
); err != nil {
logrus.Error(err)
@ -129,7 +130,7 @@ func (this *SociatyMineView) CreateView(t *model.TestCase) fyne.CanvasObject {
}
if err := service.GetPttService().SendToClient(
t.MainType,
"",
"dismiss",
&pb.SociatyDismissReq{},
); err != nil {
logrus.Error(err)
@ -148,7 +149,7 @@ func (this *SociatyMineView) CreateView(t *model.TestCase) fyne.CanvasObject {
}
if err := service.GetPttService().SendToClient(
t.MainType,
"",
"dismiss",
&pb.SociatyDismissReq{
Dismiss: 1, //取消
},
@ -289,9 +290,9 @@ func (this *SociatyMineView) dataListener(item *entryItem) {
this.obs.AddListener(observer.EVENT_REQ_RSP, observer.Listener{
OnNotify: func(d interface{}, args ...interface{}) {
data := d.(*pb.UserMessage)
if data.MainType == string("sociaty") {
if data.MainType == "sociaty" {
switch data.SubType {
case "":
case "mine":
rsp := &pb.SociatyMineResp{}
if !comm.ProtoUnmarshal(data, rsp) {
@ -332,7 +333,7 @@ func (this *SociatyMineView) dataListener(item *entryItem) {
this.form.Refresh()
//踢人
case "1":
case "discharge":
rsp := &pb.SociatyDischargeResp{}
if !comm.ProtoUnmarshal(data, rsp) {
logrus.Error("unmarshal err")
@ -367,8 +368,8 @@ func (this *SociatyMineView) showSociatyApplyListWin() {
return
}
if err := service.GetPttService().SendToClient(
string("sociaty"),
"",
"sociaty",
"applylist",
&pb.SociatyApplyListReq{
SociatyId: sociatyId,
}); err != nil {
@ -395,8 +396,8 @@ func (this *SociatyMineView) showSociatyApplyListWin() {
return
}
if err := service.GetPttService().SendToClient(
string("sociaty"),
"",
"sociaty",
"agress",
&pb.SociatyAgreeReq{
Uid: selId,
}); err != nil {
@ -416,8 +417,8 @@ func (this *SociatyMineView) showSociatyApplyListWin() {
return
}
if err := service.GetPttService().SendToClient(
string("sociaty"),
"sociaty.SociatySubTypeRefuse",
"sociaty",
"refuse",
&pb.SociatyRefuseReq{
Uid: selId,
}); err != nil {
@ -441,8 +442,8 @@ func (this *SociatyMineView) applyListen() {
this.obs.AddListener(observer.EVENT_REQ_RSP, observer.Listener{
OnNotify: func(d interface{}, args ...interface{}) {
data := d.(*pb.UserMessage)
if !(data.MainType == string("sociaty") &&
data.SubType == "") {
if !(data.MainType == "sociaty" &&
data.SubType == "applylist") {
return
}
rsp := &pb.SociatyApplyListResp{}
@ -475,8 +476,8 @@ func (this *SociatyMineView) showSociatyMemberWin() {
return
}
if err := service.GetPttService().SendToClient(
string("sociaty"),
"",
"sociaty",
"members",
&pb.SociatyMembersReq{}); err != nil {
logrus.Error(err)
}
@ -496,8 +497,8 @@ func (this *SociatyMineView) showSociatyMemberWin() {
return
}
if err := service.GetPttService().SendToClient(
string("sociaty"),
"",
"sociaty",
"accuse",
&pb.SociatyAccuseReq{},
); err != nil {
logrus.Error(err)
@ -520,8 +521,8 @@ func (this *SociatyMineView) showSociatyMemberWin() {
}
if err := service.GetPttService().SendToClient(
string("sociaty"),
"",
"sociaty",
"assign",
&pb.SociatyAssignReq{
TargetId: selId,
},
@ -542,8 +543,8 @@ func (this *SociatyMineView) showSociatyMemberWin() {
return
}
if err := service.GetPttService().SendToClient(
string("sociaty"),
"",
"sociaty",
"discharge",
&pb.SociatyDischargeReq{
TargetId: selId,
}); err != nil {
@ -572,8 +573,8 @@ func (this *SociatyMineView) showSociatyMemberWin() {
job = pb.SociatyJob_NOJOB
}
if err := service.GetPttService().SendToClient(
string("sociaty"),
"",
"sociaty",
"settingjob",
&pb.SociatySettingJobReq{
TargetId: selId,
Job: job,
@ -618,8 +619,8 @@ func (this *SociatyMineView) memberListen() {
this.obs.AddListener(observer.EVENT_REQ_RSP, observer.Listener{
OnNotify: func(d interface{}, args ...interface{}) {
data := d.(*pb.UserMessage)
if !(data.MainType == string("sociaty") &&
data.SubType == "") {
if !(data.MainType == "sociaty" &&
data.SubType == "members") {
return
}
rsp := &pb.SociatyMembersResp{}
@ -664,8 +665,8 @@ func (this *SociatyMineView) showSignWin() {
btn.OnTapped = func() {
defer btn.Disable()
if err := service.GetPttService().SendToClient(
string("sociaty"),
"",
"sociaty",
"sign",
&pb.SociatySignReq{},
); err != nil {
logrus.Error(err)
@ -691,8 +692,8 @@ func (this *SociatyMineView) showLogWin() {
logList := func() {
if err := service.GetPttService().SendToClient(
string("sociaty"),
"",
"sociaty",
"log",
&pb.SociatyLogReq{}); err != nil {
logrus.Error(err)
}
@ -718,8 +719,8 @@ func (this *SociatyMineView) logListListen() {
this.obs.AddListener(observer.EVENT_REQ_RSP, observer.Listener{
OnNotify: func(d interface{}, args ...interface{}) {
data := d.(*pb.UserMessage)
if !(data.MainType == string("sociaty") &&
data.SubType == "") {
if !(data.MainType == "sociaty" &&
data.SubType == "log") {
return
}
rsp := &pb.SociatyLogResp{}
@ -751,8 +752,8 @@ func (this *SociatyMineView) showActivityWin() {
activityBtn := widget.NewButton("活跃度领取", func() {
selId := itemList.SelItemId
if err := service.GetPttService().SendToClient(
string("sociaty"),
"",
"sociaty",
"activityreceive",
&pb.SociatyActivityReceiveReq{
Id: cast.ToInt32(selId),
}); err != nil {

View File

@ -7,6 +7,7 @@ import (
"go_dreamfactory/cmd/v2/service"
"go_dreamfactory/cmd/v2/service/observer"
"go_dreamfactory/comm"
// "go_dreamfactory/modules/sociaty"
"go_dreamfactory/pb"
@ -33,8 +34,8 @@ func (this *SociatyTasklistView) CreateView(t *model.TestCase) fyne.CanvasObject
this.taskList = func() {
this.itemList.Reset()
if err := service.GetPttService().SendToClient(
string("sociaty"),
"sociaty.SociatySubTypeTasklist",
"sociaty",
"tasklist",
&pb.SociatyTaskListReq{}); err != nil {
logrus.Error(err)
}
@ -54,8 +55,8 @@ func (this *SociatyTasklistView) CreateView(t *model.TestCase) fyne.CanvasObject
return
}
if err := service.GetPttService().SendToClient(
string("sociaty"),
"sociaty.SociatySubTypeReceive",
"sociaty",
"receive",
&pb.SociatyReceiveReq{
TaskId: cast.ToInt32(selId),
}); err != nil {
@ -81,8 +82,8 @@ func (this *SociatyTasklistView) dataListener() {
this.obs.AddListener(observer.EVENT_REQ_RSP, observer.Listener{
OnNotify: func(d interface{}, args ...interface{}) {
data := d.(*pb.UserMessage)
if !(data.MainType == string("sociaty") &&
data.SubType == "sociaty.SociatySubTypeTasklist") {
if !(data.MainType == "sociaty" &&
data.SubType == "tasklist") {
return
}

View File

@ -36,7 +36,7 @@ func (this *WorldtaskMineView) CreateView(t *model.TestCase) fyne.CanvasObject {
this.itemList.Reset()
if err := service.GetPttService().SendToClient(
t.MainType,
"",
"mine",
&pb.WorldtaskMineReq{}); err != nil {
logrus.Error(err)
}
@ -126,7 +126,7 @@ func (this *WorldtaskMineView) CreateView(t *model.TestCase) fyne.CanvasObject {
form.OnSubmit = func() {
if err := service.GetPttService().SendToClient(
t.MainType,
"worldtask.WorldtaskSubtypeFinish",
"finish",
&pb.WorldtaskFinishReq{
TaskId: cast.ToInt32(taskIdEntry.Text),
}); err != nil {
@ -238,8 +238,8 @@ func (this *WorldtaskMineView) mineData() {
OnNotify: func(d interface{}, args ...interface{}) {
data := d.(*pb.UserMessage)
if !(data.MainType == string("comm.ModuleWorldtask") &&
data.SubType == "") {
if !(data.MainType == "worldtask" &&
data.SubType == "mine") {
return
}

View File

@ -940,7 +940,7 @@ func (x *WorldtaskChapterrewardResp) GetGroupId() int32 {
}
// 测试使用
type WorldtaskTestReq struct {
type WorldtaskTriggerReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@ -952,8 +952,8 @@ type WorldtaskTestReq struct {
RtaskIds string `protobuf:"bytes,5,opt,name=rtaskIds,proto3" json:"rtaskIds"` //已完成的任务ids
}
func (x *WorldtaskTestReq) Reset() {
*x = WorldtaskTestReq{}
func (x *WorldtaskTriggerReq) Reset() {
*x = WorldtaskTriggerReq{}
if protoimpl.UnsafeEnabled {
mi := &file_worldtask_worldtask_msg_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -961,13 +961,13 @@ func (x *WorldtaskTestReq) Reset() {
}
}
func (x *WorldtaskTestReq) String() string {
func (x *WorldtaskTriggerReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WorldtaskTestReq) ProtoMessage() {}
func (*WorldtaskTriggerReq) ProtoMessage() {}
func (x *WorldtaskTestReq) ProtoReflect() protoreflect.Message {
func (x *WorldtaskTriggerReq) ProtoReflect() protoreflect.Message {
mi := &file_worldtask_worldtask_msg_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -979,47 +979,47 @@ func (x *WorldtaskTestReq) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use WorldtaskTestReq.ProtoReflect.Descriptor instead.
func (*WorldtaskTestReq) Descriptor() ([]byte, []int) {
// Deprecated: Use WorldtaskTriggerReq.ProtoReflect.Descriptor instead.
func (*WorldtaskTriggerReq) Descriptor() ([]byte, []int) {
return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{18}
}
func (x *WorldtaskTestReq) GetRtaskType() int32 {
func (x *WorldtaskTriggerReq) GetRtaskType() int32 {
if x != nil {
return x.RtaskType
}
return 0
}
func (x *WorldtaskTestReq) GetParams() []int32 {
func (x *WorldtaskTriggerReq) GetParams() []int32 {
if x != nil {
return x.Params
}
return nil
}
func (x *WorldtaskTestReq) GetCondiId() int32 {
func (x *WorldtaskTriggerReq) GetCondiId() int32 {
if x != nil {
return x.CondiId
}
return 0
}
func (x *WorldtaskTestReq) GetGroupId() int32 {
func (x *WorldtaskTriggerReq) GetGroupId() int32 {
if x != nil {
return x.GroupId
}
return 0
}
func (x *WorldtaskTestReq) GetRtaskIds() string {
func (x *WorldtaskTriggerReq) GetRtaskIds() string {
if x != nil {
return x.RtaskIds
}
return ""
}
type WorldtaskTestResp struct {
type WorldtaskTriggerResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@ -1029,8 +1029,8 @@ type WorldtaskTestResp struct {
RtaskType int32 `protobuf:"varint,3,opt,name=rtaskType,proto3" json:"rtaskType"`
}
func (x *WorldtaskTestResp) Reset() {
*x = WorldtaskTestResp{}
func (x *WorldtaskTriggerResp) Reset() {
*x = WorldtaskTriggerResp{}
if protoimpl.UnsafeEnabled {
mi := &file_worldtask_worldtask_msg_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -1038,13 +1038,13 @@ func (x *WorldtaskTestResp) Reset() {
}
}
func (x *WorldtaskTestResp) String() string {
func (x *WorldtaskTriggerResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WorldtaskTestResp) ProtoMessage() {}
func (*WorldtaskTriggerResp) ProtoMessage() {}
func (x *WorldtaskTestResp) ProtoReflect() protoreflect.Message {
func (x *WorldtaskTriggerResp) ProtoReflect() protoreflect.Message {
mi := &file_worldtask_worldtask_msg_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -1056,26 +1056,26 @@ func (x *WorldtaskTestResp) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use WorldtaskTestResp.ProtoReflect.Descriptor instead.
func (*WorldtaskTestResp) Descriptor() ([]byte, []int) {
// Deprecated: Use WorldtaskTriggerResp.ProtoReflect.Descriptor instead.
func (*WorldtaskTriggerResp) Descriptor() ([]byte, []int) {
return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{19}
}
func (x *WorldtaskTestResp) GetFlag() bool {
func (x *WorldtaskTriggerResp) GetFlag() bool {
if x != nil {
return x.Flag
}
return false
}
func (x *WorldtaskTestResp) GetRtaskIds() []int32 {
func (x *WorldtaskTriggerResp) GetRtaskIds() []int32 {
if x != nil {
return x.RtaskIds
}
return nil
}
func (x *WorldtaskTestResp) GetRtaskType() int32 {
func (x *WorldtaskTriggerResp) GetRtaskType() int32 {
if x != nil {
return x.RtaskType
}
@ -1176,24 +1176,25 @@ var file_worldtask_worldtask_msg_proto_rawDesc = []byte{
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, 0x22, 0x98,
0x01, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x65, 0x73, 0x74,
0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70,
0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 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, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x04,
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1a, 0x0a,
0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x22, 0x61, 0x0a, 0x11, 0x57, 0x6f, 0x72,
0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12,
0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c,
0x61, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x02,
0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x12, 0x1c,
0x0a, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x05, 0x52, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x42, 0x06, 0x5a, 0x04,
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x22, 0x9b,
0x01, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x72, 0x69, 0x67,
0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54,
0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b,
0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02,
0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 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, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49,
0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64,
0x12, 0x1a, 0x0a, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x05, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x22, 0x64, 0x0a, 0x14,
0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72,
0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01,
0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x74, 0x61, 0x73,
0x6b, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x72, 0x74, 0x61, 0x73,
0x6b, 0x49, 0x64, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70,
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79,
0x70, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (
@ -1228,8 +1229,8 @@ var file_worldtask_worldtask_msg_proto_goTypes = []interface{}{
(*WorldtaskFinishIdsPush)(nil), // 15: WorldtaskFinishIdsPush
(*WorldtaskChapterrewardReq)(nil), // 16: WorldtaskChapterrewardReq
(*WorldtaskChapterrewardResp)(nil), // 17: WorldtaskChapterrewardResp
(*WorldtaskTestReq)(nil), // 18: WorldtaskTestReq
(*WorldtaskTestResp)(nil), // 19: WorldtaskTestResp
(*WorldtaskTriggerReq)(nil), // 18: WorldtaskTriggerReq
(*WorldtaskTriggerResp)(nil), // 19: WorldtaskTriggerResp
nil, // 20: WorldtaskNexttaskPush.NextTaskEntry
(*DBWorldtask)(nil), // 21: DBWorldtask
(*ConIProgress)(nil), // 22: ConIProgress
@ -1483,7 +1484,7 @@ func file_worldtask_worldtask_msg_proto_init() {
}
}
file_worldtask_worldtask_msg_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WorldtaskTestReq); i {
switch v := v.(*WorldtaskTriggerReq); i {
case 0:
return &v.state
case 1:
@ -1495,7 +1496,7 @@ func file_worldtask_worldtask_msg_proto_init() {
}
}
file_worldtask_worldtask_msg_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WorldtaskTestResp); i {
switch v := v.(*WorldtaskTriggerResp); i {
case 0:
return &v.state
case 1: