上传带啊吗

This commit is contained in:
liwei 2023-07-20 15:42:15 +08:00
parent bd4cba80e6
commit 291034c9bc
24 changed files with 12091 additions and 897 deletions

View File

@ -1,86 +1,98 @@
[
{
"key": 1,
"ExaminationGroup": 1001,
"examinationnum": 3,
"start": 500,
"continue": 500,
"time": 180,
"time": 0,
"reward": [
{
"a": "attr",
"t": "gold",
"n": 1000
}
]
],
"restime": 1
},
{
"key": 2,
"ExaminationGroup": 1002,
"examinationnum": 3,
"start": 500,
"continue": 500,
"time": 180,
"time": 0,
"reward": [
{
"a": "attr",
"t": "gold",
"n": 1000
}
]
],
"restime": 1
},
{
"key": 3,
"ExaminationGroup": 1003,
"examinationnum": 3,
"start": 500,
"continue": 500,
"time": 180,
"time": 0,
"reward": [
{
"a": "attr",
"t": "gold",
"n": 1000
}
]
],
"restime": 1
},
{
"key": 4,
"ExaminationGroup": 1004,
"examinationnum": 3,
"start": 500,
"continue": 500,
"time": 180,
"time": 0,
"reward": [
{
"a": "attr",
"t": "gold",
"n": 1000
}
]
],
"restime": 1
},
{
"key": 5,
"ExaminationGroup": 1005,
"examinationnum": 3,
"start": 500,
"continue": 500,
"time": 180,
"time": 0,
"reward": [
{
"a": "attr",
"t": "gold",
"n": 1000
}
]
],
"restime": 1
},
{
"key": 6,
"ExaminationGroup": 1006,
"examinationnum": 3,
"start": 500,
"continue": 500,
"time": 360,
"time": 0,
"reward": [
{
"a": "attr",
"t": "gold",
"n": 1000
}
]
],
"restime": 1
}
]

View File

@ -28,7 +28,7 @@
"flase": "",
"fraction": 1,
"plantrue": [
"planA"
1
]
},
{
@ -60,7 +60,7 @@
"flase": "",
"fraction": 1,
"plantrue": [
"planA"
1
]
},
{
@ -92,7 +92,7 @@
"flase": "",
"fraction": 1,
"plantrue": [
"planA"
1
]
},
{
@ -124,7 +124,7 @@
"flase": "",
"fraction": 1,
"plantrue": [
"planA"
1
]
},
{
@ -156,7 +156,7 @@
"flase": "",
"fraction": 1,
"plantrue": [
"planA"
1
]
},
{
@ -188,7 +188,7 @@
"flase": "",
"fraction": 1,
"plantrue": [
"planA"
1
]
},
{
@ -220,7 +220,7 @@
"flase": "",
"fraction": 1,
"plantrue": [
"planA"
1
]
},
{
@ -252,7 +252,7 @@
"flase": "",
"fraction": 1,
"plantrue": [
"planA"
1
]
},
{
@ -284,7 +284,7 @@
"flase": "",
"fraction": 1,
"plantrue": [
"planA"
1
]
},
{
@ -316,7 +316,7 @@
"flase": "",
"fraction": 1,
"plantrue": [
"planA"
1
]
},
{
@ -348,8 +348,8 @@
"flase": "",
"fraction": 3,
"plantrue": [
"planA",
"planB"
1,
2
]
},
{
@ -381,8 +381,8 @@
"flase": "",
"fraction": 3,
"plantrue": [
"planA",
"planB"
1,
2
]
},
{
@ -414,8 +414,8 @@
"flase": "",
"fraction": 3,
"plantrue": [
"planA",
"planB"
1,
2
]
},
{
@ -447,8 +447,8 @@
"flase": "",
"fraction": 3,
"plantrue": [
"planA",
"planB"
1,
2
]
},
{
@ -480,8 +480,8 @@
"flase": "",
"fraction": 3,
"plantrue": [
"planA",
"planB"
1,
2
]
},
{
@ -513,8 +513,8 @@
"flase": "",
"fraction": 3,
"plantrue": [
"planA",
"planB"
1,
2
]
},
{
@ -546,8 +546,8 @@
"flase": "",
"fraction": 3,
"plantrue": [
"planA",
"planB"
1,
2
]
},
{
@ -579,8 +579,8 @@
"flase": "",
"fraction": 3,
"plantrue": [
"planA",
"planB"
1,
2
]
},
{
@ -612,8 +612,8 @@
"flase": "",
"fraction": 3,
"plantrue": [
"planA",
"planB"
1,
2
]
}
]

