跑商任务接取处理
This commit is contained in:
parent
d959191c8f
commit
049f5ed8f5
@ -86,6 +86,7 @@ const (
|
|||||||
ModuleTools core.M_Modules = "tools" //工具
|
ModuleTools core.M_Modules = "tools" //工具
|
||||||
ModuleReputation core.M_Modules = "reputation" //阵营声望
|
ModuleReputation core.M_Modules = "reputation" //阵营声望
|
||||||
ModuleOldtimes core.M_Modules = "oldtimes" //旧时光
|
ModuleOldtimes core.M_Modules = "oldtimes" //旧时光
|
||||||
|
ModuleCaravan core.M_Modules = "caravan" //巨怪商队
|
||||||
)
|
)
|
||||||
|
|
||||||
// 数据表名定义处
|
// 数据表名定义处
|
||||||
@ -257,6 +258,8 @@ const (
|
|||||||
|
|
||||||
//旧时光
|
//旧时光
|
||||||
TableOldtimes = "oldtimes"
|
TableOldtimes = "oldtimes"
|
||||||
|
// 巨怪商队
|
||||||
|
TableCaravan = "varavan"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RPC服务接口定义处
|
// RPC服务接口定义处
|
||||||
|
@ -485,4 +485,8 @@ type (
|
|||||||
// 获取关卡状态
|
// 获取关卡状态
|
||||||
GetLevelStatus(uid string, levelId int32) bool
|
GetLevelStatus(uid string, levelId int32) bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ICaravan interface {
|
||||||
|
ITaskComplete
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
@ -18,7 +18,7 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.CaravanGetListRe
|
|||||||
if code = this.GetListCheck(session, req); code != pb.ErrorCode_Success {
|
if code = this.GetListCheck(session, req); code != pb.ErrorCode_Success {
|
||||||
return // 参数校验失败直接返回
|
return // 参数校验失败直接返回
|
||||||
}
|
}
|
||||||
list, err := this.module.api.module.modelCaravan.getCaravanList(session.GetUserId())
|
list, err := this.module.modelCaravan.getCaravanList(session.GetUserId())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_DBError
|
code = pb.ErrorCode_DBError
|
||||||
return
|
return
|
||||||
@ -33,7 +33,7 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.CaravanGetListRe
|
|||||||
this.module.refreshCaravanCityInfo(session.GetUserId(), list)
|
this.module.refreshCaravanCityInfo(session.GetUserId(), list)
|
||||||
// 更新货物信息
|
// 更新货物信息
|
||||||
this.module.refreshCaravanItemInfo(session.GetUserId(), list)
|
this.module.refreshCaravanItemInfo(session.GetUserId(), list)
|
||||||
this.module.CheckCaravanTask(session.GetUserId(), list)
|
this.module.CheckCaravanTask(session, list)
|
||||||
resp.Data = list
|
resp.Data = list
|
||||||
session.SendMsg(string(this.module.GetType()), "getlist", resp)
|
session.SendMsg(string(this.module.GetType()), "getlist", resp)
|
||||||
return
|
return
|
||||||
|
@ -23,7 +23,7 @@ func (this *apiComp) GetStory(session comm.IUserSession, req *pb.CaravanGetStory
|
|||||||
if code = this.GetStoryCheck(session, req); code != pb.ErrorCode_Success {
|
if code = this.GetStoryCheck(session, req); code != pb.ErrorCode_Success {
|
||||||
return // 参数校验失败直接返回
|
return // 参数校验失败直接返回
|
||||||
}
|
}
|
||||||
list, err := this.module.api.module.modelCaravan.getCaravanList(session.GetUserId())
|
list, err := this.module.modelCaravan.getCaravanList(session.GetUserId())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_DBError
|
code = pb.ErrorCode_DBError
|
||||||
return
|
return
|
||||||
|
@ -25,7 +25,7 @@ func (this *apiComp) GotoCity(session comm.IUserSession, req *pb.CaravanGotoCity
|
|||||||
if code = this.GotoCityCheck(session, req); code != pb.ErrorCode_Success {
|
if code = this.GotoCityCheck(session, req); code != pb.ErrorCode_Success {
|
||||||
return // 参数校验失败直接返回
|
return // 参数校验失败直接返回
|
||||||
}
|
}
|
||||||
list, err := this.module.api.module.modelCaravan.getCaravanList(session.GetUserId())
|
list, err := this.module.modelCaravan.getCaravanList(session.GetUserId())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_DBError
|
code = pb.ErrorCode_DBError
|
||||||
return
|
return
|
||||||
|
@ -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) {
|
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)
|
err = this.MCompModel.Init(service, module, comp, options)
|
||||||
this.module = module.(*Caravan)
|
this.module = module.(*Caravan)
|
||||||
// uid 创建索引
|
// uid 创建索引
|
||||||
|
@ -3,6 +3,7 @@ package caravan
|
|||||||
import (
|
import (
|
||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/lego/core"
|
"go_dreamfactory/lego/core"
|
||||||
|
"go_dreamfactory/lego/sys/log"
|
||||||
"go_dreamfactory/modules"
|
"go_dreamfactory/modules"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
"go_dreamfactory/sys/configure"
|
"go_dreamfactory/sys/configure"
|
||||||
@ -23,7 +24,7 @@ func NewModule() core.IModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *Caravan) GetType() core.M_Modules {
|
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) {
|
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 data.Eventid != 0 {
|
||||||
if even := this.configure.GetCaravanEventById(data.Eventid); even != nil {
|
if even := this.configure.GetCaravanEventById(data.Eventid); even != nil {
|
||||||
// 校验任务是否超时
|
// 校验任务是否超时
|
||||||
if data.Tasktime-configure.Now().Unix() > int64(even.Eventtime) { //TODO 任务超时 通知任务模块处理 并清理相关数据
|
if data.Tasktime-configure.Now().Unix() > int64(even.Eventtime) { //TODO 任务超时 通知任务模块处理 并清理相关数据
|
||||||
data.Eventid = 0
|
this.CleanCaravanTask(session.GetUserId(), data) //任务超时 清理任务数据
|
||||||
data.Task = 0
|
// 任务超时发送任务失败推送
|
||||||
data.Tasktime = 0
|
resp := &pb.CaravanTaskCompletePush{}
|
||||||
update := make(map[string]interface{})
|
resp.Data = data
|
||||||
update["eventid"] = data.Eventid
|
resp.BSuccess = false
|
||||||
update["task"] = data.Task
|
if len(even.Unreword) == 2 && even.Unreword[0] == 1 {
|
||||||
update["tasktime"] = data.Tasktime
|
this.ConsumeRes(session, []*cfg.Gameatn{{
|
||||||
this.modelCaravan.modifyCaravanDataByObjId(uid, update)
|
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)
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -232,7 +232,7 @@ type DBCaravan struct {
|
|||||||
Profit int64 `protobuf:"varint,8,opt,name=profit,proto3" json:"profit"` // 虚拟货利润
|
Profit int64 `protobuf:"varint,8,opt,name=profit,proto3" json:"profit"` // 虚拟货利润
|
||||||
Resettime int64 `protobuf:"varint,9,opt,name=resettime,proto3" json:"resettime"` // 最后一次重置时间
|
Resettime int64 `protobuf:"varint,9,opt,name=resettime,proto3" json:"resettime"` // 最后一次重置时间
|
||||||
Curcity int32 `protobuf:"varint,10,opt,name=curcity,proto3" json:"curcity"` // 当前城市
|
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)
|
Eventid int32 `protobuf:"varint,12,opt,name=eventid,proto3" json:"eventid"` // 特殊事件ID(事件配置唯一id)
|
||||||
Tasktime int64 `protobuf:"varint,13,opt,name=tasktime,proto3" json:"tasktime"` // 任务触发时间
|
Tasktime int64 `protobuf:"varint,13,opt,name=tasktime,proto3" json:"tasktime"` // 任务触发时间
|
||||||
Baglimit int32 `protobuf:"varint,14,opt,name=baglimit,proto3" json:"baglimit"` // 背包上限
|
Baglimit int32 `protobuf:"varint,14,opt,name=baglimit,proto3" json:"baglimit"` // 背包上限
|
||||||
|
@ -389,7 +389,8 @@ type CaravanGetStoryResp struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
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() {
|
func (x *CaravanGetStoryResp) Reset() {
|
||||||
@ -431,50 +432,131 @@ func (x *CaravanGetStoryResp) GetData() *DBCaravan {
|
|||||||
return nil
|
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 protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_caravan_caravan_msg_proto_rawDesc = []byte{
|
var file_caravan_caravan_msg_proto_rawDesc = []byte{
|
||||||
0x0a, 0x19, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2f, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61,
|
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,
|
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,
|
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,
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x34, 0x0a, 0x12, 0x43, 0x61,
|
0x6f, 0x22, 0x13, 0x0a, 0x11, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, 0x65, 0x74, 0x4c,
|
||||||
0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
|
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,
|
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,
|
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,
|
0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x72, 0x53, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79,
|
0x08, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x22, 0x44, 0x0a, 0x12, 0x43, 0x61,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x35, 0x0a, 0x05,
|
0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71,
|
||||||
0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x43, 0x61,
|
0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x63,
|
||||||
0x72, 0x61, 0x76, 0x61, 0x6e, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x53, 0x65, 0x6c, 0x6c, 0x52, 0x65,
|
0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x69, 0x74, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18,
|
||||||
0x71, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x69, 0x74,
|
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x69, 0x74, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x79,
|
||||||
0x65, 0x6d, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x42, 0x75, 0x79, 0x18, 0x03, 0x20, 0x01,
|
0x22, 0x51, 0x0a, 0x13, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, 0x65, 0x74, 0x53, 0x74,
|
||||||
0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x42, 0x75, 0x79, 0x1a, 0x38, 0x0a, 0x0a, 0x49, 0x74, 0x65,
|
0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
|
||||||
0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
|
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61,
|
||||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x53, 0x75, 0x63, 0x63,
|
||||||
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
|
0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x62, 0x53, 0x75, 0x63, 0x63,
|
||||||
0x02, 0x38, 0x01, 0x22, 0x36, 0x0a, 0x14, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x42, 0x75,
|
0x65, 0x73, 0x73, 0x22, 0x7a, 0x0a, 0x17, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x54, 0x61,
|
||||||
0x79, 0x4f, 0x72, 0x53, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64,
|
0x73, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1e,
|
||||||
0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x43, 0x61,
|
0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44,
|
||||||
0x72, 0x61, 0x76, 0x61, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x40, 0x0a, 0x12, 0x43,
|
0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a,
|
||||||
0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, 0x6f, 0x74, 0x6f, 0x43, 0x69, 0x74, 0x79, 0x52, 0x65,
|
0x0a, 0x08, 0x62, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08,
|
||||||
0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
0x52, 0x08, 0x62, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x06, 0x72, 0x65,
|
||||||
0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18,
|
0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65,
|
||||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x4f, 0x0a,
|
0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x42,
|
||||||
0x13, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, 0x6f, 0x74, 0x6f, 0x43, 0x69, 0x74, 0x79,
|
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
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,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -489,30 +571,34 @@ func file_caravan_caravan_msg_proto_rawDescGZIP() []byte {
|
|||||||
return file_caravan_caravan_msg_proto_rawDescData
|
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{}{
|
var file_caravan_caravan_msg_proto_goTypes = []interface{}{
|
||||||
(*CaravanGetListReq)(nil), // 0: CaravanGetListReq
|
(*CaravanGetListReq)(nil), // 0: CaravanGetListReq
|
||||||
(*CaravanGetListResp)(nil), // 1: CaravanGetListResp
|
(*CaravanGetListResp)(nil), // 1: CaravanGetListResp
|
||||||
(*CaravanBuyOrSellReq)(nil), // 2: CaravanBuyOrSellReq
|
(*CaravanBuyOrSellReq)(nil), // 2: CaravanBuyOrSellReq
|
||||||
(*CaravanBuyOrSellResp)(nil), // 3: CaravanBuyOrSellResp
|
(*CaravanBuyOrSellResp)(nil), // 3: CaravanBuyOrSellResp
|
||||||
(*CaravanGotoCityReq)(nil), // 4: CaravanGotoCityReq
|
(*CaravanGotoCityReq)(nil), // 4: CaravanGotoCityReq
|
||||||
(*CaravanGotoCityResp)(nil), // 5: CaravanGotoCityResp
|
(*CaravanGotoCityResp)(nil), // 5: CaravanGotoCityResp
|
||||||
(*CaravanGetStoryReq)(nil), // 6: CaravanGetStoryReq
|
(*CaravanGetStoryReq)(nil), // 6: CaravanGetStoryReq
|
||||||
(*CaravanGetStoryResp)(nil), // 7: CaravanGetStoryResp
|
(*CaravanGetStoryResp)(nil), // 7: CaravanGetStoryResp
|
||||||
nil, // 8: CaravanBuyOrSellReq.ItemsEntry
|
(*CaravanTaskCompletePush)(nil), // 8: CaravanTaskCompletePush
|
||||||
(*DBCaravan)(nil), // 9: DBCaravan
|
nil, // 9: CaravanBuyOrSellReq.ItemsEntry
|
||||||
|
(*DBCaravan)(nil), // 10: DBCaravan
|
||||||
|
(*UserAssets)(nil), // 11: UserAssets
|
||||||
}
|
}
|
||||||
var file_caravan_caravan_msg_proto_depIdxs = []int32{
|
var file_caravan_caravan_msg_proto_depIdxs = []int32{
|
||||||
9, // 0: CaravanGetListResp.data:type_name -> DBCaravan
|
10, // 0: CaravanGetListResp.data:type_name -> DBCaravan
|
||||||
8, // 1: CaravanBuyOrSellReq.items:type_name -> CaravanBuyOrSellReq.ItemsEntry
|
9, // 1: CaravanBuyOrSellReq.items:type_name -> CaravanBuyOrSellReq.ItemsEntry
|
||||||
9, // 2: CaravanBuyOrSellResp.data:type_name -> DBCaravan
|
10, // 2: CaravanBuyOrSellResp.data:type_name -> DBCaravan
|
||||||
9, // 3: CaravanGotoCityResp.data:type_name -> DBCaravan
|
10, // 3: CaravanGotoCityResp.data:type_name -> DBCaravan
|
||||||
9, // 4: CaravanGetStoryResp.data:type_name -> DBCaravan
|
10, // 4: CaravanGetStoryResp.data:type_name -> DBCaravan
|
||||||
5, // [5:5] is the sub-list for method output_type
|
10, // 5: CaravanTaskCompletePush.data:type_name -> DBCaravan
|
||||||
5, // [5:5] is the sub-list for method input_type
|
11, // 6: CaravanTaskCompletePush.reward:type_name -> UserAssets
|
||||||
5, // [5:5] is the sub-list for extension type_name
|
7, // [7:7] is the sub-list for method output_type
|
||||||
5, // [5:5] is the sub-list for extension extendee
|
7, // [7:7] is the sub-list for method input_type
|
||||||
0, // [0:5] is the sub-list for field type_name
|
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() }
|
func init() { file_caravan_caravan_msg_proto_init() }
|
||||||
@ -521,6 +607,7 @@ func file_caravan_caravan_msg_proto_init() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
file_caravan_caravan_db_proto_init()
|
file_caravan_caravan_db_proto_init()
|
||||||
|
file_comm_proto_init()
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_caravan_caravan_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_caravan_caravan_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*CaravanGetListReq); i {
|
switch v := v.(*CaravanGetListReq); i {
|
||||||
@ -618,6 +705,18 @@ func file_caravan_caravan_msg_proto_init() {
|
|||||||
return nil
|
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{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
@ -625,7 +724,7 @@ func file_caravan_caravan_msg_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_caravan_caravan_msg_proto_rawDesc,
|
RawDescriptor: file_caravan_caravan_msg_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 9,
|
NumMessages: 10,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user