From f7ab12e4fd264cb6845904a6a95320a48d727449 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Sun, 25 Jun 2023 18:27:02 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=88=98=E6=96=97?= =?UTF-8?q?=E7=BB=93=E6=9D=9F=E8=8B=B1=E9=9B=84=E7=BB=8F=E9=AA=8C=E6=8E=A8?= =?UTF-8?q?=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/mline/api_challengeover.go | 6 +- pb/hero_db.pb.go | 139 ++++++++++++++++++++--------- pb/mline_msg.pb.go | 45 ++++++---- 3 files changed, 124 insertions(+), 66 deletions(-) diff --git a/modules/mline/api_challengeover.go b/modules/mline/api_challengeover.go index 40b1e2f7b..d3116d0e9 100644 --- a/modules/mline/api_challengeover.go +++ b/modules/mline/api_challengeover.go @@ -83,10 +83,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MlineChall return } this.module.modelMline.modifyMlineData(session.GetUserId(), curChapter.Id, update) - // errdata = &pb.ErrorData{ - // Code: pb.ErrorCode_BattleNoWin, // 战斗失败了 - // Title: pb.ErrorCode_BattleNoWin.ToString(), - // } + rsp.Data = curChapter session.SendMsg(string(this.module.GetType()), MlineChallengeOverResp, rsp) // 数据推送 return @@ -204,6 +201,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MlineChall } } } + rsp.HeroExp = stageConf.HeroExp rsp.UserExp, _ = this.module.ModuleUser.ConsumePsAddExp(session, consumPs) this.module.modelMline.modifyMlineData(session.GetUserId(), curChapter.Id, update) rsp.Data = curChapter diff --git a/pb/hero_db.pb.go b/pb/hero_db.pb.go index c404896a5..2683e9124 100644 --- a/pb/hero_db.pb.go +++ b/pb/hero_db.pb.go @@ -321,8 +321,8 @@ type DBHeroRecord struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID 主键id Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID - Star4 int32 `protobuf:"varint,3,opt,name=star4,proto3" json:"star4"` // 4星保底 - Star5 int32 `protobuf:"varint,4,opt,name=star5,proto3" json:"star5"` // 5星保底 + Star4 int32 `protobuf:"varint,3,opt,name=star4,proto3" json:"star4"` // 4星保底 -- 新版抽卡废弃字段 + Star5 int32 `protobuf:"varint,4,opt,name=star5,proto3" json:"star5"` // 5星保底 -- 新版抽卡废弃字段 Mtime int64 `protobuf:"varint,5,opt,name=mtime,proto3" json:"mtime"` // 修改时间 Drawcount int32 `protobuf:"varint,6,opt,name=drawcount,proto3" json:"drawcount"` // 普通卡牌累计抽取次数 Condition map[string]int32 `protobuf:"bytes,7,rep,name=condition,proto3" json:"condition" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key recharge、login 等 value 累计抽卡次数 @@ -334,6 +334,9 @@ type DBHeroRecord struct { Inevitable int32 `protobuf:"varint,13,opt,name=inevitable,proto3" json:"inevitable"` //第2-30次抽奖必出一个5星英雄 Inevitable1 int32 `protobuf:"varint,14,opt,name=inevitable1,proto3" json:"inevitable1"` //第30-50次抽奖必出一个5星英雄 Race map[int32]int32 `protobuf:"bytes,15,rep,name=race,proto3" json:"race" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key 阵营类型 value count + Baodi4 map[int32]int32 `protobuf:"bytes,16,rep,name=baodi4,proto3" json:"baodi4" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 4星保底次数 key 阵营类型 value count + Baodi5 map[int32]int32 `protobuf:"bytes,17,rep,name=baodi5,proto3" json:"baodi5" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 5星保底次数 key 阵营类型 value count + Count map[int32]int32 `protobuf:"bytes,18,rep,name=count,proto3" json:"count" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 抽卡次数 key 阵营类型 value count } func (x *DBHeroRecord) Reset() { @@ -473,6 +476,27 @@ func (x *DBHeroRecord) GetRace() map[int32]int32 { return nil } +func (x *DBHeroRecord) GetBaodi4() map[int32]int32 { + if x != nil { + return x.Baodi4 + } + return nil +} + +func (x *DBHeroRecord) GetBaodi5() map[int32]int32 { + if x != nil { + return x.Baodi5 + } + return nil +} + +func (x *DBHeroRecord) GetCount() map[int32]int32 { + if x != nil { + return x.Count + } + return nil +} + // 英雄天赋系统 type DBHeroTalent struct { state protoimpl.MessageState @@ -634,7 +658,7 @@ var file_hero_hero_db_proto_rawDesc = []byte{ 0x3a, 0x0a, 0x0c, 0x46, 0x65, 0x74, 0x74, 0x65, 0x72, 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, 0x98, 0x05, 0x0a, 0x0c, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xde, 0x07, 0x0a, 0x0c, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x63, 0x6f, 0x72, 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, 0x14, @@ -665,33 +689,54 @@ var file_hero_hero_db_proto_rawDesc = []byte{ 0x62, 0x6c, 0x65, 0x31, 0x12, 0x2b, 0x0a, 0x04, 0x72, 0x61, 0x63, 0x65, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x52, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x72, 0x61, 0x63, - 0x65, 0x1a, 0x3c, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, - 0x3c, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x35, 0x48, 0x65, 0x72, 0x6f, 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, 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, 0x22, 0xb6, 0x01, 0x0a, 0x0c, 0x44, 0x42, 0x48, 0x65, 0x72, - 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, - 0x6f, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, - 0x64, 0x12, 0x31, 0x0a, 0x06, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, - 0x2e, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x74, 0x61, - 0x6c, 0x65, 0x6e, 0x74, 0x1a, 0x39, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 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, 0x2a, - 0x2f, 0x0a, 0x08, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x48, - 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x69, 0x6c, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, - 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x6f, 0x6e, 0x67, 0x46, 0x75, 0x10, 0x01, - 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x12, 0x31, 0x0a, 0x06, 0x62, 0x61, 0x6f, 0x64, 0x69, 0x34, 0x18, 0x10, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x2e, 0x42, 0x61, 0x6f, 0x64, 0x69, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x62, 0x61, + 0x6f, 0x64, 0x69, 0x34, 0x12, 0x31, 0x0a, 0x06, 0x62, 0x61, 0x6f, 0x64, 0x69, 0x35, 0x18, 0x11, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x2e, 0x42, 0x61, 0x6f, 0x64, 0x69, 0x35, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x06, 0x62, 0x61, 0x6f, 0x64, 0x69, 0x35, 0x12, 0x2e, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x3c, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 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, 0x3c, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x35, 0x48, 0x65, + 0x72, 0x6f, 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, 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, 0x39, 0x0a, 0x0b, + 0x42, 0x61, 0x6f, 0x64, 0x69, 0x34, 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, 0x39, 0x0a, 0x0b, 0x42, 0x61, 0x6f, 0x64, 0x69, + 0x35, 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, 0x38, 0x0a, 0x0a, 0x43, 0x6f, 0x75, 0x6e, 0x74, 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, 0xb6, 0x01, 0x0a, + 0x0c, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x06, 0x74, 0x61, 0x6c, 0x65, 0x6e, + 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, + 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x06, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x1a, 0x39, 0x0a, 0x0b, 0x54, 0x61, + 0x6c, 0x65, 0x6e, 0x74, 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, 0x2a, 0x2f, 0x0a, 0x08, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x69, 0x6c, + 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x6f, + 0x6e, 0x67, 0x46, 0x75, 0x10, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -707,7 +752,7 @@ func file_hero_hero_db_proto_rawDescGZIP() []byte { } var file_hero_hero_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_hero_hero_db_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_hero_hero_db_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_hero_hero_db_proto_goTypes = []interface{}{ (HeroType)(0), // 0: HeroType (*DBHero)(nil), // 1: DBHero @@ -722,30 +767,36 @@ var file_hero_hero_db_proto_goTypes = []interface{}{ nil, // 10: DBHeroRecord.ConditionEntry nil, // 11: DBHeroRecord.Star5HeroEntry nil, // 12: DBHeroRecord.RaceEntry - nil, // 13: DBHeroTalent.TalentEntry - (*SkillData)(nil), // 14: SkillData - (*DB_EquipmentSuit)(nil), // 15: DB_EquipmentSuit + nil, // 13: DBHeroRecord.Baodi4Entry + nil, // 14: DBHeroRecord.Baodi5Entry + nil, // 15: DBHeroRecord.CountEntry + nil, // 16: DBHeroTalent.TalentEntry + (*SkillData)(nil), // 17: SkillData + (*DB_EquipmentSuit)(nil), // 18: DB_EquipmentSuit } var file_hero_hero_db_proto_depIdxs = []int32{ - 14, // 0: DBHero.normalSkill:type_name -> SkillData + 17, // 0: DBHero.normalSkill:type_name -> SkillData 4, // 1: DBHero.property:type_name -> DBHero.PropertyEntry 5, // 2: DBHero.addProperty:type_name -> DBHero.AddPropertyEntry 6, // 3: DBHero.juexProperty:type_name -> DBHero.JuexPropertyEntry 0, // 4: DBHero.status:type_name -> HeroType - 15, // 5: DBHero.suits:type_name -> DB_EquipmentSuit + 18, // 5: DBHero.suits:type_name -> DB_EquipmentSuit 7, // 6: DBHero.talentProperty:type_name -> DBHero.TalentPropertyEntry - 14, // 7: DBHero.equipSkill:type_name -> SkillData + 17, // 7: DBHero.equipSkill:type_name -> SkillData 8, // 8: DBHero.horoscopeProperty:type_name -> DBHero.HoroscopePropertyEntry 9, // 9: DBHero.fetters:type_name -> DBHero.FettersEntry 10, // 10: DBHeroRecord.condition:type_name -> DBHeroRecord.ConditionEntry 11, // 11: DBHeroRecord.star5Hero:type_name -> DBHeroRecord.Star5HeroEntry 12, // 12: DBHeroRecord.race:type_name -> DBHeroRecord.RaceEntry - 13, // 13: DBHeroTalent.talent:type_name -> DBHeroTalent.TalentEntry - 14, // [14:14] is the sub-list for method output_type - 14, // [14:14] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 13, // 13: DBHeroRecord.baodi4:type_name -> DBHeroRecord.Baodi4Entry + 14, // 14: DBHeroRecord.baodi5:type_name -> DBHeroRecord.Baodi5Entry + 15, // 15: DBHeroRecord.count:type_name -> DBHeroRecord.CountEntry + 16, // 16: DBHeroTalent.talent:type_name -> DBHeroTalent.TalentEntry + 17, // [17:17] is the sub-list for method output_type + 17, // [17:17] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name } func init() { file_hero_hero_db_proto_init() } @@ -799,7 +850,7 @@ func file_hero_hero_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_hero_hero_db_proto_rawDesc, NumEnums: 1, - NumMessages: 13, + NumMessages: 16, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/mline_msg.pb.go b/pb/mline_msg.pb.go index 7865908f6..1e6d67497 100644 --- a/pb/mline_msg.pb.go +++ b/pb/mline_msg.pb.go @@ -402,6 +402,7 @@ type MlineChallengeOverResp struct { Data *DBMline `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` //当前章节信息 Reward []*UserAssets `protobuf:"bytes,2,rep,name=reward,proto3" json:"reward"` // 奖励 UserExp int32 `protobuf:"varint,3,opt,name=userExp,proto3" json:"userExp"` + HeroExp int32 `protobuf:"varint,4,opt,name=heroExp,proto3" json:"heroExp"` } func (x *MlineChallengeOverResp) Reset() { @@ -457,6 +458,13 @@ func (x *MlineChallengeOverResp) GetUserExp() int32 { return 0 } +func (x *MlineChallengeOverResp) GetHeroExp() int32 { + if x != nil { + return x.HeroExp + } + return 0 +} + // 扫荡关卡 type MlineCleanStageReq struct { state protoimpl.MessageState @@ -599,24 +607,25 @@ var file_mline_mline_msg_proto_rawDesc = []byte{ 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x75, 0x0a, 0x16, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, - 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, - 0x44, 0x42, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, - 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 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, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x22, 0x2e, 0x0a, 0x12, - 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x22, 0x54, 0x0a, 0x13, - 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, - 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 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, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x16, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x43, + 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, + 0x2e, 0x44, 0x42, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x23, + 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 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, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x12, 0x18, 0x0a, + 0x07, 0x68, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, + 0x68, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x22, 0x2e, 0x0a, 0x12, 0x4d, 0x6c, 0x69, 0x6e, 0x65, + 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, + 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x22, 0x54, 0x0a, 0x13, 0x4d, 0x6c, 0x69, 0x6e, 0x65, + 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, + 0x0a, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x18, 0x02, 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 ( From b773c55d60c1f81fcb6e5c98c43e2f47d75840a8 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Sun, 25 Jun 2023 18:33:49 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=8B=B1=E9=9B=84=E7=BB=8F=E9=AA=8C?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/viking/api_challengeover.go | 4 +- pb/viking_msg.pb.go | 104 +++++++++++++--------------- 2 files changed, 49 insertions(+), 59 deletions(-) diff --git a/modules/viking/api_challengeover.go b/modules/viking/api_challengeover.go index 8dc415eec..7d61478e9 100644 --- a/modules/viking/api_challengeover.go +++ b/modules/viking/api_challengeover.go @@ -27,14 +27,12 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal bWin bool // 战斗是否胜利 atno []*pb.UserAtno // atno 类型 del []string // 自动出售的装备 - changExp map[string]int32 res []*cfg.Gameatn // 最后获得的资源 bHelp bool oldDifficulty int32 // 记录通关之前的难度 consumPs int32 userExp int32 ) - changExp = make(map[string]int32, 0) mapData = make(map[string]interface{}, 0) reward = make([]*cfg.Gameatn, 0) if errdata = this.ChallengeOverCheck(session, req); errdata != nil { @@ -163,7 +161,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal Data: viking, Asset: atno, Sell: del, - Heroexp: changExp, + Heroexp: vikingCfg.Heroexp, UserExp: userExp, }) if user := this.module.ModuleUser.GetUser(session.GetUserId()); user != nil { diff --git a/pb/viking_msg.pb.go b/pb/viking_msg.pb.go index ca340d706..d6dc28ce6 100644 --- a/pb/viking_msg.pb.go +++ b/pb/viking_msg.pb.go @@ -325,11 +325,11 @@ type VikingChallengeOverResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data *DBViking `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` - Asset []*UserAtno `protobuf:"bytes,2,rep,name=asset,proto3" json:"asset"` // 推送atno - Sell []string `protobuf:"bytes,3,rep,name=sell,proto3" json:"sell"` // 自动出售的装备 - Heroexp map[string]int32 `protobuf:"bytes,4,rep,name=heroexp,proto3" json:"heroexp" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 英雄获得经验 - UserExp int32 `protobuf:"varint,5,opt,name=userExp,proto3" json:"userExp"` + Data *DBViking `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` + Asset []*UserAtno `protobuf:"bytes,2,rep,name=asset,proto3" json:"asset"` // 推送atno + Sell []string `protobuf:"bytes,3,rep,name=sell,proto3" json:"sell"` // 自动出售的装备 + Heroexp int32 `protobuf:"varint,4,opt,name=heroexp,proto3" json:"heroexp"` // 英雄获得经验 + UserExp int32 `protobuf:"varint,5,opt,name=userExp,proto3" json:"userExp"` } func (x *VikingChallengeOverResp) Reset() { @@ -385,11 +385,11 @@ func (x *VikingChallengeOverResp) GetSell() []string { return nil } -func (x *VikingChallengeOverResp) GetHeroexp() map[string]int32 { +func (x *VikingChallengeOverResp) GetHeroexp() int32 { if x != nil { return x.Heroexp } - return nil + return 0 } func (x *VikingChallengeOverResp) GetUserExp() int32 { @@ -636,38 +636,32 @@ var file_viking_viking_msg_proto_rawDesc = []byte{ 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x61, - 0x75, 0x74, 0x6f, 0x22, 0x84, 0x02, 0x0a, 0x17, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, + 0x75, 0x74, 0x6f, 0x22, 0xa1, 0x01, 0x0a, 0x17, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x73, - 0x65, 0x6c, 0x6c, 0x12, 0x3f, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x65, 0x78, 0x70, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, - 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x48, - 0x65, 0x72, 0x6f, 0x65, 0x78, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x72, - 0x6f, 0x65, 0x78, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x1a, 0x3a, - 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x65, 0x78, 0x70, 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, 0x24, 0x0a, 0x0c, 0x56, 0x69, - 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0x2e, 0x0a, 0x0d, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x09, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x22, 0x47, 0x0a, 0x11, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x39, 0x0a, 0x12, 0x56, 0x69, 0x6b, - 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x23, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, - 0x61, 0x6e, 0x6b, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x6c, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x65, 0x78, 0x70, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x65, 0x78, 0x70, 0x12, 0x18, 0x0a, + 0x07, 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, + 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x22, 0x24, 0x0a, 0x0c, 0x56, 0x69, 0x6b, 0x69, 0x6e, + 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2e, 0x0a, + 0x0d, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, + 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x47, 0x0a, + 0x11, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x39, 0x0a, 0x12, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, + 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x05, + 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, + 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, + 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -682,7 +676,7 @@ func file_viking_viking_msg_proto_rawDescGZIP() []byte { return file_viking_viking_msg_proto_rawDescData } -var file_viking_viking_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_viking_viking_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_viking_viking_msg_proto_goTypes = []interface{}{ (*VikingGetListReq)(nil), // 0: VikingGetListReq (*VikingGetListResp)(nil), // 1: VikingGetListResp @@ -694,29 +688,27 @@ var file_viking_viking_msg_proto_goTypes = []interface{}{ (*VikingBuyResp)(nil), // 7: VikingBuyResp (*VikingRankListReq)(nil), // 8: VikingRankListReq (*VikingRankListResp)(nil), // 9: VikingRankListResp - nil, // 10: VikingChallengeOverResp.HeroexpEntry - (*DBViking)(nil), // 11: DBViking - (*BattleFormation)(nil), // 12: BattleFormation - (*BattleInfo)(nil), // 13: BattleInfo - (*BattleReport)(nil), // 14: BattleReport - (*UserAtno)(nil), // 15: UserAtno - (*DBVikingRank)(nil), // 16: DBVikingRank + (*DBViking)(nil), // 10: DBViking + (*BattleFormation)(nil), // 11: BattleFormation + (*BattleInfo)(nil), // 12: BattleInfo + (*BattleReport)(nil), // 13: BattleReport + (*UserAtno)(nil), // 14: UserAtno + (*DBVikingRank)(nil), // 15: DBVikingRank } var file_viking_viking_msg_proto_depIdxs = []int32{ - 11, // 0: VikingGetListResp.data:type_name -> DBViking - 12, // 1: VikingChallengeReq.battle:type_name -> BattleFormation - 13, // 2: VikingChallengeResp.info:type_name -> BattleInfo - 14, // 3: VikingChallengeOverReq.report:type_name -> BattleReport - 11, // 4: VikingChallengeOverResp.data:type_name -> DBViking - 15, // 5: VikingChallengeOverResp.asset:type_name -> UserAtno - 10, // 6: VikingChallengeOverResp.heroexp:type_name -> VikingChallengeOverResp.HeroexpEntry - 11, // 7: VikingBuyResp.data:type_name -> DBViking - 16, // 8: VikingRankListResp.ranks:type_name -> DBVikingRank - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 10, // 0: VikingGetListResp.data:type_name -> DBViking + 11, // 1: VikingChallengeReq.battle:type_name -> BattleFormation + 12, // 2: VikingChallengeResp.info:type_name -> BattleInfo + 13, // 3: VikingChallengeOverReq.report:type_name -> BattleReport + 10, // 4: VikingChallengeOverResp.data:type_name -> DBViking + 14, // 5: VikingChallengeOverResp.asset:type_name -> UserAtno + 10, // 6: VikingBuyResp.data:type_name -> DBViking + 15, // 7: VikingRankListResp.ranks:type_name -> DBVikingRank + 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_viking_viking_msg_proto_init() } @@ -855,7 +847,7 @@ func file_viking_viking_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_viking_viking_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 11, + NumMessages: 10, NumExtensions: 0, NumServices: 0, }, From 14c145bc4fd6cf3fe267640411d9129e485dd0c3 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Sun, 25 Jun 2023 18:45:55 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E7=BB=B4=E4=BA=AC=E6=88=98=E6=96=97=20?= =?UTF-8?q?=E8=8E=B7=E5=BE=97=E8=8B=B1=E9=9B=84=E7=BB=8F=E9=AA=8C=E8=BF=98?= =?UTF-8?q?=E6=98=AF=E7=94=A8map=20=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/viking/api_challengeover.go | 5 +- pb/viking_msg.pb.go | 104 +++++++++++++++------------- 2 files changed, 60 insertions(+), 49 deletions(-) diff --git a/modules/viking/api_challengeover.go b/modules/viking/api_challengeover.go index 7d61478e9..eca9cd0e8 100644 --- a/modules/viking/api_challengeover.go +++ b/modules/viking/api_challengeover.go @@ -27,12 +27,14 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal bWin bool // 战斗是否胜利 atno []*pb.UserAtno // atno 类型 del []string // 自动出售的装备 + changExp map[string]int32 res []*cfg.Gameatn // 最后获得的资源 bHelp bool oldDifficulty int32 // 记录通关之前的难度 consumPs int32 userExp int32 ) + changExp = make(map[string]int32, 0) mapData = make(map[string]interface{}, 0) reward = make([]*cfg.Gameatn, 0) if errdata = this.ChallengeOverCheck(session, req); errdata != nil { @@ -150,6 +152,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal for _, v := range req.Report.Info.Redflist[0].Team { if vikingCfg.Heroexp > 0 && !v.Ishelp { // 助战英雄不加经验 this.module.ModuleHero.AddHeroExp(session, v.Oid, vikingCfg.Heroexp) + changExp[v.HeroID] = vikingCfg.Heroexp } if v.Ishelp { bHelp = true @@ -161,7 +164,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal Data: viking, Asset: atno, Sell: del, - Heroexp: vikingCfg.Heroexp, + Heroexp: changExp, UserExp: userExp, }) if user := this.module.ModuleUser.GetUser(session.GetUserId()); user != nil { diff --git a/pb/viking_msg.pb.go b/pb/viking_msg.pb.go index d6dc28ce6..ca340d706 100644 --- a/pb/viking_msg.pb.go +++ b/pb/viking_msg.pb.go @@ -325,11 +325,11 @@ type VikingChallengeOverResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data *DBViking `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` - Asset []*UserAtno `protobuf:"bytes,2,rep,name=asset,proto3" json:"asset"` // 推送atno - Sell []string `protobuf:"bytes,3,rep,name=sell,proto3" json:"sell"` // 自动出售的装备 - Heroexp int32 `protobuf:"varint,4,opt,name=heroexp,proto3" json:"heroexp"` // 英雄获得经验 - UserExp int32 `protobuf:"varint,5,opt,name=userExp,proto3" json:"userExp"` + Data *DBViking `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` + Asset []*UserAtno `protobuf:"bytes,2,rep,name=asset,proto3" json:"asset"` // 推送atno + Sell []string `protobuf:"bytes,3,rep,name=sell,proto3" json:"sell"` // 自动出售的装备 + Heroexp map[string]int32 `protobuf:"bytes,4,rep,name=heroexp,proto3" json:"heroexp" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 英雄获得经验 + UserExp int32 `protobuf:"varint,5,opt,name=userExp,proto3" json:"userExp"` } func (x *VikingChallengeOverResp) Reset() { @@ -385,11 +385,11 @@ func (x *VikingChallengeOverResp) GetSell() []string { return nil } -func (x *VikingChallengeOverResp) GetHeroexp() int32 { +func (x *VikingChallengeOverResp) GetHeroexp() map[string]int32 { if x != nil { return x.Heroexp } - return 0 + return nil } func (x *VikingChallengeOverResp) GetUserExp() int32 { @@ -636,32 +636,38 @@ var file_viking_viking_msg_proto_rawDesc = []byte{ 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x61, - 0x75, 0x74, 0x6f, 0x22, 0xa1, 0x01, 0x0a, 0x17, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, + 0x75, 0x74, 0x6f, 0x22, 0x84, 0x02, 0x0a, 0x17, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x73, - 0x65, 0x6c, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x65, 0x78, 0x70, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x65, 0x78, 0x70, 0x12, 0x18, 0x0a, - 0x07, 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, - 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x22, 0x24, 0x0a, 0x0c, 0x56, 0x69, 0x6b, 0x69, 0x6e, - 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2e, 0x0a, - 0x0d, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, - 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x47, 0x0a, - 0x11, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x39, 0x0a, 0x12, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, - 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x05, - 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, - 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, - 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x6c, 0x6c, 0x12, 0x3f, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x65, 0x78, 0x70, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, + 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x48, + 0x65, 0x72, 0x6f, 0x65, 0x78, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x72, + 0x6f, 0x65, 0x78, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x1a, 0x3a, + 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x65, 0x78, 0x70, 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, 0x24, 0x0a, 0x0c, 0x56, 0x69, + 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0x2e, 0x0a, 0x0d, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x09, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x22, 0x47, 0x0a, 0x11, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x39, 0x0a, 0x12, 0x56, 0x69, 0x6b, + 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x23, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, + 0x61, 0x6e, 0x6b, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -676,7 +682,7 @@ func file_viking_viking_msg_proto_rawDescGZIP() []byte { return file_viking_viking_msg_proto_rawDescData } -var file_viking_viking_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_viking_viking_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_viking_viking_msg_proto_goTypes = []interface{}{ (*VikingGetListReq)(nil), // 0: VikingGetListReq (*VikingGetListResp)(nil), // 1: VikingGetListResp @@ -688,27 +694,29 @@ var file_viking_viking_msg_proto_goTypes = []interface{}{ (*VikingBuyResp)(nil), // 7: VikingBuyResp (*VikingRankListReq)(nil), // 8: VikingRankListReq (*VikingRankListResp)(nil), // 9: VikingRankListResp - (*DBViking)(nil), // 10: DBViking - (*BattleFormation)(nil), // 11: BattleFormation - (*BattleInfo)(nil), // 12: BattleInfo - (*BattleReport)(nil), // 13: BattleReport - (*UserAtno)(nil), // 14: UserAtno - (*DBVikingRank)(nil), // 15: DBVikingRank + nil, // 10: VikingChallengeOverResp.HeroexpEntry + (*DBViking)(nil), // 11: DBViking + (*BattleFormation)(nil), // 12: BattleFormation + (*BattleInfo)(nil), // 13: BattleInfo + (*BattleReport)(nil), // 14: BattleReport + (*UserAtno)(nil), // 15: UserAtno + (*DBVikingRank)(nil), // 16: DBVikingRank } var file_viking_viking_msg_proto_depIdxs = []int32{ - 10, // 0: VikingGetListResp.data:type_name -> DBViking - 11, // 1: VikingChallengeReq.battle:type_name -> BattleFormation - 12, // 2: VikingChallengeResp.info:type_name -> BattleInfo - 13, // 3: VikingChallengeOverReq.report:type_name -> BattleReport - 10, // 4: VikingChallengeOverResp.data:type_name -> DBViking - 14, // 5: VikingChallengeOverResp.asset:type_name -> UserAtno - 10, // 6: VikingBuyResp.data:type_name -> DBViking - 15, // 7: VikingRankListResp.ranks:type_name -> DBVikingRank - 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 + 11, // 0: VikingGetListResp.data:type_name -> DBViking + 12, // 1: VikingChallengeReq.battle:type_name -> BattleFormation + 13, // 2: VikingChallengeResp.info:type_name -> BattleInfo + 14, // 3: VikingChallengeOverReq.report:type_name -> BattleReport + 11, // 4: VikingChallengeOverResp.data:type_name -> DBViking + 15, // 5: VikingChallengeOverResp.asset:type_name -> UserAtno + 10, // 6: VikingChallengeOverResp.heroexp:type_name -> VikingChallengeOverResp.HeroexpEntry + 11, // 7: VikingBuyResp.data:type_name -> DBViking + 16, // 8: VikingRankListResp.ranks:type_name -> DBVikingRank + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_viking_viking_msg_proto_init() } @@ -847,7 +855,7 @@ func file_viking_viking_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_viking_viking_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 11, NumExtensions: 0, NumServices: 0, }, From aa1fff7273e9cca4203f8389a95b7f344467a386 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Sun, 25 Jun 2023 18:54:46 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BB=8E=E6=8E=89=E8=90=BD=E8=A1=A8?= =?UTF-8?q?=E8=8E=B7=E5=BE=97=E7=9A=84=E6=95=B0=E6=8D=AE=E4=B9=9F=E6=8F=92?= =?UTF-8?q?=E5=85=A5=E5=88=B0=E8=8E=B7=E5=BE=97=E9=81=93=E5=85=B7=E4=B8=AD?= =?UTF-8?q?=EF=BC=8C=E5=B9=B6=E9=80=9A=E7=9F=A5=E5=AE=A2=E6=88=B7=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/mline/api_challengeover.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/mline/api_challengeover.go b/modules/mline/api_challengeover.go index d3116d0e9..3c735eec2 100644 --- a/modules/mline/api_challengeover.go +++ b/modules/mline/api_challengeover.go @@ -189,6 +189,13 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MlineChall if errdata = this.module.DispenseRes(session, lotteryward, true); errdata != nil { this.module.Debugf("Mline lotteryward DispenseRes err:+%v", lotteryward) } + for _, v := range lotteryward { + rsp.Reward = append(rsp.Reward, &pb.UserAssets{ + A: v.A, + T: v.T, + N: v.N, + }) + } } // 加英雄经验