View File

@ -58,5 +58,15 @@
"ips": "10.0.0.208:7891",
"debug": true,
"sid": "dfjl"
},
{
"index": 170,
"name": {
"key": "debug_server_05",
"text": "版署测试服"
},
"ips": "101.35.125.220:6088",
"debug": true,
"sid": "170"
}
]

File diff suppressed because it is too large Load Diff

View File

@ -79,7 +79,7 @@
"id": 50,
"name": {
"key": "worldtask_world_all_name_5",
"text": "章节5:暂定名字"
"text": "章节5:"
},
"task_icon": "",
"task_txt": {

File diff suppressed because it is too large Load Diff

View File

@ -92,6 +92,7 @@ const (
ModulePasson core.M_Modules = "passon" //传功房
ModuleWarorder core.M_Modules = "warorder" //战令
ModuleUnionGve core.M_Modules = "uniongve" //工会boos战
ModuleDailytask core.M_Modules = "dailytask" //每日任务
)
// 数据表名定义处
@ -299,6 +300,9 @@ const (
TableUnionrank = "unionrank"
//全局表
TableGlobal = "global"
//世界任务
TableDailytask = "dailytask"
)
// RPC服务接口定义处

20
modules/dailytask/api.go Normal file
View File

@ -0,0 +1,20 @@
package dailytask
import (
"go_dreamfactory/lego/base"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
)
type apiComp struct {
modules.MCompGate
service base.IRPCXService
module *Dailytask
}
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
_ = this.MCompGate.Init(service, module, comp, options)
this.service = service.(base.IRPCXService)
this.module = module.(*Dailytask)
return
}

View File

@ -0,0 +1,120 @@
package dailytask
import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs"
"sync"
)
const (
game_annulartaskall = "game_annulartaskall.json"
game_annulartask_library = "game_annulartask_library.json"
)
type configureComp struct {
modules.MCompConfigure
module *Dailytask
lock sync.RWMutex
groupTasks map[int32][]*cfg.GameAnnulartask_LibraryData //key 条件ID
}
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)
this.module = module.(*Dailytask)
err = this.LoadMultiConfigure(map[string]interface{}{
game_annulartaskall: cfg.NewGameAnnulartaskAll,
game_annulartask_library: cfg.NewGameAnnulartask_Library,
})
configure.RegisterConfigure(game_annulartask_library, cfg.NewGameAnnulartask_Library, this.updateconfigure)
return
}
// 更新任务配置表
func (this *configureComp) updateconfigure() {
var (
v interface{}
conf *cfg.GameAnnulartask_Library
ok bool
err error
)
if v, err = this.GetConfigure(game_annulartask_library); err != nil {
return
}
if conf, ok = v.(*cfg.GameAnnulartask_Library); ok {
this.module.Error("日常任务配置异常!")
return
}
groupTasksConf := make(map[int32][]*cfg.GameAnnulartask_LibraryData)
for _, v := range conf.GetDataList() {
if _, ok := groupTasksConf[v.Assembleid]; !ok {
groupTasksConf[v.Assembleid] = make([]*cfg.GameAnnulartask_LibraryData, 0)
}
groupTasksConf[v.Assembleid] = append(groupTasksConf[v.Assembleid], v)
}
this.lock.Lock()
this.groupTasks = groupTasksConf
this.lock.Unlock()
}
// 随机获取任务组
func (this *configureComp) getAnnulartaskAll() (results *cfg.GameAnnulartaskAllData, err error) {
var (
v interface{}
conf *cfg.GameAnnulartaskAll
weights []int32
index int32
ok bool
)
if v, err = this.GetConfigure(game_annulartaskall); err != nil {
return
} else {
if conf, ok = v.(*cfg.GameAnnulartaskAll); !ok {
this.module.Errorf("err:%v", err)
return
}
weights = make([]int32, len(conf.GetDataList()))
for i, v := range conf.GetDataList() {
weights[i] = v.Weight
}
index = comm.GetRandW(weights)
results = conf.GetDataList()[index]
return
}
}
// 随机任务
func (this *configureComp) getAnnulartaskLibrary(ulv, group int32) (results *cfg.GameAnnulartask_LibraryData, err error) {
var (
tasks []*cfg.GameAnnulartask_LibraryData
canuse []*cfg.GameAnnulartask_LibraryData
weights []int32
index int32
ok bool
)
this.lock.RLock()
tasks, ok = this.groupTasks[group]
this.lock.RUnlock()
if ok {
err = fmt.Errorf("no found group:%d", group)
return
}
canuse = make([]*cfg.GameAnnulartask_LibraryData, 0, len(tasks))
for _, v := range tasks {
if v.Lvstart <= ulv && v.Lvend >= ulv {
canuse = append(canuse, v)
}
}
for i, v := range canuse {
weights[i] = v.Itemwt
}
index = comm.GetRandW(weights)
results = canuse[index]
return
}

