This commit is contained in:
liwei1dao 2022-11-16 17:08:36 +08:00
commit 020f355c71
82 changed files with 1621 additions and 1853 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +0,0 @@
[
{
"id": 1,
"stroy": 101,
"name": "line_1007",
"cond": [
101
],
"img": "",
"taskid": [
1001,
1002,
1003,
1004,
1005,
1006
]
}
]

View File

@ -1,70 +0,0 @@
[
{
"id": 100101,
"preTId": -1,
"nextTId": 100102,
"cond": [
101,
102
],
"reward": [
{
"a": "attr",
"t": "gold",
"n": 100
},
{
"a": "attr",
"t": "diamond",
"n": 10
}
]
},
{
"id": 100102,
"preTId": 100101,
"nextTId": 100103,
"cond": [
104
],
"reward": [
{
"a": "attr",
"t": "gold",
"n": 100
},
{
"a": "attr",
"t": "diamond",
"n": 10
}
]
},
{
"id": 100103,
"preTId": 100102,
"nextTId": 100104,
"cond": [
106
],
"reward": []
},
{
"id": 100104,
"preTId": 100103,
"nextTId": 100105,
"cond": [
108
],
"reward": []
},
{
"id": 100105,
"preTId": 100103,
"nextTId": -1,
"cond": [
109
],
"reward": []
}
]

View File

@ -1,107 +0,0 @@
[
{
"id": 1001,
"preTId": -1,
"stageTId": [
100101,
100102
],
"reward": [
{
"a": "attr",
"t": "gold",
"n": 100
},
{
"a": "attr",
"t": "diamond",
"n": 10
}
],
"finish": 0,
"ending": 1,
"resetto": -1
},
{
"id": 1002,
"preTId": 1001,
"stageTId": [
100101,
100102
],
"reward": [
{
"a": "attr",
"t": "gold",
"n": 100
},
{
"a": "attr",
"t": "diamond",
"n": 10
}
],
"finish": 0,
"ending": 1,
"resetto": -1
},
{
"id": 1003,
"preTId": 1002,
"stageTId": [
100101,
100102
],
"reward": [
{
"a": "attr",
"t": "gold",
"n": 100
},
{
"a": "attr",
"t": "diamond",
"n": 10
}
],
"finish": 0,
"ending": 1,
"resetto": -1
},
{
"id": 1004,
"preTId": 1002,
"stageTId": [
100101,
100102
],
"reward": [],
"finish": 1,
"ending": 0,
"resetto": 1001
},
{
"id": 1005,
"preTId": 1003,
"stageTId": [
100101,
100102
],
"reward": [],
"finish": 0,
"ending": 1,
"resetto": -1
},
{
"id": 1006,
"preTId": 1005,
"stageTId": [
100101,
100102
],
"reward": [],
"finish": 1,
"ending": 1,
"resetto": -1
}
]

View File

@ -1,6 +1,5 @@
[
{
"index": 1,
"group": 10001,
"nodeIndex": 0,
"cond": [],
@ -23,10 +22,11 @@
]
},
{
"index": 2,
"group": 10001,
"nodeIndex": 0,
"cond": [],
"group": 10002,
"nodeIndex": 1,
"cond": [
10001
],
"name": {
"key": "阿宝的成长2",
"text": "阿宝的成长2"
@ -46,10 +46,11 @@
]
},
{
"index": 3,
"group": 10001,
"nodeIndex": 0,
"cond": [],
"group": 10003,
"nodeIndex": 1,
"cond": [
10001
],
"name": {
"key": "阿宝的成长3",
"text": "阿宝的成长3"
@ -69,10 +70,11 @@
]
},
{
"index": 4,
"group": 10001,
"nodeIndex": 0,
"cond": [],
"group": 10004,
"nodeIndex": 2,
"cond": [
10003
],
"name": {
"key": "阿宝的成长4",
"text": "阿宝的成长4"
@ -92,10 +94,11 @@
]
},
{
"index": 5,
"group": 10001,
"nodeIndex": 0,
"cond": [],
"group": 10005,
"nodeIndex": 2,
"cond": [
10003
],
"name": {
"key": "阿宝的成长5",
"text": "阿宝的成长5"
@ -115,10 +118,11 @@
]
},
{
"index": 6,
"group": 10001,
"nodeIndex": 0,
"cond": [],
"group": 10006,
"nodeIndex": 3,
"cond": [
10005
],
"name": {
"key": "阿宝的成长6",
"text": "阿宝的成长6"
@ -138,10 +142,11 @@
]
},
{
"index": 7,
"group": 10001,
"nodeIndex": 0,
"cond": [],
"group": 10007,
"nodeIndex": 4,
"cond": [
10006
],
"name": {
"key": "阿宝的成长7",
"text": "阿宝的成长7"
@ -161,10 +166,11 @@
]
},
{
"index": 8,
"group": 10001,
"nodeIndex": 0,
"cond": [],
"group": 10008,
"nodeIndex": 5,
"cond": [
10007
],
"name": {
"key": "阿宝的成长8",
"text": "阿宝的成长8"

View File

@ -322,5 +322,11 @@
"open": true,
"routrules": "~/worker",
"describe": "公会活跃度列表"
},
{
"msgid": "viking.ranklist",
"open": true,
"routrules": "~/worker",
"describe": "维京排行榜数据"
}
]

View File

