From 239cfe68c3c878b74f89ac5f21d7cc50796296a4 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 24 Nov 2023 14:31:25 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=8C=B4=E6=8B=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 4 +- modules/monkey/api.go | 17 ++ modules/monkey/api_award.go | 35 +++ modules/monkey/api_getlist.go | 35 +++ modules/monkey/configure.go | 41 +++ modules/monkey/model.go | 46 ++++ modules/monkey/module.go | 49 ++++ pb/monkey_db.pb.go | 255 ++++++++++++++++++ pb/monkey_msg.pb.go | 479 ++++++++++++++++++++++++++++++++++ 9 files changed, 960 insertions(+), 1 deletion(-) create mode 100644 modules/monkey/api.go create mode 100644 modules/monkey/api_award.go create mode 100644 modules/monkey/api_getlist.go create mode 100644 modules/monkey/configure.go create mode 100644 modules/monkey/model.go create mode 100644 modules/monkey/module.go create mode 100644 pb/monkey_db.pb.go create mode 100644 pb/monkey_msg.pb.go diff --git a/comm/const.go b/comm/const.go index af08f0d81..e91b49ac0 100644 --- a/comm/const.go +++ b/comm/const.go @@ -125,7 +125,7 @@ const ( ModuleCatchbugs core.M_Modules = "catchbugs" //捉虫子 ModuleMoonlv core.M_Modules = "moonlv" //护月等级 ModuleWhackamole core.M_Modules = "whackamole" //大豚鼠 - + ModuleMonkey core.M_Modules = "monkey" //猴拳 ) // 数据表名定义处 @@ -428,6 +428,8 @@ const ( TableMoonlv = "moonlv" TableWhackamole = "whackamole" + // 猴拳 + TableMonkey = "monkey" ) // RPC服务接口定义处 diff --git a/modules/monkey/api.go b/modules/monkey/api.go new file mode 100644 index 000000000..e66fe8460 --- /dev/null +++ b/modules/monkey/api.go @@ -0,0 +1,17 @@ +package monkey + +import ( + "go_dreamfactory/lego/core" + "go_dreamfactory/modules" +) + +type apiComp struct { + modules.MCompGate + module *Monkey +} + +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.module = module.(*Monkey) + return +} diff --git a/modules/monkey/api_award.go b/modules/monkey/api_award.go new file mode 100644 index 000000000..7d0853d77 --- /dev/null +++ b/modules/monkey/api_award.go @@ -0,0 +1,35 @@ +package monkey + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" +) + +func (this *apiComp) AwardCheck(session comm.IUserSession, req *pb.MonkeyAwardReq) (errdata *pb.ErrorData) { + return +} + +func (this *apiComp) Award(session comm.IUserSession, req *pb.MonkeyAwardReq) (errdata *pb.ErrorData) { + var ( + err error + info *pb.DBMonkey + ) + if errdata = this.AwardCheck(session, req); errdata != nil { + return + } + + if info, err = this.module.model.getMonkeyData(session.GetUserId()); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Message: err.Error(), + } + return + } + + session.SendMsg(string(this.module.GetType()), "award", &pb.MonkeyAwardResp{ + Data: info, + Award: []*pb.UserAtno{}, + }) + + return +} diff --git a/modules/monkey/api_getlist.go b/modules/monkey/api_getlist.go new file mode 100644 index 000000000..0445f8c54 --- /dev/null +++ b/modules/monkey/api_getlist.go @@ -0,0 +1,35 @@ +package monkey + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" +) + +func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.MonkeyGetListReq) (errdata *pb.ErrorData) { + return +} + +// 获取猴拳基本信息 +func (this *apiComp) GetList(session comm.IUserSession, req *pb.MonkeyGetListReq) (errdata *pb.ErrorData) { + var ( + err error + info *pb.DBMonkey + ) + if errdata = this.GetListCheck(session, req); errdata != nil { + return + } + + if info, err = this.module.model.getMonkeyData(session.GetUserId()); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Message: err.Error(), + } + return + } + + session.SendMsg(string(this.module.GetType()), "award", &pb.MonkeyGetListResp{ + Data: info, + }) + + return +} diff --git a/modules/monkey/configure.go b/modules/monkey/configure.go new file mode 100644 index 000000000..cded30cb4 --- /dev/null +++ b/modules/monkey/configure.go @@ -0,0 +1,41 @@ +package monkey + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/modules" + cfg "go_dreamfactory/sys/configure/structs" +) + +const ( + game_repeatall = "game_repeatall.json" +) + +type configureComp struct { + modules.MCompConfigure + module *Monkey +} + +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.LoadConfigure(game_repeatall, cfg.NewGameRepeatAll) + return +} + +// 读取装备出售系数配置 +func (this *configureComp) getGameRepeatAllData(id int32) (result *cfg.GameRepeatAllData, err error) { + var ( + v interface{} + ok bool + ) + if v, err = this.GetConfigure(game_repeatall); err != nil { + this.module.Errorf("err:%v", err) + return + } else { + if result, ok = v.(*cfg.GameRepeatAll).GetDataMap()[id]; !ok { + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_repeatall, id) + return + } + } + return +} diff --git a/modules/monkey/model.go b/modules/monkey/model.go new file mode 100644 index 000000000..471af19cb --- /dev/null +++ b/modules/monkey/model.go @@ -0,0 +1,46 @@ +package monkey + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "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 modelComp struct { + modules.MCompModel + module *Monkey +} + +func (this *modelComp) 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.TableMonkey + this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ + Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, + }) + return +} + +// 获取猴拳基本数据 +func (this *modelComp) getMonkeyData(uid string) (info *pb.DBMonkey, err error) { + info = &pb.DBMonkey{} + if err = this.Get(uid, info); err != nil && err != mgo.MongodbNil { + this.module.Errorln(err) + return + } + if err == mgo.MongodbNil { + info = &pb.DBMonkey{ + Id: primitive.NewObjectID().Hex(), + Uid: uid, + Reward: map[int32]int32{}, + Data: map[int32]*pb.ChapterData{}, + } + err = this.Add(uid, info) + } + return +} diff --git a/modules/monkey/module.go b/modules/monkey/module.go new file mode 100644 index 000000000..31a4a01fa --- /dev/null +++ b/modules/monkey/module.go @@ -0,0 +1,49 @@ +package monkey + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/modules" +) + +func NewModule() core.IModule { + m := new(Monkey) + return m +} + +/* +模块名称:猜颜色 +*/ +type Monkey struct { + modules.ModuleBase + service comm.IService + api *apiComp + configure *configureComp + model *modelComp +} + +// 模块名 +func (this *Monkey) GetType() core.M_Modules { + return comm.ModuleMonkey +} + +// 模块初始化接口 +func (this *Monkey) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { + err = this.ModuleBase.Init(service, module, options) + this.service = service.(comm.IService) + return +} + +func (this *Monkey) Start() (err error) { + if err = this.ModuleBase.Start(); err != nil { + return + } + return +} + +func (this *Monkey) OnInstallComp() { + this.ModuleBase.OnInstallComp() + this.api = this.RegisterComp(new(apiComp)).(*apiComp) + this.configure = this.RegisterComp(new(configureComp)).(*configureComp) + this.model = this.RegisterComp(new(modelComp)).(*modelComp) +} diff --git a/pb/monkey_db.pb.go b/pb/monkey_db.pb.go new file mode 100644 index 000000000..4b965224c --- /dev/null +++ b/pb/monkey_db.pb.go @@ -0,0 +1,255 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.20.0 +// source: monkey/monkey_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 ChapterData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Award map[int32]int32 `protobuf:"bytes,2,rep,name=award,proto3" json:"award" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //key:stage value:星星的数量 +} + +func (x *ChapterData) Reset() { + *x = ChapterData{} + if protoimpl.UnsafeEnabled { + mi := &file_monkey_monkey_db_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChapterData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChapterData) ProtoMessage() {} + +func (x *ChapterData) ProtoReflect() protoreflect.Message { + mi := &file_monkey_monkey_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 ChapterData.ProtoReflect.Descriptor instead. +func (*ChapterData) Descriptor() ([]byte, []int) { + return file_monkey_monkey_db_proto_rawDescGZIP(), []int{0} +} + +func (x *ChapterData) GetAward() map[int32]int32 { + if x != nil { + return x.Award + } + return nil +} + +//猴拳 +type DBMonkey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` //用户ID + Reward map[int32]int32 `protobuf:"bytes,3,rep,name=reward,proto3" json:"reward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //猴拳奖励 key 章节id value starnum + Data map[int32]*ChapterData `protobuf:"bytes,4,rep,name=data,proto3" json:"data" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // key 章节id +} + +func (x *DBMonkey) Reset() { + *x = DBMonkey{} + if protoimpl.UnsafeEnabled { + mi := &file_monkey_monkey_db_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBMonkey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBMonkey) ProtoMessage() {} + +func (x *DBMonkey) ProtoReflect() protoreflect.Message { + mi := &file_monkey_monkey_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 DBMonkey.ProtoReflect.Descriptor instead. +func (*DBMonkey) Descriptor() ([]byte, []int) { + return file_monkey_monkey_db_proto_rawDescGZIP(), []int{1} +} + +func (x *DBMonkey) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DBMonkey) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *DBMonkey) GetReward() map[int32]int32 { + if x != nil { + return x.Reward + } + return nil +} + +func (x *DBMonkey) GetData() map[int32]*ChapterData { + if x != nil { + return x.Data + } + return nil +} + +var File_monkey_monkey_db_proto protoreflect.FileDescriptor + +var file_monkey_monkey_db_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x6d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x2f, 0x6d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x5f, + 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x76, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x70, + 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2d, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, + 0x44, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x1a, 0x38, 0x0a, 0x0a, 0x41, 0x77, 0x61, 0x72, 0x64, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x86, 0x02, 0x0a, 0x08, 0x44, 0x42, 0x4d, 0x6f, 0x6e, 0x6b, 0x65, 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, + 0x2d, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x44, 0x42, 0x4d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x27, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x44, + 0x42, 0x4d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x1a, 0x45, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 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, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 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, +} + +var ( + file_monkey_monkey_db_proto_rawDescOnce sync.Once + file_monkey_monkey_db_proto_rawDescData = file_monkey_monkey_db_proto_rawDesc +) + +func file_monkey_monkey_db_proto_rawDescGZIP() []byte { + file_monkey_monkey_db_proto_rawDescOnce.Do(func() { + file_monkey_monkey_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_monkey_monkey_db_proto_rawDescData) + }) + return file_monkey_monkey_db_proto_rawDescData +} + +var file_monkey_monkey_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_monkey_monkey_db_proto_goTypes = []interface{}{ + (*ChapterData)(nil), // 0: ChapterData + (*DBMonkey)(nil), // 1: DBMonkey + nil, // 2: ChapterData.AwardEntry + nil, // 3: DBMonkey.RewardEntry + nil, // 4: DBMonkey.DataEntry +} +var file_monkey_monkey_db_proto_depIdxs = []int32{ + 2, // 0: ChapterData.award:type_name -> ChapterData.AwardEntry + 3, // 1: DBMonkey.reward:type_name -> DBMonkey.RewardEntry + 4, // 2: DBMonkey.data:type_name -> DBMonkey.DataEntry + 0, // 3: DBMonkey.DataEntry.value:type_name -> ChapterData + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_monkey_monkey_db_proto_init() } +func file_monkey_monkey_db_proto_init() { + if File_monkey_monkey_db_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_monkey_monkey_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChapterData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_monkey_monkey_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBMonkey); 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_monkey_monkey_db_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_monkey_monkey_db_proto_goTypes, + DependencyIndexes: file_monkey_monkey_db_proto_depIdxs, + MessageInfos: file_monkey_monkey_db_proto_msgTypes, + }.Build() + File_monkey_monkey_db_proto = out.File + file_monkey_monkey_db_proto_rawDesc = nil + file_monkey_monkey_db_proto_goTypes = nil + file_monkey_monkey_db_proto_depIdxs = nil +} diff --git a/pb/monkey_msg.pb.go b/pb/monkey_msg.pb.go new file mode 100644 index 000000000..5b35a3116 --- /dev/null +++ b/pb/monkey_msg.pb.go @@ -0,0 +1,479 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.20.0 +// source: monkey/monkey_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 MonkeyGetListReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MonkeyGetListReq) Reset() { + *x = MonkeyGetListReq{} + if protoimpl.UnsafeEnabled { + mi := &file_monkey_monkey_msg_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MonkeyGetListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MonkeyGetListReq) ProtoMessage() {} + +func (x *MonkeyGetListReq) ProtoReflect() protoreflect.Message { + mi := &file_monkey_monkey_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 MonkeyGetListReq.ProtoReflect.Descriptor instead. +func (*MonkeyGetListReq) Descriptor() ([]byte, []int) { + return file_monkey_monkey_msg_proto_rawDescGZIP(), []int{0} +} + +type MonkeyGetListResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *DBMonkey `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` +} + +func (x *MonkeyGetListResp) Reset() { + *x = MonkeyGetListResp{} + if protoimpl.UnsafeEnabled { + mi := &file_monkey_monkey_msg_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MonkeyGetListResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MonkeyGetListResp) ProtoMessage() {} + +func (x *MonkeyGetListResp) ProtoReflect() protoreflect.Message { + mi := &file_monkey_monkey_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 MonkeyGetListResp.ProtoReflect.Descriptor instead. +func (*MonkeyGetListResp) Descriptor() ([]byte, []int) { + return file_monkey_monkey_msg_proto_rawDescGZIP(), []int{1} +} + +func (x *MonkeyGetListResp) GetData() *DBMonkey { + if x != nil { + return x.Data + } + return nil +} + +// 奖励领取 +type MonkeyAwardReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChapterId int32 `protobuf:"varint,1,opt,name=chapterId,proto3" json:"chapterId"` // 章节id + Starnum int32 `protobuf:"varint,2,opt,name=starnum,proto3" json:"starnum"` // 奖励所对应的星星数量 +} + +func (x *MonkeyAwardReq) Reset() { + *x = MonkeyAwardReq{} + if protoimpl.UnsafeEnabled { + mi := &file_monkey_monkey_msg_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MonkeyAwardReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MonkeyAwardReq) ProtoMessage() {} + +func (x *MonkeyAwardReq) ProtoReflect() protoreflect.Message { + mi := &file_monkey_monkey_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 MonkeyAwardReq.ProtoReflect.Descriptor instead. +func (*MonkeyAwardReq) Descriptor() ([]byte, []int) { + return file_monkey_monkey_msg_proto_rawDescGZIP(), []int{2} +} + +func (x *MonkeyAwardReq) GetChapterId() int32 { + if x != nil { + return x.ChapterId + } + return 0 +} + +func (x *MonkeyAwardReq) GetStarnum() int32 { + if x != nil { + return x.Starnum + } + return 0 +} + +type MonkeyAwardResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *DBMonkey `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` + Award []*UserAtno `protobuf:"bytes,2,rep,name=award,proto3" json:"award"` //获取资源 +} + +func (x *MonkeyAwardResp) Reset() { + *x = MonkeyAwardResp{} + if protoimpl.UnsafeEnabled { + mi := &file_monkey_monkey_msg_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MonkeyAwardResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MonkeyAwardResp) ProtoMessage() {} + +func (x *MonkeyAwardResp) ProtoReflect() protoreflect.Message { + mi := &file_monkey_monkey_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 MonkeyAwardResp.ProtoReflect.Descriptor instead. +func (*MonkeyAwardResp) Descriptor() ([]byte, []int) { + return file_monkey_monkey_msg_proto_rawDescGZIP(), []int{3} +} + +func (x *MonkeyAwardResp) GetData() *DBMonkey { + if x != nil { + return x.Data + } + return nil +} + +func (x *MonkeyAwardResp) GetAward() []*UserAtno { + if x != nil { + return x.Award + } + return nil +} + +// 更新关卡星级 +type MonkeyUpdateSTarReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Stage int32 `protobuf:"varint,1,opt,name=stage,proto3" json:"stage"` // 关卡ID +} + +func (x *MonkeyUpdateSTarReq) Reset() { + *x = MonkeyUpdateSTarReq{} + if protoimpl.UnsafeEnabled { + mi := &file_monkey_monkey_msg_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MonkeyUpdateSTarReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MonkeyUpdateSTarReq) ProtoMessage() {} + +func (x *MonkeyUpdateSTarReq) ProtoReflect() protoreflect.Message { + mi := &file_monkey_monkey_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 MonkeyUpdateSTarReq.ProtoReflect.Descriptor instead. +func (*MonkeyUpdateSTarReq) Descriptor() ([]byte, []int) { + return file_monkey_monkey_msg_proto_rawDescGZIP(), []int{4} +} + +func (x *MonkeyUpdateSTarReq) GetStage() int32 { + if x != nil { + return x.Stage + } + return 0 +} + +type MonkeyUpdateSTarResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *DBMonkey `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` +} + +func (x *MonkeyUpdateSTarResp) Reset() { + *x = MonkeyUpdateSTarResp{} + if protoimpl.UnsafeEnabled { + mi := &file_monkey_monkey_msg_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MonkeyUpdateSTarResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MonkeyUpdateSTarResp) ProtoMessage() {} + +func (x *MonkeyUpdateSTarResp) ProtoReflect() protoreflect.Message { + mi := &file_monkey_monkey_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 MonkeyUpdateSTarResp.ProtoReflect.Descriptor instead. +func (*MonkeyUpdateSTarResp) Descriptor() ([]byte, []int) { + return file_monkey_monkey_msg_proto_rawDescGZIP(), []int{5} +} + +func (x *MonkeyUpdateSTarResp) GetData() *DBMonkey { + if x != nil { + return x.Data + } + return nil +} + +var File_monkey_monkey_msg_proto protoreflect.FileDescriptor + +var file_monkey_monkey_msg_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x6d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x2f, 0x6d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x5f, + 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x6d, 0x6f, 0x6e, 0x6b, 0x65, + 0x79, 0x2f, 0x6d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x12, 0x0a, + 0x10, 0x4d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x71, 0x22, 0x32, 0x0a, 0x11, 0x4d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x47, 0x65, 0x74, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x4d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x48, 0x0a, 0x0e, 0x4d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x41, + 0x77, 0x61, 0x72, 0x64, 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, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x6e, 0x75, 0x6d, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x6e, 0x75, 0x6d, 0x22, + 0x51, 0x0a, 0x0f, 0x4d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x09, 0x2e, 0x44, 0x42, 0x4d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77, 0x61, + 0x72, 0x64, 0x22, 0x2b, 0x0a, 0x13, 0x4d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x54, 0x61, 0x72, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x22, + 0x35, 0x0a, 0x14, 0x4d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x54, 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x4d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, + 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_monkey_monkey_msg_proto_rawDescOnce sync.Once + file_monkey_monkey_msg_proto_rawDescData = file_monkey_monkey_msg_proto_rawDesc +) + +func file_monkey_monkey_msg_proto_rawDescGZIP() []byte { + file_monkey_monkey_msg_proto_rawDescOnce.Do(func() { + file_monkey_monkey_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_monkey_monkey_msg_proto_rawDescData) + }) + return file_monkey_monkey_msg_proto_rawDescData +} + +var file_monkey_monkey_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_monkey_monkey_msg_proto_goTypes = []interface{}{ + (*MonkeyGetListReq)(nil), // 0: MonkeyGetListReq + (*MonkeyGetListResp)(nil), // 1: MonkeyGetListResp + (*MonkeyAwardReq)(nil), // 2: MonkeyAwardReq + (*MonkeyAwardResp)(nil), // 3: MonkeyAwardResp + (*MonkeyUpdateSTarReq)(nil), // 4: MonkeyUpdateSTarReq + (*MonkeyUpdateSTarResp)(nil), // 5: MonkeyUpdateSTarResp + (*DBMonkey)(nil), // 6: DBMonkey + (*UserAtno)(nil), // 7: UserAtno +} +var file_monkey_monkey_msg_proto_depIdxs = []int32{ + 6, // 0: MonkeyGetListResp.data:type_name -> DBMonkey + 6, // 1: MonkeyAwardResp.data:type_name -> DBMonkey + 7, // 2: MonkeyAwardResp.award:type_name -> UserAtno + 6, // 3: MonkeyUpdateSTarResp.data:type_name -> DBMonkey + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_monkey_monkey_msg_proto_init() } +func file_monkey_monkey_msg_proto_init() { + if File_monkey_monkey_msg_proto != nil { + return + } + file_monkey_monkey_db_proto_init() + file_comm_proto_init() + if !protoimpl.UnsafeEnabled { + file_monkey_monkey_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MonkeyGetListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_monkey_monkey_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MonkeyGetListResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_monkey_monkey_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MonkeyAwardReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_monkey_monkey_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MonkeyAwardResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_monkey_monkey_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MonkeyUpdateSTarReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_monkey_monkey_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MonkeyUpdateSTarResp); 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_monkey_monkey_msg_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_monkey_monkey_msg_proto_goTypes, + DependencyIndexes: file_monkey_monkey_msg_proto_depIdxs, + MessageInfos: file_monkey_monkey_msg_proto_msgTypes, + }.Build() + File_monkey_monkey_msg_proto = out.File + file_monkey_monkey_msg_proto_rawDesc = nil + file_monkey_monkey_msg_proto_goTypes = nil + file_monkey_monkey_msg_proto_depIdxs = nil +} From 594282f2913fd7bec8f3acee5af498c4e0bd473f Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 24 Nov 2023 15:32:37 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=8C=B4=E6=8B=B3=E5=A5=96=E5=8A=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_askedrecruit.json | 48 +++- bin/json/game_battleready.json | 8 +- bin/json/game_catchbugstage.json | 8 +- bin/json/game_fightglobalevent.json | 12 +- bin/json/game_global.json | 5 +- bin/json/game_hero.json | 14 +- bin/json/game_loading.json | 28 +- bin/json/game_mainstage.json | 108 ++++---- bin/json/game_monkeymain.json | 104 ++++++++ bin/json/game_monkeyreward.json | 80 ++++++ bin/json/game_monsterformat.json | 70 ++--- bin/json/game_rdtasknpc.json | 8 +- bin/json/game_skillafteratk.json | 8 +- bin/json/game_tdbuff.json | 68 ++--- bin/json/game_tdmonster.json | 6 +- bin/json/game_tdweapon.json | 12 +- bin/json/game_tdweaponrandom.json | 39 +-- bin/json/game_tdweaponskill.json | 252 ++++++++++++++---- bin/json/game_worldbattle.json | 4 +- bin/json/game_worldtask.json | 2 +- modules/monkey/api_award.go | 37 ++- modules/monkey/api_getlist.go | 2 +- modules/monkey/api_updatestar.go | 75 ++++++ modules/monkey/configure.go | 53 +++- modules/monkey/model.go | 5 + pb/monkey_msg.pb.go | 71 ++--- sys/configure/structs/Game.MonkeyMain.go | 42 +++ sys/configure/structs/Game.MonkeyMainData.go | 69 +++++ sys/configure/structs/Game.MonkeyReward.go | 42 +++ .../structs/Game.MonkeyRewardData.go | 56 ++++ sys/configure/structs/Game.OpencondType.go | 1 + sys/configure/structs/Game.TDBuffData.go | 4 - sys/configure/structs/Game.TDWeaponData.go | 30 --- .../structs/Game.TDWeaponRandomData.go | 15 -- .../structs/Game.TDWeaponSkillData.go | 2 + sys/configure/structs/Tables.go | 14 + sys/configure/structs/game.globalData.go | 2 + 37 files changed, 1041 insertions(+), 363 deletions(-) create mode 100644 bin/json/game_monkeymain.json create mode 100644 bin/json/game_monkeyreward.json create mode 100644 modules/monkey/api_updatestar.go create mode 100644 sys/configure/structs/Game.MonkeyMain.go create mode 100644 sys/configure/structs/Game.MonkeyMainData.go create mode 100644 sys/configure/structs/Game.MonkeyReward.go create mode 100644 sys/configure/structs/Game.MonkeyRewardData.go diff --git a/bin/json/game_askedrecruit.json b/bin/json/game_askedrecruit.json index a967d3d07..8799b6fae 100644 --- a/bin/json/game_askedrecruit.json +++ b/bin/json/game_askedrecruit.json @@ -26,11 +26,11 @@ }, "optionText1": { "key": "drawcard_asked_optionText1_2", - "text": "1.是主角没错" + "text": "是主角没错" }, "optionText2": { "key": "drawcard_asked_optionText3", - "text": "2.只是普通肥宅" + "text": "只是普通肥宅" } }, { @@ -77,11 +77,11 @@ }, "optionText1": { "key": "drawcard_asked_optionText1_5", - "text": "1.在你眼前啊" + "text": "在你眼前啊" }, "optionText2": { "key": "drawcard_asked_optionText6", - "text": "2.在家打游戏呢" + "text": "在家打游戏呢" } }, { @@ -128,11 +128,11 @@ }, "optionText1": { "key": "drawcard_asked_optionText1_8", - "text": "1.只能二选一吗?" + "text": "只能二选一吗?" }, "optionText2": { "key": "drawcard_asked_optionText9", - "text": "2.我来过新手教程" + "text": "我来过新手教程" } }, { @@ -141,7 +141,41 @@ "talkPoint": 0, "storyText": { "key": "drawcard_asked_storyText_9", - "text": "有趣!" + "text": "有趣!有趣!" + }, + "optionText1": { + "key": "", + "text": "" + }, + "optionText2": { + "key": "", + "text": "" + } + }, + { + "key": 9, + "type": 0, + "talkPoint": 0, + "storyText": { + "key": "drawcard_asked_storyText_10", + "text": "感受此时的心境,年轻人。" + }, + "optionText1": { + "key": "", + "text": "" + }, + "optionText2": { + "key": "", + "text": "" + } + }, + { + "key": 10, + "type": 0, + "talkPoint": 0, + "storyText": { + "key": "drawcard_asked_storyText_11", + "text": "循着自己的内心,接受他的指引吧……" }, "optionText1": { "key": "", diff --git a/bin/json/game_battleready.json b/bin/json/game_battleready.json index 46dac8c1d..da0b8262b 100644 --- a/bin/json/game_battleready.json +++ b/bin/json/game_battleready.json @@ -2045,7 +2045,7 @@ "BGMusic": "", "LoadingId": 1019, "HideAlienSpace": 0, - "HideFightUI": 0, + "HideFightUI": 1, "RuleTips": { "key": "", "text": "" @@ -2059,7 +2059,7 @@ "disableAiCamera": 0, "ChoseCamp": [], "DisableCamp": [], - "DefaultHero": 0, + "DefaultHero": 720013, "ChoseHero": [], "DisableHero": [], "LockSlots": [], @@ -2089,9 +2089,7 @@ "key": "", "text": "" }, - "battleEvents": [ - 109 - ], + "battleEvents": [], "ScoreGroupID": 0, "disableAiCamera": 0, "ChoseCamp": [], diff --git a/bin/json/game_catchbugstage.json b/bin/json/game_catchbugstage.json index 9d19a5015..416d2d8c0 100644 --- a/bin/json/game_catchbugstage.json +++ b/bin/json/game_catchbugstage.json @@ -31,7 +31,7 @@ { "id": 1002, "cardnum": { - "k": 2, + "k": 4, "v": 4 }, "stagetime": 120, @@ -60,7 +60,7 @@ { "id": 1003, "cardnum": { - "k": 2, + "k": 4, "v": 4 }, "stagetime": 120, @@ -89,7 +89,7 @@ { "id": 1004, "cardnum": { - "k": 2, + "k": 4, "v": 4 }, "stagetime": 120, @@ -122,7 +122,7 @@ { "id": 1005, "cardnum": { - "k": 2, + "k": 4, "v": 4 }, "stagetime": 120, diff --git a/bin/json/game_fightglobalevent.json b/bin/json/game_fightglobalevent.json index 1c44fa00b..31d4558a0 100644 --- a/bin/json/game_fightglobalevent.json +++ b/bin/json/game_fightglobalevent.json @@ -596,17 +596,19 @@ "key": "", "text": "" }, - "When": 20, - "FromCheck": "Side=1,HeroID=44004", + "When": 1, + "FromCheck": "", "TargetCheck": "", "MainSkillCheck": "", "AfterSkillCheck": "", "BuffCheck": "", "FightEndCheck": "", - "AddCon": [], - "Execution": 2, + "AddCon": [ + "WaveEqual=1" + ], + "Execution": 3, "Args": [ - "6000010" + "1" ] }, { diff --git a/bin/json/game_global.json b/bin/json/game_global.json index 885a0a38e..a4d0249b3 100644 --- a/bin/json/game_global.json +++ b/bin/json/game_global.json @@ -757,11 +757,12 @@ }, "td_Hp": 100, "td_division_angle": 3, - "playerexname": "achieve_achieve_all_achieve_group_id_06", + "playerexname": "playerexname", "initper": { "a": "per", "t": "16010000", "n": 1 - } + }, + "catchbugturn": 6 } ] \ No newline at end of file diff --git a/bin/json/game_hero.json b/bin/json/game_hero.json index e2cdf5766..71621c5c3 100644 --- a/bin/json/game_hero.json +++ b/bin/json/game_hero.json @@ -2004,7 +2004,7 @@ "type": 1, "ip": 4, "sd": 1, - "handbook": -1, + "handbook": 1, "prefab": "24005", "rotation": "0|0|0", "revolve": 0, @@ -3498,7 +3498,7 @@ "type": 1, "ip": 3, "sd": 1, - "handbook": -1, + "handbook": 1, "prefab": "34004", "rotation": "0|0|0", "revolve": 0, @@ -4079,7 +4079,7 @@ "type": 1, "ip": 10, "sd": 1, - "handbook": -1, + "handbook": 1, "prefab": "35003", "rotation": "0|0|0", "revolve": 0, @@ -4245,7 +4245,7 @@ "type": 1, "ip": 12, "sd": 1, - "handbook": -1, + "handbook": 1, "prefab": "35005", "rotation": "0|0|0", "revolve": 0, @@ -4411,7 +4411,7 @@ "type": 1, "ip": 12, "sd": 1, - "handbook": -1, + "handbook": 1, "prefab": "43001", "rotation": "0|0|0", "revolve": 0, @@ -5490,7 +5490,7 @@ "type": 1, "ip": 7, "sd": 1, - "handbook": -1, + "handbook": 1, "prefab": "45002", "rotation": "0|0|0", "revolve": 0, @@ -7067,7 +7067,7 @@ "type": 2, "ip": 1, "sd": 1, - "handbook": -1, + "handbook": 1, "prefab": "53001", "rotation": "0|0|0", "revolve": 0, diff --git a/bin/json/game_loading.json b/bin/json/game_loading.json index d130faae1..e0a2be84f 100644 --- a/bin/json/game_loading.json +++ b/bin/json/game_loading.json @@ -101,7 +101,7 @@ }, { "id": 1011, - "scene": "WorldMapScene", + "scene": "MainLineScene", "image": "ld_mh_bg_fc", "icon": "loading_icon_fc", "prompt": { @@ -162,8 +162,8 @@ { "id": 1017, "scene": "GameFightScene", - "image": "ld_mh_bg_zd", - "icon": "loading_icon_gfxm", + "image": "ld_mh_bg_fc", + "icon": "loading_icon_fc", "prompt": { "key": "loading_Sheet1_prompt_17", "text": "伟大守护者的第一次成就,往往是一场看似平平无奇的战斗。" @@ -191,7 +191,7 @@ }, { "id": 1020, - "scene": "WorldMapScene", + "scene": "MainLineScene", "image": "ld_mh_bg_fc", "icon": "loading_icon_fc", "prompt": { @@ -201,7 +201,7 @@ }, { "id": 1021, - "scene": "WorldMapScene", + "scene": "MainLineScene", "image": "ld_mh_bg_fc", "icon": "loading_icon_fc", "prompt": { @@ -211,7 +211,7 @@ }, { "id": 1022, - "scene": "WorldMapScene", + "scene": "MainLineScene", "image": "ld_mh_bg_fc", "icon": "loading_icon_fc", "prompt": { @@ -221,7 +221,7 @@ }, { "id": 1023, - "scene": "WorldMapScene", + "scene": "MainLineScene", "image": "ld_mh_bg_fc", "icon": "loading_icon_fc", "prompt": { @@ -231,7 +231,7 @@ }, { "id": 1024, - "scene": "WorldMapScene", + "scene": "MainLineScene", "image": "ld_mh_bg_fc", "icon": "loading_icon_fc", "prompt": { @@ -241,7 +241,7 @@ }, { "id": 1025, - "scene": "WorldMapScene", + "scene": "MainLineScene", "image": "ld_mh_bg_fc", "icon": "loading_icon_fc", "prompt": { @@ -251,7 +251,7 @@ }, { "id": 1026, - "scene": "WorldMapScene", + "scene": "MainLineScene", "image": "ld_mh_bg_fc", "icon": "loading_icon_fc", "prompt": { @@ -261,7 +261,7 @@ }, { "id": 1027, - "scene": "WorldMapScene", + "scene": "MainLineScene", "image": "ld_mh_bg_fc", "icon": "loading_icon_fc", "prompt": { @@ -271,7 +271,7 @@ }, { "id": 1028, - "scene": "WorldMapScene", + "scene": "MainLineScene", "image": "ld_mh_bg_fc", "icon": "loading_icon_fc", "prompt": { @@ -281,7 +281,7 @@ }, { "id": 1029, - "scene": "WorldMapScene", + "scene": "MainLineScene", "image": "ld_mh_bg_fc", "icon": "loading_icon_fc", "prompt": { @@ -291,7 +291,7 @@ }, { "id": 1030, - "scene": "WorldMapScene", + "scene": "MainLineScene", "image": "ld_mh_bg_fc", "icon": "loading_icon_fc", "prompt": { diff --git a/bin/json/game_mainstage.json b/bin/json/game_mainstage.json index b14faf726..f6b8e18d0 100644 --- a/bin/json/game_mainstage.json +++ b/bin/json/game_mainstage.json @@ -1987,8 +1987,8 @@ "text": "" }, "mainlineName": { - "key": "", - "text": "" + "key": "mainchapter_main_stage_mainlineName_20", + "text": "1-20" }, "title": { "key": "", @@ -2070,8 +2070,8 @@ "text": "" }, "mainlineName": { - "key": "", - "text": "" + "key": "mainchapter_main_stage_mainlineName_21", + "text": "1-21" }, "title": { "key": "", @@ -2157,8 +2157,8 @@ "text": "" }, "mainlineName": { - "key": "", - "text": "" + "key": "mainchapter_main_stage_mainlineName_22", + "text": "1-22" }, "title": { "key": "", @@ -2234,8 +2234,8 @@ "text": "" }, "mainlineName": { - "key": "", - "text": "" + "key": "mainchapter_main_stage_mainlineName_23", + "text": "1-23" }, "title": { "key": "", @@ -2353,8 +2353,8 @@ "text": "" }, "mainlineName": { - "key": "mainchapter_main_stage_mainlineName_20", - "text": "1-20" + "key": "mainchapter_main_stage_mainlineName_24", + "text": "1-24" }, "title": { "key": "", @@ -2432,8 +2432,8 @@ "text": "" }, "mainlineName": { - "key": "mainchapter_main_stage_mainlineName_21", - "text": "1-21" + "key": "mainchapter_main_stage_mainlineName_25", + "text": "1-25" }, "title": { "key": "", @@ -2507,8 +2507,8 @@ "text": "" }, "mainlineName": { - "key": "mainchapter_main_stage_mainlineName_22", - "text": "1-22" + "key": "mainchapter_main_stage_mainlineName_26", + "text": "1-26" }, "title": { "key": "", @@ -2582,8 +2582,8 @@ "text": "" }, "mainlineName": { - "key": "mainchapter_main_stage_mainlineName_23", - "text": "1-23" + "key": "mainchapter_main_stage_mainlineName_27", + "text": "1-27" }, "title": { "key": "mainchapter_main_stage_title_23", @@ -2699,8 +2699,8 @@ "text": "" }, "mainlineName": { - "key": "mainchapter_main_stage_mainlineName_24", - "text": "1-24" + "key": "mainchapter_main_stage_mainlineName_28", + "text": "1-28" }, "title": { "key": "", @@ -2774,8 +2774,8 @@ "text": "" }, "mainlineName": { - "key": "mainchapter_main_stage_mainlineName_25", - "text": "1-25" + "key": "mainchapter_main_stage_mainlineName_29", + "text": "1-29" }, "title": { "key": "mainchapter_main_stage_title_25", @@ -2887,8 +2887,8 @@ "text": "" }, "mainlineName": { - "key": "mainchapter_main_stage_mainlineName_26", - "text": "1-26" + "key": "mainchapter_main_stage_mainlineName_30", + "text": "1-30" }, "title": { "key": "", @@ -2962,8 +2962,8 @@ "text": "" }, "mainlineName": { - "key": "mainchapter_main_stage_mainlineName_27", - "text": "1-27" + "key": "mainchapter_main_stage_mainlineName_31", + "text": "1-31" }, "title": { "key": "", @@ -3037,8 +3037,8 @@ "text": "" }, "mainlineName": { - "key": "mainchapter_main_stage_mainlineName_28", - "text": "1-28" + "key": "mainchapter_main_stage_mainlineName_32", + "text": "1-32" }, "title": { "key": "mainchapter_main_stage_title_28", @@ -3122,7 +3122,7 @@ "venturemodelspeed": 0, "venturemodelscale": 0, "move_type": 0, - "venturemodel": "Person/mount/35003_q.prefab", + "venturemodel": "Person/35003/35003_q.prefab", "bubbletalk": { "key": "", "text": "" @@ -3152,8 +3152,8 @@ "text": "" }, "mainlineName": { - "key": "mainchapter_main_stage_mainlineName_29", - "text": "1-29" + "key": "mainchapter_main_stage_mainlineName_33", + "text": "1-33" }, "title": { "key": "", @@ -3227,8 +3227,8 @@ "text": "" }, "mainlineName": { - "key": "", - "text": "" + "key": "mainchapter_main_stage_mainlineName_34", + "text": "1-34" }, "title": { "key": "", @@ -3306,8 +3306,8 @@ "text": "" }, "mainlineName": { - "key": "", - "text": "" + "key": "mainchapter_main_stage_mainlineName_35", + "text": "1-35" }, "title": { "key": "", @@ -3374,15 +3374,15 @@ "destroy": 1, "progress": 1, "stroyshow": 0, - "frontstoryid": 200391, + "frontstoryid": 200390, "afterstoryid": 0, "maingroupName": { "key": "", "text": "" }, "mainlineName": { - "key": "mainchapter_main_stage_mainlineName_30", - "text": "1-30" + "key": "mainchapter_main_stage_mainlineName_36", + "text": "1-36" }, "title": { "key": "", @@ -3449,15 +3449,15 @@ "destroy": 1, "progress": 1, "stroyshow": 0, - "frontstoryid": 0, + "frontstoryid": 200391, "afterstoryid": 0, "maingroupName": { "key": "", "text": "" }, "mainlineName": { - "key": "mainchapter_main_stage_mainlineName_31", - "text": "1-31" + "key": "mainchapter_main_stage_mainlineName_37", + "text": "1-37" }, "title": { "key": "", @@ -3522,7 +3522,7 @@ "animation": [], "hide": 0, "destroy": 1, - "progress": 1, + "progress": 0, "stroyshow": 0, "frontstoryid": 200400, "afterstoryid": 0, @@ -3531,8 +3531,8 @@ "text": "" }, "mainlineName": { - "key": "mainchapter_main_stage_mainlineName_32", - "text": "1-32" + "key": "mainchapter_main_stage_mainlineName_38", + "text": "1-38" }, "title": { "key": "", @@ -3604,8 +3604,8 @@ "text": "" }, "mainlineName": { - "key": "mainchapter_main_stage_mainlineName_33", - "text": "1-33" + "key": "mainchapter_main_stage_mainlineName_39", + "text": "1-39" }, "title": { "key": "", @@ -3717,8 +3717,8 @@ "text": "" }, "mainlineName": { - "key": "", - "text": "" + "key": "mainchapter_main_stage_mainlineName_40", + "text": "1-40" }, "title": { "key": "", @@ -5717,7 +5717,7 @@ "chapterid": 11001, "group_id": 100136, "previous_group_id": [ - 100130 + 100129 ], "previoustage": 0, "buried_type": 0, @@ -5797,7 +5797,7 @@ "chapterid": 11001, "group_id": 100137, "previous_group_id": [ - 100130 + 100129 ], "previoustage": 0, "buried_type": 0, @@ -5877,7 +5877,7 @@ "chapterid": 11001, "group_id": 100138, "previous_group_id": [ - 100130 + 100129 ], "previoustage": 0, "buried_type": 0, @@ -5957,7 +5957,7 @@ "chapterid": 11001, "group_id": 100139, "previous_group_id": [ - 100130 + 100129 ], "previoustage": 0, "buried_type": 0, @@ -6035,7 +6035,7 @@ "chapterid": 11001, "group_id": 100140, "previous_group_id": [ - 100130 + 100129 ], "previoustage": 0, "buried_type": 0, @@ -6113,7 +6113,7 @@ "chapterid": 11001, "group_id": 100141, "previous_group_id": [ - 100130 + 100129 ], "previoustage": 0, "buried_type": 0, @@ -6191,7 +6191,7 @@ "chapterid": 11001, "group_id": 100142, "previous_group_id": [ - 100118 + 100119 ], "previoustage": 0, "buried_type": 0, @@ -7870,7 +7870,7 @@ "chapterid": 11001, "group_id": 1001591, "previous_group_id": [ - 100118 + 100119 ], "previoustage": 0, "buried_type": 0, diff --git a/bin/json/game_monkeymain.json b/bin/json/game_monkeymain.json new file mode 100644 index 000000000..e5859e6c7 --- /dev/null +++ b/bin/json/game_monkeymain.json @@ -0,0 +1,104 @@ +[ + { + "id": 1001, + "chapter": 1, + "stagedepict": { + "key": "punchmonkey_stage_stagedepict_1", + "text": "第一关描述" + }, + "startype": [ + 1, + 1, + 2 + ], + "starcondition": [ + 60, + 90 + ] + }, + { + "id": 1002, + "chapter": 1, + "stagedepict": { + "key": "punchmonkey_stage_stagedepict_2", + "text": "第一关描述" + }, + "startype": [ + 1, + 1, + 2 + ], + "starcondition": [ + 60, + 90 + ] + }, + { + "id": 1003, + "chapter": 1, + "stagedepict": { + "key": "punchmonkey_stage_stagedepict_3", + "text": "第一关描述" + }, + "startype": [ + 1, + 1, + 2 + ], + "starcondition": [ + 60, + 90 + ] + }, + { + "id": 1004, + "chapter": 1, + "stagedepict": { + "key": "punchmonkey_stage_stagedepict_4", + "text": "第一关描述" + }, + "startype": [ + 1, + 1, + 2 + ], + "starcondition": [ + 60, + 90 + ] + }, + { + "id": 1005, + "chapter": 1, + "stagedepict": { + "key": "punchmonkey_stage_stagedepict_5", + "text": "第一关描述" + }, + "startype": [ + 1, + 1, + 2 + ], + "starcondition": [ + 60, + 90 + ] + }, + { + "id": 2001, + "chapter": 2, + "stagedepict": { + "key": "punchmonkey_stage_stagedepict_6", + "text": "第一关描述" + }, + "startype": [ + 1, + 1, + 2 + ], + "starcondition": [ + 60, + 90 + ] + } +] \ No newline at end of file diff --git a/bin/json/game_monkeyreward.json b/bin/json/game_monkeyreward.json new file mode 100644 index 000000000..dc23a082c --- /dev/null +++ b/bin/json/game_monkeyreward.json @@ -0,0 +1,80 @@ +[ + { + "key": 1001, + "chapter": 1, + "type": 1, + "starnum": 3, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 1 + } + ] + }, + { + "key": 1002, + "chapter": 1, + "type": 1, + "starnum": 6, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 2 + } + ] + }, + { + "key": 1003, + "chapter": 1, + "type": 1, + "starnum": 9, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 3 + } + ] + }, + { + "key": 2001, + "chapter": 2, + "type": 1, + "starnum": 3, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 1 + } + ] + }, + { + "key": 2002, + "chapter": 2, + "type": 1, + "starnum": 6, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 2 + } + ] + }, + { + "key": 2003, + "chapter": 2, + "type": 1, + "starnum": 9, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 3 + } + ] + } +] \ No newline at end of file diff --git a/bin/json/game_monsterformat.json b/bin/json/game_monsterformat.json index 5281f0277..1e1564c03 100644 --- a/bin/json/game_monsterformat.json +++ b/bin/json/game_monsterformat.json @@ -233607,7 +233607,7 @@ "captainId": 0, "IsBoss": 0, "bossHpCnt": 0, - "heroid": -1, + "heroid": 51052, "star": 3, "equip": [], "newskill": [], @@ -233667,7 +233667,7 @@ "captainId": 1, "IsBoss": 0, "bossHpCnt": 0, - "heroid": -1, + "heroid": 51052, "star": 3, "equip": [], "newskill": [], @@ -233687,7 +233687,7 @@ "captainId": 0, "IsBoss": 0, "bossHpCnt": 0, - "heroid": -1, + "heroid": 51052, "star": 3, "equip": [], "newskill": [], @@ -233712,7 +233712,7 @@ "equip": [], "newskill": [], "lv": 1, - "hppro": 1.2, + "hppro": 0.6, "atkpro": 0.5, "defpro": 0.1, "skill1": 1, @@ -233732,7 +233732,7 @@ "equip": [], "newskill": [], "lv": 1, - "hppro": 0.8, + "hppro": 0.6, "atkpro": 0.5, "defpro": 0.1, "skill1": 1, @@ -233752,7 +233752,7 @@ "equip": [], "newskill": [], "lv": 1, - "hppro": 0.8, + "hppro": 0.6, "atkpro": 0.5, "defpro": 0.1, "skill1": 1, @@ -233772,7 +233772,7 @@ "equip": [], "newskill": [], "lv": 1, - "hppro": 0.8, + "hppro": 0.6, "atkpro": 0.5, "defpro": 0.1, "skill1": 1, @@ -233792,7 +233792,7 @@ "equip": [], "newskill": [], "lv": 1, - "hppro": 0.8, + "hppro": 0.6, "atkpro": 0.5, "defpro": 0.1, "skill1": 1, @@ -239247,14 +239247,14 @@ "captainId": 0, "IsBoss": 0, "bossHpCnt": 0, - "heroid": 51004, + "heroid": 25001, "star": 3, "equip": [], "newskill": [], - "lv": 5, - "hppro": 0.3, - "atkpro": 0.5, - "defpro": 0.2, + "lv": 1, + "hppro": 1.5, + "atkpro": 1, + "defpro": 1, "skill1": 1, "skill2": 1, "skill3": 1, @@ -239267,14 +239267,14 @@ "captainId": 0, "IsBoss": 0, "bossHpCnt": 0, - "heroid": 51004, + "heroid": -1, "star": 3, "equip": [], "newskill": [], - "lv": 5, - "hppro": 0.4, - "atkpro": 0.5, - "defpro": 0.2, + "lv": 1, + "hppro": 1, + "atkpro": 1, + "defpro": 1, "skill1": 1, "skill2": 1, "skill3": 1, @@ -239291,9 +239291,9 @@ "star": 3, "equip": [], "newskill": [], - "lv": 5, - "hppro": 0.6, - "atkpro": 0.5, + "lv": 1, + "hppro": 1, + "atkpro": 1, "defpro": 1, "skill1": 1, "skill2": 1, @@ -239304,17 +239304,17 @@ { "Id": 720013, "pos": 4, - "captainId": 1, + "captainId": 0, "IsBoss": 0, "bossHpCnt": 0, - "heroid": 51005, - "star": 4, + "heroid": -1, + "star": 3, "equip": [], "newskill": [], - "lv": 5, - "hppro": 0.3, - "atkpro": 0.5, - "defpro": 0.2, + "lv": 1, + "hppro": 1, + "atkpro": 1, + "defpro": 1, "skill1": 1, "skill2": 1, "skill3": 1, @@ -239331,9 +239331,9 @@ "star": 3, "equip": [], "newskill": [], - "lv": 5, - "hppro": 0.3, - "atkpro": 0.5, + "lv": 1, + "hppro": 1, + "atkpro": 1, "defpro": 1, "skill1": 1, "skill2": 1, @@ -239367,7 +239367,7 @@ "captainId": 0, "IsBoss": 0, "bossHpCnt": 0, - "heroid": -1, + "heroid": 44006, "star": 3, "equip": [], "newskill": [], @@ -239387,7 +239387,7 @@ "captainId": 0, "IsBoss": 0, "bossHpCnt": 0, - "heroid": -1, + "heroid": 14005, "star": 3, "equip": [], "newskill": [], @@ -239407,7 +239407,7 @@ "captainId": 0, "IsBoss": 0, "bossHpCnt": 0, - "heroid": -1, + "heroid": 24005, "star": 3, "equip": [], "newskill": [], @@ -239710,7 +239710,7 @@ "IsBoss": 0, "bossHpCnt": 0, "heroid": 53001, - "star": 4, + "star": 3, "equip": [], "newskill": [], "lv": 5, diff --git a/bin/json/game_rdtasknpc.json b/bin/json/game_rdtasknpc.json index 839db8687..a34bcded1 100644 --- a/bin/json/game_rdtasknpc.json +++ b/bin/json/game_rdtasknpc.json @@ -475,7 +475,7 @@ ], "event": [ 2, - 10042 + 10031 ], "goto": 0 }, @@ -620,7 +620,7 @@ "Levelid": 0, "datas": [ "GameMain", - "功能入口-烹饪", + "功能入口-烹饪_剧情专用", "901" ], "event": [ @@ -635,7 +635,7 @@ "Levelid": 0, "datas": [ "GameMain", - "功能入口-烹饪", + "功能入口-烹饪_剧情专用", "901" ], "event": [ @@ -650,7 +650,7 @@ "Levelid": 0, "datas": [ "GameMain", - "功能入口-烹饪", + "20033_邦尼兔", "901" ], "event": [ diff --git a/bin/json/game_skillafteratk.json b/bin/json/game_skillafteratk.json index 9e87e2bce..87d9962bc 100644 --- a/bin/json/game_skillafteratk.json +++ b/bin/json/game_skillafteratk.json @@ -3895,7 +3895,7 @@ 800, 1, 5, - 4000 + 1000 ], "FollowSK": [], "SucFollowSK": [], @@ -3921,7 +3921,7 @@ 800, 1, 5, - 4100 + 1100 ], "FollowSK": [], "SucFollowSK": [], @@ -3947,7 +3947,7 @@ 800, 1, 5, - 4200 + 1200 ], "FollowSK": [], "SucFollowSK": [], @@ -3973,7 +3973,7 @@ 800, 1, 5, - 4300 + 1400 ], "FollowSK": [], "SucFollowSK": [], diff --git a/bin/json/game_tdbuff.json b/bin/json/game_tdbuff.json index 3150930d5..f223a36e3 100644 --- a/bin/json/game_tdbuff.json +++ b/bin/json/game_tdbuff.json @@ -1,67 +1,75 @@ [ { "id": 2007, - "buff_type": 2005, - "trigger_pro": 0, + "trigger_pro": 1000, "describe": { - "key": "td_t_skill_describe_name2007", + "key": "td_td_buff_describe_1", "text": "超载:每次攻击获得一层超载。 每层攻击速度-25% 超载伤害+30% 达到三层持续10秒,之后重置。弓箭超载特殊效果:超载达到3层的弓箭能无视铁甲" }, - "overlay_type": 0, + "overlay_type": 2, "effectType": [ - 22, + 4, 2 ], "value": [ -250, 300 ], - "target_buffId": 0, "effect_Range": 0, - "max_layer": 1, - "layer_effectType": [], - "layer_value": [], - "duration": 0, + "max_layer": 3, + "layer_effectType": [ + 8 + ], + "layer_value": [ + 1 + ], + "duration": 10000, "duration_layer": 10000, "interval": 0 }, { "id": 2008, - "buff_type": 2006, - "trigger_pro": 0, + "trigger_pro": 250, "describe": { - "key": "td_t_skill_describe_name2008", - "text": "流血:有25%概率给敌方追加一层流血 每秒60%伤害 最多四层。流血特殊效果:每层流血会降低敌方治疗效果10%" + "key": "td_td_buff_describe_2", + "text": "流血:有25%概率给敌方追加一层流血 每秒40%伤害 最多四层。流血特殊效果:每层流血会降低敌方治疗效果10%" }, - "overlay_type": 0, - "effectType": [], - "value": [], - "target_buffId": 0, + "overlay_type": 3, + "effectType": [ + 80 + ], + "value": [ + 400 + ], "effect_Range": 0, - "max_layer": 0, + "max_layer": 4, "layer_effectType": [], "layer_value": [], - "duration": 0, + "duration": 5000, "duration_layer": 0, - "interval": 0 + "interval": 1000 }, { "id": 2009, - "buff_type": 2007, - "trigger_pro": 0, + "trigger_pro": 500, "describe": { - "key": "td_t_skill_describe_name2009", + "key": "td_td_buff_describe_3", "text": "狂暴:每次攻击50概率获得1层狂暴 每层伤害加5% 攻速加5% 爆炸范围+3% 最多10层 持续10秒 之后重置" }, - "overlay_type": 0, - "effectType": [], - "value": [], - "target_buffId": 0, + "overlay_type": 3, + "effectType": [ + 60 + ], + "value": [ + 50, + 50, + 30 + ], "effect_Range": 0, - "max_layer": 0, + "max_layer": 10, "layer_effectType": [], "layer_value": [], - "duration": 0, + "duration": 10000, "duration_layer": 0, "interval": 0 } diff --git a/bin/json/game_tdmonster.json b/bin/json/game_tdmonster.json index 1e708efe1..dfe83624c 100644 --- a/bin/json/game_tdmonster.json +++ b/bin/json/game_tdmonster.json @@ -11,7 +11,7 @@ "multiple": 1, "width": 2, "height": 3, - "hp": 20, + "hp": 30, "dis": 2, "atk": 1, "atk_speed": 2000, @@ -22,7 +22,7 @@ "npc_id": 1021, "name": { "key": "td_npc_name_1021", - "text": "豚鼠灵冲车" + "text": "豚鼠灵肉盾" }, "monster_skillid": 0, "monster_type": 0, @@ -30,7 +30,7 @@ "multiple": 1, "width": 2, "height": 3, - "hp": 30, + "hp": 50, "dis": 3, "atk": 3, "atk_speed": 5000, diff --git a/bin/json/game_tdweapon.json b/bin/json/game_tdweapon.json index 9ac3ee353..4a64e1322 100644 --- a/bin/json/game_tdweapon.json +++ b/bin/json/game_tdweapon.json @@ -11,7 +11,7 @@ "text": "向前方发射冲击能量打击敌人" }, "sak": 20, - "atk_speed": 200, + "atk_speed": 100, "weapon_type": 1, "bulletPrefab": "gongjian", "fly_speed": 10, @@ -20,8 +20,6 @@ "num": 0, "explosion_Range": 0, "catapult": 0, - "self_buff": [], - "target_buff": [], "pro": 1000, "explosion_effect": "" }, @@ -37,7 +35,7 @@ "text": "向前方射出一枚爆炎弹,碰到第一个敌人后会立刻爆炸造成范围伤害" }, "sak": 50, - "atk_speed": 400, + "atk_speed": 500, "weapon_type": 2, "bulletPrefab": "gongjian", "fly_speed": 8, @@ -46,8 +44,6 @@ "num": 0, "explosion_Range": 3, "catapult": 0, - "self_buff": [], - "target_buff": [], "pro": 1000, "explosion_effect": "effect_ui_baozha" }, @@ -62,7 +58,7 @@ "key": "td_t_weapon_describe3", "text": "射出后可以穿透敌人的弹力球,会在敌人之间相互碰撞" }, - "sak": 15, + "sak": 30, "atk_speed": 300, "weapon_type": 3, "bulletPrefab": "gongjian", @@ -72,8 +68,6 @@ "num": 0, "explosion_Range": 0, "catapult": 1, - "self_buff": [], - "target_buff": [], "pro": 1000, "explosion_effect": "" } diff --git a/bin/json/game_tdweaponrandom.json b/bin/json/game_tdweaponrandom.json index 515d82e38..9161d3346 100644 --- a/bin/json/game_tdweaponrandom.json +++ b/bin/json/game_tdweaponrandom.json @@ -2,79 +2,66 @@ { "id": 1, "weapon_id": 1, - "skill_id": 1001, - "subSkill_id": [] + "skill_id": 1001 }, { "id": 2, "weapon_id": 1, - "skill_id": 1002, - "subSkill_id": [] + "skill_id": 1002 }, { "id": 3, "weapon_id": 1, - "skill_id": 1003, - "subSkill_id": [] + "skill_id": 1003 }, { "id": 4, "weapon_id": 1, - "skill_id": 1004, - "subSkill_id": [] + "skill_id": 1004 }, { "id": 5, "weapon_id": 1, - "skill_id": 1005, - "subSkill_id": [] + "skill_id": 1005 }, { "id": 6, "weapon_id": 2, - "skill_id": 2001, - "subSkill_id": [] + "skill_id": 2001 }, { "id": 7, "weapon_id": 2, - "skill_id": 2002, - "subSkill_id": [] + "skill_id": 2002 }, { "id": 8, "weapon_id": 2, - "skill_id": 2003, - "subSkill_id": [] + "skill_id": 2003 }, { "id": 9, "weapon_id": 2, - "skill_id": 2004, - "subSkill_id": [] + "skill_id": 2004 }, { "id": 10, "weapon_id": 2, - "skill_id": 2005, - "subSkill_id": [] + "skill_id": 2005 }, { "id": 11, "weapon_id": 3, - "skill_id": 3001, - "subSkill_id": [] + "skill_id": 3001 }, { "id": 12, "weapon_id": 3, - "skill_id": 3002, - "subSkill_id": [] + "skill_id": 3002 }, { "id": 13, "weapon_id": 3, - "skill_id": 3003, - "subSkill_id": [] + "skill_id": 3003 } ] \ No newline at end of file diff --git a/bin/json/game_tdweaponskill.json b/bin/json/game_tdweaponskill.json index 906ed4654..481e46249 100644 --- a/bin/json/game_tdweaponskill.json +++ b/bin/json/game_tdweaponskill.json @@ -1,14 +1,15 @@ [ { "skill_id": 1001, + "subSkill_id": 0, "skill_triggerType": 0, "icon": "", "name": { - "key": "td_t_skill_describe_name1001", + "key": "td_weapon_skill_data_name_1", "text": "技能1" }, "describe": { - "key": "td_t_skill_describe_des1001", + "key": "td_weapon_skill_data_describe_1", "text": "分裂+1" }, "skilltype": [ @@ -25,14 +26,15 @@ }, { "skill_id": 1002, + "subSkill_id": 0, "skill_triggerType": 0, "icon": "", "name": { - "key": "td_t_skill_describe_name1002", + "key": "td_weapon_skill_data_name_2", "text": "技能2" }, "describe": { - "key": "td_t_skill_describe_des1002", + "key": "td_weapon_skill_data_describe_2", "text": "击中目标后,对目标造成5%减速" }, "skilltype": [], @@ -47,14 +49,15 @@ }, { "skill_id": 1003, + "subSkill_id": 0, "skill_triggerType": 0, "icon": "", "name": { - "key": "td_t_skill_describe_name1003", + "key": "td_weapon_skill_data_name_3", "text": "技能3" }, "describe": { - "key": "td_t_skill_describe_des1003", + "key": "td_weapon_skill_data_describe_3", "text": "伤害+10%" }, "skilltype": [ @@ -71,14 +74,15 @@ }, { "skill_id": 1004, + "subSkill_id": 0, "skill_triggerType": 0, "icon": "", "name": { - "key": "td_t_skill_describe_name1004", + "key": "td_weapon_skill_data_name_4", "text": "技能4" }, "describe": { - "key": "td_t_skill_describe_des1004", + "key": "td_weapon_skill_data_describe_4", "text": "射击频率+10%" }, "skilltype": [ @@ -95,14 +99,15 @@ }, { "skill_id": 1005, + "subSkill_id": 0, "skill_triggerType": 0, "icon": "", "name": { - "key": "td_t_skill_describe_name1005", + "key": "td_weapon_skill_data_name_5", "text": "技能5" }, "describe": { - "key": "td_t_skill_describe_des1005", + "key": "td_weapon_skill_data_describe_5", "text": "飞行速度+10%" }, "skilltype": [ @@ -118,15 +123,135 @@ "pro": 1000 }, { - "skill_id": 2001, + "skill_id": 1006, + "subSkill_id": 0, "skill_triggerType": 0, "icon": "", "name": { - "key": "td_t_skill_describe_name2001", + "key": "td_weapon_skill_data_name_6", "text": "技能6" }, "describe": { - "key": "td_t_skill_describe_des2001", + "key": "td_weapon_skill_data_describe_6", + "text": "超载:每次攻击获得一层超载。 每层攻击速度-25% 超载伤害+30% 达到三层持续10秒,之后重置。弓箭超载特殊效果:超载达到3层的弓箭能无视铁甲" + }, + "skilltype": [], + "value": [], + "target_buffId": 2007, + "self_buff": [], + "target_buff": [], + "maxlv": 5, + "pro": 1000 + }, + { + "skill_id": 1007, + "subSkill_id": 1006, + "skill_triggerType": 0, + "icon": "", + "name": { + "key": "td_weapon_skill_data_name_7", + "text": "技能7" + }, + "describe": { + "key": "td_weapon_skill_data_describe_7", + "text": "每层超载效果增加:-30%攻速,伤害增加60%" + }, + "skilltype": [ + 4, + 2 + ], + "value": [ + -350, + 600 + ], + "target_buffId": 0, + "self_buff": [], + "target_buff": [], + "maxlv": 1, + "pro": 500 + }, + { + "skill_id": 1008, + "subSkill_id": 1006, + "skill_triggerType": 0, + "icon": "", + "name": { + "key": "td_weapon_skill_data_name_8", + "text": "技能8" + }, + "describe": { + "key": "td_weapon_skill_data_describe_8", + "text": "增加超载最大层数,并提升超载持续时间" + }, + "skilltype": [], + "value": [], + "target_buffId": 0, + "self_buff": [], + "target_buff": [], + "maxlv": 1, + "pro": 100 + }, + { + "skill_id": 2006, + "subSkill_id": 0, + "skill_triggerType": 0, + "icon": "", + "name": { + "key": "td_weapon_skill_data_name_9", + "text": "技能9" + }, + "describe": { + "key": "td_weapon_skill_data_describe_9", + "text": "流血重伤buff" + }, + "skilltype": [ + 81 + ], + "value": [ + 1 + ], + "target_buffId": 0, + "self_buff": [], + "target_buff": [ + 2008 + ], + "maxlv": 0, + "pro": 1000 + }, + { + "skill_id": 3006, + "subSkill_id": 0, + "skill_triggerType": 0, + "icon": "", + "name": { + "key": "td_weapon_skill_data_name_10", + "text": "技能10" + }, + "describe": { + "key": "td_weapon_skill_data_describe_10", + "text": "狂暴buff" + }, + "skilltype": [], + "value": [], + "target_buffId": 0, + "self_buff": [ + 2009 + ], + "target_buff": [], + "maxlv": 1, + "pro": 100 + }, + { + "skill_id": 2001, + "subSkill_id": 0, + "skill_triggerType": 0, + "icon": "", + "name": { + "key": "td_weapon_skill_data_name_11", + "text": "技能11" + }, + "describe": { + "key": "td_weapon_skill_data_describe_11", "text": "所有武器伤害攻击力+5%" }, "skilltype": [ @@ -143,14 +268,15 @@ }, { "skill_id": 2002, + "subSkill_id": 0, "skill_triggerType": 0, "icon": "", "name": { - "key": "td_t_skill_describe_name2002", - "text": "技能7" + "key": "td_weapon_skill_data_name_12", + "text": "技能12" }, "describe": { - "key": "td_t_skill_describe_des2002", + "key": "td_weapon_skill_data_describe_12", "text": "所有武器射击频率+5%" }, "skilltype": [ @@ -167,14 +293,15 @@ }, { "skill_id": 2003, + "subSkill_id": 0, "skill_triggerType": 0, "icon": "", "name": { - "key": "td_t_skill_describe_name2003", - "text": "技能8" + "key": "td_weapon_skill_data_name_13", + "text": "技能13" }, "describe": { - "key": "td_t_skill_describe_des2003", + "key": "td_weapon_skill_data_describe_13", "text": "城墙生命值上限+5,并额外恢复5点生命值" }, "skilltype": [ @@ -193,14 +320,15 @@ }, { "skill_id": 2004, + "subSkill_id": 0, "skill_triggerType": 0, "icon": "", "name": { - "key": "td_t_skill_describe_name2004", - "text": "技能9" + "key": "td_weapon_skill_data_name_14", + "text": "技能14" }, "describe": { - "key": "td_t_skill_describe_des2004", + "key": "td_weapon_skill_data_describe_14", "text": "城墙生命值上限+10" }, "skilltype": [ @@ -217,14 +345,15 @@ }, { "skill_id": 2005, + "subSkill_id": 0, "skill_triggerType": 0, "icon": "", "name": { - "key": "td_t_skill_describe_name2005", - "text": "技能10" + "key": "td_weapon_skill_data_name_15", + "text": "技能15" }, "describe": { - "key": "td_t_skill_describe_des2005", + "key": "td_weapon_skill_data_describe_15", "text": "城墙恢复10点生命值" }, "skilltype": [ @@ -241,14 +370,15 @@ }, { "skill_id": 3001, + "subSkill_id": 0, "skill_triggerType": 0, "icon": "", "name": { - "key": "td_t_skill_describe_name3001", - "text": "技能11" + "key": "td_weapon_skill_data_name_16", + "text": "技能16" }, "describe": { - "key": "td_t_skill_describe_des3001", + "key": "td_weapon_skill_data_describe_16", "text": "{0}能够额外穿透1个怪物" }, "skilltype": [ @@ -265,14 +395,15 @@ }, { "skill_id": 3002, + "subSkill_id": 0, "skill_triggerType": 0, "icon": "", "name": { - "key": "td_t_skill_describe_name3002", - "text": "技能12" + "key": "td_weapon_skill_data_name_17", + "text": "技能17" }, "describe": { - "key": "td_t_skill_describe_des3002", + "key": "td_weapon_skill_data_describe_17", "text": "{0}爆炸范围+10%" }, "skilltype": [ @@ -289,22 +420,19 @@ }, { "skill_id": 3003, + "subSkill_id": 0, "skill_triggerType": 0, "icon": "", "name": { - "key": "td_t_skill_describe_name3003", - "text": "技能13" + "key": "td_weapon_skill_data_name_18", + "text": "技能18" }, "describe": { - "key": "td_t_skill_describe_des3003", + "key": "td_weapon_skill_data_describe_18", "text": "{0}弹射次数+1" }, - "skilltype": [ - 6 - ], - "value": [ - 1 - ], + "skilltype": [], + "value": [], "target_buffId": 0, "self_buff": [], "target_buff": [], @@ -313,14 +441,15 @@ }, { "skill_id": 4001, + "subSkill_id": 0, "skill_triggerType": 0, "icon": "", "name": { - "key": "td_t_skill_describe_name4001", - "text": "技能14" + "key": "td_weapon_skill_data_name_19", + "text": "技能19" }, "describe": { - "key": "td_t_skill_describe_des4001", + "key": "td_weapon_skill_data_describe_19", "text": "所有武器伤害攻击力+5%" }, "skilltype": [ @@ -337,14 +466,15 @@ }, { "skill_id": 4002, + "subSkill_id": 0, "skill_triggerType": 0, "icon": "", "name": { - "key": "td_t_skill_describe_name4002", - "text": "技能15" + "key": "td_weapon_skill_data_name_20", + "text": "技能20" }, "describe": { - "key": "td_t_skill_describe_des4002", + "key": "td_weapon_skill_data_describe_20", "text": "所有武器射击频率+5%" }, "skilltype": [ @@ -361,14 +491,15 @@ }, { "skill_id": 4003, + "subSkill_id": 0, "skill_triggerType": 0, "icon": "", "name": { - "key": "td_t_skill_describe_name4003", - "text": "技能16" + "key": "td_weapon_skill_data_name_21", + "text": "技能21" }, "describe": { - "key": "td_t_skill_describe_des4003", + "key": "td_weapon_skill_data_describe_21", "text": "所有弹道飞行速度+5%" }, "skilltype": [ @@ -380,19 +511,20 @@ "target_buffId": 0, "self_buff": [], "target_buff": [], - "maxlv": 0, + "maxlv": 5, "pro": 1000 }, { "skill_id": 4004, + "subSkill_id": 0, "skill_triggerType": 0, "icon": "", "name": { - "key": "td_t_skill_describe_name4004", - "text": "技能17" + "key": "td_weapon_skill_data_name_22", + "text": "技能22" }, "describe": { - "key": "td_t_skill_describe_des4004", + "key": "td_weapon_skill_data_describe_22", "text": "城墙生命值上限+5,并额外恢复5点生命值" }, "skilltype": [ @@ -411,14 +543,15 @@ }, { "skill_id": 4005, + "subSkill_id": 0, "skill_triggerType": 0, "icon": "", "name": { - "key": "td_t_skill_describe_name4005", - "text": "技能18" + "key": "td_weapon_skill_data_name_23", + "text": "技能23" }, "describe": { - "key": "td_t_skill_describe_des4005", + "key": "td_weapon_skill_data_describe_23", "text": "城墙生命值上限+10" }, "skilltype": [ @@ -435,14 +568,15 @@ }, { "skill_id": 4006, + "subSkill_id": 0, "skill_triggerType": 0, "icon": "", "name": { - "key": "td_t_skill_describe_name4006", - "text": "技能19" + "key": "td_weapon_skill_data_name_24", + "text": "技能24" }, "describe": { - "key": "td_t_skill_describe_des4006", + "key": "td_weapon_skill_data_describe_24", "text": "城墙恢复10点生命值" }, "skilltype": [ diff --git a/bin/json/game_worldbattle.json b/bin/json/game_worldbattle.json index c8bd17ce1..75c92c246 100644 --- a/bin/json/game_worldbattle.json +++ b/bin/json/game_worldbattle.json @@ -4,7 +4,7 @@ "FormatList": [ 700011 ], - "BattleReadyID": 201, + "BattleReadyID": 10300001, "EventList": [], "playexp": { "a": "attr", @@ -36,7 +36,7 @@ "FormatList": [ 700012 ], - "BattleReadyID": 202, + "BattleReadyID": 10300002, "EventList": [], "playexp": { "a": "attr", diff --git a/bin/json/game_worldtask.json b/bin/json/game_worldtask.json index 1fecedefd..552a6c05e 100644 --- a/bin/json/game_worldtask.json +++ b/bin/json/game_worldtask.json @@ -156,7 +156,7 @@ "completetask": [ 12070030 ], - "deliver_npc": 100109, + "deliver_npc": 0, "taskend_removeitem": [], "auto_accept": 1, "tasktips": 0, diff --git a/modules/monkey/api_award.go b/modules/monkey/api_award.go index 7d0853d77..36ef8d9b1 100644 --- a/modules/monkey/api_award.go +++ b/modules/monkey/api_award.go @@ -3,6 +3,7 @@ package monkey import ( "go_dreamfactory/comm" "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" ) func (this *apiComp) AwardCheck(session comm.IUserSession, req *pb.MonkeyAwardReq) (errdata *pb.ErrorData) { @@ -13,6 +14,9 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.MonkeyAwardReq) (e var ( err error info *pb.DBMonkey + conf []*cfg.GameMonkeyRewardData + res []*cfg.Gameatn + atno []*pb.UserAtno ) if errdata = this.AwardCheck(session, req); errdata != nil { return @@ -21,14 +25,45 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.MonkeyAwardReq) (e if info, err = this.module.model.getMonkeyData(session.GetUserId()); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), Message: err.Error(), } return } + if info.Reward[req.ChapterId] >= req.Starnum { // 重复领取 + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_UserRepeadReward, + Title: pb.ErrorCode_UserRepeadReward.ToString(), + } + return + } + + if conf, err = this.module.configure.getGameMonkeyRewardData(req.ChapterId); err != nil { + for _, v := range conf { + if v.Starnum > info.Reward[req.ChapterId] && v.Starnum <= req.Starnum { + res = append(res, v.Reward...) + } + } + } + if len(res) > 0 { + if errdata, atno = this.module.DispenseAtno(session, res, true); errdata != nil { + return + } + if err = this.module.model.changeMonkeyData(session.GetUserId(), map[string]interface{}{ // 更新 + "reward": info.Reward, + }); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + } session.SendMsg(string(this.module.GetType()), "award", &pb.MonkeyAwardResp{ Data: info, - Award: []*pb.UserAtno{}, + Award: atno, }) return diff --git a/modules/monkey/api_getlist.go b/modules/monkey/api_getlist.go index 0445f8c54..2038d5bc9 100644 --- a/modules/monkey/api_getlist.go +++ b/modules/monkey/api_getlist.go @@ -27,7 +27,7 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.MonkeyGetListReq return } - session.SendMsg(string(this.module.GetType()), "award", &pb.MonkeyGetListResp{ + session.SendMsg(string(this.module.GetType()), "getlist", &pb.MonkeyGetListResp{ Data: info, }) diff --git a/modules/monkey/api_updatestar.go b/modules/monkey/api_updatestar.go new file mode 100644 index 000000000..f188c0b6d --- /dev/null +++ b/modules/monkey/api_updatestar.go @@ -0,0 +1,75 @@ +package monkey + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" +) + +func (this *apiComp) UpdateStarCheck(session comm.IUserSession, req *pb.MonkeyUpdateStarReq) (errdata *pb.ErrorData) { + if req.Stage == 0 { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + } + return + } + return +} + +// 获取猴拳章节信息 +func (this *apiComp) UpdateStar(session comm.IUserSession, req *pb.MonkeyUpdateStarReq) (errdata *pb.ErrorData) { + var ( + err error + info *pb.DBMonkey + conf *cfg.GameMonkeyMainData + update map[string]interface{} + ) + update = make(map[string]interface{}, 0) + if errdata = this.UpdateStarCheck(session, req); errdata != nil { + return + } + + if conf, err = this.module.configure.getGameMonkeyData(req.Stage); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), + } + return + } + if info, err = this.module.model.getMonkeyData(session.GetUserId()); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + if info.Data[conf.Chapter].Award == nil { + info.Data[conf.Chapter].Award = map[int32]int32{ + req.Stage: req.Star, + } + update["data"] = info.Data + } else { + if info.Data[conf.Chapter].Award[req.Stage] < req.Star { + info.Data[conf.Chapter].Award[req.Stage] = req.Star + update["data"] = info.Data + } + } + if len(update) > 0 { + if err = this.module.model.changeMonkeyData(session.GetUserId(), update); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + } + session.SendMsg(string(this.module.GetType()), "updatestar", &pb.MonkeyUpdateStarResp{ + Data: info, + }) + + return +} diff --git a/modules/monkey/configure.go b/modules/monkey/configure.go index cded30cb4..a7095b259 100644 --- a/modules/monkey/configure.go +++ b/modules/monkey/configure.go @@ -1,41 +1,74 @@ package monkey 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_repeatall = "game_repeatall.json" + monkey_main = "game_monkeymain.json" + monkey_reward = "game_monkeyreward.json" ) type configureComp struct { modules.MCompConfigure module *Monkey + hlock sync.RWMutex + reward map[int32][]*cfg.GameMonkeyRewardData } 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.LoadConfigure(game_repeatall, cfg.NewGameRepeatAll) + err = this.LoadConfigure(monkey_main, cfg.NewGameMonkeyMain) + + configure.RegisterConfigure(monkey_reward, cfg.NewGameGameFast, func() { + if v, err := this.GetConfigure(monkey_reward); err == nil { + this.hlock.Lock() + defer this.hlock.Unlock() + this.reward = make(map[int32][]*cfg.GameMonkeyRewardData) + if _configure, ok := v.(*cfg.GameMonkeyReward); ok { + for _, v := range _configure.GetDataList() { + this.reward[v.Chapter] = append(this.reward[v.Chapter], v) + } + return + } + } else { + err = fmt.Errorf("%T no is *cfg.GameMonkeyReward", v) + } + }) return } -// 读取装备出售系数配置 -func (this *configureComp) getGameRepeatAllData(id int32) (result *cfg.GameRepeatAllData, err error) { +// 通过章节id 获取信息 +func (this *configureComp) getGameMonkeyData(id int32) (result *cfg.GameMonkeyMainData, err error) { var ( v interface{} ok bool ) - if v, err = this.GetConfigure(game_repeatall); err != nil { - this.module.Errorf("err:%v", err) - return - } else { - if result, ok = v.(*cfg.GameRepeatAll).GetDataMap()[id]; !ok { - err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_repeatall, id) + if v, err = this.GetConfigure(monkey_main); err == nil { + if result, ok = v.(*cfg.GameMonkeyMain).GetDataMap()[id]; ok { return } } + err = comm.NewNotFoundConfErr(string(this.module.GetType()), monkey_main, id) + return +} + +// 获取章节对应的奖励 +func (this *configureComp) getGameMonkeyRewardData(chapterid int32) (result []*cfg.GameMonkeyRewardData, err error) { + var ( + ok bool + ) + this.hlock.Lock() + result, ok = this.reward[chapterid] + this.hlock.Unlock() + if !ok { + err = comm.NewNotFoundConfErr(string(this.module.GetType()), monkey_reward, chapterid) + } return } diff --git a/modules/monkey/model.go b/modules/monkey/model.go index 471af19cb..c397c5181 100644 --- a/modules/monkey/model.go +++ b/modules/monkey/model.go @@ -44,3 +44,8 @@ func (this *modelComp) getMonkeyData(uid string) (info *pb.DBMonkey, err error) } return } + +func (this *modelComp) changeMonkeyData(uid string, update map[string]interface{}) (err error) { + err = this.Change(uid, update) + return +} diff --git a/pb/monkey_msg.pb.go b/pb/monkey_msg.pb.go index 5b35a3116..1b73b6f3f 100644 --- a/pb/monkey_msg.pb.go +++ b/pb/monkey_msg.pb.go @@ -217,16 +217,17 @@ func (x *MonkeyAwardResp) GetAward() []*UserAtno { } // 更新关卡星级 -type MonkeyUpdateSTarReq struct { +type MonkeyUpdateStarReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Stage int32 `protobuf:"varint,1,opt,name=stage,proto3" json:"stage"` // 关卡ID + Star int32 `protobuf:"varint,2,opt,name=star,proto3" json:"star"` // 星星数 } -func (x *MonkeyUpdateSTarReq) Reset() { - *x = MonkeyUpdateSTarReq{} +func (x *MonkeyUpdateStarReq) Reset() { + *x = MonkeyUpdateStarReq{} if protoimpl.UnsafeEnabled { mi := &file_monkey_monkey_msg_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -234,13 +235,13 @@ func (x *MonkeyUpdateSTarReq) Reset() { } } -func (x *MonkeyUpdateSTarReq) String() string { +func (x *MonkeyUpdateStarReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MonkeyUpdateSTarReq) ProtoMessage() {} +func (*MonkeyUpdateStarReq) ProtoMessage() {} -func (x *MonkeyUpdateSTarReq) ProtoReflect() protoreflect.Message { +func (x *MonkeyUpdateStarReq) ProtoReflect() protoreflect.Message { mi := &file_monkey_monkey_msg_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -252,19 +253,26 @@ func (x *MonkeyUpdateSTarReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use MonkeyUpdateSTarReq.ProtoReflect.Descriptor instead. -func (*MonkeyUpdateSTarReq) Descriptor() ([]byte, []int) { +// Deprecated: Use MonkeyUpdateStarReq.ProtoReflect.Descriptor instead. +func (*MonkeyUpdateStarReq) Descriptor() ([]byte, []int) { return file_monkey_monkey_msg_proto_rawDescGZIP(), []int{4} } -func (x *MonkeyUpdateSTarReq) GetStage() int32 { +func (x *MonkeyUpdateStarReq) GetStage() int32 { if x != nil { return x.Stage } return 0 } -type MonkeyUpdateSTarResp struct { +func (x *MonkeyUpdateStarReq) GetStar() int32 { + if x != nil { + return x.Star + } + return 0 +} + +type MonkeyUpdateStarResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -272,8 +280,8 @@ type MonkeyUpdateSTarResp struct { Data *DBMonkey `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` } -func (x *MonkeyUpdateSTarResp) Reset() { - *x = MonkeyUpdateSTarResp{} +func (x *MonkeyUpdateStarResp) Reset() { + *x = MonkeyUpdateStarResp{} if protoimpl.UnsafeEnabled { mi := &file_monkey_monkey_msg_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -281,13 +289,13 @@ func (x *MonkeyUpdateSTarResp) Reset() { } } -func (x *MonkeyUpdateSTarResp) String() string { +func (x *MonkeyUpdateStarResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MonkeyUpdateSTarResp) ProtoMessage() {} +func (*MonkeyUpdateStarResp) ProtoMessage() {} -func (x *MonkeyUpdateSTarResp) ProtoReflect() protoreflect.Message { +func (x *MonkeyUpdateStarResp) ProtoReflect() protoreflect.Message { mi := &file_monkey_monkey_msg_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -299,12 +307,12 @@ func (x *MonkeyUpdateSTarResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use MonkeyUpdateSTarResp.ProtoReflect.Descriptor instead. -func (*MonkeyUpdateSTarResp) Descriptor() ([]byte, []int) { +// Deprecated: Use MonkeyUpdateStarResp.ProtoReflect.Descriptor instead. +func (*MonkeyUpdateStarResp) Descriptor() ([]byte, []int) { return file_monkey_monkey_msg_proto_rawDescGZIP(), []int{5} } -func (x *MonkeyUpdateSTarResp) GetData() *DBMonkey { +func (x *MonkeyUpdateStarResp) GetData() *DBMonkey { if x != nil { return x.Data } @@ -332,14 +340,15 @@ var file_monkey_monkey_msg_proto_rawDesc = []byte{ 0x32, 0x09, 0x2e, 0x44, 0x42, 0x4d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77, 0x61, - 0x72, 0x64, 0x22, 0x2b, 0x0a, 0x13, 0x4d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x53, 0x54, 0x61, 0x72, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, - 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x22, - 0x35, 0x0a, 0x14, 0x4d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, - 0x54, 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x4d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x64, 0x22, 0x3f, 0x0a, 0x13, 0x4d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x74, 0x61, 0x72, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x73, 0x74, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, + 0x74, 0x61, 0x72, 0x22, 0x35, 0x0a, 0x14, 0x4d, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x4d, 0x6f, + 0x6e, 0x6b, 0x65, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -360,8 +369,8 @@ var file_monkey_monkey_msg_proto_goTypes = []interface{}{ (*MonkeyGetListResp)(nil), // 1: MonkeyGetListResp (*MonkeyAwardReq)(nil), // 2: MonkeyAwardReq (*MonkeyAwardResp)(nil), // 3: MonkeyAwardResp - (*MonkeyUpdateSTarReq)(nil), // 4: MonkeyUpdateSTarReq - (*MonkeyUpdateSTarResp)(nil), // 5: MonkeyUpdateSTarResp + (*MonkeyUpdateStarReq)(nil), // 4: MonkeyUpdateStarReq + (*MonkeyUpdateStarResp)(nil), // 5: MonkeyUpdateStarResp (*DBMonkey)(nil), // 6: DBMonkey (*UserAtno)(nil), // 7: UserAtno } @@ -369,7 +378,7 @@ var file_monkey_monkey_msg_proto_depIdxs = []int32{ 6, // 0: MonkeyGetListResp.data:type_name -> DBMonkey 6, // 1: MonkeyAwardResp.data:type_name -> DBMonkey 7, // 2: MonkeyAwardResp.award:type_name -> UserAtno - 6, // 3: MonkeyUpdateSTarResp.data:type_name -> DBMonkey + 6, // 3: MonkeyUpdateStarResp.data:type_name -> DBMonkey 4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name @@ -434,7 +443,7 @@ func file_monkey_monkey_msg_proto_init() { } } file_monkey_monkey_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MonkeyUpdateSTarReq); i { + switch v := v.(*MonkeyUpdateStarReq); i { case 0: return &v.state case 1: @@ -446,7 +455,7 @@ func file_monkey_monkey_msg_proto_init() { } } file_monkey_monkey_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MonkeyUpdateSTarResp); i { + switch v := v.(*MonkeyUpdateStarResp); i { case 0: return &v.state case 1: diff --git a/sys/configure/structs/Game.MonkeyMain.go b/sys/configure/structs/Game.MonkeyMain.go new file mode 100644 index 000000000..f5e9fefb1 --- /dev/null +++ b/sys/configure/structs/Game.MonkeyMain.go @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +package cfg + +type GameMonkeyMain struct { + _dataMap map[int32]*GameMonkeyMainData + _dataList []*GameMonkeyMainData +} + +func NewGameMonkeyMain(_buf []map[string]interface{}) (*GameMonkeyMain, error) { + _dataList := make([]*GameMonkeyMainData, 0, len(_buf)) + dataMap := make(map[int32]*GameMonkeyMainData) + for _, _ele_ := range _buf { + if _v, err2 := DeserializeGameMonkeyMainData(_ele_); err2 != nil { + return nil, err2 + } else { + _dataList = append(_dataList, _v) + dataMap[_v.Id] = _v + } + } + return &GameMonkeyMain{_dataList:_dataList, _dataMap:dataMap}, nil +} + +func (table *GameMonkeyMain) GetDataMap() map[int32]*GameMonkeyMainData { + return table._dataMap +} + +func (table *GameMonkeyMain) GetDataList() []*GameMonkeyMainData { + return table._dataList +} + +func (table *GameMonkeyMain) Get(key int32) *GameMonkeyMainData { + return table._dataMap[key] +} + + diff --git a/sys/configure/structs/Game.MonkeyMainData.go b/sys/configure/structs/Game.MonkeyMainData.go new file mode 100644 index 000000000..ef77c0069 --- /dev/null +++ b/sys/configure/structs/Game.MonkeyMainData.go @@ -0,0 +1,69 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +package cfg + +import "errors" + +type GameMonkeyMainData struct { + Id int32 + Chapter int32 + Stagedepict string + Startype []int32 + Starcondition []int32 +} + +const TypeId_GameMonkeyMainData = 1592430450 + +func (*GameMonkeyMainData) GetTypeId() int32 { + return 1592430450 +} + +func (_v *GameMonkeyMainData)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["chapter"].(float64); !_ok_ { err = errors.New("chapter error"); return }; _v.Chapter = int32(_tempNum_) } + {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["stagedepict"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Stagedepict error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Stagedepict, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["startype"].([]interface{}); !_ok_ { err = errors.New("startype error"); return } + + _v.Startype = 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.Startype = append(_v.Startype, _list_v_) + } + } + + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["starcondition"].([]interface{}); !_ok_ { err = errors.New("starcondition error"); return } + + _v.Starcondition = 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.Starcondition = append(_v.Starcondition, _list_v_) + } + } + + return +} + +func DeserializeGameMonkeyMainData(_buf map[string]interface{}) (*GameMonkeyMainData, error) { + v := &GameMonkeyMainData{} + if err := v.Deserialize(_buf); err == nil { + return v, nil + } else { + return nil, err + } +} diff --git a/sys/configure/structs/Game.MonkeyReward.go b/sys/configure/structs/Game.MonkeyReward.go new file mode 100644 index 000000000..d1782a6c0 --- /dev/null +++ b/sys/configure/structs/Game.MonkeyReward.go @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +package cfg + +type GameMonkeyReward struct { + _dataMap map[int32]*GameMonkeyRewardData + _dataList []*GameMonkeyRewardData +} + +func NewGameMonkeyReward(_buf []map[string]interface{}) (*GameMonkeyReward, error) { + _dataList := make([]*GameMonkeyRewardData, 0, len(_buf)) + dataMap := make(map[int32]*GameMonkeyRewardData) + for _, _ele_ := range _buf { + if _v, err2 := DeserializeGameMonkeyRewardData(_ele_); err2 != nil { + return nil, err2 + } else { + _dataList = append(_dataList, _v) + dataMap[_v.Key] = _v + } + } + return &GameMonkeyReward{_dataList:_dataList, _dataMap:dataMap}, nil +} + +func (table *GameMonkeyReward) GetDataMap() map[int32]*GameMonkeyRewardData { + return table._dataMap +} + +func (table *GameMonkeyReward) GetDataList() []*GameMonkeyRewardData { + return table._dataList +} + +func (table *GameMonkeyReward) Get(key int32) *GameMonkeyRewardData { + return table._dataMap[key] +} + + diff --git a/sys/configure/structs/Game.MonkeyRewardData.go b/sys/configure/structs/Game.MonkeyRewardData.go new file mode 100644 index 000000000..9fe84d9e8 --- /dev/null +++ b/sys/configure/structs/Game.MonkeyRewardData.go @@ -0,0 +1,56 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +package cfg + +import "errors" + +type GameMonkeyRewardData struct { + Key int32 + Chapter int32 + Type int32 + Starnum int32 + Reward []*Gameatn +} + +const TypeId_GameMonkeyRewardData = -1304932824 + +func (*GameMonkeyRewardData) GetTypeId() int32 { + return -1304932824 +} + +func (_v *GameMonkeyRewardData)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["chapter"].(float64); !_ok_ { err = errors.New("chapter error"); return }; _v.Chapter = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["starnum"].(float64); !_ok_ { err = errors.New("starnum error"); return }; _v.Starnum = int32(_tempNum_) } + { + 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 DeserializeGameMonkeyRewardData(_buf map[string]interface{}) (*GameMonkeyRewardData, error) { + v := &GameMonkeyRewardData{} + if err := v.Deserialize(_buf); err == nil { + return v, nil + } else { + return nil, err + } +} diff --git a/sys/configure/structs/Game.OpencondType.go b/sys/configure/structs/Game.OpencondType.go index a7be337cb..c95fe8fc4 100644 --- a/sys/configure/structs/Game.OpencondType.go +++ b/sys/configure/structs/Game.OpencondType.go @@ -14,4 +14,5 @@ const ( GameOpencondType_Maxmapid = 2 GameOpencondType_Worldtaskid = 3 GameOpencondType_Friend = 4 + GameOpencondType_MoonLevel = 5 ) diff --git a/sys/configure/structs/Game.TDBuffData.go b/sys/configure/structs/Game.TDBuffData.go index a2a4e457a..c3cf12f5c 100644 --- a/sys/configure/structs/Game.TDBuffData.go +++ b/sys/configure/structs/Game.TDBuffData.go @@ -12,13 +12,11 @@ import "errors" type GameTDBuffData struct { Id int32 - BuffType int32 TriggerPro int32 Describe string OverlayType int32 EffectType []int32 Value []int32 - TargetBuffId int32 EffectRange float32 MaxLayer int32 LayerEffectType []int32 @@ -36,7 +34,6 @@ func (*GameTDBuffData) GetTypeId() int32 { func (_v *GameTDBuffData)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["buff_type"].(float64); !_ok_ { err = errors.New("buff_type error"); return }; _v.BuffType = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["trigger_pro"].(float64); !_ok_ { err = errors.New("trigger_pro error"); return }; _v.TriggerPro = int32(_tempNum_) } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["describe"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Describe error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Describe, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["overlay_type"].(float64); !_ok_ { err = errors.New("overlay_type error"); return }; _v.OverlayType = int32(_tempNum_) } @@ -68,7 +65,6 @@ func (_v *GameTDBuffData)Deserialize(_buf map[string]interface{}) (err error) { } } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["target_buffId"].(float64); !_ok_ { err = errors.New("target_buffId error"); return }; _v.TargetBuffId = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["effect_Range"].(float64); !_ok_ { err = errors.New("effect_Range error"); return }; _v.EffectRange = float32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["max_layer"].(float64); !_ok_ { err = errors.New("max_layer error"); return }; _v.MaxLayer = int32(_tempNum_) } { diff --git a/sys/configure/structs/Game.TDWeaponData.go b/sys/configure/structs/Game.TDWeaponData.go index 946bc42f5..6e94074ce 100644 --- a/sys/configure/structs/Game.TDWeaponData.go +++ b/sys/configure/structs/Game.TDWeaponData.go @@ -25,8 +25,6 @@ type GameTDWeaponData struct { Num int32 ExplosionRange float32 Catapult int32 - SelfBuff []int32 - TargetBuff []int32 Pro int32 ExplosionEffect string } @@ -52,34 +50,6 @@ func (_v *GameTDWeaponData)Deserialize(_buf map[string]interface{}) (err error) { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["num"].(float64); !_ok_ { err = errors.New("num error"); return }; _v.Num = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["explosion_Range"].(float64); !_ok_ { err = errors.New("explosion_Range error"); return }; _v.ExplosionRange = float32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["catapult"].(float64); !_ok_ { err = errors.New("catapult error"); return }; _v.Catapult = int32(_tempNum_) } - { - var _arr_ []interface{} - var _ok_ bool - if _arr_, _ok_ = _buf["self_buff"].([]interface{}); !_ok_ { err = errors.New("self_buff error"); return } - - _v.SelfBuff = 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.SelfBuff = append(_v.SelfBuff, _list_v_) - } - } - - { - var _arr_ []interface{} - var _ok_ bool - if _arr_, _ok_ = _buf["target_buff"].([]interface{}); !_ok_ { err = errors.New("target_buff error"); return } - - _v.TargetBuff = 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.TargetBuff = append(_v.TargetBuff, _list_v_) - } - } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pro"].(float64); !_ok_ { err = errors.New("pro error"); return }; _v.Pro = int32(_tempNum_) } { var _ok_ bool; if _v.ExplosionEffect, _ok_ = _buf["explosion_effect"].(string); !_ok_ { err = errors.New("explosion_effect error"); return } } return diff --git a/sys/configure/structs/Game.TDWeaponRandomData.go b/sys/configure/structs/Game.TDWeaponRandomData.go index 81088a621..d495b12f8 100644 --- a/sys/configure/structs/Game.TDWeaponRandomData.go +++ b/sys/configure/structs/Game.TDWeaponRandomData.go @@ -14,7 +14,6 @@ type GameTDWeaponRandomData struct { Id int32 WeaponId int32 SkillId int32 - SubSkillId []int32 } const TypeId_GameTDWeaponRandomData = 108801077 @@ -27,20 +26,6 @@ func (_v *GameTDWeaponRandomData)Deserialize(_buf map[string]interface{}) (err e { 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["weapon_id"].(float64); !_ok_ { err = errors.New("weapon_id error"); return }; _v.WeaponId = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["skill_id"].(float64); !_ok_ { err = errors.New("skill_id error"); return }; _v.SkillId = int32(_tempNum_) } - { - var _arr_ []interface{} - var _ok_ bool - if _arr_, _ok_ = _buf["subSkill_id"].([]interface{}); !_ok_ { err = errors.New("subSkill_id error"); return } - - _v.SubSkillId = 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.SubSkillId = append(_v.SubSkillId, _list_v_) - } - } - return } diff --git a/sys/configure/structs/Game.TDWeaponSkillData.go b/sys/configure/structs/Game.TDWeaponSkillData.go index 0c81a3a2c..8a47cdf91 100644 --- a/sys/configure/structs/Game.TDWeaponSkillData.go +++ b/sys/configure/structs/Game.TDWeaponSkillData.go @@ -12,6 +12,7 @@ import "errors" type GameTDWeaponSkillData struct { SkillId int32 + SubSkillId int32 SkillTriggerType int32 Icon string Name string @@ -33,6 +34,7 @@ func (*GameTDWeaponSkillData) GetTypeId() int32 { func (_v *GameTDWeaponSkillData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["skill_id"].(float64); !_ok_ { err = errors.New("skill_id error"); return }; _v.SkillId = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["subSkill_id"].(float64); !_ok_ { err = errors.New("subSkill_id error"); return }; _v.SubSkillId = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["skill_triggerType"].(float64); !_ok_ { err = errors.New("skill_triggerType error"); return }; _v.SkillTriggerType = 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["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 } } } diff --git a/sys/configure/structs/Tables.go b/sys/configure/structs/Tables.go index 6d12f759d..bf8fafb5d 100644 --- a/sys/configure/structs/Tables.go +++ b/sys/configure/structs/Tables.go @@ -311,6 +311,8 @@ type Tables struct { PuggsyStar *GamePuggsyStar PuggsyMake *GamePuggsyMake PuggsyRecruit *GamePuggsyRecruit + MonkeyMain *GameMonkeyMain + MonkeyReward *GameMonkeyReward } func NewTables(loader JsonLoader) (*Tables, error) { @@ -2118,5 +2120,17 @@ func NewTables(loader JsonLoader) (*Tables, error) { if tables.PuggsyRecruit, err = NewGamePuggsyRecruit(buf) ; err != nil { return nil, err } + if buf, err = loader("game_monkeymain") ; err != nil { + return nil, err + } + if tables.MonkeyMain, err = NewGameMonkeyMain(buf) ; err != nil { + return nil, err + } + if buf, err = loader("game_monkeyreward") ; err != nil { + return nil, err + } + if tables.MonkeyReward, err = NewGameMonkeyReward(buf) ; err != nil { + return nil, err + } return tables, nil } diff --git a/sys/configure/structs/game.globalData.go b/sys/configure/structs/game.globalData.go index d2fbeb907..1c2c3fe86 100644 --- a/sys/configure/structs/game.globalData.go +++ b/sys/configure/structs/game.globalData.go @@ -264,6 +264,7 @@ type GameGlobalData struct { TdDivisionAngle int32 Playerexname string Initper *Gameatn + Catchbugturn int32 } const TypeId_GameGlobalData = 477542761 @@ -1059,6 +1060,7 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["td_division_angle"].(float64); !_ok_ { err = errors.New("td_division_angle error"); return }; _v.TdDivisionAngle = int32(_tempNum_) } { var _ok_ bool; if _v.Playerexname, _ok_ = _buf["playerexname"].(string); !_ok_ { err = errors.New("playerexname error"); return } } { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["initper"].(map[string]interface{}); !_ok_ { err = errors.New("initper error"); return }; if _v.Initper, err = DeserializeGameatn(_x_); err != nil { return } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["catchbugturn"].(float64); !_ok_ { err = errors.New("catchbugturn error"); return }; _v.Catchbugturn = int32(_tempNum_) } return } From add9124da83469ed9cf85bbd77f90ba60fb9e71b Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 24 Nov 2023 16:01:44 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=BA=9F=E5=BC=83?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_battleready.json | 2 +- bin/json/game_mainstage.json | 2 +- pb/userexpand.pb.go | 150 +++++++++++++++------------------ 3 files changed, 69 insertions(+), 85 deletions(-) diff --git a/bin/json/game_battleready.json b/bin/json/game_battleready.json index da0b8262b..30206fe4d 100644 --- a/bin/json/game_battleready.json +++ b/bin/json/game_battleready.json @@ -1851,7 +1851,7 @@ { "id": 10103005, "PlayType": 1, - "HeroCount": 1, + "HeroCount": 5, "readyScene": "scenesfight_role_interface_07", "battleScenes": [ "scenesfight_09" diff --git a/bin/json/game_mainstage.json b/bin/json/game_mainstage.json index f6b8e18d0..a395856db 100644 --- a/bin/json/game_mainstage.json +++ b/bin/json/game_mainstage.json @@ -2198,7 +2198,7 @@ "Episodetype": 1, "stage_param": 0, "inherit": 0, - "battle_fail": 0, + "battle_fail": 1, "venturemodelspeed": 0, "venturemodelscale": 0, "move_type": 0, diff --git a/pb/userexpand.pb.go b/pb/userexpand.pb.go index df88d3a3e..6252ccf48 100644 --- a/pb/userexpand.pb.go +++ b/pb/userexpand.pb.go @@ -26,42 +26,42 @@ type DBUserExpand struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //主键id - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` //用户id - Lastreadnotiftime int64 `protobuf:"varint,3,opt,name=lastreadnotiftime,proto3" json:"lastreadnotiftime"` //最后阅读公告时间 - LastInitdataTime int64 `protobuf:"varint,4,opt,name=lastInitdataTime,proto3" json:"lastInitdataTime"` //上次初始数据时间 - InitdataCount uint32 `protobuf:"varint,5,opt,name=initdataCount,proto3" json:"initdataCount"` //今日初始累计次数 - Chatchannel int32 `protobuf:"varint,6,opt,name=chatchannel,proto3" json:"chatchannel"` //跨服聊天频道 - ModifynameCount int32 `protobuf:"varint,7,opt,name=modifynameCount,proto3" json:"modifynameCount"` //修改昵称次数 - Expitem map[string]int32 `protobuf:"bytes,8,rep,name=expitem,proto3" json:"expitem" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //该英雄重复获取后所获得的升星道具 - Activeday int32 `protobuf:"varint,11,opt,name=activeday,proto3" json:"activeday"` //日活跃度 - Activeweek int32 `protobuf:"varint,12,opt,name=activeweek,proto3" json:"activeweek"` //周活跃度 - Sign string `protobuf:"bytes,13,opt,name=sign,proto3" json:"sign"` //用户签名 - FriendPoint int32 `protobuf:"varint,14,opt,name=friendPoint,proto3" json:"friendPoint" bson:"friendPoint"` //友情点 - FriendPointID int32 `protobuf:"varint,15,opt,name=friendPointID,proto3" json:"friendPointID" bson:"friendPointID"` //每日获赠友情点 - FriendPointOD int32 `protobuf:"varint,16,opt,name=friendPointOD,proto3" json:"friendPointOD" bson:"friendPointOD"` //每日送出友情点 - LoginAddCount int32 `protobuf:"varint,19,opt,name=loginAddCount,proto3" json:"loginAddCount"` //@go_tasgs(`bson:"loginAddCount"`) 累计登录天数 - LoginContinueCount int32 `protobuf:"varint,20,opt,name=loginContinueCount,proto3" json:"loginContinueCount"` //@go_tasgs(`bson:"loginContinueCount"`) 连续登录天数 - RtaskId int32 `protobuf:"varint,21,opt,name=rtaskId,proto3" json:"rtaskId" bson:"rtaskId"` // 当前完成的随机任务ID - TeamHeroIds []string `protobuf:"bytes,22,rep,name=teamHeroIds,proto3" json:"teamHeroIds" bson:"teamHeroIds"` //阵容英雄IDs - SociatyId string `protobuf:"bytes,23,opt,name=sociatyId,proto3" json:"sociatyId" bson:"sociatyId"` //公会ID - SociatyCd int64 `protobuf:"varint,24,opt,name=sociatyCd,proto3" json:"sociatyCd" bson:"sociatyCd"` //主动退出CD - Guildcoin int32 `protobuf:"varint,25,opt,name=guildcoin,proto3" json:"guildcoin" bson:"guildcoin"` //公会币 - Arenacoin int32 `protobuf:"varint,26,opt,name=arenacoin,proto3" json:"arenacoin" bson:"arenacoin"` //竞技场币 - Physicalbuynum int32 `protobuf:"varint,27,opt,name=physicalbuynum,proto3" json:"physicalbuynum"` //@go_tags(`bson:"physicalbuynum"`)体力购买次数 - PhysicalbuyLasttime int64 `protobuf:"varint,28,opt,name=physicalbuyLasttime,proto3" json:"physicalbuyLasttime"` //@go_tags(`bson:"physicalbuyLasttime"`)最后购买体力事件 - Buyunifiedticket int32 `protobuf:"varint,29,opt,name=buyunifiedticket,proto3" json:"buyunifiedticket"` //@go_tags(`bson:"buyunifiedticket"`)购买统一入场门票次数 - Lasttimeunifiedticket int64 `protobuf:"varint,30,opt,name=lasttimeunifiedticket,proto3" json:"lasttimeunifiedticket"` //@go_tags(`bson:"lasttimeunifiedticket"`)最后购买统一入场门票时间 - Recovertimeunifiedticket int64 `protobuf:"varint,31,opt,name=recovertimeunifiedticket,proto3" json:"recovertimeunifiedticket"` //@go_tags(`bson:"recovertimeunifiedticket"`)同意门票恢复时间 - SociatyTicketBuyNum int32 `protobuf:"varint,32,opt,name=sociatyTicketBuyNum,proto3" json:"sociatyTicketBuyNum" bson:"sociatyTicketBuyNum"` //公会boss挑战券购买次数 - SociatyTicket int32 `protobuf:"varint,33,opt,name=sociatyTicket,proto3" json:"sociatyTicket" bson:"sociatyTicket"` //公会boss挑战券数量 - Mline map[int32]int32 `protobuf:"bytes,34,rep,name=mline,proto3" json:"mline" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"mline"` //主线关卡最大进度 key难度val是关卡ID - SuiteId []int32 `protobuf:"varint,35,rep,packed,name=suiteId,proto3" json:"suiteId" bson:"suiteId"` // 套装Id - Globalbuff int32 `protobuf:"varint,36,opt,name=globalbuff,proto3" json:"globalbuff" bson:"globalbuff"` // 全局buff - Race map[int32]int32 `protobuf:"bytes,37,rep,name=race,proto3" json:"race" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key 阵营ID 1~4 value 总好感度 - Herofrag map[string]int32 `protobuf:"bytes,38,rep,name=herofrag,proto3" json:"herofrag" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //当获得重复守护者时获得的守护之心次数 - Passonlv int32 `protobuf:"varint,39,opt,name=passonlv,proto3" json:"passonlv"` //传功等级 - ConsumPs int32 `protobuf:"varint,40,opt,name=consumPs,proto3" json:"consumPs"` //今天消耗的体力 + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //主键id + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` //用户id + Lastreadnotiftime int64 `protobuf:"varint,3,opt,name=lastreadnotiftime,proto3" json:"lastreadnotiftime"` //最后阅读公告时间 + LastInitdataTime int64 `protobuf:"varint,4,opt,name=lastInitdataTime,proto3" json:"lastInitdataTime"` //上次初始数据时间 + InitdataCount uint32 `protobuf:"varint,5,opt,name=initdataCount,proto3" json:"initdataCount"` //今日初始累计次数 + Chatchannel int32 `protobuf:"varint,6,opt,name=chatchannel,proto3" json:"chatchannel"` //跨服聊天频道 + ModifynameCount int32 `protobuf:"varint,7,opt,name=modifynameCount,proto3" json:"modifynameCount"` //修改昵称次数 + Expitem map[string]int32 `protobuf:"bytes,8,rep,name=expitem,proto3" json:"expitem" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //该英雄重复获取后所获得的升星道具 + Activeday int32 `protobuf:"varint,11,opt,name=activeday,proto3" json:"activeday"` //日活跃度 + Activeweek int32 `protobuf:"varint,12,opt,name=activeweek,proto3" json:"activeweek"` //周活跃度 + Sign string `protobuf:"bytes,13,opt,name=sign,proto3" json:"sign"` //用户签名 + FriendPoint int32 `protobuf:"varint,14,opt,name=friendPoint,proto3" json:"friendPoint" bson:"friendPoint"` //友情点 + FriendPointID int32 `protobuf:"varint,15,opt,name=friendPointID,proto3" json:"friendPointID" bson:"friendPointID"` //每日获赠友情点 + FriendPointOD int32 `protobuf:"varint,16,opt,name=friendPointOD,proto3" json:"friendPointOD" bson:"friendPointOD"` //每日送出友情点 + LoginAddCount int32 `protobuf:"varint,19,opt,name=loginAddCount,proto3" json:"loginAddCount"` //@go_tasgs(`bson:"loginAddCount"`) 累计登录天数 + LoginContinueCount int32 `protobuf:"varint,20,opt,name=loginContinueCount,proto3" json:"loginContinueCount"` //@go_tasgs(`bson:"loginContinueCount"`) 连续登录天数 + RtaskId int32 `protobuf:"varint,21,opt,name=rtaskId,proto3" json:"rtaskId" bson:"rtaskId"` // 当前完成的随机任务ID + TeamHeroIds []string `protobuf:"bytes,22,rep,name=teamHeroIds,proto3" json:"teamHeroIds" bson:"teamHeroIds"` //阵容英雄IDs + SociatyId string `protobuf:"bytes,23,opt,name=sociatyId,proto3" json:"sociatyId" bson:"sociatyId"` //公会ID + SociatyCd int64 `protobuf:"varint,24,opt,name=sociatyCd,proto3" json:"sociatyCd" bson:"sociatyCd"` //主动退出CD + Guildcoin int32 `protobuf:"varint,25,opt,name=guildcoin,proto3" json:"guildcoin" bson:"guildcoin"` //公会币 + Arenacoin int32 `protobuf:"varint,26,opt,name=arenacoin,proto3" json:"arenacoin" bson:"arenacoin"` //竞技场币 + Physicalbuynum int32 `protobuf:"varint,27,opt,name=physicalbuynum,proto3" json:"physicalbuynum"` //@go_tags(`bson:"physicalbuynum"`)体力购买次数 + PhysicalbuyLasttime int64 `protobuf:"varint,28,opt,name=physicalbuyLasttime,proto3" json:"physicalbuyLasttime"` //@go_tags(`bson:"physicalbuyLasttime"`)最后购买体力事件 + Buyunifiedticket int32 `protobuf:"varint,29,opt,name=buyunifiedticket,proto3" json:"buyunifiedticket"` //@go_tags(`bson:"buyunifiedticket"`)购买统一入场门票次数 + Lasttimeunifiedticket int64 `protobuf:"varint,30,opt,name=lasttimeunifiedticket,proto3" json:"lasttimeunifiedticket"` //@go_tags(`bson:"lasttimeunifiedticket"`)最后购买统一入场门票时间 + Recovertimeunifiedticket int64 `protobuf:"varint,31,opt,name=recovertimeunifiedticket,proto3" json:"recovertimeunifiedticket"` //@go_tags(`bson:"recovertimeunifiedticket"`)同意门票恢复时间 + SociatyTicketBuyNum int32 `protobuf:"varint,32,opt,name=sociatyTicketBuyNum,proto3" json:"sociatyTicketBuyNum" bson:"sociatyTicketBuyNum"` //公会boss挑战券购买次数 + SociatyTicket int32 `protobuf:"varint,33,opt,name=sociatyTicket,proto3" json:"sociatyTicket" bson:"sociatyTicket"` //公会boss挑战券数量 + //map mline = 34;//@go_tags(`bson:"mline"`) 主线关卡最大进度 key难度val是关卡ID + SuiteId []int32 `protobuf:"varint,35,rep,packed,name=suiteId,proto3" json:"suiteId" bson:"suiteId"` // 套装Id + Globalbuff int32 `protobuf:"varint,36,opt,name=globalbuff,proto3" json:"globalbuff" bson:"globalbuff"` // 全局buff + Race map[int32]int32 `protobuf:"bytes,37,rep,name=race,proto3" json:"race" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key 阵营ID 1~4 value 总好感度 + Herofrag map[string]int32 `protobuf:"bytes,38,rep,name=herofrag,proto3" json:"herofrag" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //当获得重复守护者时获得的守护之心次数 + Passonlv int32 `protobuf:"varint,39,opt,name=passonlv,proto3" json:"passonlv"` //传功等级 + ConsumPs int32 `protobuf:"varint,40,opt,name=consumPs,proto3" json:"consumPs"` //今天消耗的体力 } func (x *DBUserExpand) Reset() { @@ -299,13 +299,6 @@ func (x *DBUserExpand) GetSociatyTicket() int32 { return 0 } -func (x *DBUserExpand) GetMline() map[int32]int32 { - if x != nil { - return x.Mline - } - return nil -} - func (x *DBUserExpand) GetSuiteId() []int32 { if x != nil { return x.SuiteId @@ -440,7 +433,7 @@ var File_userexpand_proto protoreflect.FileDescriptor var file_userexpand_proto_rawDesc = []byte{ 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xc0, 0x0c, 0x0a, 0x0c, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, + 0x74, 0x6f, 0x22, 0xd6, 0x0b, 0x0a, 0x0c, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 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, 0x2c, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, @@ -509,10 +502,7 @@ var file_userexpand_proto_rawDesc = []byte{ 0x69, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x21, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x54, 0x69, 0x63, 0x6b, 0x65, - 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x6d, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x22, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x2e, - 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x6d, 0x6c, 0x69, 0x6e, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x23, 0x20, 0x03, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x23, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x73, 0x75, 0x69, 0x74, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x62, 0x75, 0x66, 0x66, 0x18, 0x24, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x62, 0x75, 0x66, 0x66, 0x12, 0x2b, 0x0a, 0x04, 0x72, @@ -529,28 +519,24 @@ var file_userexpand_proto_rawDesc = []byte{ 0x69, 0x74, 0x65, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, - 0x37, 0x0a, 0x09, 0x52, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, - 0x66, 0x72, 0x61, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x89, 0x01, 0x0a, 0x09, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, - 0x4c, 0x6f, 0x67, 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, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x41, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x41, - 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x6f, 0x67, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, - 0x61, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x12, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x37, 0x0a, 0x09, 0x52, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, + 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x66, 0x72, 0x61, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x89, 0x01, 0x0a, 0x09, + 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 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, 0x1a, 0x0a, 0x08, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x41, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x41, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x6f, 0x67, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x74, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -565,25 +551,23 @@ func file_userexpand_proto_rawDescGZIP() []byte { return file_userexpand_proto_rawDescData } -var file_userexpand_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_userexpand_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_userexpand_proto_goTypes = []interface{}{ (*DBUserExpand)(nil), // 0: DBUserExpand (*DBUserLog)(nil), // 1: DBUserLog nil, // 2: DBUserExpand.ExpitemEntry - nil, // 3: DBUserExpand.MlineEntry - nil, // 4: DBUserExpand.RaceEntry - nil, // 5: DBUserExpand.HerofragEntry + nil, // 3: DBUserExpand.RaceEntry + nil, // 4: DBUserExpand.HerofragEntry } var file_userexpand_proto_depIdxs = []int32{ 2, // 0: DBUserExpand.expitem:type_name -> DBUserExpand.ExpitemEntry - 3, // 1: DBUserExpand.mline:type_name -> DBUserExpand.MlineEntry - 4, // 2: DBUserExpand.race:type_name -> DBUserExpand.RaceEntry - 5, // 3: DBUserExpand.herofrag:type_name -> DBUserExpand.HerofragEntry - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 3, // 1: DBUserExpand.race:type_name -> DBUserExpand.RaceEntry + 4, // 2: DBUserExpand.herofrag:type_name -> DBUserExpand.HerofragEntry + 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_userexpand_proto_init() } @@ -623,7 +607,7 @@ func file_userexpand_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_userexpand_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 5, NumExtensions: 0, NumServices: 0, },