View File

@ -0,0 +1,68 @@
package dailytask
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/mgo"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/x/bsonx"
)
type ModelDailytask struct {
modules.MCompModel
module *Dailytask
}
func (this *ModelDailytask) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompModel.Init(service, module, comp, options)
this.TableName = comm.TableDailytask
this.module = module.(*Dailytask)
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
})
return
}
// 获取用户全部的埋点数据
func (this *ModelDailytask) getUserDTasks(uid string) (results *pb.DBDailytask, err error) {
results = &pb.DBDailytask{}
if err = this.Get(uid, results); err != nil && err != mgo.MongodbNil {
this.module.Errorln(err)
return
}
if err == mgo.MongodbNil {
err = nil
results = &pb.DBDailytask{
Id: primitive.NewObjectID().Hex(),
Uid: uid,
Groups: make([]int32, 0),
Complete: make([]int32, 0),
}
err = this.Add(uid, results)
}
return
}
// 重置任务
func (this *ModelDailytask) resetUserDTasks(ulv int32) (group []int32, err error) {
var (
conf *cfg.GameAnnulartaskAllData
task *cfg.GameAnnulartask_LibraryData
)
if conf, err = this.module.configure.getAnnulartaskAll(); err != nil {
return
}
group = make([]int32, 0)
for _, v := range conf.Taskdetail {
if task, err = this.module.configure.getAnnulartaskLibrary(ulv, v); err != nil {
return
}
group = append(group, task.Itemid)
}
return
}

View File

@ -0,0 +1,66 @@
package dailytask
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/event"
"go_dreamfactory/modules"
)
type Dailytask struct {
modules.ModuleBase
service core.IService
caravan comm.ICaravan
battle comm.IBattle
sys comm.ISys
api *apiComp
configure *configureComp
modelDailytask *ModelDailytask
}
func NewModule() core.IModule {
return &Dailytask{}
}
func (this *Dailytask) GetType() core.M_Modules {
return comm.ModuleDailytask
}
func (this *Dailytask) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
err = this.ModuleBase.Init(service, module, options)
this.service = service
return
}
func (this *Dailytask) Start() (err error) {
err = this.ModuleBase.Start()
var module core.IModule
if module, err = this.service.GetModule(comm.ModuleBattle); err != nil {
return
}
this.battle = module.(comm.IBattle)
if module, err = this.service.GetModule(comm.ModuleSys); err != nil {
return
}
this.sys = module.(comm.ISys)
if module, err = this.service.GetModule(comm.ModuleCaravan); err != nil {
return
}
this.caravan = module.(comm.ICaravan)
event.RegisterGO(comm.EventUserLogin, this.EventUserLogin)
return
}
func (this *Dailytask) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
this.modelDailytask = this.RegisterComp(new(ModelDailytask)).(*ModelDailytask)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
}
// 用户登录
func (this *Dailytask) EventUserLogin(session comm.IUserSession) {
}

View File

@ -0,0 +1,20 @@
package questionnaire
import (
"go_dreamfactory/lego/base"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
)
type apiComp struct {
modules.MCompGate
service base.IRPCXService
module *Questionnaire
}
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
_ = this.MCompGate.Init(service, module, comp, options)
this.service = service.(base.IRPCXService)
this.module = module.(*Questionnaire)
return
}

View File