@ -110,8 +110,7 @@ var (
ff(comm.ModuleRtask, rtask.RtaskSubTypeBattleFinish): &formview.RtaskBattleFinishView{},
ff(comm.ModuleRtask, rtask.RtaskSubTypeGetrecord): &formview.RtaskRecordView{},
// linestory
ff(comm.ModuleLinestory, linestory.LinestorySubTypeDostart): &formview.LinestoryStartView{},
ff(comm.ModuleLinestory, linestory.LinestorySubTypeDotask): &formview.LinestoryTaskView{},
ff(comm.ModuleLinestory, linestory.LinestorySubTypeChapter): &formview.LinestoryMineView{},
// gourmet
ff(comm.ModuleGourmet, "getranduser"): &formview.GourmentGetRandView{},
// sociaty
@ -235,8 +234,7 @@ var (
ff(comm.ModuleRtask, "rtest"),
},
"linestory": {
ff(comm.ModuleLinestory, linestory.LinestorySubTypeDostart),
ff(comm.ModuleLinestory, linestory.LinestorySubTypeDotask),
ff(comm.ModuleLinestory, linestory.LinestorySubTypeChapter),
},
"gourmet": {
ff(comm.ModuleGourmet, "getranduser"),
@ -822,18 +820,11 @@ var (
MainType: string(comm.ModuleLinestory),
Enabled: true,
},
ff(comm.ModuleLinestory, linestory.LinestorySubTypeDostart): {
NavLabel: "启动",
Desc: "启动剧情任务",
ff(comm.ModuleLinestory, linestory.LinestorySubTypeChapter): {
NavLabel: "我的任务",
Desc: "我的剧情任务",
MainType: string(comm.ModuleLinestory),
SubType: linestory.LinestorySubTypeDostart,
Enabled: true,
},
ff(comm.ModuleLinestory, linestory.LinestorySubTypeDotask): {
NavLabel: "做任务",
Desc: "做任务",
MainType: string(comm.ModuleLinestory),
SubType: linestory.LinestorySubTypeDotask,
SubType: linestory.LinestorySubTypeChapter,
Enabled: true,
},
// gourmet

View File

@ -1,53 +0,0 @@
package formview
import (
"errors"
"go_dreamfactory/cmd/v2/model"
"go_dreamfactory/cmd/v2/service"
"go_dreamfactory/pb"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/dialog"
"fyne.io/fyne/v2/widget"
"github.com/sirupsen/logrus"
"github.com/spf13/cast"
)
type LinestoryTaskView struct {
BaseformView
}
func (this *LinestoryTaskView) CreateView(t *model.TestCase) fyne.CanvasObject {
taskId := widget.NewEntry()
taskId.PlaceHolder = "任务ID"
subTaskId := widget.NewEntry()
subTaskId.PlaceHolder = "子任务ID"
this.form.AppendItem(widget.NewFormItem("任务ID", taskId))
this.form.AppendItem(widget.NewFormItem("子任务ID", subTaskId))
this.form.OnSubmit = func() {
if taskId.Text == "" {
dialog.ShowError(errors.New("请任务ID"), this.w)
return
}
if subTaskId.Text == "" {
dialog.ShowError(errors.New("请子任务ID"), this.w)
return
}
if err := service.GetPttService().SendToClient(
t.MainType,
t.SubType,
&pb.LinestoryDotaskReq{
TaskId: cast.ToInt32(taskId.Text),
SubtaskId: cast.ToInt32(subTaskId.Text),
},
); err != nil {
logrus.Error(err)
return
}
}
return this.form
}

View File

@ -0,0 +1,113 @@
package formview
import (
"fmt"
"go_dreamfactory/cmd/v2/lib/common"
"go_dreamfactory/cmd/v2/model"
"go_dreamfactory/cmd/v2/service"
"go_dreamfactory/cmd/v2/service/observer"
"go_dreamfactory/comm"
"go_dreamfactory/modules/linestory"
"go_dreamfactory/pb"
"strings"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/widget"
"github.com/sirupsen/logrus"
"github.com/spf13/cast"
)
type LinestoryMineView struct {
BaseformView
friendList func()
itemList *common.ItemList
flag bool
}
func (this *LinestoryMineView) CreateView(t *model.TestCase) fyne.CanvasObject {
jqId := widget.NewEntry()
jqId.PlaceHolder = "章节ID"
this.form.AppendItem(widget.NewFormItem("章节ID", jqId))
mine := func() {
if err := service.GetPttService().SendToClient(
t.MainType,
linestory.LinestorySubTypeChapter,
&pb.LinestoryChapterReq{},
); err != nil {
logrus.Error(err)
return
}
}
defer mine()
// 进入章节
this.form.OnSubmit = func() {
if jqId.Text == "" {
common.ShowTip("输入章节ID")
return
}
if err := service.GetPttService().SendToClient(
t.MainType,
linestory.LinestorySubTypeMaintask,
&pb.LinestoryMaintaskReq{
ChapterId: cast.ToInt32(jqId.Text),
},
); err != nil {
logrus.Error(err)
return
}
}
this.form.SubmitText = "进入章节"
// 章节奖励
this.form.OnCancel = func() {
if jqId.Text == "" {
common.ShowTip("输入章节ID")
return
}
if err := service.GetPttService().SendToClient(
t.MainType,
linestory.LinestorySubTypeReceive,
&pb.LinestoryReceiveReq{
ChapterId: cast.ToInt32(jqId.Text),
},
); err != nil {
logrus.Error(err)
return
}
}
this.form.CancelText = "领奖励"
this.dataListener()
return this.form
}
func (this *LinestoryMineView) dataListener() {
if this.flag {
return
}
this.obs.AddListener(observer.EVENT_REQ_RSP, observer.Listener{
OnNotify: func(d interface{}, args ...interface{}) {
data := d.(*pb.UserMessage)
if !(data.MainType == string(comm.ModuleLinestory) &&
data.SubType == linestory.LinestorySubTypeMaintask) {
return
}
rsp := &pb.LinestoryMaintaskResp{}
if !comm.ProtoUnmarshal(data, rsp) {
logrus.Error("unmarshal err")
return
}
var formatStr strings.Builder
for _, v := range rsp.List {
formatStr.WriteString(fmt.Sprintf("%d- %v\n", v.TaskId, v.Status))
}
this.res.Text = formatStr.String()
this.res.Refresh()
},
})
this.flag = true
}

View File

@ -1,43 +0,0 @@
package formview
import (
"errors"
"go_dreamfactory/cmd/v2/model"
"go_dreamfactory/cmd/v2/service"
"go_dreamfactory/pb"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/dialog"
"fyne.io/fyne/v2/widget"
"github.com/sirupsen/logrus"
"github.com/spf13/cast"
)
type LinestoryStartView struct {
BaseformView
}
func (this *LinestoryStartView) CreateView(t *model.TestCase) fyne.CanvasObject {
jqId := widget.NewEntry()
jqId.PlaceHolder = "情景ID"
this.form.AppendItem(widget.NewFormItem("情景ID", jqId))
this.form.OnSubmit = func() {
if jqId.Text == "" {
dialog.ShowError(errors.New("请情景ID"), this.w)
return
}
if err := service.GetPttService().SendToClient(
t.MainType,
t.SubType,
&pb.LinestoryStartReq{
JqId: cast.ToInt32(jqId.Text),
},
); err != nil {
logrus.Error(err)
return
}
}
return this.form
}

View File

@ -8,7 +8,7 @@ import (
type CustomError struct {
Code pb.ErrorCode `json:"code"` // 业务码
Message string `json:"message"` // 业务
Message string `json:"message"` // 业务注释
}
func (e *CustomError) Error() string {

View File

@ -260,5 +260,12 @@ type (
TaskcondNotify(session IUserSession, condId int32) error
// bingo任务
BingoJumpTask(session IUserSession, groupId, rtaskId int32) error
// 查询我的世界任务
GetMyWorldtask(uid string) *pb.DBWorldtask
}
// 支线剧情任务
ILinestory interface {
// 任务完成通知
TaskFinishNotify(uid string, taskId, groupId int32) error
}
)

View File

@ -10,11 +10,8 @@ var AllLevels = []Loglevel{
}
type (
Field struct {
Key string
Value interface{}
}
Fields []Field
Fields map[string]interface{}
Ilogf interface {
Debugf(format string, args ...interface{})
Infof(format string, args ...interface{})
@ -34,13 +31,13 @@ type (
Panicln(args ...interface{})
}
ILog interface {
Debug(msg string, args ...Field)
Info(msg string, args ...Field)
Print(msg string, args ...Field)
Warn(msg string, args ...Field)
Error(msg string, args ...Field)
Fatal(msg string, args ...Field)
Panic(msg string, args ...Field)
Debug(msg string, args Fields)
Info(msg string, args Fields)
Print(msg string, args Fields)
Warn(msg string, args Fields)
Error(msg string, args Fields)
Fatal(msg string, args Fields)
Panic(msg string, args Fields)
}
ILogger interface {
@ -80,23 +77,23 @@ func NewSys(opt ...Option) (sys ISys, err error) {
func Clone(name string, skip int) ILogger {
return defsys.Clone(name, skip)
}
func Debug(msg string, args ...Field) {
defsys.Debug(msg, args...)
func Debug(msg string, args Fields) {
defsys.Debug(msg, args)
}
func Info(msg string, args ...Field) {
defsys.Info(msg, args...)
func Info(msg string, args Fields) {
defsys.Info(msg, args)
}
func Warn(msg string, args ...Field) {
defsys.Warn(msg, args...)
func Warn(msg string, args Fields) {
defsys.Warn(msg, args)
}
func Error(msg string, args ...Field) {
defsys.Error(msg, args...)
func Error(msg string, args Fields) {
defsys.Error(msg, args)
}
func Fatal(msg string, args ...Field) {
defsys.Fatal(msg, args...)
func Fatal(msg string, args Fields) {
defsys.Fatal(msg, args)
}
func Panic(msg string, args ...Field) {
defsys.Panic(msg, args...)
func Panic(msg string, args Fields) {
defsys.Panic(msg, args)
}
func Debugf(format string, args ...interface{}) {
defsys.Debugf(format, args...)

View File

@ -14,7 +14,7 @@ var (
_cePool = sync.Pool{New: func() interface{} {
// Pre-allocate some space for cores.
return &Entry{
Data: make(Fields, 0, 6),
Data: make(map[string]interface{}),
}
}}
)
@ -91,31 +91,29 @@ func (entry *Entry) reset() {
entry.Caller.Function = ""
entry.Caller.Stack = ""
entry.Err = ""
entry.Data = entry.Data[:0]
entry.Data = make(map[string]interface{})
}
func (entry *Entry) WithFields(fields ...Field) {
if cap(entry.Data) < len(fields) {
entry.Data = make(Fields, 0, cap(entry.Data)+len(fields))
}
func (entry *Entry) WithFields(fields Fields) {
fieldErr := entry.Err
for _, v := range fields {
for k, v := range fields {
isErrField := false
if t := reflect.TypeOf(v.Value); t != nil {
if t := reflect.TypeOf(v); t != nil {
switch {
case t.Kind() == reflect.Func, t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Func:
isErrField = true
}
}
if isErrField {
tmp := fmt.Sprintf("can not add field %q", v.Key)
tmp := fmt.Sprintf("can not add field %q", k)
if fieldErr != "" {
fieldErr = entry.Err + ", " + tmp
} else {
fieldErr = tmp
}
} else {
entry.Data = append(entry.Data, v)
entry.Data[k] = v
}
}
}

View File

@ -9,7 +9,7 @@ import (
var _fieldsPool = sync.Pool{
New: func() interface{} {
return make(Fields, 0, 6)
return make(map[string]interface{})
},
}
@ -18,7 +18,6 @@ func getFields() Fields {
}
func putFields(fields Fields) {
fields = fields[:0]
_fieldsPool.Put(fields)
}

View File

@ -62,14 +62,14 @@ func (this *ConsoleFormatter) Format(config *EncoderConfig, entry *Entry) (*pool
isfirst = false
line.AppendString(entry.Message)
}
for _, v := range entry.Data {
for k, v := range entry.Data {
if !isfirst {
line.AppendString(config.ConsoleSeparator)
}
isfirst = false
line.AppendString(v.Key)
line.AppendString(k)
line.AppendString(":")
writetoline(line, v.Value)
writetoline(line, v)
}
if entry.Caller.Stack != "" && config.StacktraceKey != "" {

View File

@ -68,31 +68,31 @@ func (this *Logger) SetName(name string) {
func (this *Logger) Enabled(lvl Loglevel) bool {
return this.level.Enabled(lvl)
}
func (this *Logger) Debug(msg string, args ...Field) {
this.Log(DebugLevel, msg, args...)
func (this *Logger) Debug(msg string, args Fields) {
this.Log(DebugLevel, msg, args)
}
func (this *Logger) Info(msg string, args ...Field) {
this.Log(InfoLevel, msg, args...)
func (this *Logger) Info(msg string, args Fields) {
this.Log(InfoLevel, msg, args)
}
func (this *Logger) Print(msg string, args ...Field) {
this.Log(InfoLevel, msg, args...)
func (this *Logger) Print(msg string, args Fields) {
this.Log(InfoLevel, msg, args)
}
func (this *Logger) Warn(msg string, args ...Field) {
this.Log(WarnLevel, msg, args...)
func (this *Logger) Warn(msg string, args Fields) {
this.Log(WarnLevel, msg, args)
}
func (this *Logger) Error(msg string, args ...Field) {
this.Log(ErrorLevel, msg, args...)
func (this *Logger) Error(msg string, args Fields) {
this.Log(ErrorLevel, msg, args)
}
func (this *Logger) Panic(msg string, args ...Field) {
this.Log(PanicLevel, msg, args...)
func (this *Logger) Panic(msg string, args Fields) {
this.Log(PanicLevel, msg, args)
}
func (this *Logger) Fatal(msg string, args ...Field) {
this.Log(FatalLevel, msg, args...)
func (this *Logger) Fatal(msg string, args Fields) {
this.Log(FatalLevel, msg, args)
os.Exit(1)
}
func (this *Logger) Log(level Loglevel, msg string, args ...Field) {
func (this *Logger) Log(level Loglevel, msg string, args Fields) {
if this.level.Enabled(level) {
this.log(level, msg, args...)
this.logWithFields(level, msg, args)
}
}
func (this *Logger) Debugf(format string, args ...interface{}) {
@ -150,8 +150,8 @@ func (this *Logger) Logln(level Loglevel, args ...interface{}) {
}
}
func (this *Logger) log(level Loglevel, msg string, args ...Field) {
entry := this.check(level, msg, args...)
func (this *Logger) logWithFields(level Loglevel, msg string, args Fields) {
entry := this.checkWithFields(level, msg, args)
this.write(entry)
if level <= PanicLevel {
panic(entry)
@ -159,13 +159,28 @@ func (this *Logger) log(level Loglevel, msg string, args ...Field) {
putEntry(entry)
}
func (this *Logger) check(level Loglevel, msg string, args ...Field) (entry *Entry) {
func (this *Logger) log(level Loglevel, msg string) {
entry := this.check(level, msg)
this.write(entry)
if level <= PanicLevel {
panic(entry)
}
putEntry(entry)
}
func (this *Logger) checkWithFields(level Loglevel, msg string, args Fields) (entry *Entry) {
e := this.check(level, msg)
e.WithFields(args)
return e
}
func (this *Logger) check(level Loglevel, msg string) (entry *Entry) {
entry = getEntry()
entry.Name = this.name
entry.Time = time.Now()
entry.Level = level
entry.Message = msg
entry.WithFields(args...)
// entry.WithFields(args)
addStack := this.addStack.Enabled(level)
addCaller := this.addCaller.Enabled(level)
if !addCaller && !addStack {

View File

@ -14,7 +14,7 @@ type TestData struct {
}
func (this *TestData) Log() {
sys.Error("妈妈咪呀!")
sys.Errorln("妈妈咪呀!")
}
var sys log.ISys
@ -39,6 +39,7 @@ func Test_sys(t *testing.T) {
//性能测试
func Benchmark_Ability(b *testing.B) {
for i := 0; i < b.N; i++ { //use b.N for looping
sys.Error("妈妈咪呀!")
// sys.Errorln("妈妈咪呀!")
sys.Error("测试", log.Fields{"a":1,"b":2})
}
}

View File

@ -25,39 +25,39 @@ func (this *Turnlog) Enabled(lvl Loglevel) bool {
return false
}
}
func (this *Turnlog) Debug(msg string, args ...Field) {
func (this *Turnlog) Debug(msg string, args Fields) {
if this.isturnon && this.log != nil {
this.log.Debug(msg, args...)
this.log.Debug(msg, args)
}
}
func (this *Turnlog) Info(msg string, args ...Field) {
func (this *Turnlog) Info(msg string, args Fields) {
if this.isturnon && this.log != nil {
this.log.Info(msg, args...)
this.log.Info(msg, args)
}
}
func (this *Turnlog) Print(msg string, args ...Field) {
func (this *Turnlog) Print(msg string, args Fields) {
if this.isturnon && this.log != nil {
this.log.Print(msg, args...)
this.log.Print(msg, args)
}
}
func (this *Turnlog) Warn(msg string, args ...Field) {
func (this *Turnlog) Warn(msg string, args Fields) {
if this.isturnon && this.log != nil {
this.log.Warn(msg, args...)
this.log.Warn(msg, args)
}
}
func (this *Turnlog) Error(msg string, args ...Field) {
func (this *Turnlog) Error(msg string, args Fields) {
if this.log != nil {
this.log.Error(msg, args...)
this.log.Error(msg, args)
}
}
func (this *Turnlog) Panic(msg string, args ...Field) {
func (this *Turnlog) Panic(msg string, args Fields) {
if this.log != nil {
this.log.Panic(msg, args...)
this.log.Panic(msg, args)
}
}
func (this *Turnlog) Fatal(msg string, args ...Field) {
func (this *Turnlog) Fatal(msg string, args Fields) {
if this.log != nil {
this.log.Fatal(msg, args...)
this.log.Fatal(msg, args)
}
}
func (this *Turnlog) Debugf(format string, args ...interface{}) {

View File

@ -60,7 +60,11 @@ func (this *Selector) Select(ctx context.Context, servicePath, serviceMethod str
} else if leng == 2 {
result := this.ParseRoutRules(service[1])
if len(result) == 0 {
this.log.Error("Select no found any node", log.Field{"stag", this.stag}, log.Field{"servicePath", servicePath}, log.Field{"serviceMethod", serviceMethod}, log.Field{"routrules", routrules})
this.log.Error("Select no found any node", log.Fields{
"stag": this.stag,
"servicePath": servicePath,
"serviceMethod": serviceMethod,
"routrules": routrules})
return ""
}
i := fastrand.Uint32n(uint32(len(result)))

View File

@ -68,6 +68,6 @@ func (this *Arena) OnInstallComp() {
//比赛结算
func (this *Arena) Rpc_ModuleArenaRaceSettlement(ctx context.Context, args *pb.EmptyReq, reply *pb.EmptyResp) {
this.Debug("Rpc_ModuleArenaRaceSettlement", log.Field{Key: "args", Value: args.String()})
this.Debug("Rpc_ModuleArenaRaceSettlement", log.Fields{ "args": args.String()})
this.modelRank.raceSettlement()
}

View File

@ -132,7 +132,7 @@ func (this *configureComp) GetSkillAtk(skillId int32, skillLv int32) (result *cf
}
}
err = fmt.Errorf("no found SkillAtk skillId:%d skillLv%d", skillId, skillLv)
this.module.Error(err.Error())
this.module.Errorln(err.Error())
return
}
@ -147,7 +147,7 @@ func (this *configureComp) GetSkillAfteratk(skillId int32) (result *cfg.GameSkil
} else {
if result, ok = v.(*cfg.GameSkillAfteratk).GetDataMap()[skillId]; !ok {
err = fmt.Errorf("on found SkillAfteratk skillId:%d", skillId)
this.module.Error(err.Error())
this.module.Errorln(err.Error())
}
}
return
@ -164,7 +164,7 @@ func (this *configureComp) GetSkillBuff(skillId int32) (result *cfg.GameSkillBuf
} else {
if result, ok = v.(*cfg.GameSkillBuff).GetDataMap()[skillId]; !ok {
err = fmt.Errorf("on found SkillAfteratk skillId:%d", skillId)
this.module.Error(err.Error())
this.module.Errorln(err.Error())
}
}
return
@ -181,7 +181,7 @@ func (this *configureComp) GetSkillPassive(skillId int32) (result *cfg.GameSkill
} else {
if result, ok = v.(*cfg.GameSkillPassive).GetDataMap()[skillId]; !ok {
err = fmt.Errorf("on found SkillAfteratk skillId:%d", skillId)
this.module.Error(err.Error())
this.module.Errorln(err.Error())
}
}
return

View File

@ -48,7 +48,7 @@ func (this *FightBase) Init() {
/// 开始战斗
func (this *FightBase) StartFight() {
this.fightIng = true
this.Debug("=========开始战斗=========")
this.Debugln("=========开始战斗=========")
//记录战报
com := new(core.ComStartFight)
com.CurWave = 1
@ -72,7 +72,7 @@ func (this *FightBase) BeforeStart() {
/// 触发队长技队长技配置在atk表中触发顺序无所谓
func (this *FightBase) EmitCaptainSkill() {
this.Debug("计算队长技...")
this.Debugln("计算队长技...")
for _, role := range this.roles {
if role.GetData().Captain && role.GetData().CaptainSkillId != 0 {
_skill := role.AddSkill(role.GetData().CaptainSkillId, 1)
@ -129,26 +129,26 @@ func (this *FightBase) Rand(min, max int32) int32 {
//Log-----------------------------------------------------------------------------------------------------------------------
//日志接口
func (this *FightBase) Debug(msg string, args ...log.Field) {
this.options.Log.Debug(msg, args...)
func (this *FightBase) Debug(msg string, args log.Fields) {
this.options.Log.Debug(msg, args)
}
func (this *FightBase) Info(msg string, args ...log.Field) {
this.options.Log.Info(msg, args...)
func (this *FightBase) Info(msg string, args log.Fields) {
this.options.Log.Info(msg, args)
}
func (this *FightBase) Print(msg string, args ...log.Field) {
this.options.Log.Print(msg, args...)
func (this *FightBase) Print(msg string, args log.Fields) {
this.options.Log.Print(msg, args)
}
func (this *FightBase) Warn(msg string, args ...log.Field) {
this.options.Log.Warn(msg, args...)
func (this *FightBase) Warn(msg string, args log.Fields) {
this.options.Log.Warn(msg, args)
}
func (this *FightBase) Error(msg string, args ...log.Field) {
this.options.Log.Error(msg, args...)
func (this *FightBase) Error(msg string, args log.Fields) {
this.options.Log.Error(msg, args)
}
func (this *FightBase) Panic(msg string, args ...log.Field) {
this.options.Log.Panic(msg, args...)
func (this *FightBase) Panic(msg string, args log.Fields) {
this.options.Log.Panic(msg, args)
}
func (this *FightBase) Fatal(msg string, args ...log.Field) {
this.options.Log.Fatal(msg, args...)
func (this *FightBase) Fatal(msg string, args log.Fields) {
this.options.Log.Fatal(msg, args)
}
func (this *FightBase) Debugf(format string, args ...interface{}) {

View File

@ -365,7 +365,7 @@ func (this *modelBattleComp) createMasterRoles(comp, wheel int, fid int32) (capt
} else {
hero := &pb.DBHero{}
if hero = this.module.ModuleHero.CreateMonster(monst.HeroId, monst.Star, v.Lv); hero == nil {
this.module.Error("on found battle req data", log.Field{Key: "HeroId", Value: monst.HeroId})
this.module.Error("on found battle req data", log.Fields{ "HeroId": monst.HeroId})
code = pb.ErrorCode_ReqParameterError
return
} else {

View File

@ -82,7 +82,7 @@ func (this *Chat) OnInstallComp() {
//Event------------------------------------------------------------------------------------------------------------
func (this *Chat) EventUserOffline(session comm.IUserSession) {
if err := this.modelChat.removeCrossChannelMember(session); err != nil {
this.Debug("EventUserOffline:", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "err", Value: err.Error()})
this.Debug("EventUserOffline:", log.Fields{ "uid": session.GetUserId(),"err":err.Error()})
}
}

View File

@ -71,7 +71,7 @@ func (this *Friend) ResetFriend(uid string) {
"received": 0, //奖励状态重置
}
if err := this.modelFriend.Change(uid, zanUpdate); err != nil {
log.Error("resetZanFriend err", log.Field{Key: "err", Value: err})
log.Error("resetZanFriend err", log.Fields{"err": err})
}
// 重置今日友情点
@ -80,7 +80,7 @@ func (this *Friend) ResetFriend(uid string) {
"friendPointOD": 0,
}
if err := this.ModuleUser.ChangeUserExpand(uid, update); err != nil {
log.Error("resetFriend err", log.Field{Key: "err", Value: err})
log.Error("resetFriend err", log.Fields{"err": err})
}
}
@ -100,7 +100,7 @@ func (this *Friend) GetFriendList(uid string) (uids []string) {
}
func (this *Friend) RpcUseAssisHero(ctx context.Context, req *pb.RPCGeneralReqA2, reply *pb.DBHero) error {
this.Debug("Rpc_ModuleFriendUseAssitHero", log.Field{Key: "req", Value: req})
this.Debug("Rpc_ModuleFriendUseAssitHero", log.Fields{"req": req})
hero, err := this.UseAssistHero(req.Param1, req.Param2)
if err != nil {
return err

View File

@ -270,27 +270,20 @@ func (this *Agent) messageDistribution(msg *pb.UserMessage) (err error) {
if len(serviceTag) == 0 {
if err = this.gateway.Service().RpcCall(context.Background(), servicePath, string(comm.Rpc_GatewayRoute), req, reply); err != nil {
this.gateway.Error("[UserResponse]",
log.Field{Key: "uid", Value: this.uId},
log.Field{Key: "req", Value: req.String()},
log.Field{Key: "err", Value: err.Error()},
log.Fields{"uid": this.uId, "req": req.String(), "err": err.Error()},
)
return
}
} else { //跨集群调用
if err = this.gateway.Service().AcrossClusterRpcCall(context.Background(), serviceTag, servicePath, string(comm.Rpc_GatewayRoute), req, reply); err != nil {
this.gateway.Error("[UserResponse]",
log.Field{Key: "uid", Value: this.uId},
log.Field{Key: "req", Value: req.String()},
log.Field{Key: "err", Value: err.Error()},
log.Fields{"uid": this.uId, "req": req.String(), "err": err.Error()},
)
return
}
}
this.gateway.Debug("[UserResponse]",
log.Field{Key: "uid", Value: this.uId},
log.Field{Key: "t", Value: time.Since(stime).Milliseconds()},
log.Field{Key: "req", Value: req.String()},
log.Field{Key: "reply", Value: reply.String()},
log.Fields{"uid": this.uId, "t": time.Since(stime).Milliseconds(), "req": req.String(), "reply": reply.String()},
)
if reply.Code != pb.ErrorCode_Success {
data, _ := anypb.New(&pb.NotifyErrorNotifyPush{

View File

@ -124,26 +124,26 @@ func (this *Gateway) SetName(name string) {
}
//日志接口
func (this *Gateway) Debug(msg string, args ...log.Field) {
this.options.GetLog().Debug(msg, args...)
func (this *Gateway) Debug(msg string, args log.Fields) {
this.options.GetLog().Debug(msg, args)
}
func (this *Gateway) Info(msg string, args ...log.Field) {
this.options.GetLog().Info(msg, args...)
func (this *Gateway) Info(msg string, args log.Fields) {
this.options.GetLog().Info(msg, args)
}
func (this *Gateway) Print(msg string, args ...log.Field) {
this.options.GetLog().Print(msg, args...)
func (this *Gateway) Print(msg string, args log.Fields) {
this.options.GetLog().Print(msg, args)
}
func (this *Gateway) Warn(msg string, args ...log.Field) {
this.options.GetLog().Warn(msg, args...)
func (this *Gateway) Warn(msg string, args log.Fields) {
this.options.GetLog().Warn(msg, args)
}
func (this *Gateway) Error(msg string, args ...log.Field) {
this.options.GetLog().Error(msg, args...)
func (this *Gateway) Error(msg string, args log.Fields) {
this.options.GetLog().Error(msg, args)
}
func (this *Gateway) Panic(msg string, args ...log.Field) {
this.options.GetLog().Panic(msg, args...)
func (this *Gateway) Panic(msg string, args log.Fields) {
this.options.GetLog().Panic(msg, args)
}
func (this *Gateway) Fatal(msg string, args ...log.Field) {
this.options.GetLog().Fatal(msg, args...)
func (this *Gateway) Fatal(msg string, args log.Fields) {
this.options.GetLog().Fatal(msg, args)
}
func (this *Gateway) Debugf(format string, args ...interface{}) {

View File

@ -84,7 +84,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC
if code == pb.ErrorCode_Success { // 成功直接返回
session.SendMsg(string(this.GetType()), "cmd", &pb.GMCmdResp{IsSucc: true})
}
this.Debug("使用bingo命令", log.Field{"uid", session.GetUserId()}, log.Field{"A", datas[0]}, log.Field{"T", datas[1]}, log.Field{"N", int32(num)})
this.Debug("使用bingo命令", log.Fields{"uid": session.GetUserId(), "A": datas[0], "T": datas[1], "N": int32(num)})
} else if len(datas) == 2 && (datas[0] == "mapid") {
module1, err := this.service.GetModule(comm.ModuleMainline)
if err != nil {
@ -97,7 +97,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC
}
code = module1.(comm.IMainline).ModifyMainlineData(session.GetUserId(), int32(num))
this.Debug("使用bingo命令", log.Field{"uid", session.GetUserId()}, log.Field{"0", datas[0]}, log.Field{"N", int32(num)})
this.Debug("使用bingo命令", log.Fields{"uid": session.GetUserId(), "0": datas[0], "N": int32(num)})
} else if len(datas) == 2 && (datas[0] == "pataid") {
module1, err := this.service.GetModule(comm.ModulePagoda)
if err != nil {
@ -109,7 +109,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC
return
}
code = module1.(comm.IPagoda).ModifyPagodaFloor(session, int32(num))
this.Debug("使用bingo命令:uid = %s ", log.Field{"uid", session.GetUserId()}, log.Field{"0", datas[0]}, log.Field{"N", int32(num)})
this.Debug("使用bingo命令:uid = %s ", log.Fields{"uid": session.GetUserId(), "0": datas[0], "N": int32(num)})
} else if len(datas) == 1 && (datas[0] == "Iamyoudad" || datas[0] == "iamyoudad") {
var (
res []*cfg.Gameatn
@ -124,7 +124,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC
this.Errorf("资源发放失败,%v", code)
}
}
this.Debugf("使用bingo命令", log.Field{"uid", session.GetUserId()}, datas[0], res)
this.Debugf("使用bingo命令", log.Fields{"uid": session.GetUserId()}, datas[0], res)
} else if len(datas) == 3 && (datas[0] == "worldtask") {
module, err := this.service.GetModule(comm.ModuleWorldtask)
if err != nil {
@ -145,7 +145,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC
}
func (this *GM) Rpc_ModuleGMCreateCmd(ctx context.Context, args *pb.RPCGeneralReqA2, reply *pb.EmptyResp) (err error) {
this.Debug("Rpc_ModuleGMCreateCmd", log.Field{Key: "args", Value: args.String()})
this.Debug("Rpc_ModuleGMCreateCmd", log.Fields{"args": args.String()})
if args.Param1 == "" || args.Param2 == "" {
err = errors.New("请求参数错误")
}

View File

@ -22,7 +22,7 @@ func (this *apiComp) CreateOrderCheck(session comm.IUserSession, req *pb.Gourmet
///美食城创建订单
func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.GourmetCreateOrderReq) (code pb.ErrorCode, data proto.Message) {
var (
res []*cfg.Gameatn
res []*cfg.Gameatn // 订单消耗
costTime int32
szTime map[int32]int32 // 记录每个类型的订单耗时 key 是技能组type value 订单耗时
)
@ -38,21 +38,19 @@ func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.GourmetCreat
}
// 记录每个食材耗时
for k, v := range _gourmet.Skill {
var _time int32
// 计算出需要的时间
_skillCfg := this.module.configure.GetGourmetConfigData(k, v)
_time += _skillCfg.Needtime
// 高效制作技能
for k, v := range _gourmet.SpecialSkill {
specalSkill := this.module.configure.GetGourmetConfigData(k, v)
_time += specalSkill.Needtime
}
szTime[k] = _time
szTime[k] = _skillCfg.Needtime
}
// 高效制作技能
for k, v := range _gourmet.SpecialSkill {
specalSkill := this.module.configure.GetGourmetConfigData(k, v)
szTime[k] = specalSkill.Needtime
}
if !utils.IsToday(_gourmet.Ctime) { // 跨天了
_gourmet.Ctime = configure.Now().Unix()
_gourmet.OrderCostTime = 0
}
// 计算消耗
for _, order := range req.Order {
if order.FoodCount == 0 {
continue
@ -60,6 +58,10 @@ func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.GourmetCreat
if v, ok := szTime[order.FoodType]; ok {
costTime += v * order.FoodCount
}
if v, ok := _gourmet.Skill[order.FoodType]; ok {
conf := this.module.configure.GetGourmetConfigData(order.FoodType, v)
res = append(res, conf.DeliciousConsume...)
}
}
// 校验时间
@ -97,17 +99,12 @@ func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.GourmetCreat
}
if v1, ok := szTime[v.FoodType]; ok {
v.CookTime = v1 * v.FoodCount
costTime += v.CookTime
}
}
if _gourmet.CookingFood != nil && _gourmet.CookingFood.ETime == 0 {
_gourmet.CookingFood = nil
}
if _gourmet.CookingFood == nil {
if _gourmet.Ctime == 0 {
_gourmet.Ctime = configure.Now().Unix()
}
for _, v := range _gourmet.Foods {
if v.FoodCount > 0 {
v.FoodCount--
@ -121,6 +118,9 @@ func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.GourmetCreat
if v.FoodCount == 0 {
v.CookTime = 0
}
if _gourmet.Ctime == 0 {
_gourmet.Ctime = configure.Now().Unix()
}
break
}
}
@ -130,10 +130,6 @@ func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.GourmetCreat
return
}
if code = this.module.DispenseRes(session, res, true); code != pb.ErrorCode_Success { // 真正消耗
return
}
// 校验通过 写数据
mapData := make(map[string]interface{}, 0)
mapData["foods"] = _gourmet.Foods

View File

@ -3,7 +3,6 @@ package gourmet
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
"google.golang.org/protobuf/proto"
)
@ -26,9 +25,7 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.GourmetGetListRe
code = pb.ErrorCode_DBError
return
}
if _gourmet.Ctime == 0 {
_gourmet.Ctime = configure.Now().Unix()
}
// 计算订单信息
this.module.modelGourmet.CalculationGourmet(session.GetUserId(), _gourmet)
session.SendMsg(string(this.module.GetType()), GourmetGetListResp, &pb.GourmetGetListResp{Data: _gourmet})

View File

@ -93,9 +93,9 @@ func (this *modelGourmet) CalculationGourmet(uid string, gourmet *pb.DBGourmet)
szTime[k] = _time
}
if gourmet.CookingFood != nil && gourmet.CookingFood.ETime > 0 {
zeroTime = utils.GetZeroTime(gourmet.CookingFood.STime) // 获取订单开始时间当天的0点
zeroTime = utils.GetZeroTime(gourmet.CookingFood.STime) // 获取订单开始时间当天的0点
costTime = int32(configure.Now().Unix() - gourmet.CookingFood.ETime) // 当前过去的时间
if costTime < 0 { // 没有完成 不做处理
if costTime < 0 { // 没有完成 不做处理
return
}
}
@ -148,7 +148,7 @@ func (this *modelGourmet) CalculationGourmet(uid string, gourmet *pb.DBGourmet)
bCooking = true
// 记录下订单时间
gourmet.Ctime = configure.Now().Unix()
gourmet.Ctime = gourmet.CookingFood.ETime
mapData["ctime"] = gourmet.Ctime
break
}

View File

@ -227,7 +227,7 @@ func (this *Library) getLibraryByObjID(uid, oid string) *pb.DBLibrary {
}
func (this *Library) Rpc_ModuleFetter(ctx context.Context, args *pb.RPCGeneralReqA2, reply *pb.EmptyResp) (err error) {
this.Debug("Rpc_ModuleFetter", log.Field{Key: "args", Value: args.String()})
this.Debug("Rpc_ModuleFetter", log.Fields{"args": args.String()})
if args.Param1 == "" || args.Param2 == "" {
err = errors.New("请求参数错误")
}

View File

@ -6,8 +6,9 @@ import (
)
const (
LinestorySubTypeDostart = "dostart" //开始
LinestorySubTypeDotask = "dotask" //做任务
LinestorySubTypeChapter = "chapter" //章节
LinestorySubTypeMaintask = "maintask" //主线任务
LinestorySubTypeReceive = "receive" //领取章节奖励
)
type apiComp struct {

View File

@ -0,0 +1,26 @@
package linestory
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
// 支线剧情任务-章节
func (this *apiComp) ChapterCheck(session comm.IUserSession, req *pb.LinestoryChapterReq) (code pb.ErrorCode) {
return
}
func (this *apiComp) Chapter(session comm.IUserSession, req *pb.LinestoryChapterReq) (code pb.ErrorCode, data proto.Message) {
uid := session.GetUserId()
taskMap := this.moduleLinestory.modelLinestory.getChapters(uid)
rsp := &pb.LinestoryChapterResp{
TaskChapter: taskMap,
}
if err := session.SendMsg(string(this.moduleLinestory.GetType()), LinestorySubTypeChapter, rsp); err != nil {
code = pb.ErrorCode_SystemError
}
return
}

View File

@ -1,151 +0,0 @@
package linestory
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb"
"go_dreamfactory/utils"
"google.golang.org/protobuf/proto"
)
func (this *apiComp) DotaskCheck(session comm.IUserSession, req *pb.LinestoryDotaskReq) (code pb.ErrorCode) {
if req.TaskId == 0 || req.SubtaskId == 0 {
code = pb.ErrorCode_ReqParameterError
}
return
}
func (this *apiComp) Dotask(session comm.IUserSession, req *pb.LinestoryDotaskReq) (code pb.ErrorCode, data proto.Message) {
if code = this.DotaskCheck(session, req); code != pb.ErrorCode_Success {
return
}
rsp := &pb.LinestoryDotaskResp{}
defer func() {
if err := session.SendMsg(string(this.moduleLinestory.GetType()), LinestorySubTypeDotask, rsp); err != nil {
code = pb.ErrorCode_SystemError
return
}
}()
// task conf
conf := this.moduleLinestory.configure.getLinestoryTaskCfgById(req.TaskId)
if conf == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
// stage conf
stageConf := this.moduleLinestory.configure.getLinestoryStageCfgById(req.SubtaskId)
if stageConf == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
// 查询当前玩家的支线任务数据
dbLinestory := &pb.DBLinestory{}
if err := this.moduleLinestory.modelLinestory.Get(session.GetUserId(), dbLinestory); err != nil {
code = pb.ErrorCode_DBError
return
}
var curTask *pb.TaskNode //当前任务
if dbLinestory.Tasks == nil {
dbLinestory.Tasks = make(map[int32]*pb.TaskNode)
curTask = &pb.TaskNode{}
dbLinestory.Tasks[req.TaskId] = curTask
} else {
if v, ok := dbLinestory.Tasks[req.TaskId]; ok {
curTask = v
// 是否被禁止进入
if v.Status == 3 {
code = pb.ErrorCode_LinestoryTaskDisabledEnter
return
}
}
}
//校验前置
if conf.PreTId != -1 {
if tn, ok := dbLinestory.Tasks[conf.PreTId]; !ok {
code = pb.ErrorCode_LinestoryPreTaskNoFinished
return
} else {
if tn.Status != 2 {
code = pb.ErrorCode_LinestoryPreTaskNoFinished
return
}
}
}
// 判此任务是否是结局
if conf.Ending == 0 && conf.Resetto != -1 {
// 重置任务
for k, _ := range dbLinestory.Tasks {
if k >= conf.Resetto {
delete(dbLinestory.Tasks, k)
}
}
// 设置当前任务为禁止
dbLinestory.Tasks[req.TaskId] = &pb.TaskNode{Status: 3}
}
// 校验子任务是否完成
if _, ok := utils.Findx(curTask.SubtaskIds, req.SubtaskId); ok {
code = pb.ErrorCode_LinestorySubTaskFinished
return
}
// 校验子任务前置是否完成
if stageConf.PreTId != -1 {
if _, ok := utils.Findx(curTask.SubtaskIds, stageConf.PreTId); !ok {
code = pb.ErrorCode_LinestoryPreTaskNoFinished
return
}
}
module, err := this.service.GetModule(comm.ModuleRtask)
if err != nil {
code = pb.ErrorCode_SystemError
return
}
//校验子任务完成条件
if m, ok := module.(comm.IRtask); ok {
for _, condiId := range stageConf.Cond {
if code = m.CheckCondi(session.GetUserId(), condiId); code != pb.ErrorCode_Success {
return
}
}
// 全部符合条件
curTask.SubtaskIds = append(curTask.SubtaskIds, req.SubtaskId)
if len(conf.StageTId) == len(curTask.SubtaskIds) {
curTask.Status = 2 //完成
// 发任务奖励
if code = this.moduleLinestory.DispenseRes(session, conf.Reward, true); code != pb.ErrorCode_Success {
log.Errorf("%v", code)
}
} else {
curTask.Status = 1 //进行中
}
dbLinestory.Tasks[conf.Id] = curTask
}
// 更新子任务
update := map[string]interface{}{
"tasks": dbLinestory.Tasks,
}
if err := this.moduleLinestory.modelLinestory.Change(session.GetUserId(), update); err != nil {
code = pb.ErrorCode_DBError
return
}
//派发子任务奖励
code = this.moduleLinestory.DispenseRes(session, stageConf.Reward, true)
return
}

View File

@ -0,0 +1,37 @@
package linestory
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
// 支线剧情-我的主线任务
func (this *apiComp) MaintaskCheck(session comm.IUserSession, req *pb.LinestoryMaintaskReq) (code pb.ErrorCode) {
if req.ChapterId == 0 {
code = pb.ErrorCode_ReqParameterError
}
return
}
func (this *apiComp) Maintask(session comm.IUserSession, req *pb.LinestoryMaintaskReq) (code pb.ErrorCode, data proto.Message) {
if code = this.MaintaskCheck(session, req); code != pb.ErrorCode_Success {
return
}
uid := session.GetUserId()
// 我的主线任务
list := this.moduleLinestory.modelLinestory.getMaintasks(uid, req.ChapterId)
rsp := &pb.LinestoryMaintaskResp{
List: list,
}
if err := session.SendMsg(string(this.moduleLinestory.GetType()), LinestorySubTypeMaintask, rsp); err != nil {
code = pb.ErrorCode_SystemError
return
}
return
}

View File

@ -0,0 +1,55 @@
package linestory
import (
"errors"
"go_dreamfactory/comm"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
// 章节奖励领取
func (this *apiComp) ReceiveCheck(session comm.IUserSession, req *pb.LinestoryReceiveReq) (code pb.ErrorCode) {
if req.ChapterId == 0 {
code = pb.ErrorCode_ReqParameterError
}
return
}
func (this *apiComp) Receive(session comm.IUserSession, req *pb.LinestoryReceiveReq) (code pb.ErrorCode, data proto.Message) {
if code = this.ReceiveCheck(session, req); code != pb.ErrorCode_Success {
return
}
uid := session.GetUserId()
conf := this.moduleLinestory.configure.getChapterCfgById(req.ChapterId)
if conf == nil {
log.Errorf("config is nil uid:%v groupId:%v", uid, req.ChapterId)
code = pb.ErrorCode_ConfigNoFound
return
}
if err := this.moduleLinestory.modelLinestory.receive(uid, req.ChapterId); err != nil {
var customErr = new(comm.CustomError)
if errors.As(err, &customErr) {
code = customErr.Code
} else {
code = pb.ErrorCode_DBError
}
this.moduleLinestory.Error("章节奖励领取失败", log.Fields{"uid": uid, "chapterId": req.ChapterId, "code": code})
return
}
//发奖
if code := this.moduleLinestory.DispenseRes(session, conf.Reward, true); code != pb.ErrorCode_Success {
this.moduleLinestory.Errorf("奖励发放失败 uid:%v groupId:%v reward:%v", uid, req.ChapterId, conf.Reward)
}
rsp := &pb.LinestoryReceiveResp{
ChapterId: req.ChapterId,
}
if err := session.SendMsg(string(this.moduleLinestory.GetType()), LinestorySubTypeReceive, rsp); err != nil {
code = pb.ErrorCode_SystemError
}
return
}

View File

@ -1,77 +0,0 @@
package linestory
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"google.golang.org/protobuf/proto"
)
func (this *apiComp) DostartCheck(session comm.IUserSession, req *pb.LinestoryStartReq) (code pb.ErrorCode) {
return
}
func (this *apiComp) Dostart(session comm.IUserSession, req *pb.LinestoryStartReq) (code pb.ErrorCode, data proto.Message) {
if code = this.DostartCheck(session, req); code != pb.ErrorCode_Success {
return
}
rsp := &pb.LinestoryStartResp{
JqId: req.JqId,
}
defer func() {
if err := session.SendMsg(string(this.moduleLinestory.GetType()), LinestorySubTypeDostart,
rsp); err != nil {
code = pb.ErrorCode_SystemError
}
}()
conf := this.moduleLinestory.configure.getLinestoryChapterCfgById(req.JqId)
if conf == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
module, err := this.service.GetModule(comm.ModuleRtask)
if err != nil {
code = pb.ErrorCode_SystemError
return
}
if m, ok := module.(comm.IRtask); ok {
// 校验限定条件
for _, condiId := range conf.Cond {
if code = m.CheckCondi(session.GetUserId(), condiId); code != pb.ErrorCode_Success {
return
}
}
}
dbLinestory := &pb.DBLinestory{}
if err := this.moduleLinestory.modelLinestory.Get(session.GetUserId(), dbLinestory); err != nil {
if err == mongo.ErrNoDocuments {
//创建任务记录
if err := this.moduleLinestory.modelLinestory.Add(session.GetUserId(), &pb.DBLinestory{
Id: primitive.NewObjectID().Hex(),
Uid: session.GetUserId(),
JqId: req.JqId,
}); err != nil {
code = pb.ErrorCode_DBError
return
}
} else {
code = pb.ErrorCode_DBError
return
}
}
if dbLinestory.Tasks != nil {
for k, _ := range dbLinestory.Tasks {
rsp.TaskIds = append(rsp.TaskIds, k)
}
}
return
}

View File

@ -9,9 +9,8 @@ import (
)
const (
gameLinestoryChapter = "game_linestorychapter.json"
gameLinestoryTask = "game_linestorytask.json"
gameLinestoryStagetask = "game_linestorystagetask.json"
gameLinestoryTimeline = "game_linestorytimeline.json"
gameLinestoryMainTask = "game_linestorymaintask.json"
)
type configureComp struct {
@ -21,22 +20,21 @@ type configureComp struct {
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompConfigure.Init(service, module, comp, options)
err = this.LoadMultiConfigure(map[string]interface{}{
gameLinestoryChapter: cfg.NewGameLineStoryChapter,
gameLinestoryTask: cfg.NewGameLineStoryTask,
gameLinestoryStagetask: cfg.NewGameLineStoryStageTask,
gameLinestoryTimeline: cfg.NewGameLinestoryTimeLine,
gameLinestoryMainTask: cfg.NewGameLinestoryMainTask,
})
return
}
func (this *configureComp) getLinestoryChapterCfg() (data *cfg.GameLineStoryChapter, err error) {
func (this *configureComp) getLinestoryTimelineCfg() (data *cfg.GameLinestoryTimeLine, err error) {
var (
v interface{}
ok bool
)
if v, err = this.GetConfigure(gameLinestoryChapter); err != nil {
if v, err = this.GetConfigure(gameLinestoryTimeline); err != nil {
return
} else {
if data, ok = v.(*cfg.GameLineStoryChapter); !ok {
if data, ok = v.(*cfg.GameLinestoryTimeLine); !ok {
err = fmt.Errorf("%T no is *cfg.GameLineStoryChapter", v)
return
}
@ -44,15 +42,15 @@ func (this *configureComp) getLinestoryChapterCfg() (data *cfg.GameLineStoryChap
return
}
func (this *configureComp) getLinestoryTaskCfg() (data *cfg.GameLineStoryTask, err error) {
func (this *configureComp) getLinestoryMainTaskCfg() (data *cfg.GameLinestoryMainTask, err error) {
var (
v interface{}
ok bool
)
if v, err = this.GetConfigure(gameLinestoryTask); err != nil {
if v, err = this.GetConfigure(gameLinestoryMainTask); err != nil {
return
} else {
if data, ok = v.(*cfg.GameLineStoryTask); !ok {
if data, ok = v.(*cfg.GameLinestoryMainTask); !ok {
err = fmt.Errorf("%T no is *cfg.GameLineStoryTask", v)
return
}
@ -60,24 +58,8 @@ func (this *configureComp) getLinestoryTaskCfg() (data *cfg.GameLineStoryTask, e
return
}
func (this *configureComp) getLinestoryStageCfg() (data *cfg.GameLineStoryStageTask, err error) {
var (
v interface{}
ok bool
)
if v, err = this.GetConfigure(gameLinestoryStagetask); err != nil {
return
} else {
if data, ok = v.(*cfg.GameLineStoryStageTask); !ok {
err = fmt.Errorf("%T no is *cfg.GameLineStoryStageTask", v)
return
}
}
return
}
func (this *configureComp) getLinestoryChapterCfgById(id int32) (data *cfg.GameLineStoryChapterData) {
if cfg, err := this.getLinestoryChapterCfg(); err != nil {
func (this *configureComp) getChapterCfgById(id int32) (data *cfg.GameLinestoryTimeLineData) {
if cfg, err := this.getLinestoryTimelineCfg(); err != nil {
log.Errorf("%v", err)
return
} else {
@ -88,8 +70,8 @@ func (this *configureComp) getLinestoryChapterCfgById(id int32) (data *cfg.GameL
return
}
func (this *configureComp) getLinestoryTaskCfgById(id int32) (data *cfg.GameLineStoryTaskData) {
if cfg, err := this.getLinestoryTaskCfg(); err != nil {
func (this *configureComp) getMainTaskCfgById(id int32) (data *cfg.GameLinestoryMainTaskData) {
if cfg, err := this.getLinestoryMainTaskCfg(); err != nil {
log.Errorf("%v", err)
return
} else {
@ -100,13 +82,29 @@ func (this *configureComp) getLinestoryTaskCfgById(id int32) (data *cfg.GameLine
return
}
func (this *configureComp) getLinestoryStageCfgById(id int32) (data *cfg.GameLineStoryStageTaskData) {
if cfg, err := this.getLinestoryStageCfg(); err != nil {
func (this *configureComp) getMainTaskCfgByGroup(groupId int32) (data []*cfg.GameLinestoryMainTaskData) {
if cfg, err := this.getLinestoryMainTaskCfg(); err != nil {
log.Errorf("%v", err)
return
} else {
if cfg != nil {
data = cfg.GetDataMap()[id]
for _, v := range cfg.GetDataList() {
if v.Group == groupId {
data = append(data, v)
}
}
}
}
return
}
func (this *configureComp) converArr(groupId int32) (taskIds []int32) {
data := this.getMainTaskCfgByGroup(groupId)
if data != nil {
for _, v := range data {
if v.Group == groupId {
taskIds = append(taskIds, v.Id)
}
}
}
return

View File

@ -3,7 +3,12 @@ package linestory
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
)
type ModelLinestory struct {
@ -19,3 +24,73 @@ func (this *ModelLinestory) Init(service core.IService, module core.IModule, com
this.service = service
return
}
func (this *ModelLinestory) getLinestory(uid string) *pb.DBLinestory {
ls := &pb.DBLinestory{
Uid: uid,
}
if err := this.Get(uid, ls); err != nil {
if err == mongo.ErrNoDocuments {
ls.Id = primitive.NewObjectID().Hex()
if err := this.Add(uid, ls); err != nil {
log.Errorf("save linestory err:%v", err)
return ls
}
return ls
} else {
log.Errorf("getLinestory err:%v", err)
return ls
}
}
return ls
}
// 获取章节节点信息
func (this *ModelLinestory) getChapters(uid string) map[int32]*pb.TaskChapter {
ls := this.getLinestory(uid)
return ls.TaskChapter
}
// 获取玩家支线剧情-主线任务
func (this *ModelLinestory) getMaintasks(uid string, groupId int32) (list []*pb.TaskMain) {
// 调用世界任务接口groupId & taskId
if module, err := this.service.GetModule(comm.ModuleWorldtask); err == nil {
if iwt, ok := module.(comm.IWorldtask); ok {
// 获取玩家世界任务
wt := iwt.GetMyWorldtask(uid)
if wt != nil {
mainTasks := this.moduleLinestory.configure.getMainTaskCfgByGroup(groupId)
for _, conf := range mainTasks {
// 遍历已完成的世界任务
for _, task := range wt.TaskList {
if conf.Id == task.TaskId {
list = append(list, &pb.TaskMain{
TaskId: conf.Id,
Status: 2,
})
}
}
}
}
}
}
return
}
// 章节奖励领取
func (this *ModelLinestory) receive(uid string, groupId int32) (err error) {
ls := this.getLinestory(uid)
if v, ok := ls.TaskChapter[groupId]; ok {
if v.Receive == 1 {
v.Receive = 2
update := map[string]interface{}{
"receive": v.Receive,
}
return this.Change(uid, update)
} else {
return comm.NewCustomError(pb.ErrorCode_LinestoryNoReceive)
}
}
return comm.NewCustomError(pb.ErrorCode_LinestoryChapterNoOpen)
}

View File

@ -7,13 +7,20 @@ import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
"go_dreamfactory/utils"
)
var _ comm.ILinestory = (*ModuleLinestory)(nil)
type ModuleLinestory struct {
modules.ModuleBase
api *apiComp
configure *configureComp
modelLinestory *ModelLinestory
confTimeline *cfg.GameLinestoryTimeLine
confMaintask *cfg.GameLinestoryMainTask
}
func NewModule() core.IModule {
@ -35,3 +42,43 @@ func (this *ModuleLinestory) OnInstallComp() {
func (this *ModuleLinestory) GetType() core.M_Modules {
return comm.ModuleLinestory
}
func (this *ModuleLinestory) Start() (err error) {
err = this.ModuleBase.Start()
if this.confTimeline, err = this.configure.getLinestoryTimelineCfg(); err != nil {
return err
}
if this.confMaintask, err = this.configure.getLinestoryMainTaskCfg(); err != nil {
return err
}
return
}
// 世界任务完成通知
func (this *ModuleLinestory) TaskFinishNotify(uid string, taskId, groupId int32) error {
ls := this.modelLinestory.getLinestory(uid)
if v, ok := ls.TaskChapter[groupId]; ok {
if _, ok := utils.Findx(v.TaskIds, taskId); !ok {
v.TaskIds = append(v.TaskIds, taskId)
taskIds := this.configure.converArr(groupId)
// 校验当前组下的任务是否全部完成
if utils.ForContainer(taskIds, v.TaskIds) {
//说明组里的所有任务完成
v.Receive = 1
v.Status = 1
}
}
} else {
tg := &pb.TaskChapter{}
tg.TaskIds = append(tg.TaskIds, taskId)
if ls.TaskChapter == nil {
ls.TaskChapter = make(map[int32]*pb.TaskChapter)
}
ls.TaskChapter[groupId] = tg
}
update := map[string]interface{}{
"taskChapter": ls.TaskChapter,
}
return this.modelLinestory.Change(uid, update)
}

View File

@ -413,26 +413,26 @@ func (this *ModuleBase) GetDBNoduleByUid(uid, tableName string, expired time.Dur
}
//日志接口
func (this *ModuleBase) Debug(msg string, args ...log.Field) {
this.options.GetLog().Debug(msg, args...)
func (this *ModuleBase) Debug(msg string, args log.Fields) {
this.options.GetLog().Debug(msg, args)
}
func (this *ModuleBase) Info(msg string, args ...log.Field) {
this.options.GetLog().Info(msg, args...)
func (this *ModuleBase) Info(msg string, args log.Fields) {
this.options.GetLog().Info(msg, args)
}
func (this *ModuleBase) Print(msg string, args ...log.Field) {
this.options.GetLog().Print(msg, args...)
func (this *ModuleBase) Print(msg string, args log.Fields) {
this.options.GetLog().Print(msg, args)
}
func (this *ModuleBase) Warn(msg string, args ...log.Field) {
this.options.GetLog().Warn(msg, args...)
func (this *ModuleBase) Warn(msg string, args log.Fields) {
this.options.GetLog().Warn(msg, args)
}
func (this *ModuleBase) Error(msg string, args ...log.Field) {
this.options.GetLog().Error(msg, args...)
func (this *ModuleBase) Error(msg string, args log.Fields) {
this.options.GetLog().Error(msg, args)
}
func (this *ModuleBase) Panic(msg string, args ...log.Field) {
this.options.GetLog().Panic(msg, args...)
func (this *ModuleBase) Panic(msg string, args log.Fields) {
this.options.GetLog().Panic(msg, args)
}
func (this *ModuleBase) Fatal(msg string, args ...log.Field) {
this.options.GetLog().Fatal(msg, args...)
func (this *ModuleBase) Fatal(msg string, args log.Fields) {
this.options.GetLog().Fatal(msg, args)
}
func (this *ModuleBase) Debugf(format string, args ...interface{}) {
@ -478,3 +478,25 @@ func (this *ModuleBase) Fatalln(args ...interface{}) {
func (this *ModuleBase) Panicln(args ...interface{}) {
this.options.GetLog().Panicln(args...)
}
func (this *ModuleBase) DebugWithField(msg string, fields log.Fields) {
}
func (this *ModuleBase) InfoWithField(msg string, fields log.Fields) {
}
func (this *ModuleBase) PrintWithField(msg string, fields log.Fields) {
}
func (this *ModuleBase) WarnWithField(msg string, fields log.Fields) {
}
func (this *ModuleBase) ErrorWithField(msg string, fields log.Fields) {
}
func (this *ModuleBase) FatalWithField(msg string, fields log.Fields) {
}
func (this *ModuleBase) PanicWithField(msg string, fields log.Fields) {
}

View File

@ -105,7 +105,7 @@ func (this *Moonfantasy) Trigger(session comm.IUserSession, source *pb.BattleRep
//接收区服worker发起的秘境事件
func (this *Moonfantasy) Rpc_ModuleMoonfantasyTrigger(ctx context.Context, args *pb.RPCGeneralReqA1, reply *pb.EmptyResp) (err error) {
this.Debug("Rpc_ModuleMoonfantasyTrigger", log.Field{Key: "args", Value: args.String()})
this.Debug("Rpc_ModuleMoonfantasyTrigger", log.Fields{"args": args.String()})
if args.Param1 == "" {
err = errors.New("参数异常!")
return

View File

@ -179,6 +179,6 @@ func (this *Pagoda) CheckPoint(uid string) bool {
return true
}
func (this *Pagoda) Rpc_ModuleSeasonPagodaReward(ctx context.Context, args *pb.EmptyReq, reply *pb.EmptyResp) {
this.Debug("Rpc_ModuleSeasonPagodaReward", log.Field{Key: "args", Value: args.String()})
this.Debug("Rpc_ModuleSeasonPagodaReward", log.Fields{"args": args.String()})
this.modulerank.seasonSettlement()
}

View File

@ -62,7 +62,7 @@ func (this *Pay) OnInstallComp() {
//RPC-----------------------------------------------------------------------------------------------------------------------
func (this *Pay) Rpc_ModulePayDelivery(ctx context.Context, args *pb.PayDeliveryReq, reply *pb.PayDeliveryResp) (err error) {
this.Debug("Rpc_ModulePayDelivery", log.Field{Key: "args", Value: args.String()})
this.Debug("Rpc_ModulePayDelivery", log.Fields{ "args": args.String()})
var (
conf *cfg.GameRechargeData
info *pb.DBUserPay

View File

@ -63,7 +63,7 @@ func (this *apiComp) BattleFinish(session comm.IUserSession, req *pb.RtaskBattle
for _, v := range sideConf.EndTid {
if err, ok := this.moduleRtask.modelRtask.checkCondi(session.GetUserId(), v); !ok {
if err != nil {
this.moduleRtask.Error(err.Error())
this.moduleRtask.Errorln(err.Error())
}
this.moduleRtask.Debugf("条件未达成 condiID:%v rtaskId:%v subRtaskId:%v chooseID:%v", v, req.RtaskId, req.RtaskSubId, req.ChooseId)
break

View File

@ -240,7 +240,7 @@ func (this *ModuleRtask) SendToRtask(session comm.IUserSession, rtaskType comm.T
return
}
this.Debug("任务事件触发", log.Field{"uid", uid}, log.Field{"taskType", rtaskType}, log.Field{"params", params})
this.Debug("任务事件触发", log.Fields{"uid": uid, "taskType": rtaskType, "params": params})
var (
err error
condiId int32
@ -250,7 +250,7 @@ func (this *ModuleRtask) SendToRtask(session comm.IUserSession, rtaskType comm.T
for _, codi := range this.configure.getRtaskCondis(int32(rtaskType)) {
v, ok := this.handleMap[codi.Id]
if !ok {
this.Warn("未注册事件处理器", log.Field{"uid", uid}, log.Field{"condiId", codi.Id})
this.Warn("未注册事件处理器", log.Fields{"uid": uid, "condiId": codi.Id})
code = pb.ErrorCode_RtaskCondiNoFound
return
}
@ -260,7 +260,7 @@ func (this *ModuleRtask) SendToRtask(session comm.IUserSession, rtaskType comm.T
}
if condiId, err = v.find(v.cfg, params...); condiId == 0 {
if err != nil {
this.Warn(errors.WithMessage(err, uid).Error())
this.Warnln(errors.WithMessage(err, uid).Error())
}
} else {
condis = append(condis, v)
@ -413,7 +413,7 @@ func (this *ModuleRtask) RemoteCheckCondi(uid string, condiId int32, rsp *pb.DBR
//接收区服worker发起的秘境事件
func (this *ModuleRtask) Rpc_ModuleRtaskSendTask(ctx context.Context, args *pb.RPCRTaskReq, reply *pb.EmptyResp) (err error) {
this.Debug("Rpc_ModuleRtaskSendTask", log.Field{Key: "args", Value: args.String()})
this.Debug("Rpc_ModuleRtaskSendTask", log.Fields{ "args": args.String()})
if args.Uid == "" {
err = errors.New("参数异常!")
return

View File

@ -139,7 +139,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
var _items []*cfg.GameShopitemData
for _, v := range shopconf.Shopitem {
if _items, err = this.module.configure.GetShopItemsConfigureByGroups(v, udata); err != nil || len(_items) == 0 {
this.module.Error("no founf shopgroup", log.Field{Key: "gid", Value: v})
this.module.Error("no founf shopgroup", log.Fields{"gid": v})
code = pb.ErrorCode_SystemError
return
}

View File

@ -122,7 +122,7 @@ func (this *Sociaty) Reddot(uid string, rid ...comm.ReddotType) (reddot map[comm
// 跨服获取公会
func (this *Sociaty) RpcGetSociaty(ctx context.Context, req *pb.RPCGeneralReqA1, reply *pb.DBSociaty) error {
this.Debug("Rpc_ModuleSociaty", log.Field{Key: "req", Value: req})
this.Debug("Rpc_ModuleSociaty", log.Fields{"req": req})
sociaty := this.modelSociaty.getSociaty(req.Param1)
*reply = *sociaty
return nil

View File

@ -297,7 +297,7 @@ func (this *ModelTask) doTaskHandle(event interface{}, next func(event interface
task, ok := this.checkTask(tl.Uid, conf.Key)
if !ok {
this.moduleTask.Debug("任务已完成", log.Field{"uid", tl.Uid}, log.Field{"任务ID", conf.Key})
this.moduleTask.Debug("任务已完成", log.Fields{"uid": tl.Uid, "任务ID": conf.Key})
continue
}
@ -327,11 +327,7 @@ func (this *ModelTask) doTaskHandle(event interface{}, next func(event interface
return
}
this.moduleTask.Debug("更新任务",
log.Field{"uid", tl.Uid},
log.Field{"任务ID", conf.Key},
log.Field{"事件ID", conf.TypeId},
log.Field{"progress", update["progress"]},
log.Field{"status", update["status"]},
log.Fields{"uid": tl.Uid, "任务ID": conf.Key, "事件ID": conf.TypeId, "progress": update["progress"], "status": update["status"]},
)
}
return

View File

@ -67,7 +67,7 @@ func (this *ChatComp) Start() (err error) {
}
cronStr := fmt.Sprintf("0 %d %d ? * %s", v1.TimeM, v1.TimeH, weekStr)
this.module.Debug("注册Chat广播公告消息", log.Field{Key: "cronStr", Value: cronStr}, log.Field{Key: "text", Value: v1.Text})
this.module.Debug("注册Chat广播公告消息", log.Fields{"cronStr": cronStr, "text": v1.Text})
if id, err = cron.AddFunc(cronStr, this.chatNoticen(v1.Text)); err != nil {
this.module.Errorf("cron.AddFunc:%s err:%v", cronStr, err)
continue
@ -89,7 +89,7 @@ func (this *ChatComp) chatNoticen(content string) func() {
Content: content,
}
data, _ := anypb.New(&pb.ChatMessagePush{Chat: msg})
this.module.Debug("广播公告消息", log.Field{Key: "chat", Value: content})
this.module.Debug("广播公告消息", log.Fields{"chat": content})
if err := this.module.service.RpcBroadcast(context.Background(), comm.Service_Gateway, string(comm.Rpc_GatewaySendRadioMsg), pb.UserMessage{
MainType: string(comm.ModuleChat),
SubType: "message",

View File

@ -77,26 +77,26 @@ func (this *Timer) SetName(name string) {
}
//日志接口
func (this *Timer) Debug(msg string, args ...log.Field) {
this.options.GetLog().Debug(msg, args...)
func (this *Timer) Debug(msg string, args log.Fields) {
this.options.GetLog().Debug(msg, args)
}
func (this *Timer) Info(msg string, args ...log.Field) {
this.options.GetLog().Info(msg, args...)
func (this *Timer) Info(msg string, args log.Fields) {
this.options.GetLog().Info(msg, args)
}
func (this *Timer) Print(msg string, args ...log.Field) {
this.options.GetLog().Print(msg, args...)
func (this *Timer) Print(msg string, args log.Fields) {
this.options.GetLog().Print(msg, args)
}
func (this *Timer) Warn(msg string, args ...log.Field) {
this.options.GetLog().Warn(msg, args...)
func (this *Timer) Warn(msg string, args log.Fields) {
this.options.GetLog().Warn(msg, args)
}
func (this *Timer) Error(msg string, args ...log.Field) {
this.options.GetLog().Error(msg, args...)
func (this *Timer) Error(msg string, args log.Fields) {
this.options.GetLog().Error(msg, args)
}
func (this *Timer) Panic(msg string, args ...log.Field) {
this.options.GetLog().Panic(msg, args...)
func (this *Timer) Panic(msg string, args log.Fields) {
this.options.GetLog().Panic(msg, args)
}
func (this *Timer) Fatal(msg string, args ...log.Field) {
this.options.GetLog().Fatal(msg, args...)
func (this *Timer) Fatal(msg string, args log.Fields) {
this.options.GetLog().Fatal(msg, args)
}
func (this *Timer) Debugf(format string, args ...interface{}) {

View File

@ -5,7 +5,9 @@ import (
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs"
"go_dreamfactory/sys/db"
"strconv"
"time"
"go.mongodb.org/mongo-driver/bson/primitive"
"google.golang.org/protobuf/proto"
@ -121,7 +123,9 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
mapRankData["Leadpos"] = Leadpos
mapRankData["line"] = szLine
mapRankData["costTime"] = costTime
this.module.modulerank.ChangeUserRank(session.GetUserId(), v.Id, mapRankData)
conn_, _ := db.Cross()
dbModel := db.NewDBModel(comm.TableVikingRank, time.Hour, conn_)
dbModel.ChangeList(session.GetUserId(), v.Id, mapRankData)
objID = v.Id
bFind = true
break
@ -142,7 +146,9 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
CostTime: costTime,
}
objID = new.Id
this.module.modulerank.AddRankList(session.GetUserId(), new.Id, new)
conn_, _ := db.Cross()
dbModel := db.NewDBModel(comm.TableVikingRank, time.Hour, conn_)
dbModel.AddList(session.GetUserId(), new.Id, new)
}
this.module.modulerank.SetRankListData("vikingRank"+strconv.Itoa(int(req.BossId)), req.Difficulty<<16+costTime, objID)
}

View File

@ -5,7 +5,6 @@ import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/sys/redis/pipe"
"go_dreamfactory/pb"
"go_dreamfactory/sys/db"
"strconv"
"github.com/go-redis/redis/v8"
@ -29,28 +28,25 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.VikingRankListR
if code != pb.ErrorCode_Success {
return // 参数校验失败直接返回
}
if !req.Friend {
if !this.module.IsCross() {
if conn, err := db.Local(); err == nil {
var (
pipe *pipe.RedisPipe = conn.Redis.RedisPipe(context.TODO())
)
var (
pipe *pipe.RedisPipe = this.module.modelViking.Redis.RedisPipe(context.TODO())
)
rd = pipe.ZRange("vikingRank"+strconv.Itoa(int(req.BoosType)), 0, -1)
rd = pipe.ZRange("vikingRank"+strconv.Itoa(int(req.BoosType)), 0, -1)
if _, err = pipe.Exec(); err != nil {
this.module.Errorln(err)
return
}
_dataList := rd.Val()
for _, v := range _dataList {
result := &pb.DBVikingRank{}
if err = this.module.modulerank.GetListObj(session.GetUserId(), v, result); err == nil {
szRank = append(szRank, result)
}
}
if _, err := pipe.Exec(); err != nil {
this.module.Errorln(err)
return
}
_dataList := rd.Val()
for _, v := range _dataList {
result := &pb.DBVikingRank{}
if err := this.module.modulerank.GetListObj(session.GetUserId(), v, result); err == nil {
szRank = append(szRank, result)
}
}
} else {
uids := this.friend.GetFriendList(session.GetUserId())
for _, id := range uids {

View File

@ -7,6 +7,7 @@ import (
"go_dreamfactory/lego/sys/redis/pipe"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go_dreamfactory/sys/db"
"github.com/go-redis/redis/v8"
)
@ -61,24 +62,28 @@ func (this *ModelRank) getVikingRankListByBossType(uid string, bossType int32) *
return nil
}
// 排行数据写跨服
func (this *ModelRank) SetRankListData(tableName string, score int32, uid string) {
if !db.IsCross() {
if conn, err := db.Cross(); err == nil {
var (
pipe *pipe.RedisPipe = conn.Redis.RedisPipe(context.TODO())
menbers *redis.Z
)
var (
pipe *pipe.RedisPipe = this.DBModel.Redis.RedisPipe(context.TODO())
menbers *redis.Z
)
menbers = &redis.Z{Score: float64(score), Member: uid}
menbers = &redis.Z{Score: float64(score), Member: uid}
if cmd := pipe.ZAdd(tableName, menbers); cmd != nil {
if cmd := pipe.ZAdd(tableName, menbers); cmd != nil {
dock, err1 := cmd.Result()
if err1 != nil {
this.moduleViking.Errorln(dock, err1)
dock, err1 := cmd.Result()
if err1 != nil {
this.moduleViking.Errorln(dock, err1)
}
}
if _, err := pipe.Exec(); err != nil {
this.moduleViking.Errorln(err)
return
}
}
}
if _, err := pipe.Exec(); err != nil {
this.moduleViking.Errorln(err)
return
}
}

View File

@ -58,26 +58,26 @@ func (this *Web) OnInstallComp() {
//日志
//日志接口
func (this *Web) Debug(msg string, args ...log.Field) {
this.options.GetLog().Debug(msg, args...)
func (this *Web) Debug(msg string, args log.Fields) {
this.options.GetLog().Debug(msg, args)
}
func (this *Web) Info(msg string, args ...log.Field) {
this.options.GetLog().Info(msg, args...)
func (this *Web) Info(msg string, args log.Fields) {
this.options.GetLog().Info(msg, args)
}
func (this *Web) Print(msg string, args ...log.Field) {
this.options.GetLog().Print(msg, args...)
func (this *Web) Print(msg string, args log.Fields) {
this.options.GetLog().Print(msg, args)
}
func (this *Web) Warn(msg string, args ...log.Field) {
this.options.GetLog().Warn(msg, args...)
func (this *Web) Warn(msg string, args log.Fields) {
this.options.GetLog().Warn(msg, args)
}
func (this *Web) Error(msg string, args ...log.Field) {
this.options.GetLog().Error(msg, args...)
func (this *Web) Error(msg string, args log.Fields) {
this.options.GetLog().Error(msg, args)
}
func (this *Web) Panic(msg string, args ...log.Field) {
this.options.GetLog().Panic(msg, args...)
func (this *Web) Panic(msg string, args log.Fields) {
this.options.GetLog().Panic(msg, args)
}
func (this *Web) Fatal(msg string, args ...log.Field) {
this.options.GetLog().Fatal(msg, args...)
func (this *Web) Fatal(msg string, args log.Fields) {
this.options.GetLog().Fatal(msg, args)
}
func (this *Web) Debugf(format string, args ...interface{}) {

View File

@ -60,6 +60,7 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
// 前置任务ID
if !this.module.modelWorldtask.IsPreFinished(userTask, curTaskConf) {
this.module.Warnf("前置任务未完成 uid:%v preTaskId:%v taskId:", uid, curTaskConf.Ontxe, curTaskConf.Key)
code = pb.ErrorCode_WorldtaskLastUnFinished
return
}

View File

@ -4,6 +4,7 @@ import (
"errors"
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
@ -86,5 +87,16 @@ func (this *ModelWorldtask) finishTask(groupId, taskId int32, task *pb.DBWorldta
update["taskList"] = task.TaskList
update["lastTaskIds"] = task.LastTaskIds
return this.Change(task.Uid, update)
if err := this.Change(task.Uid, update); err != nil {
return err
}
if module, err := this.service.GetModule(comm.ModuleLinestory); err == nil {
if iLinestory, ok := module.(comm.ILinestory); ok {
if err := iLinestory.TaskFinishNotify(task.Uid, taskId, groupId); err != nil {
log.Errorf("任务完成通知失败 groupId:%v taskId:%v err:%v", groupId, taskId, err)
}
}
}
return nil
}

View File

@ -129,6 +129,15 @@ func (this *Worldtask) TaskcondNotify(session comm.IUserSession, condId int32) e
return nil
}
// 获取我的世界任务
func (this *Worldtask) GetMyWorldtask(uid string) *pb.DBWorldtask {
wt, err := this.modelWorldtask.getWorldtask(uid)
if err != nil {
log.Errorf("GetMyWorldtask err:%v", err)
}
return wt
}
// bingo世界任务跳跃 支持回退
func (this *Worldtask) BingoJumpTask(session comm.IUserSession, groupId, taskId int32) error {
uid := session.GetUserId()

View File

@ -20,6 +20,7 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// go:generate stringer -type ErrorCode -linecomment
type ErrorCode int32
const (
@ -182,9 +183,9 @@ const (
ErrorCode_MoonfantasyNotEnoughbattles ErrorCode = 2407 // boos 挑战次数不足
ErrorCode_BattleNoFoundRecord ErrorCode = 2501 // 未找到记录
ErrorCode_LinestoryTaskFinished ErrorCode = 2601 //任务已完成
ErrorCode_LinestorySubTaskFinished ErrorCode = 2602 //子任务已完成
ErrorCode_LinestoryNoReceive ErrorCode = 2602 //章节奖励不能领取
ErrorCode_LinestoryTaskDisabledEnter ErrorCode = 2603 //禁止进入
ErrorCode_LinestoryPreTaskNoFinished ErrorCode = 2604 //前置任务未完成
ErrorCode_LinestoryChapterNoOpen ErrorCode = 2604 //章节未开启
// hunting
ErrorCode_HuntingLvErr ErrorCode = 2701 // 关卡难度不匹配
ErrorCode_HuntingBoosType ErrorCode = 2702 // BOSS 类型不对
@ -267,7 +268,7 @@ const (
ErrorCode_WorldtaskNoComplete ErrorCode = 3804 //任务条件未完成
ErrorCode_WorldtaskFinihed ErrorCode = 3805 //任务已完成
ErrorCode_WorldtaskLastUnFinished ErrorCode = 3806 //上个任务未完成
//academy
// academy
ErrorCode_AcademyTaskNoCompleteTask ErrorCode = 3901 //未完成任务
)
@ -418,9 +419,9 @@ var (
2407: "MoonfantasyNotEnoughbattles",
2501: "BattleNoFoundRecord",
2601: "LinestoryTaskFinished",
2602: "LinestorySubTaskFinished",
2602: "LinestoryNoReceive",
2603: "LinestoryTaskDisabledEnter",
2604: "LinestoryPreTaskNoFinished",
2604: "LinestoryChapterNoOpen",
2701: "HuntingLvErr",
2702: "HuntingBoosType",
2703: "HuntingBuyMaxCount",
@ -638,9 +639,9 @@ var (
"MoonfantasyNotEnoughbattles": 2407,
"BattleNoFoundRecord": 2501,
"LinestoryTaskFinished": 2601,
"LinestorySubTaskFinished": 2602,
"LinestoryNoReceive": 2602,
"LinestoryTaskDisabledEnter": 2603,
"LinestoryPreTaskNoFinished": 2604,
"LinestoryChapterNoOpen": 2604,
"HuntingLvErr": 2701,
"HuntingBoosType": 2702,
"HuntingBuyMaxCount": 2703,
@ -746,7 +747,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
var file_errorcode_proto_rawDesc = []byte{
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2a, 0xf1, 0x26, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x6f, 0x2a, 0xe7, 0x26, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d,
0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12,
0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
@ -945,120 +946,119 @@ var file_errorcode_proto_rawDesc = []byte{
0x74, 0x74, 0x6c, 0x65, 0x4e, 0x6f, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72,
0x64, 0x10, 0xc5, 0x13, 0x12, 0x1a, 0x0a, 0x15, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72,
0x79, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xa9, 0x14,
0x12, 0x1d, 0x0a, 0x18, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x75, 0x62,
0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xaa, 0x14, 0x12,
0x1f, 0x0a, 0x1a, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x73, 0x6b,
0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x10, 0xab, 0x14,
0x12, 0x1f, 0x0a, 0x1a, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x65,
0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xac,
0x14, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x76, 0x45, 0x72,
0x72, 0x10, 0x8d, 0x15, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x42,
0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x10, 0x8e, 0x15, 0x12, 0x17, 0x0a, 0x12, 0x48, 0x75,
0x6e, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74,
0x10, 0x8f, 0x15, 0x12, 0x1d, 0x0a, 0x18, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x61,
0x78, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10,
0x90, 0x15, 0x12, 0x11, 0x0a, 0x0c, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x4d, 0x61, 0x78,
0x4c, 0x76, 0x10, 0xf1, 0x15, 0x12, 0x12, 0x0a, 0x0d, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79,
0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x10, 0xf2, 0x15, 0x12, 0x16, 0x0a, 0x11, 0x4c, 0x69, 0x62,
0x72, 0x61, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0xf3,
0x15, 0x12, 0x12, 0x0a, 0x0d, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x65, 0x77, 0x61,
0x72, 0x64, 0x10, 0xf4, 0x15, 0x12, 0x14, 0x0a, 0x0f, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79,
0x4c, 0x76, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xf5, 0x15, 0x12, 0x1b, 0x0a, 0x16, 0x42,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46,
0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0xd5, 0x16, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69,
0x61, 0x74, 0x79, 0x4e, 0x6f, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xb8, 0x17, 0x12, 0x11, 0x0a,
0x0c, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x64, 0x64, 0x65, 0x64, 0x10, 0xb9, 0x17,
0x12, 0x1b, 0x0a, 0x16, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x44, 0x69, 0x61, 0x6d, 0x6f,
0x6e, 0x64, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xba, 0x17, 0x12, 0x11, 0x0a,
0x0c, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x10, 0xbb, 0x17,
0x12, 0x13, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4e, 0x6f, 0x52, 0x69, 0x67,
0x68, 0x74, 0x10, 0xbc, 0x17, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
0x4e, 0x6f, 0x41, 0x64, 0x64, 0x65, 0x64, 0x10, 0xbd, 0x17, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x6f,
0x63, 0x69, 0x61, 0x74, 0x79, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x10, 0xbe, 0x17, 0x12,
0x10, 0x0a, 0x0b, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x51, 0x75, 0x69, 0x74, 0x10, 0xbf,
0x17, 0x12, 0x11, 0x0a, 0x0c, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x67, 0x72, 0x65,
0x65, 0x10, 0xc0, 0x17, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52,
0x65, 0x66, 0x75, 0x73, 0x65, 0x10, 0xc1, 0x17, 0x12, 0x13, 0x0a, 0x0d, 0x53, 0x6f, 0x63, 0x69,
0x61, 0x74, 0x79, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x10, 0xba, 0xea, 0x01, 0x12, 0x16, 0x0a,
0x10, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x44, 0x69, 0x73, 0x63, 0x68, 0x61, 0x72, 0x67,
0x65, 0x10, 0xbb, 0xea, 0x01, 0x12, 0x17, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x10, 0xbc, 0xea, 0x01, 0x12, 0x14,
0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
0x10, 0xbd, 0xea, 0x01, 0x12, 0x13, 0x0a, 0x0d, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41,
0x63, 0x63, 0x75, 0x73, 0x65, 0x10, 0xbe, 0xea, 0x01, 0x12, 0x11, 0x0a, 0x0b, 0x53, 0x6f, 0x63,
0x69, 0x61, 0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x10, 0xbf, 0xea, 0x01, 0x12, 0x13, 0x0a, 0x0d,
0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x10, 0xc0, 0xea,
0x01, 0x12, 0x14, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x44, 0x4c, 0x69,
0x6d, 0x69, 0x74, 0x10, 0xc1, 0xea, 0x01, 0x12, 0x15, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61,
0x74, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4d, 0x61, 0x78, 0x10, 0xc2, 0xea, 0x01, 0x12, 0x18,
0x0a, 0x12, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x65, 0x6c, 0x66, 0x53, 0x65, 0x74,
0x74, 0x69, 0x6e, 0x67, 0x10, 0xc3, 0xea, 0x01, 0x12, 0x1d, 0x0a, 0x17, 0x53, 0x6f, 0x63, 0x69,
0x61, 0x74, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69,
0x6d, 0x69, 0x74, 0x10, 0xc4, 0xea, 0x01, 0x12, 0x1b, 0x0a, 0x15, 0x53, 0x6f, 0x63, 0x69, 0x61,
0x74, 0x79, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64,
0x10, 0xc5, 0xea, 0x01, 0x12, 0x1a, 0x0a, 0x14, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52,
0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x10, 0xc6, 0xea, 0x01,
0x12, 0x15, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x10, 0xc7, 0xea, 0x01, 0x12, 0x17, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61,
0x74, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x61, 0x6e, 0x65, 0x6c, 0x10, 0xc8, 0xea, 0x01,
0x12, 0x15, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x42, 0x65, 0x6c, 0x6f, 0x6e,
0x67, 0x54, 0x6f, 0x10, 0xc9, 0xea, 0x01, 0x12, 0x14, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61,
0x74, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x10, 0xca, 0xea, 0x01, 0x12, 0x1b, 0x0a,
0x15, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x70, 0x70, 0x79, 0x4c, 0x76, 0x4e, 0x6f,
0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xcb, 0xea, 0x01, 0x12, 0x1b, 0x0a, 0x15, 0x53, 0x6f,
0x63, 0x69, 0x61, 0x74, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x10, 0xcc, 0xea, 0x01, 0x12, 0x1d, 0x0a, 0x17, 0x53, 0x6f, 0x63, 0x69, 0x61,
0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75,
0x67, 0x68, 0x10, 0xcd, 0xea, 0x01, 0x12, 0x1c, 0x0a, 0x16, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
0x79, 0x41, 0x63, 0x69, 0x74, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65,
0x10, 0xce, 0xea, 0x01, 0x12, 0x16, 0x0a, 0x10, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x44,
0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x65, 0x64, 0x10, 0xcf, 0xea, 0x01, 0x12, 0x16, 0x0a, 0x10,
0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74,
0x10, 0xd0, 0xea, 0x01, 0x12, 0x1a, 0x0a, 0x14, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x51,
0x75, 0x69, 0x74, 0x4e, 0x6f, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x10, 0xd1, 0xea, 0x01,
0x12, 0x15, 0x0a, 0x10, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x42,
0x75, 0x79, 0x55, 0x70, 0x10, 0x9d, 0x18, 0x12, 0x19, 0x0a, 0x14, 0x41, 0x72, 0x65, 0x6e, 0x61,
0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10,
0x9e, 0x18, 0x12, 0x17, 0x0a, 0x12, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65,
0x74, 0x4e, 0x70, 0x63, 0x49, 0x6e, 0x43, 0x64, 0x10, 0x9f, 0x18, 0x12, 0x16, 0x0a, 0x11, 0x54,
0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x4c, 0x65, 0x61, 0x72, 0x6e,
0x10, 0x81, 0x19, 0x12, 0x12, 0x0a, 0x0d, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x45, 0x72, 0x72,
0x44, 0x61, 0x74, 0x61, 0x10, 0x82, 0x19, 0x12, 0x19, 0x0a, 0x14, 0x54, 0x61, 0x6c, 0x65, 0x6e,
0x74, 0x55, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x10,
0x83, 0x19, 0x12, 0x15, 0x0a, 0x10, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x65,
0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x10, 0x84, 0x19, 0x12, 0x10, 0x0a, 0x0b, 0x54, 0x72, 0x6f,
0x6c, 0x6c, 0x42, 0x75, 0x79, 0x4d, 0x61, 0x78, 0x10, 0xe5, 0x19, 0x12, 0x11, 0x0a, 0x0c, 0x54,
0x72, 0x6f, 0x6c, 0x6c, 0x53, 0x65, 0x6c, 0x6c, 0x4d, 0x61, 0x78, 0x10, 0xe6, 0x19, 0x12, 0x16,
0x0a, 0x11, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x6c, 0x6c, 0x43, 0x6f,
0x75, 0x6e, 0x74, 0x10, 0xe7, 0x19, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x4d,
0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0xe8, 0x19, 0x12, 0x18,
0x0a, 0x13, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52,
0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe9, 0x19, 0x12, 0x19, 0x0a, 0x14, 0x48, 0x6f, 0x72, 0x6f,
0x73, 0x63, 0x6f, 0x70, 0x65, 0x4e, 0x6f, 0x74, 0x54, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x4f, 0x6e,
0x10, 0xc9, 0x1a, 0x12, 0x19, 0x0a, 0x14, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65,
0x52, 0x65, 0x73, 0x74, 0x43, 0x44, 0x4e, 0x6f, 0x45, 0x6e, 0x64, 0x10, 0xca, 0x1a, 0x12, 0x16,
0x0a, 0x11, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f,
0x75, 0x6e, 0x64, 0x10, 0xad, 0x1b, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c,
0x65, 0x67, 0x65, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x10, 0xae, 0x1b, 0x12,
0x14, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69,
0x76, 0x65, 0x10, 0x91, 0x1c, 0x12, 0x17, 0x0a, 0x12, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73,
0x6b, 0x41, 0x64, 0x76, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x10, 0x92, 0x1c, 0x12, 0x17,
0x0a, 0x12, 0x50, 0x61, 0x79, 0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x4e, 0x6f, 0x74, 0x45, 0x6e,
0x6f, 0x75, 0x67, 0x68, 0x10, 0xf5, 0x1c, 0x12, 0x14, 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x52, 0x65,
0x6e, 0x65, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x45, 0x72, 0x72, 0x10, 0xf6, 0x1c, 0x12, 0x14, 0x0a,
0x0f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68,
0x10, 0xd9, 0x1d, 0x12, 0x19, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b,
0x4c, 0x76, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xda, 0x1d, 0x12, 0x16,
0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x41, 0x63, 0x63,
0x65, 0x70, 0x74, 0x10, 0xdb, 0x1d, 0x12, 0x18, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74,
0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x10, 0xdc, 0x1d,
0x12, 0x15, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e,
0x69, 0x68, 0x65, 0x64, 0x10, 0xdd, 0x1d, 0x12, 0x1c, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6c, 0x64,
0x74, 0x61, 0x73, 0x6b, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x6e, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68,
0x65, 0x64, 0x10, 0xde, 0x1d, 0x12, 0x1e, 0x0a, 0x19, 0x41, 0x63, 0x61, 0x64, 0x65, 0x6d, 0x79,
0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61,
0x73, 0x6b, 0x10, 0xbd, 0x1e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
0x12, 0x17, 0x0a, 0x12, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x6f, 0x52,
0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x10, 0xaa, 0x14, 0x12, 0x1f, 0x0a, 0x1a, 0x4c, 0x69, 0x6e,
0x65, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c,
0x65, 0x64, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x10, 0xab, 0x14, 0x12, 0x1b, 0x0a, 0x16, 0x4c, 0x69,
0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x4e, 0x6f,
0x4f, 0x70, 0x65, 0x6e, 0x10, 0xac, 0x14, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x75, 0x6e, 0x74, 0x69,
0x6e, 0x67, 0x4c, 0x76, 0x45, 0x72, 0x72, 0x10, 0x8d, 0x15, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x75,
0x6e, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x10, 0x8e, 0x15,
0x12, 0x17, 0x0a, 0x12, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x4d, 0x61,
0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0x8f, 0x15, 0x12, 0x1d, 0x0a, 0x18, 0x48, 0x75, 0x6e,
0x74, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x78, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0x90, 0x15, 0x12, 0x11, 0x0a, 0x0c, 0x4c, 0x69, 0x62, 0x72,
0x61, 0x72, 0x79, 0x4d, 0x61, 0x78, 0x4c, 0x76, 0x10, 0xf1, 0x15, 0x12, 0x12, 0x0a, 0x0d, 0x4c,
0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x10, 0xf2, 0x15, 0x12,
0x16, 0x0a, 0x11, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x10, 0xf3, 0x15, 0x12, 0x12, 0x0a, 0x0d, 0x4c, 0x69, 0x62, 0x72, 0x61,
0x72, 0x79, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xf4, 0x15, 0x12, 0x14, 0x0a, 0x0f, 0x4c,
0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x4c, 0x76, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xf5,
0x15, 0x12, 0x1b, 0x0a, 0x16, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0xd5, 0x16, 0x12, 0x13,
0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4e, 0x6f, 0x46, 0x6f, 0x75, 0x6e, 0x64,
0x10, 0xb8, 0x17, 0x12, 0x11, 0x0a, 0x0c, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x64,
0x64, 0x65, 0x64, 0x10, 0xb9, 0x17, 0x12, 0x1b, 0x0a, 0x16, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
0x79, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68,
0x10, 0xba, 0x17, 0x12, 0x11, 0x0a, 0x0c, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x70,
0x70, 0x6c, 0x79, 0x10, 0xbb, 0x17, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
0x79, 0x4e, 0x6f, 0x52, 0x69, 0x67, 0x68, 0x74, 0x10, 0xbc, 0x17, 0x12, 0x13, 0x0a, 0x0e, 0x53,
0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4e, 0x6f, 0x41, 0x64, 0x64, 0x65, 0x64, 0x10, 0xbd, 0x17,
0x12, 0x13, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x44, 0x69, 0x73, 0x6d, 0x69,
0x73, 0x73, 0x10, 0xbe, 0x17, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
0x51, 0x75, 0x69, 0x74, 0x10, 0xbf, 0x17, 0x12, 0x11, 0x0a, 0x0c, 0x53, 0x6f, 0x63, 0x69, 0x61,
0x74, 0x79, 0x41, 0x67, 0x72, 0x65, 0x65, 0x10, 0xc0, 0x17, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x6f,
0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x65, 0x66, 0x75, 0x73, 0x65, 0x10, 0xc1, 0x17, 0x12, 0x13,
0x0a, 0x0d, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x10,
0xba, 0xea, 0x01, 0x12, 0x16, 0x0a, 0x10, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x44, 0x69,
0x73, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x10, 0xbb, 0xea, 0x01, 0x12, 0x17, 0x0a, 0x11, 0x53,
0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62,
0x10, 0xbc, 0xea, 0x01, 0x12, 0x14, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53,
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x10, 0xbd, 0xea, 0x01, 0x12, 0x13, 0x0a, 0x0d, 0x53, 0x6f,
0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x63, 0x63, 0x75, 0x73, 0x65, 0x10, 0xbe, 0xea, 0x01, 0x12,
0x11, 0x0a, 0x0b, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x10, 0xbf,
0xea, 0x01, 0x12, 0x13, 0x0a, 0x0d, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x69, 0x67,
0x6e, 0x65, 0x64, 0x10, 0xc0, 0xea, 0x01, 0x12, 0x14, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61,
0x74, 0x79, 0x43, 0x44, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x10, 0xc1, 0xea, 0x01, 0x12, 0x15, 0x0a,
0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4d, 0x61, 0x78,
0x10, 0xc2, 0xea, 0x01, 0x12, 0x18, 0x0a, 0x12, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53,
0x65, 0x6c, 0x66, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x10, 0xc3, 0xea, 0x01, 0x12, 0x1d,
0x0a, 0x17, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43,
0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x10, 0xc4, 0xea, 0x01, 0x12, 0x1b, 0x0a,
0x15, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65,
0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0xc5, 0xea, 0x01, 0x12, 0x1a, 0x0a, 0x14, 0x53, 0x6f,
0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69,
0x76, 0x65, 0x10, 0xc6, 0xea, 0x01, 0x12, 0x15, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x10, 0xc7, 0xea, 0x01, 0x12, 0x17, 0x0a,
0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x61, 0x6e,
0x65, 0x6c, 0x10, 0xc8, 0xea, 0x01, 0x12, 0x15, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
0x79, 0x42, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x54, 0x6f, 0x10, 0xc9, 0xea, 0x01, 0x12, 0x14, 0x0a,
0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x10,
0xca, 0xea, 0x01, 0x12, 0x1b, 0x0a, 0x15, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x70,
0x70, 0x79, 0x4c, 0x76, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xcb, 0xea, 0x01,
0x12, 0x1b, 0x0a, 0x15, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x56,
0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0xcc, 0xea, 0x01, 0x12, 0x1d, 0x0a,
0x17, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xcd, 0xea, 0x01, 0x12, 0x1c, 0x0a, 0x16,
0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x63, 0x69, 0x74, 0x76, 0x69, 0x74, 0x79, 0x52,
0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x10, 0xce, 0xea, 0x01, 0x12, 0x16, 0x0a, 0x10, 0x53, 0x6f,
0x63, 0x69, 0x61, 0x74, 0x79, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x65, 0x64, 0x10, 0xcf,
0xea, 0x01, 0x12, 0x16, 0x0a, 0x10, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4e, 0x61, 0x6d,
0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0xd0, 0xea, 0x01, 0x12, 0x1a, 0x0a, 0x14, 0x53, 0x6f,
0x63, 0x69, 0x61, 0x74, 0x79, 0x51, 0x75, 0x69, 0x74, 0x4e, 0x6f, 0x41, 0x6c, 0x6c, 0x6f, 0x77,
0x65, 0x64, 0x10, 0xd1, 0xea, 0x01, 0x12, 0x15, 0x0a, 0x10, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x54,
0x69, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x75, 0x79, 0x55, 0x70, 0x10, 0x9d, 0x18, 0x12, 0x19, 0x0a,
0x14, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x45,
0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x9e, 0x18, 0x12, 0x17, 0x0a, 0x12, 0x41, 0x72, 0x65, 0x6e,
0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x70, 0x63, 0x49, 0x6e, 0x43, 0x64, 0x10, 0x9f,
0x18, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x65, 0x61,
0x74, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x10, 0x81, 0x19, 0x12, 0x12, 0x0a, 0x0d, 0x54, 0x61, 0x6c,
0x65, 0x6e, 0x74, 0x45, 0x72, 0x72, 0x44, 0x61, 0x74, 0x61, 0x10, 0x82, 0x19, 0x12, 0x19, 0x0a,
0x14, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x55, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x42,
0x65, 0x66, 0x6f, 0x72, 0x65, 0x10, 0x83, 0x19, 0x12, 0x15, 0x0a, 0x10, 0x54, 0x61, 0x6c, 0x65,
0x6e, 0x74, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x10, 0x84, 0x19, 0x12,
0x10, 0x0a, 0x0b, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x42, 0x75, 0x79, 0x4d, 0x61, 0x78, 0x10, 0xe5,
0x19, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x53, 0x65, 0x6c, 0x6c, 0x4d, 0x61,
0x78, 0x10, 0xe6, 0x19, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x78,
0x53, 0x65, 0x6c, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0xe7, 0x19, 0x12, 0x16, 0x0a, 0x11,
0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x43, 0x6f, 0x75, 0x6e,
0x74, 0x10, 0xe8, 0x19, 0x12, 0x18, 0x0a, 0x13, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x52, 0x65, 0x70,
0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe9, 0x19, 0x12, 0x19,
0x0a, 0x14, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x4e, 0x6f, 0x74, 0x54, 0x75,
0x72, 0x6e, 0x65, 0x64, 0x4f, 0x6e, 0x10, 0xc9, 0x1a, 0x12, 0x19, 0x0a, 0x14, 0x48, 0x6f, 0x72,
0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x65, 0x73, 0x74, 0x43, 0x44, 0x4e, 0x6f, 0x45, 0x6e,
0x64, 0x10, 0xca, 0x1a, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67,
0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xad, 0x1b, 0x12, 0x17, 0x0a, 0x12,
0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x54, 0x69,
0x6d, 0x65, 0x10, 0xae, 0x1b, 0x12, 0x14, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73,
0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x10, 0x91, 0x1c, 0x12, 0x17, 0x0a, 0x12, 0x47,
0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x41, 0x64, 0x76, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76,
0x65, 0x10, 0x92, 0x1c, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x42, 0x75, 0x79, 0x4e, 0x75,
0x6d, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xf5, 0x1c, 0x12, 0x14, 0x0a,
0x0f, 0x50, 0x61, 0x79, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x45, 0x72, 0x72,
0x10, 0xf6, 0x1c, 0x12, 0x14, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b,
0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x10, 0xd9, 0x1d, 0x12, 0x19, 0x0a, 0x14, 0x57, 0x6f, 0x72,
0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x76, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67,
0x68, 0x10, 0xda, 0x1d, 0x12, 0x16, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73,
0x6b, 0x4e, 0x6f, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x10, 0xdb, 0x1d, 0x12, 0x18, 0x0a, 0x13,
0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x6c,
0x65, 0x74, 0x65, 0x10, 0xdc, 0x1d, 0x12, 0x15, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74,
0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x68, 0x65, 0x64, 0x10, 0xdd, 0x1d, 0x12, 0x1c, 0x0a,
0x17, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x6e,
0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xde, 0x1d, 0x12, 0x1e, 0x0a, 0x19, 0x41,
0x63, 0x61, 0x64, 0x65, 0x6d, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x43, 0x6f, 0x6d, 0x70,
0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x10, 0xbd, 0x1e, 0x42, 0x06, 0x5a, 0x04, 0x2e,
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -20,77 +20,20 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type TaskNode struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status" bson:"status"` //状态 0未做
// 1进行中(子任务没有全部完成) 2已做 3禁止进入
SubtaskIds []int32 `protobuf:"varint,2,rep,packed,name=subtaskIds,proto3" json:"subtaskIds" bson:"subtasks"` //子任务
}
func (x *TaskNode) Reset() {
*x = TaskNode{}
if protoimpl.UnsafeEnabled {
mi := &file_linestory_linestory_db_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TaskNode) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TaskNode) ProtoMessage() {}
func (x *TaskNode) ProtoReflect() protoreflect.Message {
mi := &file_linestory_linestory_db_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TaskNode.ProtoReflect.Descriptor instead.
func (*TaskNode) Descriptor() ([]byte, []int) {
return file_linestory_linestory_db_proto_rawDescGZIP(), []int{0}
}
func (x *TaskNode) GetStatus() int32 {
if x != nil {
return x.Status
}
return 0
}
func (x *TaskNode) GetSubtaskIds() []int32 {
if x != nil {
return x.SubtaskIds
}
return nil
}
type DBLinestory struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
JqId int32 `protobuf:"varint,3,opt,name=jqId,proto3" json:"jqId" bson:"jqId"` //剧情ID
Tasks map[int32]*TaskNode `protobuf:"bytes,4,rep,name=tasks,proto3" json:"tasks" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3" bson:"tasks"` //任务
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
TaskChapter map[int32]*TaskChapter `protobuf:"bytes,3,rep,name=taskChapter,proto3" json:"taskChapter" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3" bson:"taskChapter"` //已开启的章节 key:章节ID
}
func (x *DBLinestory) Reset() {
*x = DBLinestory{}
if protoimpl.UnsafeEnabled {
mi := &file_linestory_linestory_db_proto_msgTypes[1]
mi := &file_linestory_linestory_db_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -103,7 +46,7 @@ func (x *DBLinestory) String() string {
func (*DBLinestory) ProtoMessage() {}
func (x *DBLinestory) ProtoReflect() protoreflect.Message {
mi := &file_linestory_linestory_db_proto_msgTypes[1]
mi := &file_linestory_linestory_db_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -116,7 +59,7 @@ func (x *DBLinestory) ProtoReflect() protoreflect.Message {
// Deprecated: Use DBLinestory.ProtoReflect.Descriptor instead.
func (*DBLinestory) Descriptor() ([]byte, []int) {
return file_linestory_linestory_db_proto_rawDescGZIP(), []int{1}
return file_linestory_linestory_db_proto_rawDescGZIP(), []int{0}
}
func (x *DBLinestory) GetId() string {
@ -133,42 +76,161 @@ func (x *DBLinestory) GetUid() string {
return ""
}
func (x *DBLinestory) GetJqId() int32 {
func (x *DBLinestory) GetTaskChapter() map[int32]*TaskChapter {
if x != nil {
return x.JqId
return x.TaskChapter
}
return nil
}
// 章节
type TaskChapter struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Receive int32 `protobuf:"varint,1,opt,name=receive,proto3" json:"receive" bson:"receive"` //章节奖励领取状态 0未领 1待领取 2已领取
Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status" bson:"status"` //完成状态 0未完成 1已完成
TaskIds []int32 `protobuf:"varint,3,rep,packed,name=taskIds,proto3" json:"taskIds" bson:"taskIds"` //完成的任务
}
func (x *TaskChapter) Reset() {
*x = TaskChapter{}
if protoimpl.UnsafeEnabled {
mi := &file_linestory_linestory_db_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TaskChapter) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TaskChapter) ProtoMessage() {}
func (x *TaskChapter) ProtoReflect() protoreflect.Message {
mi := &file_linestory_linestory_db_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TaskChapter.ProtoReflect.Descriptor instead.
func (*TaskChapter) Descriptor() ([]byte, []int) {
return file_linestory_linestory_db_proto_rawDescGZIP(), []int{1}
}
func (x *TaskChapter) GetReceive() int32 {
if x != nil {
return x.Receive
}
return 0
}
func (x *DBLinestory) GetTasks() map[int32]*TaskNode {
func (x *TaskChapter) GetStatus() int32 {
if x != nil {
return x.Tasks
return x.Status
}
return 0
}
func (x *TaskChapter) GetTaskIds() []int32 {
if x != nil {
return x.TaskIds
}
return nil
}
// 主线任务
type TaskMain struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
TaskId int32 `protobuf:"varint,1,opt,name=taskId,proto3" json:"taskId" bson:"taskId"` //任务Id
Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status" bson:"status"` //状态 0锁定 1已完成
}
func (x *TaskMain) Reset() {
*x = TaskMain{}
if protoimpl.UnsafeEnabled {
mi := &file_linestory_linestory_db_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TaskMain) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TaskMain) ProtoMessage() {}
func (x *TaskMain) ProtoReflect() protoreflect.Message {
mi := &file_linestory_linestory_db_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TaskMain.ProtoReflect.Descriptor instead.
func (*TaskMain) Descriptor() ([]byte, []int) {
return file_linestory_linestory_db_proto_rawDescGZIP(), []int{2}
}
func (x *TaskMain) GetTaskId() int32 {
if x != nil {
return x.TaskId
}
return 0
}
func (x *TaskMain) GetStatus() int32 {
if x != nil {
return x.Status
}
return 0
}
var File_linestory_linestory_db_proto protoreflect.FileDescriptor
var file_linestory_linestory_db_proto_rawDesc = []byte{
0x0a, 0x1c, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x6c, 0x69, 0x6e, 0x65,
0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x42,
0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74,
0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74,
0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73,
0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x74, 0x61, 0x73, 0x6b, 0x49,
0x64, 0x73, 0x22, 0xb7, 0x01, 0x0a, 0x0b, 0x44, 0x42, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f,
0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x71, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01,
0x28, 0x05, 0x52, 0x04, 0x6a, 0x71, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b,
0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x4c, 0x69, 0x6e, 0x65,
0x73, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x1a, 0x43, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x73,
0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbe,
0x01, 0x0a, 0x0b, 0x44, 0x42, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10,
0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64,
0x12, 0x3f, 0x0a, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x18,
0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x44, 0x42, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74,
0x6f, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65,
0x72, 0x1a, 0x4c, 0x0a, 0x10, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x64,
0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04,
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x22, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x61,
0x70, 0x74, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,
0x59, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x12, 0x18,
0x0a, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74,
0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
0x12, 0x18, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
0x05, 0x52, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x22, 0x3a, 0x0a, 0x08, 0x54, 0x61,
0x73, 0x6b, 0x4d, 0x61, 0x69, 0x6e, 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, 0x16,
0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -183,15 +245,16 @@ func file_linestory_linestory_db_proto_rawDescGZIP() []byte {
return file_linestory_linestory_db_proto_rawDescData
}
var file_linestory_linestory_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_linestory_linestory_db_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_linestory_linestory_db_proto_goTypes = []interface{}{
(*TaskNode)(nil), // 0: TaskNode
(*DBLinestory)(nil), // 1: DBLinestory
nil, // 2: DBLinestory.TasksEntry
(*DBLinestory)(nil), // 0: DBLinestory
(*TaskChapter)(nil), // 1: TaskChapter
(*TaskMain)(nil), // 2: TaskMain
nil, // 3: DBLinestory.TaskChapterEntry
}
var file_linestory_linestory_db_proto_depIdxs = []int32{
2, // 0: DBLinestory.tasks:type_name -> DBLinestory.TasksEntry
0, // 1: DBLinestory.TasksEntry.value:type_name -> TaskNode
3, // 0: DBLinestory.taskChapter:type_name -> DBLinestory.TaskChapterEntry
1, // 1: DBLinestory.TaskChapterEntry.value:type_name -> TaskChapter
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
@ -206,7 +269,7 @@ func file_linestory_linestory_db_proto_init() {
}
if !protoimpl.UnsafeEnabled {
file_linestory_linestory_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TaskNode); i {
switch v := v.(*DBLinestory); i {
case 0:
return &v.state
case 1:
@ -218,7 +281,19 @@ func file_linestory_linestory_db_proto_init() {
}
}
file_linestory_linestory_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBLinestory); i {
switch v := v.(*TaskChapter); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_linestory_linestory_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TaskMain); i {
case 0:
return &v.state
case 1:
@ -236,7 +311,7 @@ func file_linestory_linestory_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_linestory_linestory_db_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -20,17 +20,15 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 剧情开始
type LinestoryStartReq struct {
// 支线剧情章节
type LinestoryChapterReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
JqId int32 `protobuf:"varint,1,opt,name=jqId,proto3" json:"jqId"` //剧情ID
}
func (x *LinestoryStartReq) Reset() {
*x = LinestoryStartReq{}
func (x *LinestoryChapterReq) Reset() {
*x = LinestoryChapterReq{}
if protoimpl.UnsafeEnabled {
mi := &file_linestory_linestory_msg_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -38,13 +36,13 @@ func (x *LinestoryStartReq) Reset() {
}
}
func (x *LinestoryStartReq) String() string {
func (x *LinestoryChapterReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LinestoryStartReq) ProtoMessage() {}
func (*LinestoryChapterReq) ProtoMessage() {}
func (x *LinestoryStartReq) ProtoReflect() protoreflect.Message {
func (x *LinestoryChapterReq) ProtoReflect() protoreflect.Message {
mi := &file_linestory_linestory_msg_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -56,29 +54,21 @@ func (x *LinestoryStartReq) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use LinestoryStartReq.ProtoReflect.Descriptor instead.
func (*LinestoryStartReq) Descriptor() ([]byte, []int) {
// Deprecated: Use LinestoryChapterReq.ProtoReflect.Descriptor instead.
func (*LinestoryChapterReq) Descriptor() ([]byte, []int) {
return file_linestory_linestory_msg_proto_rawDescGZIP(), []int{0}
}
func (x *LinestoryStartReq) GetJqId() int32 {
if x != nil {
return x.JqId
}
return 0
}
type LinestoryStartResp struct {
type LinestoryChapterResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
JqId int32 `protobuf:"varint,1,opt,name=jqId,proto3" json:"jqId"`
TaskIds []int32 `protobuf:"varint,2,rep,packed,name=taskIds,proto3" json:"taskIds"` //已完成的任务ID
TaskChapter map[int32]*TaskChapter `protobuf:"bytes,1,rep,name=taskChapter,proto3" json:"taskChapter" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *LinestoryStartResp) Reset() {
*x = LinestoryStartResp{}
func (x *LinestoryChapterResp) Reset() {
*x = LinestoryChapterResp{}
if protoimpl.UnsafeEnabled {
mi := &file_linestory_linestory_msg_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -86,13 +76,13 @@ func (x *LinestoryStartResp) Reset() {
}
}
func (x *LinestoryStartResp) String() string {
func (x *LinestoryChapterResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LinestoryStartResp) ProtoMessage() {}
func (*LinestoryChapterResp) ProtoMessage() {}
func (x *LinestoryStartResp) ProtoReflect() protoreflect.Message {
func (x *LinestoryChapterResp) ProtoReflect() protoreflect.Message {
mi := &file_linestory_linestory_msg_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -104,37 +94,29 @@ func (x *LinestoryStartResp) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use LinestoryStartResp.ProtoReflect.Descriptor instead.
func (*LinestoryStartResp) Descriptor() ([]byte, []int) {
// Deprecated: Use LinestoryChapterResp.ProtoReflect.Descriptor instead.
func (*LinestoryChapterResp) Descriptor() ([]byte, []int) {
return file_linestory_linestory_msg_proto_rawDescGZIP(), []int{1}
}
func (x *LinestoryStartResp) GetJqId() int32 {
func (x *LinestoryChapterResp) GetTaskChapter() map[int32]*TaskChapter {
if x != nil {
return x.JqId
}
return 0
}
func (x *LinestoryStartResp) GetTaskIds() []int32 {
if x != nil {
return x.TaskIds
return x.TaskChapter
}
return nil
}
// 任务
type LinestoryDotaskReq struct {
// 支线剧情-我的主线任务
type LinestoryMaintaskReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
TaskId int32 `protobuf:"varint,1,opt,name=taskId,proto3" json:"taskId"` //任务ID
SubtaskId int32 `protobuf:"varint,2,opt,name=subtaskId,proto3" json:"subtaskId"` //子任务ID
ChapterId int32 `protobuf:"varint,1,opt,name=chapterId,proto3" json:"chapterId"` //章节ID
}
func (x *LinestoryDotaskReq) Reset() {
*x = LinestoryDotaskReq{}
func (x *LinestoryMaintaskReq) Reset() {
*x = LinestoryMaintaskReq{}
if protoimpl.UnsafeEnabled {
mi := &file_linestory_linestory_msg_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -142,13 +124,13 @@ func (x *LinestoryDotaskReq) Reset() {
}
}
func (x *LinestoryDotaskReq) String() string {
func (x *LinestoryMaintaskReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LinestoryDotaskReq) ProtoMessage() {}
func (*LinestoryMaintaskReq) ProtoMessage() {}
func (x *LinestoryDotaskReq) ProtoReflect() protoreflect.Message {
func (x *LinestoryMaintaskReq) ProtoReflect() protoreflect.Message {
mi := &file_linestory_linestory_msg_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -160,37 +142,28 @@ func (x *LinestoryDotaskReq) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use LinestoryDotaskReq.ProtoReflect.Descriptor instead.
func (*LinestoryDotaskReq) Descriptor() ([]byte, []int) {
// Deprecated: Use LinestoryMaintaskReq.ProtoReflect.Descriptor instead.
func (*LinestoryMaintaskReq) Descriptor() ([]byte, []int) {
return file_linestory_linestory_msg_proto_rawDescGZIP(), []int{2}
}
func (x *LinestoryDotaskReq) GetTaskId() int32 {
func (x *LinestoryMaintaskReq) GetChapterId() int32 {
if x != nil {
return x.TaskId
return x.ChapterId
}
return 0
}
func (x *LinestoryDotaskReq) GetSubtaskId() int32 {
if x != nil {
return x.SubtaskId
}
return 0
}
type LinestoryDotaskResp struct {
type LinestoryMaintaskResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
TaskId int32 `protobuf:"varint,1,opt,name=taskId,proto3" json:"taskId"` //任务ID
SubtaskId int32 `protobuf:"varint,2,opt,name=subtaskId,proto3" json:"subtaskId"` //子任务ID
ResetTaskId int32 `protobuf:"varint,3,opt,name=resetTaskId,proto3" json:"resetTaskId"` //重置任务起始ID
List []*TaskMain `protobuf:"bytes,1,rep,name=list,proto3" json:"list"`
}
func (x *LinestoryDotaskResp) Reset() {
*x = LinestoryDotaskResp{}
func (x *LinestoryMaintaskResp) Reset() {
*x = LinestoryMaintaskResp{}
if protoimpl.UnsafeEnabled {
mi := &file_linestory_linestory_msg_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -198,13 +171,13 @@ func (x *LinestoryDotaskResp) Reset() {
}
}
func (x *LinestoryDotaskResp) String() string {
func (x *LinestoryMaintaskResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LinestoryDotaskResp) ProtoMessage() {}
func (*LinestoryMaintaskResp) ProtoMessage() {}
func (x *LinestoryDotaskResp) ProtoReflect() protoreflect.Message {
func (x *LinestoryMaintaskResp) ProtoReflect() protoreflect.Message {
mi := &file_linestory_linestory_msg_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -216,28 +189,109 @@ func (x *LinestoryDotaskResp) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use LinestoryDotaskResp.ProtoReflect.Descriptor instead.
func (*LinestoryDotaskResp) Descriptor() ([]byte, []int) {
// Deprecated: Use LinestoryMaintaskResp.ProtoReflect.Descriptor instead.
func (*LinestoryMaintaskResp) Descriptor() ([]byte, []int) {
return file_linestory_linestory_msg_proto_rawDescGZIP(), []int{3}
}
func (x *LinestoryDotaskResp) GetTaskId() int32 {
func (x *LinestoryMaintaskResp) GetList() []*TaskMain {
if x != nil {
return x.TaskId
return x.List
}
return nil
}
// 章节奖励领取
type LinestoryReceiveReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ChapterId int32 `protobuf:"varint,1,opt,name=chapterId,proto3" json:"chapterId"`
}
func (x *LinestoryReceiveReq) Reset() {
*x = LinestoryReceiveReq{}
if protoimpl.UnsafeEnabled {
mi := &file_linestory_linestory_msg_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LinestoryReceiveReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LinestoryReceiveReq) ProtoMessage() {}
func (x *LinestoryReceiveReq) ProtoReflect() protoreflect.Message {
mi := &file_linestory_linestory_msg_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LinestoryReceiveReq.ProtoReflect.Descriptor instead.
func (*LinestoryReceiveReq) Descriptor() ([]byte, []int) {
return file_linestory_linestory_msg_proto_rawDescGZIP(), []int{4}
}
func (x *LinestoryReceiveReq) GetChapterId() int32 {
if x != nil {
return x.ChapterId
}
return 0
}
func (x *LinestoryDotaskResp) GetSubtaskId() int32 {
if x != nil {
return x.SubtaskId
}
return 0
type LinestoryReceiveResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ChapterId int32 `protobuf:"varint,1,opt,name=chapterId,proto3" json:"chapterId"`
}
func (x *LinestoryDotaskResp) GetResetTaskId() int32 {
func (x *LinestoryReceiveResp) Reset() {
*x = LinestoryReceiveResp{}
if protoimpl.UnsafeEnabled {
mi := &file_linestory_linestory_msg_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LinestoryReceiveResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LinestoryReceiveResp) ProtoMessage() {}
func (x *LinestoryReceiveResp) ProtoReflect() protoreflect.Message {
mi := &file_linestory_linestory_msg_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LinestoryReceiveResp.ProtoReflect.Descriptor instead.
func (*LinestoryReceiveResp) Descriptor() ([]byte, []int) {
return file_linestory_linestory_msg_proto_rawDescGZIP(), []int{5}
}
func (x *LinestoryReceiveResp) GetChapterId() int32 {
if x != nil {
return x.ResetTaskId
return x.ChapterId
}
return 0
}
@ -246,27 +300,36 @@ var File_linestory_linestory_msg_proto protoreflect.FileDescriptor
var file_linestory_linestory_msg_proto_rawDesc = []byte{
0x0a, 0x1d, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x6c, 0x69, 0x6e, 0x65,
0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x27, 0x0a, 0x11, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x72,
0x74, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x71, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x04, 0x6a, 0x71, 0x49, 0x64, 0x22, 0x42, 0x0a, 0x12, 0x4c, 0x69, 0x6e, 0x65,
0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12,
0x0a, 0x04, 0x6a, 0x71, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x6a, 0x71,
0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20,
0x03, 0x28, 0x05, 0x52, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x22, 0x4a, 0x0a, 0x12,
0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x6f, 0x74, 0x61, 0x73, 0x6b, 0x52,
0x65, 0x71, 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, 0x1c, 0x0a, 0x09, 0x73, 0x75,
0x62, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73,
0x75, 0x62, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x6d, 0x0a, 0x13, 0x4c, 0x69, 0x6e, 0x65,
0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x6f, 0x74, 0x61, 0x73, 0x6b, 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, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x74, 0x61,
0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x75, 0x62, 0x74,
0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x74, 0x54, 0x61,
0x73, 0x6b, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x65,
0x74, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x1c, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x6c, 0x69, 0x6e, 0x65, 0x73,
0x74, 0x6f, 0x72, 0x79, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x15, 0x0a,
0x13, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65,
0x72, 0x52, 0x65, 0x71, 0x22, 0xae, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f,
0x72, 0x79, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x48, 0x0a,
0x0b, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x26, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x68,
0x61, 0x70, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x68,
0x61, 0x70, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x74, 0x61, 0x73, 0x6b,
0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x1a, 0x4c, 0x0a, 0x10, 0x54, 0x61, 0x73, 0x6b, 0x43,
0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x22, 0x0a,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x54,
0x61, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x34, 0x0a, 0x14, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f,
0x72, 0x79, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a,
0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x36, 0x0a, 0x15, 0x4c,
0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x73, 0x6b,
0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x09, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x61, 0x69, 0x6e, 0x52, 0x04, 0x6c,
0x69, 0x73, 0x74, 0x22, 0x33, 0x0a, 0x13, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79,
0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68,
0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63,
0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x34, 0x0a, 0x14, 0x4c, 0x69, 0x6e, 0x65,
0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70,
0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x42, 0x06,
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -281,19 +344,27 @@ func file_linestory_linestory_msg_proto_rawDescGZIP() []byte {
return file_linestory_linestory_msg_proto_rawDescData
}
var file_linestory_linestory_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_linestory_linestory_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_linestory_linestory_msg_proto_goTypes = []interface{}{
(*LinestoryStartReq)(nil), // 0: LinestoryStartReq
(*LinestoryStartResp)(nil), // 1: LinestoryStartResp
(*LinestoryDotaskReq)(nil), // 2: LinestoryDotaskReq
(*LinestoryDotaskResp)(nil), // 3: LinestoryDotaskResp
(*LinestoryChapterReq)(nil), // 0: LinestoryChapterReq
(*LinestoryChapterResp)(nil), // 1: LinestoryChapterResp
(*LinestoryMaintaskReq)(nil), // 2: LinestoryMaintaskReq
(*LinestoryMaintaskResp)(nil), // 3: LinestoryMaintaskResp
(*LinestoryReceiveReq)(nil), // 4: LinestoryReceiveReq
(*LinestoryReceiveResp)(nil), // 5: LinestoryReceiveResp
nil, // 6: LinestoryChapterResp.TaskChapterEntry
(*TaskMain)(nil), // 7: TaskMain
(*TaskChapter)(nil), // 8: TaskChapter
}
var file_linestory_linestory_msg_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
6, // 0: LinestoryChapterResp.taskChapter:type_name -> LinestoryChapterResp.TaskChapterEntry
7, // 1: LinestoryMaintaskResp.list:type_name -> TaskMain
8, // 2: LinestoryChapterResp.TaskChapterEntry.value:type_name -> TaskChapter
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_linestory_linestory_msg_proto_init() }
@ -301,9 +372,10 @@ func file_linestory_linestory_msg_proto_init() {
if File_linestory_linestory_msg_proto != nil {
return
}
file_linestory_linestory_db_proto_init()
if !protoimpl.UnsafeEnabled {
file_linestory_linestory_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LinestoryStartReq); i {
switch v := v.(*LinestoryChapterReq); i {
case 0:
return &v.state
case 1:
@ -315,7 +387,7 @@ func file_linestory_linestory_msg_proto_init() {
}
}
file_linestory_linestory_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LinestoryStartResp); i {
switch v := v.(*LinestoryChapterResp); i {
case 0:
return &v.state
case 1:
@ -327,7 +399,7 @@ func file_linestory_linestory_msg_proto_init() {
}
}
file_linestory_linestory_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LinestoryDotaskReq); i {
switch v := v.(*LinestoryMaintaskReq); i {
case 0:
return &v.state
case 1:
@ -339,7 +411,31 @@ func file_linestory_linestory_msg_proto_init() {
}
}
file_linestory_linestory_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LinestoryDotaskResp); i {
switch v := v.(*LinestoryMaintaskResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_linestory_linestory_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LinestoryReceiveReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_linestory_linestory_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LinestoryReceiveResp); i {
case 0:
return &v.state
case 1:
@ -357,7 +453,7 @@ func file_linestory_linestory_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_linestory_linestory_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -100,15 +100,15 @@ func Execute() {
//生成配置
func conf() {
if config, err := readergmconf(gmpath); err != nil {
log.Error("读取区服配置失败!", log.Field{Key: "err", Value: err})
log.Error("读取区服配置失败!", log.Fields{"err": err})
} else {
if ss, err := rederServiceSttings(config); err != nil {
log.Error("转换服务配置异常!", log.Field{Key: "err", Value: err})
log.Error("转换服务配置异常!", log.Fields{"err": err})
} else {
for _, v := range ss {
if sid == "" || fmt.Sprintf("%s_%s", v.Tag, sid) == v.Id {
if err = writeServiceConfig(fmt.Sprintf("./conf/%s.yaml", v.Id), v); err != nil {
log.Error("写入配置文件失败!", log.Field{Key: "err", Value: err})
log.Error("写入配置文件失败!", log.Fields{"err": err})
return
}
}
@ -120,7 +120,7 @@ func conf() {
//启动程序
func start() {
if config, err := readergmconf(gmpath); err != nil {
log.Error("读取区服配置失败!", log.Field{Key: "err", Value: err})
log.Error("读取区服配置失败!", log.Fields{"err": err})
} else {
var (
maintes *core.ServiceSttings
@ -128,12 +128,12 @@ func start() {
gateways []*core.ServiceSttings = make([]*core.ServiceSttings, 0)
)
if ss, err := rederServiceSttings(config); err != nil {
log.Error("转换服务配置异常!", log.Field{Key: "err", Value: err})
log.Error("转换服务配置异常!", log.Fields{"err": err})
} else {
for _, v := range ss {
if sid == "" || fmt.Sprintf("%s_%s", v.Tag, sid) == v.Id {
if err = writeServiceConfig(fmt.Sprintf("./conf/%s.yaml", v.Id), v); err != nil {
log.Error("写入配置文件失败!", log.Field{Key: "err", Value: err})
log.Error("写入配置文件失败!", log.Fields{"err": err})
return
}
switch v.Type {
@ -157,7 +157,7 @@ func start() {
//优先启动 维护服
if maintes != nil {
if err = startService(maintes); err != nil {
log.Error("启动服务失败!", log.Field{Key: "id", Value: maintes.Id}, log.Field{Key: "err", Value: err})
log.Error("启动服务失败!", log.Fields{"id": maintes.Id, "err": err})
return
}
}
@ -166,7 +166,7 @@ func start() {
// 业务服
for _, v := range workers {
if err = startService(v); err != nil {
log.Error("启动服务失败!", log.Field{Key: "id", Value: v.Id}, log.Field{Key: "err", Value: err})
log.Error("启动服务失败!", log.Fields{"id": v.Id, "err": err})
return
}
}
@ -174,7 +174,7 @@ func start() {
// 网关服
for _, v := range gateways {
if err = startService(v); err != nil {
log.Error("启动服务失败!", log.Field{Key: "id", Value: v.Id}, log.Field{Key: "err", Value: err})
log.Error("启动服务失败!", log.Fields{"id": v.Id, "err": err})
return
}
}
@ -184,11 +184,11 @@ func start() {
//关闭程序
func stop() {
if config, err := readergmconf(gmpath); err != nil {
log.Error("读取区服配置失败!", log.Field{Key: "err", Value: err})
log.Error("读取区服配置失败!", log.Fields{"err": err})
} else {
if ss, err := rederServiceSttings(config); err != nil {
log.Error("转换服务配置异常!", log.Field{Key: "err", Value: err})
log.Error("转换服务配置异常!", log.Fields{"err": err})
} else {
for _, v := range ss {
if sid == "" || fmt.Sprintf("%s_%s", v.Tag, sid) == v.Id {
@ -346,12 +346,12 @@ func startService(sseting *core.ServiceSttings) (err error) {
err = fmt.Errorf("服务类型异常 stype:%s", sseting.Type)
return
}
log.Debug("启动外部命令", log.Field{Key: "cmd", Value: command})
log.Debug("启动外部命令", log.Fields{"cmd": command})
cmd = exec.Command("/bin/bash", "-c", command)
if output, err = cmd.CombinedOutput(); err != nil {
return
}
log.Debug(string(output))
log.Debugln(string(output))
return
}
@ -376,12 +376,12 @@ func stopService(sseting *core.ServiceSttings) (err error) {
err = fmt.Errorf("服务类型异常 stype:%s", sseting.Type)
return
}
log.Debug("启动外部命令", log.Field{Key: "cmd", Value: command})
log.Debug("启动外部命令", log.Fields{"cmd": command})
cmd = exec.Command("/bin/bash", "-c", command)
if output, err = cmd.CombinedOutput(); err != nil {
return
}
log.Debug(string(output))
log.Debugln(string(output))
return
}

View File

@ -158,21 +158,13 @@ func (this *SCompGateRoute) ReceiveMsg(ctx context.Context, args *pb.AgentMessag
}
// log.Errorf("[Handle Api] t:%v m:%s req:%v reply:%v", time.Since(stime), method, msg, reply)
log.Error("[Handle Api]",
log.Field{Key: "t", Value: time.Since(stime).Milliseconds()},
log.Field{Key: "m", Value: method},
log.Field{Key: "uid", Value: args.UserId},
log.Field{Key: "req", Value: msg},
log.Field{Key: "reply", Value: reply.String()},
log.Fields{"t": time.Since(stime).Milliseconds(), "m": method, "uid": args.UserId, "req": msg, "reply": reply.String()},
)
} else {
reply.Reply = session.Polls()
// log.Debugf("[Handle Api] t:%v m:%s uid:%s req:%v reply:%v", time.Since(stime), method, args.UserId, msg, reply)
log.Debug("[Handle Api]",
log.Field{Key: "t", Value: time.Since(stime).Milliseconds()},
log.Field{Key: "m", Value: method},
log.Field{Key: "uid", Value: args.UserId},
log.Field{Key: "req", Value: msg},
log.Field{Key: "reply", Value: reply.String()},
log.Fields{"t": time.Since(stime).Milliseconds(), "m": method, "uid": args.UserId, "req": msg, "reply": reply.String()},
)
}
} else { //未找到消息处理函数

View File

@ -13,7 +13,7 @@ type TestData struct {
}
func (this *TestData) Log() {
sys.Error("妈妈咪呀!")
sys.Errorln("妈妈咪呀!")
}
var sys log.ISys

View File

@ -210,7 +210,7 @@ func (this *Configure) checkConfigure() {
log.Errorln(err)
return
}
log.Debug("UpDate Configure", log.Field{Key: "table", Value: v.Name})
log.Debug("UpDate Configure", log.Fields{ "table": v.Name})
for _, v := range handle.events {
if v != nil {
go func(f func()) {

View File

@ -1,42 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
type GameLineStoryChapter struct {
_dataMap map[int32]*GameLineStoryChapterData
_dataList []*GameLineStoryChapterData
}
func NewGameLineStoryChapter(_buf []map[string]interface{}) (*GameLineStoryChapter, error) {
_dataList := make([]*GameLineStoryChapterData, 0, len(_buf))
dataMap := make(map[int32]*GameLineStoryChapterData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameLineStoryChapterData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
}
}
return &GameLineStoryChapter{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameLineStoryChapter) GetDataMap() map[int32]*GameLineStoryChapterData {
return table._dataMap
}
func (table *GameLineStoryChapter) GetDataList() []*GameLineStoryChapterData {
return table._dataList
}
func (table *GameLineStoryChapter) Get(key int32) *GameLineStoryChapterData {
return table._dataMap[key]
}

View File

@ -1,71 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
import "errors"
type GameLineStoryChapterData struct {
Id int32
Stroy int32
Name string
Cond []int32
Img string
Taskid []int32
}
const TypeId_GameLineStoryChapterData = -1620958734
func (*GameLineStoryChapterData) GetTypeId() int32 {
return -1620958734
}
func (_v *GameLineStoryChapterData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["stroy"].(float64); !_ok_ { err = errors.New("stroy error"); return }; _v.Stroy = int32(_tempNum_) }
{ var _ok_ bool; if _v.Name, _ok_ = _buf["name"].(string); !_ok_ { err = errors.New("name error"); return } }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["cond"].([]interface{}); !_ok_ { err = errors.New("cond error"); return }
_v.Cond = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.Cond = append(_v.Cond, _list_v_)
}
}
{ var _ok_ bool; if _v.Img, _ok_ = _buf["img"].(string); !_ok_ { err = errors.New("img error"); return } }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["taskid"].([]interface{}); !_ok_ { err = errors.New("taskid error"); return }
_v.Taskid = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.Taskid = append(_v.Taskid, _list_v_)
}
}
return
}
func DeserializeGameLineStoryChapterData(_buf map[string]interface{}) (*GameLineStoryChapterData, error) {
v := &GameLineStoryChapterData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

View File

@ -1,42 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
type GameLineStoryStageTask struct {
_dataMap map[int32]*GameLineStoryStageTaskData
_dataList []*GameLineStoryStageTaskData
}
func NewGameLineStoryStageTask(_buf []map[string]interface{}) (*GameLineStoryStageTask, error) {
_dataList := make([]*GameLineStoryStageTaskData, 0, len(_buf))
dataMap := make(map[int32]*GameLineStoryStageTaskData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameLineStoryStageTaskData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
}
}
return &GameLineStoryStageTask{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameLineStoryStageTask) GetDataMap() map[int32]*GameLineStoryStageTaskData {
return table._dataMap
}
func (table *GameLineStoryStageTask) GetDataList() []*GameLineStoryStageTaskData {
return table._dataList
}
func (table *GameLineStoryStageTask) Get(key int32) *GameLineStoryStageTaskData {
return table._dataMap[key]
}

View File

@ -1,69 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
import "errors"
type GameLineStoryStageTaskData struct {
Id int32
PreTId int32
NextTId int32
Cond []int32
Reward []*Gameatn
}
const TypeId_GameLineStoryStageTaskData = 884678024
func (*GameLineStoryStageTaskData) GetTypeId() int32 {
return 884678024
}
func (_v *GameLineStoryStageTaskData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["preTId"].(float64); !_ok_ { err = errors.New("preTId error"); return }; _v.PreTId = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["nextTId"].(float64); !_ok_ { err = errors.New("nextTId error"); return }; _v.NextTId = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["cond"].([]interface{}); !_ok_ { err = errors.New("cond error"); return }
_v.Cond = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.Cond = append(_v.Cond, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["reward"].([]interface{}); !_ok_ { err = errors.New("reward error"); return }
_v.Reward = make([]*Gameatn, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ *Gameatn
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
_v.Reward = append(_v.Reward, _list_v_)
}
}
return
}
func DeserializeGameLineStoryStageTaskData(_buf map[string]interface{}) (*GameLineStoryStageTaskData, error) {
v := &GameLineStoryStageTaskData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

View File

@ -1,42 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
type GameLineStoryTask struct {
_dataMap map[int32]*GameLineStoryTaskData
_dataList []*GameLineStoryTaskData
}
func NewGameLineStoryTask(_buf []map[string]interface{}) (*GameLineStoryTask, error) {
_dataList := make([]*GameLineStoryTaskData, 0, len(_buf))
dataMap := make(map[int32]*GameLineStoryTaskData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameLineStoryTaskData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
}
}
return &GameLineStoryTask{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameLineStoryTask) GetDataMap() map[int32]*GameLineStoryTaskData {
return table._dataMap
}
func (table *GameLineStoryTask) GetDataList() []*GameLineStoryTaskData {
return table._dataList
}
func (table *GameLineStoryTask) Get(key int32) *GameLineStoryTaskData {
return table._dataMap[key]
}

View File

@ -1,73 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
import "errors"
type GameLineStoryTaskData struct {
Id int32
PreTId int32
StageTId []int32
Reward []*Gameatn
Finish int32
Ending int32
Resetto int32
}
const TypeId_GameLineStoryTaskData = -2080476076
func (*GameLineStoryTaskData) GetTypeId() int32 {
return -2080476076
}
func (_v *GameLineStoryTaskData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["preTId"].(float64); !_ok_ { err = errors.New("preTId error"); return }; _v.PreTId = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["stageTId"].([]interface{}); !_ok_ { err = errors.New("stageTId error"); return }
_v.StageTId = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.StageTId = append(_v.StageTId, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["reward"].([]interface{}); !_ok_ { err = errors.New("reward error"); return }
_v.Reward = make([]*Gameatn, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ *Gameatn
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
_v.Reward = append(_v.Reward, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["finish"].(float64); !_ok_ { err = errors.New("finish error"); return }; _v.Finish = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ending"].(float64); !_ok_ { err = errors.New("ending error"); return }; _v.Ending = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["resetto"].(float64); !_ok_ { err = errors.New("resetto error"); return }; _v.Resetto = int32(_tempNum_) }
return
}
func DeserializeGameLineStoryTaskData(_buf map[string]interface{}) (*GameLineStoryTaskData, error) {
v := &GameLineStoryTaskData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

View File

@ -12,11 +12,10 @@ import "errors"
type GameLinestoryMainTaskData struct {
Id int32
ParetnTask int32
Group int32
SubTask int32
Name string
Img string
Reward []*Gameatn
Ending int32
Resetto []int32
}
@ -29,24 +28,10 @@ func (*GameLinestoryMainTaskData) GetTypeId() int32 {
func (_v *GameLinestoryMainTaskData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["paretnTask"].(float64); !_ok_ { err = errors.New("paretnTask error"); return }; _v.ParetnTask = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["group"].(float64); !_ok_ { err = errors.New("group error"); return }; _v.Group = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["subTask"].(float64); !_ok_ { err = errors.New("subTask error"); return }; _v.SubTask = int32(_tempNum_) }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Name error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Name, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; if _v.Img, _ok_ = _buf["img"].(string); !_ok_ { err = errors.New("img error"); return } }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["reward"].([]interface{}); !_ok_ { err = errors.New("reward error"); return }
_v.Reward = make([]*Gameatn, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ *Gameatn
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
_v.Reward = append(_v.Reward, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ending"].(float64); !_ok_ { err = errors.New("ending error"); return }; _v.Ending = int32(_tempNum_) }
{
var _arr_ []interface{}

View File

@ -21,7 +21,7 @@ func NewGameLinestoryTimeLine(_buf []map[string]interface{}) (*GameLinestoryTime
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Index] = _v
dataMap[_v.Group] = _v
}
}
return &GameLinestoryTimeLine{_dataList:_dataList, _dataMap:dataMap}, nil

View File

@ -11,7 +11,7 @@ package cfg
import "errors"
type GameLinestoryTimeLineData struct {
Index int32
Group int32
NodeIndex int32
Cond []int32
Name string
@ -26,7 +26,7 @@ func (*GameLinestoryTimeLineData) GetTypeId() int32 {
}
func (_v *GameLinestoryTimeLineData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["index"].(float64); !_ok_ { err = errors.New("index error"); return }; _v.Index = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["group"].(float64); !_ok_ { err = errors.New("group error"); return }; _v.Group = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["nodeIndex"].(float64); !_ok_ { err = errors.New("nodeIndex error"); return }; _v.NodeIndex = int32(_tempNum_) }
{
var _arr_ []interface{}

View File

@ -71,7 +71,7 @@ func (this *DB) readercrossconf(path string) (err error) {
MongodbUrl: cf.LoaclDB.MongodbUrl,
MongodbDatabase: cf.LoaclDB.MongodbDatabase,
}); err != nil {
log.Error("comment db err!", log.Field{Key: "stag", Value: cf.AreaId}, log.Field{Key: "db", Value: cf.LoaclDB}, log.Field{Key: "err", Value: err})
log.Error("comment db err!", log.Fields{"stag": cf.AreaId, "db": cf.LoaclDB, "err": err})
return
}
} else {
@ -84,7 +84,7 @@ func (this *DB) readercrossconf(path string) (err error) {
MongodbUrl: v.MongodbUrl,
MongodbDatabase: v.MongodbDatabase,
}); err != nil {
log.Error("comment db err!", log.Field{Key: "stag", Value: k}, log.Field{Key: "db", Value: v}, log.Field{Key: "err", Value: err})
log.Error("comment db err!", log.Fields{"stag": k, "db": v, "err": err})
return
}
}

View File

@ -28,14 +28,14 @@ func newDBConn(lg log.ILogger, conf DBConfig) (conn *DBConn, err error) {
)
}
if err != nil {
lg.Error(err.Error(), log.Field{Key: "config", Value: conf})
lg.Error(err.Error(), log.Fields{"config": conf})
return
}
if conn.Mgo, err = mgo.NewSys(
mgo.SetMongodbUrl(conf.MongodbUrl),
mgo.SetMongodbDatabase(conf.MongodbDatabase),
); err != nil {
lg.Error(err.Error(), log.Field{Key: "config", Value: conf})
lg.Error(err.Error(), log.Fields{"config": conf})
return
}
go conn.run()

View File

@ -271,7 +271,7 @@ func (this *DBModel) Change(uid string, data map[string]interface{}, opt ...DBOp
func (this *DBModel) ChangeList(uid string, _id string, data map[string]interface{}, opt ...DBOption) (err error) {
//defer log.Debug("DBModel ChangeList", log.Field{Key: "TableName", Value: this.TableName}, log.Field{Key: "uid", Value: uid}, log.Field{Key: "_id", Value: _id}, log.Field{Key: "data", Value: data})
if err = this.Redis.HMSet(this.ukeylist(uid, _id), data); err != nil {
log.Error("DBModel ChangeList", log.Field{Key: "err", Value: err})
log.Error("DBModel ChangeList", log.Fields{"err": err})
return
}

38
utils/compare.go Normal file
View File

@ -0,0 +1,38 @@
package utils
// 比较切片 比较每个位置的元素
func ForEqual(x, y []int32) bool {
if len(x) != len(y) {
return false
}
if (x == nil) != (y == nil) {
return false
}
for i, v := range x {
if v != y[i] {
return false
}
}
return true
}
func ForContainer(x, y []int32) bool {
if len(x) != len(y) {
return false
}
if (x == nil) != (y == nil) {
return false
}
for _, v := range x {
if _, ok := Findx(y, v); !ok {
return false
}
}
return true
}

View File

@ -1 +0,0 @@
package utils

View File

@ -76,3 +76,9 @@ func BenchmarkInt32ToString(b *testing.B) {
func TestMatrxing(t *testing.T) {
utils.MatrixingHour("2022-10-11 00:00:00")
}
func TestCompre(t *testing.T){
a:=[]int32{1,2,4,5}
b:=[]int32{1,2,4}
fmt.Println(utils.ForContainer(a,b))
}