From 049f5ed8f5db91886331a49238cb61484efb8330 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 16 May 2023 17:13:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=91=E5=95=86=E4=BB=BB=E5=8A=A1=E6=8E=A5?= =?UTF-8?q?=E5=8F=96=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 3 + comm/imodule.go | 4 + modules/caravan/api_getlist.go | 4 +- modules/caravan/api_getstory.go | 2 +- modules/caravan/api_gotocity.go | 2 +- modules/caravan/model_caravan.go | 2 +- modules/caravan/module.go | 65 +++++++-- pb/caravan_db.pb.go | 2 +- pb/caravan_msg.pb.go | 217 ++++++++++++++++++++++--------- 9 files changed, 226 insertions(+), 75 deletions(-) diff --git a/comm/const.go b/comm/const.go index 6a956428a..b8f5a66a2 100644 --- a/comm/const.go +++ b/comm/const.go @@ -86,6 +86,7 @@ const ( ModuleTools core.M_Modules = "tools" //工具 ModuleReputation core.M_Modules = "reputation" //阵营声望 ModuleOldtimes core.M_Modules = "oldtimes" //旧时光 + ModuleCaravan core.M_Modules = "caravan" //巨怪商队 ) // 数据表名定义处 @@ -257,6 +258,8 @@ const ( //旧时光 TableOldtimes = "oldtimes" + // 巨怪商队 + TableCaravan = "varavan" ) // RPC服务接口定义处 diff --git a/comm/imodule.go b/comm/imodule.go index a0f081e32..9584816d5 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -485,4 +485,8 @@ type ( // 获取关卡状态 GetLevelStatus(uid string, levelId int32) bool } + + ICaravan interface { + ITaskComplete + } ) diff --git a/modules/caravan/api_getlist.go b/modules/caravan/api_getlist.go index 161b4ef7e..6c64bdcf9 100644 --- a/modules/caravan/api_getlist.go +++ b/modules/caravan/api_getlist.go @@ -18,7 +18,7 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.CaravanGetListRe if code = this.GetListCheck(session, req); code != pb.ErrorCode_Success { return // 参数校验失败直接返回 } - list, err := this.module.api.module.modelCaravan.getCaravanList(session.GetUserId()) + list, err := this.module.modelCaravan.getCaravanList(session.GetUserId()) if err != nil { code = pb.ErrorCode_DBError return @@ -33,7 +33,7 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.CaravanGetListRe this.module.refreshCaravanCityInfo(session.GetUserId(), list) // 更新货物信息 this.module.refreshCaravanItemInfo(session.GetUserId(), list) - this.module.CheckCaravanTask(session.GetUserId(), list) + this.module.CheckCaravanTask(session, list) resp.Data = list session.SendMsg(string(this.module.GetType()), "getlist", resp) return diff --git a/modules/caravan/api_getstory.go b/modules/caravan/api_getstory.go index 83fea9fb8..aa5d5ab8a 100644 --- a/modules/caravan/api_getstory.go +++ b/modules/caravan/api_getstory.go @@ -23,7 +23,7 @@ func (this *apiComp) GetStory(session comm.IUserSession, req *pb.CaravanGetStory if code = this.GetStoryCheck(session, req); code != pb.ErrorCode_Success { return // 参数校验失败直接返回 } - list, err := this.module.api.module.modelCaravan.getCaravanList(session.GetUserId()) + list, err := this.module.modelCaravan.getCaravanList(session.GetUserId()) if err != nil { code = pb.ErrorCode_DBError return diff --git a/modules/caravan/api_gotocity.go b/modules/caravan/api_gotocity.go index b5fc2052a..af2c5668f 100644 --- a/modules/caravan/api_gotocity.go +++ b/modules/caravan/api_gotocity.go @@ -25,7 +25,7 @@ func (this *apiComp) GotoCity(session comm.IUserSession, req *pb.CaravanGotoCity if code = this.GotoCityCheck(session, req); code != pb.ErrorCode_Success { return // 参数校验失败直接返回 } - list, err := this.module.api.module.modelCaravan.getCaravanList(session.GetUserId()) + list, err := this.module.modelCaravan.getCaravanList(session.GetUserId()) if err != nil { code = pb.ErrorCode_DBError return diff --git a/modules/caravan/model_caravan.go b/modules/caravan/model_caravan.go index 79a02cc2e..bdb30e61a 100644 --- a/modules/caravan/model_caravan.go +++ b/modules/caravan/model_caravan.go @@ -19,7 +19,7 @@ type modelCaravan struct { } func (this *modelCaravan) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { - this.TableName = string(comm.TableTroll) + this.TableName = string(comm.TableCaravan) err = this.MCompModel.Init(service, module, comp, options) this.module = module.(*Caravan) // uid 创建索引 diff --git a/modules/caravan/module.go b/modules/caravan/module.go index 1901eda37..145cd1967 100644 --- a/modules/caravan/module.go +++ b/modules/caravan/module.go @@ -3,6 +3,7 @@ package caravan import ( "go_dreamfactory/comm" "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/log" "go_dreamfactory/modules" "go_dreamfactory/pb" "go_dreamfactory/sys/configure" @@ -23,7 +24,7 @@ func NewModule() core.IModule { } func (this *Caravan) GetType() core.M_Modules { - return comm.ModuleTroll + return comm.ModuleCaravan } func (this *Caravan) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { @@ -216,19 +217,29 @@ func (this *Caravan) refreshCaravanItemInfo(uid string, data *pb.DBCaravan) { } // 校验随机事件是否超时 -func (this *Caravan) CheckCaravanTask(uid string, data *pb.DBCaravan) { +func (this *Caravan) CheckCaravanTask(session comm.IUserSession, data *pb.DBCaravan) { if data.Eventid != 0 { if even := this.configure.GetCaravanEventById(data.Eventid); even != nil { // 校验任务是否超时 if data.Tasktime-configure.Now().Unix() > int64(even.Eventtime) { //TODO 任务超时 通知任务模块处理 并清理相关数据 - data.Eventid = 0 - data.Task = 0 - data.Tasktime = 0 - update := make(map[string]interface{}) - update["eventid"] = data.Eventid - update["task"] = data.Task - update["tasktime"] = data.Tasktime - this.modelCaravan.modifyCaravanDataByObjId(uid, update) + this.CleanCaravanTask(session.GetUserId(), data) //任务超时 清理任务数据 + // 任务超时发送任务失败推送 + resp := &pb.CaravanTaskCompletePush{} + resp.Data = data + resp.BSuccess = false + if len(even.Unreword) == 2 && even.Unreword[0] == 1 { + this.ConsumeRes(session, []*cfg.Gameatn{{ + A: "attr", + T: "merchantmoney", + N: even.Unreword[1], + }}, true) + resp.Reward = append(resp.Reward, &pb.UserAssets{ + A: "attr", + T: "merchantmoney", + N: -even.Unreword[1], + }) + } + session.SendMsg(string(this.GetType()), "taskcomplete", resp) } } } @@ -245,3 +256,37 @@ func (this *Caravan) CleanCaravanTask(uid string, data *pb.DBCaravan) { this.modelCaravan.modifyCaravanDataByObjId(uid, update) } } + +func (this *Caravan) TaskComplete(session comm.IUserSession, taskid int32) { + this.Debug("TaskComplete", + log.Field{Key: "session", Value: session.GetUserId()}, + log.Field{Key: "taskid", Value: taskid}, + ) + var ( + resp *pb.CaravanTaskCompletePush + ) + if !this.IsCross() { + if conf := this.configure.GetCaravanEventById(taskid); conf != nil { + + if list, err := this.modelCaravan.getCaravanList(session.GetUserId()); err != nil { + if list.Eventid == taskid { + this.CleanCaravanTask(session.GetUserId(), list) //任务完成 清理任务数据 + resp = &pb.CaravanTaskCompletePush{} + resp.Data = list + resp.BSuccess = true + for _, v := range conf.Reword { + resp.Reward = append(resp.Reward, &pb.UserAssets{ + A: v.A, + T: v.T, + N: v.N, + }) + } + if code := this.ModuleBase.DispenseRes(session, conf.Reword, true); code != pb.ErrorCode_Success { + this.Errorf("Caravan DispenseRes err:%v", conf.Reword) + } + session.SendMsg(string(this.GetType()), "taskcomplete", resp) + } + } + } + } +} diff --git a/pb/caravan_db.pb.go b/pb/caravan_db.pb.go index 07b2a5a5e..d540bd2d1 100644 --- a/pb/caravan_db.pb.go +++ b/pb/caravan_db.pb.go @@ -232,7 +232,7 @@ type DBCaravan struct { Profit int64 `protobuf:"varint,8,opt,name=profit,proto3" json:"profit"` // 虚拟货利润 Resettime int64 `protobuf:"varint,9,opt,name=resettime,proto3" json:"resettime"` // 最后一次重置时间 Curcity int32 `protobuf:"varint,10,opt,name=curcity,proto3" json:"curcity"` // 当前城市 - Task int32 `protobuf:"varint,11,opt,name=task,proto3" json:"task"` // 对应对应世界任务组 worldtask + Task int32 `protobuf:"varint,11,opt,name=task,proto3" json:"task"` // 对应对应世界任务组 worldtask 210 Eventid int32 `protobuf:"varint,12,opt,name=eventid,proto3" json:"eventid"` // 特殊事件ID(事件配置唯一id) Tasktime int64 `protobuf:"varint,13,opt,name=tasktime,proto3" json:"tasktime"` // 任务触发时间 Baglimit int32 `protobuf:"varint,14,opt,name=baglimit,proto3" json:"baglimit"` // 背包上限 diff --git a/pb/caravan_msg.pb.go b/pb/caravan_msg.pb.go index 9c343c7da..2aad3fcd2 100644 --- a/pb/caravan_msg.pb.go +++ b/pb/caravan_msg.pb.go @@ -389,7 +389,8 @@ type CaravanGetStoryResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data *DBCaravan `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` + Data *DBCaravan `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` + BSuccess bool `protobuf:"varint,2,opt,name=bSuccess,proto3" json:"bSuccess"` // 是否成功接取到任务 } func (x *CaravanGetStoryResp) Reset() { @@ -431,50 +432,131 @@ func (x *CaravanGetStoryResp) GetData() *DBCaravan { return nil } +func (x *CaravanGetStoryResp) GetBSuccess() bool { + if x != nil { + return x.BSuccess + } + return false +} + +// 任务完成推送 +type CaravanTaskCompletePush struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *DBCaravan `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` + BSuccess bool `protobuf:"varint,2,opt,name=bSuccess,proto3" json:"bSuccess"` // 是否成功完成任务 + Reward []*UserAssets `protobuf:"bytes,3,rep,name=reward,proto3" json:"reward"` // 成功奖励 +} + +func (x *CaravanTaskCompletePush) Reset() { + *x = CaravanTaskCompletePush{} + if protoimpl.UnsafeEnabled { + mi := &file_caravan_caravan_msg_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CaravanTaskCompletePush) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CaravanTaskCompletePush) ProtoMessage() {} + +func (x *CaravanTaskCompletePush) ProtoReflect() protoreflect.Message { + mi := &file_caravan_caravan_msg_proto_msgTypes[8] + 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 CaravanTaskCompletePush.ProtoReflect.Descriptor instead. +func (*CaravanTaskCompletePush) Descriptor() ([]byte, []int) { + return file_caravan_caravan_msg_proto_rawDescGZIP(), []int{8} +} + +func (x *CaravanTaskCompletePush) GetData() *DBCaravan { + if x != nil { + return x.Data + } + return nil +} + +func (x *CaravanTaskCompletePush) GetBSuccess() bool { + if x != nil { + return x.BSuccess + } + return false +} + +func (x *CaravanTaskCompletePush) GetReward() []*UserAssets { + if x != nil { + return x.Reward + } + return nil +} + var File_caravan_caravan_msg_proto protoreflect.FileDescriptor var file_caravan_caravan_msg_proto_rawDesc = []byte{ 0x0a, 0x19, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2f, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2f, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x5f, 0x64, 0x62, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x13, 0x0a, 0x11, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, - 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x34, 0x0a, 0x12, 0x43, 0x61, - 0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x13, 0x0a, 0x11, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, 0x65, 0x74, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x34, 0x0a, 0x12, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, + 0x6e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x43, + 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xb0, 0x01, 0x0a, + 0x13, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x53, 0x65, 0x6c, + 0x6c, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x35, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, + 0x6e, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x53, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x2e, 0x49, 0x74, + 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, + 0x14, 0x0a, 0x05, 0x69, 0x73, 0x42, 0x75, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, + 0x69, 0x73, 0x42, 0x75, 0x79, 0x1a, 0x38, 0x0a, 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73, 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, + 0x36, 0x0a, 0x14, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x53, + 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, + 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x40, 0x0a, 0x12, 0x43, 0x61, 0x72, 0x61, 0x76, + 0x61, 0x6e, 0x47, 0x6f, 0x74, 0x6f, 0x43, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, + 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x69, 0x74, + 0x79, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x4f, 0x0a, 0x13, 0x43, 0x61, 0x72, + 0x61, 0x76, 0x61, 0x6e, 0x47, 0x6f, 0x74, 0x6f, 0x43, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x22, 0xb0, 0x01, 0x0a, 0x13, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x42, 0x75, 0x79, 0x4f, - 0x72, 0x53, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x35, 0x0a, 0x05, - 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x43, 0x61, - 0x72, 0x61, 0x76, 0x61, 0x6e, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x53, 0x65, 0x6c, 0x6c, 0x52, 0x65, - 0x71, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x69, 0x74, - 0x65, 0x6d, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x42, 0x75, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x42, 0x75, 0x79, 0x1a, 0x38, 0x0a, 0x0a, 0x49, 0x74, 0x65, - 0x6d, 0x73, 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, 0x36, 0x0a, 0x14, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x42, 0x75, - 0x79, 0x4f, 0x72, 0x53, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x43, 0x61, - 0x72, 0x61, 0x76, 0x61, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x40, 0x0a, 0x12, 0x43, - 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, 0x6f, 0x74, 0x6f, 0x43, 0x69, 0x74, 0x79, 0x52, 0x65, - 0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x4f, 0x0a, - 0x13, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, 0x6f, 0x74, 0x6f, 0x43, 0x69, 0x74, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x22, 0x44, - 0x0a, 0x12, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, - 0x79, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x69, 0x74, 0x79, 0x73, 0x74, - 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x69, 0x74, 0x79, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x22, 0x35, 0x0a, 0x13, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, - 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x43, 0x61, - 0x72, 0x61, 0x76, 0x61, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, - 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x22, 0x44, 0x0a, 0x12, 0x43, 0x61, + 0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, + 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x63, + 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x69, 0x74, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x69, 0x74, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x22, 0x51, 0x0a, 0x13, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, 0x65, 0x74, 0x53, 0x74, + 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, + 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x53, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x62, 0x53, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x22, 0x7a, 0x0a, 0x17, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x54, 0x61, + 0x73, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1e, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, + 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, + 0x0a, 0x08, 0x62, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x62, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x06, 0x72, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x42, + 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -489,30 +571,34 @@ func file_caravan_caravan_msg_proto_rawDescGZIP() []byte { return file_caravan_caravan_msg_proto_rawDescData } -var file_caravan_caravan_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_caravan_caravan_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_caravan_caravan_msg_proto_goTypes = []interface{}{ - (*CaravanGetListReq)(nil), // 0: CaravanGetListReq - (*CaravanGetListResp)(nil), // 1: CaravanGetListResp - (*CaravanBuyOrSellReq)(nil), // 2: CaravanBuyOrSellReq - (*CaravanBuyOrSellResp)(nil), // 3: CaravanBuyOrSellResp - (*CaravanGotoCityReq)(nil), // 4: CaravanGotoCityReq - (*CaravanGotoCityResp)(nil), // 5: CaravanGotoCityResp - (*CaravanGetStoryReq)(nil), // 6: CaravanGetStoryReq - (*CaravanGetStoryResp)(nil), // 7: CaravanGetStoryResp - nil, // 8: CaravanBuyOrSellReq.ItemsEntry - (*DBCaravan)(nil), // 9: DBCaravan + (*CaravanGetListReq)(nil), // 0: CaravanGetListReq + (*CaravanGetListResp)(nil), // 1: CaravanGetListResp + (*CaravanBuyOrSellReq)(nil), // 2: CaravanBuyOrSellReq + (*CaravanBuyOrSellResp)(nil), // 3: CaravanBuyOrSellResp + (*CaravanGotoCityReq)(nil), // 4: CaravanGotoCityReq + (*CaravanGotoCityResp)(nil), // 5: CaravanGotoCityResp + (*CaravanGetStoryReq)(nil), // 6: CaravanGetStoryReq + (*CaravanGetStoryResp)(nil), // 7: CaravanGetStoryResp + (*CaravanTaskCompletePush)(nil), // 8: CaravanTaskCompletePush + nil, // 9: CaravanBuyOrSellReq.ItemsEntry + (*DBCaravan)(nil), // 10: DBCaravan + (*UserAssets)(nil), // 11: UserAssets } var file_caravan_caravan_msg_proto_depIdxs = []int32{ - 9, // 0: CaravanGetListResp.data:type_name -> DBCaravan - 8, // 1: CaravanBuyOrSellReq.items:type_name -> CaravanBuyOrSellReq.ItemsEntry - 9, // 2: CaravanBuyOrSellResp.data:type_name -> DBCaravan - 9, // 3: CaravanGotoCityResp.data:type_name -> DBCaravan - 9, // 4: CaravanGetStoryResp.data:type_name -> DBCaravan - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 10, // 0: CaravanGetListResp.data:type_name -> DBCaravan + 9, // 1: CaravanBuyOrSellReq.items:type_name -> CaravanBuyOrSellReq.ItemsEntry + 10, // 2: CaravanBuyOrSellResp.data:type_name -> DBCaravan + 10, // 3: CaravanGotoCityResp.data:type_name -> DBCaravan + 10, // 4: CaravanGetStoryResp.data:type_name -> DBCaravan + 10, // 5: CaravanTaskCompletePush.data:type_name -> DBCaravan + 11, // 6: CaravanTaskCompletePush.reward:type_name -> UserAssets + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_caravan_caravan_msg_proto_init() } @@ -521,6 +607,7 @@ func file_caravan_caravan_msg_proto_init() { return } file_caravan_caravan_db_proto_init() + file_comm_proto_init() if !protoimpl.UnsafeEnabled { file_caravan_caravan_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CaravanGetListReq); i { @@ -618,6 +705,18 @@ func file_caravan_caravan_msg_proto_init() { return nil } } + file_caravan_caravan_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CaravanTaskCompletePush); 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{ @@ -625,7 +724,7 @@ func file_caravan_caravan_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_caravan_caravan_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 9, + NumMessages: 10, NumExtensions: 0, NumServices: 0, },