@ -0,0 +1,33 @@
package questionnaire
import (
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
cfg "go_dreamfactory/sys/configure/structs"
)
const (
gameWorldTask = "game_worldtask.json"
gameWorldtaskBattle = "game_worldbattle.json"
gameWorldAll = "game_worldall.json"
gameburiedCond = "game_buriedcondi.json"
gamerdtasknpc = "game_rdtasknpc.json"
)
type configureComp struct {
modules.MCompConfigure
module *Questionnaire
}
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)
this.module = module.(*Questionnaire)
err = this.LoadMultiConfigure(map[string]interface{}{
gameWorldTask: cfg.NewGameWorldTask,
gameWorldtaskBattle: cfg.NewGameWorldBattle,
gameWorldAll: cfg.NewGameWorldAll,
gameburiedCond: cfg.NewGameBuriedCondi,
gamerdtasknpc: cfg.NewGameRdtaskNpc,
})
return
}

View File

@ -0,0 +1,66 @@
package questionnaire
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/lego/sys/mgo"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/x/bsonx"
)
type ModelDailytask struct {
modules.MCompModel
module *Questionnaire
}
func (this *ModelDailytask) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompModel.Init(service, module, comp, options)
this.TableName = comm.TableWtask
this.module = module.(*Questionnaire)
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
})
return
}
// 获取用户全部的埋点数据
func (this *ModelDailytask) getUserWTasks(uid string) (results *pb.DBWTask, err error) {
results = &pb.DBWTask{}
if err = this.Get(uid, results); err != nil && err != mgo.MongodbNil {
this.module.Errorln(err)
return
}
if err == mgo.MongodbNil {
err = nil
results = &pb.DBWTask{
Id: primitive.NewObjectID().Hex(),
Uid: uid,
Currchapter: 0,
Activations: make([]int32, 0),
Accepts: make([]int32, 0),
Completes: make([]int32, 0),
Groups: make(map[int32]int32),
}
err = this.Add(uid, results)
}
return
}
func (this *ModelDailytask) updateUserWTasks(uid string, data *pb.DBWTask) (err error) {
if err = this.Change(uid, map[string]interface{}{
"currchapter": data.Currchapter,
"activations": data.Activations,
"accepts": data.Accepts,
"completes": data.Completes,
"groups": data.Groups,
}); err != nil {
this.module.Error("更新用户任务数据 错误!", log.Field{Key: "err", Value: err.Error()})
return
}
return
}

View File

@ -0,0 +1,58 @@
package questionnaire
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
)
type Questionnaire struct {
modules.ModuleBase
service core.IService
caravan comm.ICaravan
battle comm.IBattle
sys comm.ISys
api *apiComp
configure *configureComp
modelDailytask *ModelDailytask
}
func NewModule() core.IModule {
return &Questionnaire{}
}
func (this *Questionnaire) GetType() core.M_Modules {
return comm.ModuleDailytask
}
func (this *Questionnaire) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
err = this.ModuleBase.Init(service, module, options)
this.service = service
return
}
func (this *Questionnaire) Start() (err error) {
err = this.ModuleBase.Start()
var module core.IModule
if module, err = this.service.GetModule(comm.ModuleBattle); err != nil {
return
}
this.battle = module.(comm.IBattle)
if module, err = this.service.GetModule(comm.ModuleSys); err != nil {
return
}
this.sys = module.(comm.ISys)
if module, err = this.service.GetModule(comm.ModuleCaravan); err != nil {
return
}
this.caravan = module.(comm.ICaravan)
return
}
func (this *Questionnaire) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
this.modelDailytask = this.RegisterComp(new(ModelDailytask)).(*ModelDailytask)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
}

180
pb/dailytask_db.pb.go Normal file
View File

