From 6a4aa77ef21e2486c42b19035c4e6e155ac7014d Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 27 Feb 2024 14:17:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 5 +- comm/imodule.go | 1 + modules/atlas/module.go | 55 ++++++++++++ modules/exclusive/api_addexp.go | 35 ++++---- modules/reddot/api_get.go | 3 + modules/reddot/module.go | 5 ++ pb/exclusive_msg.pb.go | 147 ++++++++++++++++---------------- services/worker/main.go | 2 + 8 files changed, 163 insertions(+), 90 deletions(-) diff --git a/comm/const.go b/comm/const.go index 4b4f25ffe..ff84afe58 100644 --- a/comm/const.go +++ b/comm/const.go @@ -723,6 +723,9 @@ const ( //武馆派遣 Reddot18105 ReddotType = 18105 //熊猫武馆功夫派遣界面倒计时 Reddot18112 ReddotType = 18112 //熊猫武馆功夫派遣界面进度奖励待领取 + //武馆图鉴 + Reddot18108 ReddotType = 18108 //武馆图鉴待激活 + Reddot18111 ReddotType = 18111 //武馆图鉴待激活 // 羁绊 Reddot19103 ReddotType = 19103 // 当好感度奖励可以领取时,出现好感度奖励领取红点 Reddot19105 ReddotType = 19105 //当英雄等级解锁到一定程度,下方传记解锁新的传记的时候 @@ -741,7 +744,7 @@ const ( Reddot25101 ReddotType = 25101 // 每日任务进度红点 //武馆 Reddot18106 ReddotType = 18106 // 每日一练 - Reddot18111 ReddotType = 18111 // 今日剩余训练次数:x + // Reddot18111 ReddotType = 18111 // 今日剩余训练次数:x //云朵签到 Reddot27101 ReddotType = 27101 // 签到进度 //巨怪商队跑商 前端处理 diff --git a/comm/imodule.go b/comm/imodule.go index 290b72356..cb8ba810c 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -509,6 +509,7 @@ type ( } IPandaAtlas interface { + IGetReddot CheckActivatePandaAtlasCollect(uid string, id string) (err error) } //练功房 diff --git a/modules/atlas/module.go b/modules/atlas/module.go index cf4244ee7..ade30fc40 100644 --- a/modules/atlas/module.go +++ b/modules/atlas/module.go @@ -116,3 +116,58 @@ func (this *PandaAtlas) CheckActivatePandaAtlasCollect(uid string, id string) (e return } + +//红点查询 +func (this *PandaAtlas) Reddot(session comm.IUserSession, rid map[comm.ReddotType]struct{}) (items map[comm.ReddotType]*pb.ReddotItem) { + var ( + selfrid []comm.ReddotType = []comm.ReddotType{comm.Reddot18108, comm.Reddot18111} + info *pb.DBPandaAtlas + err error + ok bool + ) + items = make(map[comm.ReddotType]*pb.ReddotItem) + for _, v := range selfrid { + if _, ok = rid[v]; ok { + break + } + } + + if !ok { + return + } + if info, err = this.modelPandaAtlas.getPandaAtlasList(session.GetUserId()); err != nil { + return + } + for _, v := range selfrid { + if _, ok = rid[v]; ok { + switch v { + case comm.Reddot18108: // 铁匠铺手册台 + + for _, v := range info.Collect { + if !v.Activate { + items[comm.Reddot18108] = &pb.ReddotItem{ + Rid: int32(comm.Reddot18108), + Activated: true, + } + break + } + } + break + case comm.Reddot18111: // 铁匠铺手册台 + conf, err := this.configure.GetPandoAtlasAwardConf(info.Award + 1) + if err != nil { + break + } + if info.Score < conf.AtlasScore { // 校验积分够不够 + break + } + items[comm.Reddot18111] = &pb.ReddotItem{ + Rid: int32(comm.Reddot18111), + Activated: true, + } + break + } + } + } + return +} diff --git a/modules/exclusive/api_addexp.go b/modules/exclusive/api_addexp.go index 74700b0bb..21b9ea36c 100644 --- a/modules/exclusive/api_addexp.go +++ b/modules/exclusive/api_addexp.go @@ -15,10 +15,11 @@ func (this *apiComp) AddExpCheck(session comm.IUserSession, req *pb.ExclusiveAdd ///获取用户装备列表 func (this *apiComp) AddExp(session comm.IUserSession, req *pb.ExclusiveAddExpReq) (errdata *pb.ErrorData) { var ( - info *pb.DB_Exclusive - conf *cfg.GameExclusiveItemData - need []*cfg.Gameatn = make([]*cfg.Gameatn, 0) - err error + info *pb.DB_Exclusive + confs map[string]*cfg.GameExclusiveItemData = make(map[string]*cfg.GameExclusiveItemData) + conf *cfg.GameExclusiveItemData + need []*cfg.Gameatn = make([]*cfg.Gameatn, 0) + err error ) if info, err = this.module.model.getExclusivesById(session.GetUserId(), req.Oid); err != nil { @@ -28,22 +29,26 @@ func (this *apiComp) AddExp(session comm.IUserSession, req *pb.ExclusiveAddExpRe } return } - if conf, err = this.module.configure.GetGameExclusiveItem(req.Itemid); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ConfigNoFound, - Message: err.Error(), + for k, n := range req.Items { + if conf, err = this.module.configure.GetGameExclusiveItem(k); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Message: err.Error(), + } + return } - return + confs[k] = conf + need = append(need, &cfg.Gameatn{ + A: comm.ItemType, + T: k, + N: n, + }) + info.Exp += conf.Exp * n } - need = append(need, &cfg.Gameatn{ - A: comm.ItemType, - T: req.Itemid, - N: req.Num, - }) + if errdata = this.module.ConsumeRes(session, need, true); errdata != nil { return } - info.Exp += conf.Exp if err = this.module.model.updateExclusive(session.GetUserId(), info); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError, diff --git a/modules/reddot/api_get.go b/modules/reddot/api_get.go index 38ed89079..a153dc043 100644 --- a/modules/reddot/api_get.go +++ b/modules/reddot/api_get.go @@ -71,6 +71,9 @@ func (this *apiComp) Get(session comm.IUserSession, req *pb.ReddotGetReq) (errda for _, v := range this.module.ModuleUser.Reddot(session, reds) { reddotItem = append(reddotItem, v) } + for _, v := range this.module.atlas.Reddot(session, reds) { + reddotItem = append(reddotItem, v) + } if len(reddotItem) > 0 { session.SendMsg(string(this.module.GetType()), "change", &pb.ReddotChangePush{Rids: reddotItem}) } diff --git a/modules/reddot/module.go b/modules/reddot/module.go index a678c48ff..a7b8cc4cf 100644 --- a/modules/reddot/module.go +++ b/modules/reddot/module.go @@ -39,6 +39,7 @@ type Reddot struct { expedition comm.IExpedition //工会远征 api_comp *apiComp mainline comm.IMainline + atlas comm.IPandaAtlas } // 模块名 @@ -128,6 +129,10 @@ func (this *Reddot) Start() (err error) { return } this.guildgve = module.(comm.IGuildgve) + if module, err = this.service.GetModule(comm.ModulePandaAtlas); err != nil { + return + } + this.atlas = module.(comm.IPandaAtlas) return } diff --git a/pb/exclusive_msg.pb.go b/pb/exclusive_msg.pb.go index 77ec771e4..2f9c1cb83 100644 --- a/pb/exclusive_msg.pb.go +++ b/pb/exclusive_msg.pb.go @@ -113,9 +113,8 @@ type ExclusiveAddExpReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Oid string `protobuf:"bytes,1,opt,name=oid,proto3" json:"oid"` - Itemid string `protobuf:"bytes,2,opt,name=itemid,proto3" json:"itemid"` - Num int32 `protobuf:"varint,3,opt,name=num,proto3" json:"num"` + Oid string `protobuf:"bytes,1,opt,name=oid,proto3" json:"oid"` + Items map[string]int32 `protobuf:"bytes,2,rep,name=items,proto3" json:"items" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` } func (x *ExclusiveAddExpReq) Reset() { @@ -157,18 +156,11 @@ func (x *ExclusiveAddExpReq) GetOid() string { return "" } -func (x *ExclusiveAddExpReq) GetItemid() string { +func (x *ExclusiveAddExpReq) GetItems() map[string]int32 { if x != nil { - return x.Itemid + return x.Items } - return "" -} - -func (x *ExclusiveAddExpReq) GetNum() int32 { - if x != nil { - return x.Num - } - return 0 + return nil } type ExclusiveAddExpResp struct { @@ -416,7 +408,7 @@ func (x *ExclusiveStarUpResp) GetExclusives() *DB_Exclusive { return nil } -// 升星 +// 升阶级 type ExclusiveRankUpReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -673,52 +665,57 @@ var file_exclusive_exclusive_msg_proto_rawDesc = []byte{ 0x65, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x0a, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x52, - 0x0a, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x73, 0x22, 0x50, 0x0a, 0x12, 0x45, - 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x41, 0x64, 0x64, 0x45, 0x78, 0x70, 0x52, 0x65, + 0x0a, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x73, 0x22, 0x96, 0x01, 0x0a, 0x12, + 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x41, 0x64, 0x64, 0x45, 0x78, 0x70, 0x52, + 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6f, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x41, + 0x64, 0x64, 0x45, 0x78, 0x70, 0x52, 0x65, 0x71, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 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, 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, 0x44, 0x0a, 0x13, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, + 0x65, 0x41, 0x64, 0x64, 0x45, 0x78, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x0a, 0x45, + 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x52, 0x0a, + 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x73, 0x22, 0x27, 0x0a, 0x13, 0x45, 0x78, + 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6f, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x74, 0x65, 0x6d, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x74, 0x65, 0x6d, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6e, - 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x22, 0x44, 0x0a, - 0x13, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x41, 0x64, 0x64, 0x45, 0x78, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x0a, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x78, - 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x52, 0x0a, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, - 0x76, 0x65, 0x73, 0x22, 0x27, 0x0a, 0x13, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, - 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x69, 0x64, 0x22, 0x45, 0x0a, 0x14, - 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x0a, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x78, - 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x52, 0x0a, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, - 0x76, 0x65, 0x73, 0x22, 0x3c, 0x0a, 0x12, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, - 0x53, 0x74, 0x61, 0x72, 0x55, 0x70, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, - 0x61, 0x74, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x65, 0x61, 0x74, 0x69, - 0x64, 0x22, 0x44, 0x0a, 0x13, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x53, 0x74, - 0x61, 0x72, 0x55, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x0a, 0x45, 0x78, 0x63, 0x6c, - 0x75, 0x73, 0x69, 0x76, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, - 0x42, 0x5f, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x52, 0x0a, 0x45, 0x78, 0x63, - 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x73, 0x22, 0x26, 0x0a, 0x12, 0x45, 0x78, 0x63, 0x6c, 0x75, - 0x73, 0x69, 0x76, 0x65, 0x52, 0x61, 0x6e, 0x6b, 0x55, 0x70, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, - 0x03, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x69, 0x64, 0x22, - 0x44, 0x0a, 0x13, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x52, 0x61, 0x6e, 0x6b, - 0x55, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x0a, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, - 0x69, 0x76, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x5f, - 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x52, 0x0a, 0x45, 0x78, 0x63, 0x6c, 0x75, - 0x73, 0x69, 0x76, 0x65, 0x73, 0x22, 0x3c, 0x0a, 0x10, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, - 0x76, 0x65, 0x57, 0x65, 0x61, 0x72, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, - 0x65, 0x72, 0x6f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, - 0x6f, 0x69, 0x64, 0x22, 0x42, 0x0a, 0x11, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, - 0x57, 0x65, 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x0a, 0x45, 0x78, 0x63, 0x6c, - 0x75, 0x73, 0x69, 0x76, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, - 0x42, 0x5f, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x52, 0x0a, 0x45, 0x78, 0x63, - 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x73, 0x22, 0x44, 0x0a, 0x13, 0x45, 0x78, 0x63, 0x6c, 0x75, - 0x73, 0x69, 0x76, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x2d, - 0x0a, 0x0a, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, - 0x65, 0x52, 0x0a, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x73, 0x42, 0x06, 0x5a, - 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x69, 0x64, 0x22, 0x45, 0x0a, 0x14, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, + 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x0a, 0x45, + 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x52, 0x0a, + 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x73, 0x22, 0x3c, 0x0a, 0x12, 0x45, 0x78, + 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x72, 0x55, 0x70, 0x52, 0x65, 0x71, + 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, + 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x61, 0x74, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x05, 0x65, 0x61, 0x74, 0x69, 0x64, 0x22, 0x44, 0x0a, 0x13, 0x45, 0x78, 0x63, 0x6c, + 0x75, 0x73, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x72, 0x55, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x2d, 0x0a, 0x0a, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, + 0x76, 0x65, 0x52, 0x0a, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x73, 0x22, 0x26, + 0x0a, 0x12, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x52, 0x61, 0x6e, 0x6b, 0x55, + 0x70, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6f, 0x69, 0x64, 0x22, 0x44, 0x0a, 0x13, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, + 0x69, 0x76, 0x65, 0x52, 0x61, 0x6e, 0x6b, 0x55, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, + 0x0a, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, + 0x52, 0x0a, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x73, 0x22, 0x3c, 0x0a, 0x10, + 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x57, 0x65, 0x61, 0x72, 0x52, 0x65, 0x71, + 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, + 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x22, 0x42, 0x0a, 0x11, 0x45, 0x78, + 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x57, 0x65, 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x2d, 0x0a, 0x0a, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, + 0x76, 0x65, 0x52, 0x0a, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x73, 0x22, 0x44, + 0x0a, 0x13, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x2d, 0x0a, 0x0a, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, + 0x76, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45, + 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x52, 0x0a, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, + 0x69, 0x76, 0x65, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -733,7 +730,7 @@ func file_exclusive_exclusive_msg_proto_rawDescGZIP() []byte { return file_exclusive_exclusive_msg_proto_rawDescData } -var file_exclusive_exclusive_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_exclusive_exclusive_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_exclusive_exclusive_msg_proto_goTypes = []interface{}{ (*ExclusiveGetListReq)(nil), // 0: ExclusiveGetListReq (*ExclusiveGetListResp)(nil), // 1: ExclusiveGetListResp @@ -748,21 +745,23 @@ var file_exclusive_exclusive_msg_proto_goTypes = []interface{}{ (*ExclusiveWearReq)(nil), // 10: ExclusiveWearReq (*ExclusiveWearResp)(nil), // 11: ExclusiveWearResp (*ExclusiveChangePush)(nil), // 12: ExclusiveChangePush - (*DB_Exclusive)(nil), // 13: DB_Exclusive + nil, // 13: ExclusiveAddExpReq.ItemsEntry + (*DB_Exclusive)(nil), // 14: DB_Exclusive } var file_exclusive_exclusive_msg_proto_depIdxs = []int32{ - 13, // 0: ExclusiveGetListResp.Exclusives:type_name -> DB_Exclusive - 13, // 1: ExclusiveAddExpResp.Exclusives:type_name -> DB_Exclusive - 13, // 2: ExclusiveUpgradeResp.Exclusives:type_name -> DB_Exclusive - 13, // 3: ExclusiveStarUpResp.Exclusives:type_name -> DB_Exclusive - 13, // 4: ExclusiveRankUpResp.Exclusives:type_name -> DB_Exclusive - 13, // 5: ExclusiveWearResp.Exclusives:type_name -> DB_Exclusive - 13, // 6: ExclusiveChangePush.Exclusives:type_name -> DB_Exclusive - 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 + 14, // 0: ExclusiveGetListResp.Exclusives:type_name -> DB_Exclusive + 13, // 1: ExclusiveAddExpReq.items:type_name -> ExclusiveAddExpReq.ItemsEntry + 14, // 2: ExclusiveAddExpResp.Exclusives:type_name -> DB_Exclusive + 14, // 3: ExclusiveUpgradeResp.Exclusives:type_name -> DB_Exclusive + 14, // 4: ExclusiveStarUpResp.Exclusives:type_name -> DB_Exclusive + 14, // 5: ExclusiveRankUpResp.Exclusives:type_name -> DB_Exclusive + 14, // 6: ExclusiveWearResp.Exclusives:type_name -> DB_Exclusive + 14, // 7: ExclusiveChangePush.Exclusives:type_name -> DB_Exclusive + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_exclusive_exclusive_msg_proto_init() } @@ -935,7 +934,7 @@ func file_exclusive_exclusive_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_exclusive_exclusive_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 13, + NumMessages: 14, NumExtensions: 0, NumServices: 0, }, diff --git a/services/worker/main.go b/services/worker/main.go index 4d58c99cb..d3e2d0aac 100644 --- a/services/worker/main.go +++ b/services/worker/main.go @@ -26,6 +26,7 @@ import ( "go_dreamfactory/modules/enchant" "go_dreamfactory/modules/entertainment" "go_dreamfactory/modules/equipment" + "go_dreamfactory/modules/exclusive" "go_dreamfactory/modules/expedition" "go_dreamfactory/modules/forum" "go_dreamfactory/modules/friend" @@ -198,6 +199,7 @@ func main() { integral.NewModule(), plunder.NewModule(), expedition.NewModule(), + exclusive.NewModule(), ) }