@ -0,0 +1,180 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.20.0
// source: dailytask/dailytask_db.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
//日常任务
type DBDailytask struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"`
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"`
Groups []int32 `protobuf:"varint,3,rep,packed,name=groups,proto3" json:"groups"`
Complete []int32 `protobuf:"varint,4,rep,packed,name=complete,proto3" json:"complete"`
Rtime int64 `protobuf:"varint,5,opt,name=rtime,proto3" json:"rtime"`
}
func (x *DBDailytask) Reset() {
*x = DBDailytask{}
if protoimpl.UnsafeEnabled {
mi := &file_dailytask_dailytask_db_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DBDailytask) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DBDailytask) ProtoMessage() {}
func (x *DBDailytask) ProtoReflect() protoreflect.Message {
mi := &file_dailytask_dailytask_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 DBDailytask.ProtoReflect.Descriptor instead.
func (*DBDailytask) Descriptor() ([]byte, []int) {
return file_dailytask_dailytask_db_proto_rawDescGZIP(), []int{0}
}
func (x *DBDailytask) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *DBDailytask) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *DBDailytask) GetGroups() []int32 {
if x != nil {
return x.Groups
}
return nil
}
func (x *DBDailytask) GetComplete() []int32 {
if x != nil {
return x.Complete
}
return nil
}
func (x *DBDailytask) GetRtime() int64 {
if x != nil {
return x.Rtime
}
return 0
}
var File_dailytask_dailytask_db_proto protoreflect.FileDescriptor
var file_dailytask_dailytask_db_proto_rawDesc = []byte{
0x0a, 0x1c, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x64, 0x61, 0x69, 0x6c,
0x79, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x79,
0x0a, 0x0b, 0x44, 0x42, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x74, 0x61, 0x73, 0x6b, 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,
0x16, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52,
0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x6c,
0x65, 0x74, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x6c,
0x65, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01,
0x28, 0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70,
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_dailytask_dailytask_db_proto_rawDescOnce sync.Once
file_dailytask_dailytask_db_proto_rawDescData = file_dailytask_dailytask_db_proto_rawDesc
)
func file_dailytask_dailytask_db_proto_rawDescGZIP() []byte {
file_dailytask_dailytask_db_proto_rawDescOnce.Do(func() {
file_dailytask_dailytask_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_dailytask_dailytask_db_proto_rawDescData)
})
return file_dailytask_dailytask_db_proto_rawDescData
}
var file_dailytask_dailytask_db_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_dailytask_dailytask_db_proto_goTypes = []interface{}{
(*DBDailytask)(nil), // 0: DBDailytask
}
var file_dailytask_dailytask_db_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
}
func init() { file_dailytask_dailytask_db_proto_init() }
func file_dailytask_dailytask_db_proto_init() {
if File_dailytask_dailytask_db_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_dailytask_dailytask_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBDailytask); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_dailytask_dailytask_db_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_dailytask_dailytask_db_proto_goTypes,
DependencyIndexes: file_dailytask_dailytask_db_proto_depIdxs,
MessageInfos: file_dailytask_dailytask_db_proto_msgTypes,
}.Build()
File_dailytask_dailytask_db_proto = out.File
file_dailytask_dailytask_db_proto_rawDesc = nil
file_dailytask_dailytask_db_proto_goTypes = nil
file_dailytask_dailytask_db_proto_depIdxs = nil
}

293
pb/dailytask_msg.pb.go Normal file
View File

@ -0,0 +1,293 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.20.0
// source: dailytask/dailytask_msg.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
//日常任务信息获取
type DailytaskInfoReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *DailytaskInfoReq) Reset() {
*x = DailytaskInfoReq{}
if protoimpl.UnsafeEnabled {
mi := &file_dailytask_dailytask_msg_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DailytaskInfoReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DailytaskInfoReq) ProtoMessage() {}
func (x *DailytaskInfoReq) ProtoReflect() protoreflect.Message {
mi := &file_dailytask_dailytask_msg_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 DailytaskInfoReq.ProtoReflect.Descriptor instead.
func (*DailytaskInfoReq) Descriptor() ([]byte, []int) {
return file_dailytask_dailytask_msg_proto_rawDescGZIP(), []int{0}
}
//日常任务信息获取 回应
type DailytaskInfoResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *DailytaskInfoResp) Reset() {
*x = DailytaskInfoResp{}
if protoimpl.UnsafeEnabled {
mi := &file_dailytask_dailytask_msg_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DailytaskInfoResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DailytaskInfoResp) ProtoMessage() {}
func (x *DailytaskInfoResp) ProtoReflect() protoreflect.Message {
mi := &file_dailytask_dailytask_msg_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 DailytaskInfoResp.ProtoReflect.Descriptor instead.
func (*DailytaskInfoResp) Descriptor() ([]byte, []int) {
return file_dailytask_dailytask_msg_proto_rawDescGZIP(), []int{1}
}
//日常任务 领奖请求
type DailytaskReceiveReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *DailytaskReceiveReq) Reset() {
*x = DailytaskReceiveReq{}
if protoimpl.UnsafeEnabled {
mi := &file_dailytask_dailytask_msg_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DailytaskReceiveReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DailytaskReceiveReq) ProtoMessage() {}
func (x *DailytaskReceiveReq) ProtoReflect() protoreflect.Message {
mi := &file_dailytask_dailytask_msg_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 DailytaskReceiveReq.ProtoReflect.Descriptor instead.
func (*DailytaskReceiveReq) Descriptor() ([]byte, []int) {
return file_dailytask_dailytask_msg_proto_rawDescGZIP(), []int{2}
}
//日常任务 领奖请求 回应
type DailytaskReceiveResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *DailytaskReceiveResp) Reset() {
*x = DailytaskReceiveResp{}
if protoimpl.UnsafeEnabled {
mi := &file_dailytask_dailytask_msg_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DailytaskReceiveResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DailytaskReceiveResp) ProtoMessage() {}
func (x *DailytaskReceiveResp) ProtoReflect() protoreflect.Message {
mi := &file_dailytask_dailytask_msg_proto_msgTypes[3]
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 DailytaskReceiveResp.ProtoReflect.Descriptor instead.
func (*DailytaskReceiveResp) Descriptor() ([]byte, []int) {
return file_dailytask_dailytask_msg_proto_rawDescGZIP(), []int{3}
}
var File_dailytask_dailytask_msg_proto protoreflect.FileDescriptor
var file_dailytask_dailytask_msg_proto_rawDesc = []byte{
0x0a, 0x1d, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x64, 0x61, 0x69, 0x6c,
0x79, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x12, 0x0a, 0x10, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x66, 0x6f,
0x52, 0x65, 0x71, 0x22, 0x13, 0x0a, 0x11, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x74, 0x61, 0x73, 0x6b,
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x61, 0x69, 0x6c,
0x79, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x22,
0x16, 0x0a, 0x14, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x65,
0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_dailytask_dailytask_msg_proto_rawDescOnce sync.Once
file_dailytask_dailytask_msg_proto_rawDescData = file_dailytask_dailytask_msg_proto_rawDesc
)
func file_dailytask_dailytask_msg_proto_rawDescGZIP() []byte {
file_dailytask_dailytask_msg_proto_rawDescOnce.Do(func() {
file_dailytask_dailytask_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_dailytask_dailytask_msg_proto_rawDescData)
})
return file_dailytask_dailytask_msg_proto_rawDescData
}
var file_dailytask_dailytask_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_dailytask_dailytask_msg_proto_goTypes = []interface{}{
(*DailytaskInfoReq)(nil), // 0: DailytaskInfoReq
(*DailytaskInfoResp)(nil), // 1: DailytaskInfoResp
(*DailytaskReceiveReq)(nil), // 2: DailytaskReceiveReq
(*DailytaskReceiveResp)(nil), // 3: DailytaskReceiveResp
}
var file_dailytask_dailytask_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
}
func init() { file_dailytask_dailytask_msg_proto_init() }
func file_dailytask_dailytask_msg_proto_init() {
if File_dailytask_dailytask_msg_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_dailytask_dailytask_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DailytaskInfoReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_dailytask_dailytask_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DailytaskInfoResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_dailytask_dailytask_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DailytaskReceiveReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_dailytask_dailytask_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DailytaskReceiveResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_dailytask_dailytask_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_dailytask_dailytask_msg_proto_goTypes,
DependencyIndexes: file_dailytask_dailytask_msg_proto_depIdxs,
MessageInfos: file_dailytask_dailytask_msg_proto_msgTypes,
}.Build()
File_dailytask_dailytask_msg_proto = out.File
file_dailytask_dailytask_msg_proto_rawDesc = nil
file_dailytask_dailytask_msg_proto_goTypes = nil
file_dailytask_dailytask_msg_proto_depIdxs = nil
}

View File

@ -188,23 +188,16 @@ func (this *SCompGateRoute) NoticeUserLogin(ctx context.Context, args *pb.Notice
return err
}
model := db.NewDBModel(comm.TableSession, 0, conn)
// model.AddList(comm.RDS_EMPTY, args.UserId, map[string]interface{}{
// "uid": args.UserId,
// "sessionId": args.UserSessionId,
// "serviceTag": args.ServiceTag,
// "gatewayServiceId": args.GatewayServiceId,
// "ip": args.Ip,
// }, db.SetDBMgoLog(false))
model.AddList(comm.RDS_EMPTY, args.UserId, &pb.CacheUser{
user := &pb.CacheUser{
Uid: args.UserId,
SessionId: args.UserSessionId,
ServiceTag: args.ServiceTag,
GatewayServiceId: args.GatewayServiceId,
Ip: args.Ip,
}, db.SetDBMgoLog(false))
// session := this.pools.Get().(comm.IUserSession)
// session.SetSession(args.Ip, args.UserSessionId, args.ServiceTag, args.GatewayServiceId, args.UserId)
event.TriggerEvent(comm.EventUserLogin, args.UserId)
}
model.AddList(comm.RDS_EMPTY, args.UserId, user, db.SetDBMgoLog(false))
session := this.GetUserSession(user)
event.TriggerEvent(comm.EventUserLogin, session)
return nil
}

View File

@ -12,6 +12,7 @@ import (
"go_dreamfactory/modules/caravan"
"go_dreamfactory/modules/chat"
"go_dreamfactory/modules/combat"
"go_dreamfactory/modules/dailytask"
"go_dreamfactory/modules/dispatch"
"go_dreamfactory/modules/enchant"
"go_dreamfactory/modules/equipment"
@ -134,6 +135,7 @@ func main() {
passon.NewModule(),
warorder.NewModule(),
uniongve.NewModule(),
dailytask.NewModule(),
)
}

View File

@ -21,7 +21,7 @@ func NewGameAskAll(_buf []map[string]interface{}) (*GameAskAll, error) {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.ExaminationGroup] = _v
dataMap[_v.Key] = _v
}
}
return &GameAskAll{_dataList:_dataList, _dataMap:dataMap}, nil

View File

@ -11,12 +11,14 @@ package cfg
import "errors"
type GameAskAllData struct {
Key int32
ExaminationGroup int32
Examinationnum int32
Start int32
Continue int32
Time int32
Reward []*Gameatn
Restime int32
}
const TypeId_GameAskAllData = 305140654
@ -26,6 +28,7 @@ func (*GameAskAllData) GetTypeId() int32 {
}
func (_v *GameAskAllData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ExaminationGroup"].(float64); !_ok_ { err = errors.New("ExaminationGroup error"); return }; _v.ExaminationGroup = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["examinationnum"].(float64); !_ok_ { err = errors.New("examinationnum error"); return }; _v.Examinationnum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["start"].(float64); !_ok_ { err = errors.New("start error"); return }; _v.Start = int32(_tempNum_) }
@ -45,6 +48,7 @@ func (_v *GameAskAllData)Deserialize(_buf map[string]interface{}) (err error) {
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["restime"].(float64); !_ok_ { err = errors.New("restime error"); return }; _v.Restime = int32(_tempNum_) }
return
}

View File

@ -23,7 +23,7 @@ type GameAskLibraryData struct {
True string
Flase string
Fraction int32
Plantrue []string
Plantrue []int32
}
const TypeId_GameAskLibraryData = -162756536
@ -50,11 +50,11 @@ func (_v *GameAskLibraryData)Deserialize(_buf map[string]interface{}) (err error
var _ok_ bool
if _arr_, _ok_ = _buf["plantrue"].([]interface{}); !_ok_ { err = errors.New("plantrue error"); return }
_v.Plantrue = make([]string, 0, len(_arr_))
_v.Plantrue = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ string
{ if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } }
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.Plantrue = append(_v.Plantrue, _list_v_)
}
}

View File

@ -14,11 +14,23 @@ import "bright/serialization"
type GameMainStageData struct {
Id int32
Chapterid int32
Taskid int32
Unlockid int32
Previoustage int32
Episodetype int32
Openlevel int32
Episodelocation serialization.Vector3
EditorStage int32
Venturepos serialization.Vector3
Venturemodel string
Ventureavatar []string
Heroimg string
Bubbletext string
Animation string
Challenge int32
Hide int32
Destroy int32
Progress int32
Detailwindow string
Frontstoryid int32
Afterstoryid int32
@ -49,6 +61,8 @@ func (*GameMainStageData) GetTypeId() int32 {
func (_v *GameMainStageData)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["chapterid"].(float64); !_ok_ { err = errors.New("chapterid error"); return }; _v.Chapterid = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["taskid"].(float64); !_ok_ { err = errors.New("taskid error"); return }; _v.Taskid = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["unlockid"].(float64); !_ok_ { err = errors.New("unlockid error"); return }; _v.Unlockid = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["previoustage"].(float64); !_ok_ { err = errors.New("previoustage error"); return }; _v.Previoustage = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Episodetype"].(float64); !_ok_ { err = errors.New("Episodetype error"); return }; _v.Episodetype = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["openlevel"].(float64); !_ok_ { err = errors.New("openlevel error"); return }; _v.Openlevel = int32(_tempNum_) }
@ -61,6 +75,36 @@ func (_v *GameMainStageData)Deserialize(_buf map[string]interface{}) (err error)
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["EditorStage"].(float64); !_ok_ { err = errors.New("EditorStage error"); return }; _v.EditorStage = int32(_tempNum_) }
{ var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["venturepos"].(map[string]interface{}); !_ok_ { err = errors.New("venturepos error"); return }
var _x_, _y_, _z_ float32;
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["x"].(float64); !_ok_ { err = errors.New("x error"); return }; _x_ = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["y"].(float64); !_ok_ { err = errors.New("y error"); return }; _y_ = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["z"].(float64); !_ok_ { err = errors.New("z error"); return }; _z_ = float32(_tempNum_) }
_v.Venturepos = serialization.NewVector3(_x_, _y_, _z_)
}
{ var _ok_ bool; if _v.Venturemodel, _ok_ = _buf["venturemodel"].(string); !_ok_ { err = errors.New("venturemodel error"); return } }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["ventureavatar"].([]interface{}); !_ok_ { err = errors.New("ventureavatar error"); return }
_v.Ventureavatar = make([]string, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ string
{ if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } }
_v.Ventureavatar = append(_v.Ventureavatar, _list_v_)
}
}
{ var _ok_ bool; if _v.Heroimg, _ok_ = _buf["heroimg"].(string); !_ok_ { err = errors.New("heroimg error"); return } }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["bubbletext"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Bubbletext error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Bubbletext, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; if _v.Animation, _ok_ = _buf["animation"].(string); !_ok_ { err = errors.New("animation error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["challenge"].(float64); !_ok_ { err = errors.New("challenge error"); return }; _v.Challenge = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["hide"].(float64); !_ok_ { err = errors.New("hide error"); return }; _v.Hide = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["destroy"].(float64); !_ok_ { err = errors.New("destroy error"); return }; _v.Destroy = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["progress"].(float64); !_ok_ { err = errors.New("progress error"); return }; _v.Progress = int32(_tempNum_) }
{ var _ok_ bool; if _v.Detailwindow, _ok_ = _buf["detailwindow"].(string); !_ok_ { err = errors.New("detailwindow error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["frontstoryid"].(float64); !_ok_ { err = errors.New("frontstoryid error"); return }; _v.Frontstoryid = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["afterstoryid"].(float64); !_ok_ { err = errors.New("afterstoryid error"); return }; _v.Afterstoryid = int32(_tempNum_) }

View File

@ -18,6 +18,7 @@ type GameWorldTaskData struct {
Ontxe int32
IdAfter int32
Group int32
Exgroup int32
Des int32
Icon string
TaskName string
@ -47,6 +48,7 @@ func (_v *GameWorldTaskData)Deserialize(_buf map[string]interface{}) (err error)
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ontxe"].(float64); !_ok_ { err = errors.New("ontxe error"); return }; _v.Ontxe = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id_after"].(float64); !_ok_ { err = errors.New("id_after error"); return }; _v.IdAfter = 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["exgroup"].(float64); !_ok_ { err = errors.New("exgroup error"); return }; _v.Exgroup = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["des"].(float64); !_ok_ { err = errors.New("des error"); return }; _v.Des = int32(_tempNum_) }
{ var _ok_ bool; if _v.Icon, _ok_ = _buf["icon"].(string); !_ok_ { err = errors.New("icon error"); return } }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["task_name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.TaskName error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.TaskName, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }