This commit is contained in:
liwei1dao 2023-01-12 15:28:46 +08:00
commit 60ccd20504
27 changed files with 1302 additions and 660 deletions

View File

@ -45,8 +45,9 @@ func (s *SociatyBossView) CreateView(t *model.TestCase) fyne.CanvasObject {
defer loadSociaty()
buzhenBtn := widget.NewButton("布阵", s.buzhen)
challengeBtn := widget.NewButton("挑战", s.challenge)
btns := container.NewHBox(buzhenBtn, challengeBtn)
challengestartBtn := widget.NewButton("开始挑战", s.challengestart)
challengefinishBtn := widget.NewButton("挑战结束", s.challengefinish)
btns := container.NewHBox(buzhenBtn, challengestartBtn, challengefinishBtn)
c := container.NewBorder(btns, nil, nil, nil)
s.listenTeams()
@ -82,9 +83,36 @@ func (s *SociatyBossView) listenTeams() {
s.teamFlag = true
}
// 挑战
func (s *SociatyBossView) challenge() {
// 挑战开始
func (s *SociatyBossView) challengestart() {
if err := service.GetPttService().SendToClient(
string(comm.ModuleSociaty),
sociaty.SociatySubTypeChallengestart,
&pb.SociatyBChallengeStartReq{
SociatyId: s.sociatyId,
},
); err != nil {
logrus.Error(err)
return
}
}
// 挑战结束
func (s *SociatyBossView) challengefinish() {
if err := service.GetPttService().SendToClient(
string(comm.ModuleSociaty),
sociaty.SociatySubTypeChallengefinish,
&pb.SociatyBChallengeFinishReq{
Ptype: pb.PlayType_sociaty,
Report: &pb.BattleReport{
Costtime: 180,
Harm: 180300,
},
},
); err != nil {
logrus.Error(err)
return
}
}
//布阵
@ -148,6 +176,8 @@ func (s *SociatyBossView) buzhen() {
s.teams = make(map[int32]*pb.ChallengeTeams)
}
s.teams[1] = &pb.ChallengeTeams{Infos: teams}
team1.Refresh()
team1Box.Refresh()
}
// 添加二队英雄
@ -194,6 +224,16 @@ func (s *SociatyBossView) buzhen() {
// 保存阵容
saveBuzhen.OnTapped = func() {
// var fs []*pb.BattleFormation
// for _, v := range s.teams {
// heroIds := []string{}
// for _, id := range v.Infos {
// heroIds = append(heroIds, id.HeroId)
// }
// fs = append(fs, &pb.BattleFormation{
// Format: heroIds,
// })
// }
if err := service.GetPttService().SendToClient(string(comm.ModuleSociaty),
sociaty.SociatySubTypeFormation, &pb.SociatyBFormationReq{
SociatyId: s.sociatyId,

View File

@ -707,3 +707,8 @@ const (
MainStarType2 = 1 //死亡人数不超过{0}人
MainStarType3 = 1 //不超过{0}回合通关
)
const (
UseType1 int32 = 1 //英雄碎片
UseType8 int32 = 8 //觉醒材料合成
)

View File

@ -28,24 +28,20 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
// GetMsgDistribute 获取消息分发规则读取配置表
func (this *configureComp) GetMsgDistribute(msgmid, msguid string) (rule string, ok bool) {
var (
err error
v interface{}
item *cfg.GameMsgdistribData
)
if v, err = this.GetConfigure(game_msgdistrib); err != nil {
ok = false
return
} else {
if v, err := this.GetConfigure(game_msgdistrib); err == nil {
if item, ok = v.(*cfg.GameMsgdistrib).GetDataMap()[msgmid]; ok && item.Open {
rule = item.Routrules
return
} else {
msgid := strings.ToLower(fmt.Sprintf("%s.%s", msgmid, msguid))
if item, ok = v.(*cfg.GameMsgdistrib).GetDataMap()[msgid]; ok && item.Open {
rule = item.Routrules
return
}
ok = false
}
}
ok = false
return
}

View File

@ -5,7 +5,6 @@ import (
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs"
"go_dreamfactory/utils"
"google.golang.org/protobuf/proto"
)
@ -22,8 +21,8 @@ func (this *apiComp) CreateOrderCheck(session comm.IUserSession, req *pb.Gourmet
///美食城创建订单
func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.GourmetCreateOrderReq) (code pb.ErrorCode, data proto.Message) {
var (
res []*cfg.Gameatn // 订单消耗
costTime int32
res []*cfg.Gameatn // 订单消耗
costTime int32 // 当前订单的总耗时
szTime map[int32]int32 // 记录每个类型的订单耗时 key 是技能组type value 订单耗时
privilegeAddItme int32 // 特权额外增加的时间
)
@ -48,10 +47,10 @@ func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.GourmetCreat
}
}
if !utils.IsToday(_gourmet.Ctime) { // 跨天了
_gourmet.Ctime = configure.Now().Unix()
_gourmet.OrderCostTime = 0
}
// if !utils.IsToday(_gourmet.Ctime) { // 跨天了
// _gourmet.Ctime = configure.Now().Unix()
// _gourmet.OrderCostTime = 0
// }
// 计算消耗
for _, order := range req.Order {
if order.FoodCount == 0 {
@ -97,9 +96,6 @@ func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.GourmetCreat
}
// 重新计算时间
for _, v := range _gourmet.Foods {
if v.FoodCount == 0 {
continue
}
if v1, ok := szTime[v.FoodType]; ok {
v.CookTime = v1 * v.FoodCount
}

View File

@ -67,8 +67,8 @@ func (this *modelGourmet) modifyGourmetDataByObjId(uid string, data map[string]i
// 计算订单信息
func (this *modelGourmet) CalculationGourmet(uid string, gourmet *pb.DBGourmet) {
var (
szTime map[int32]int32
zeroTime int64 // 当前时间对应的0点时间戳,用来判断是否跨天了
szTime map[int32]int32 // 食材耗时
zeroTime int64 // 当前时间对应的0点时间戳,用来判断是否跨天了
)
mapData := make(map[string]interface{}, 0)
szTime = make(map[int32]int32, 0)
@ -87,13 +87,8 @@ func (this *modelGourmet) CalculationGourmet(uid string, gourmet *pb.DBGourmet)
// 有订单在做
zeroTime = utils.GetTodayZeroTime(configure.Now().Unix())
for {
if gourmet.CookingFood != nil {
if configure.Now().Unix() < gourmet.CookingFood.ETime {
break
}
}
bRet := false
if (gourmet.CookingFood != nil && gourmet.CookingFood.ETime >= configure.Now().Unix()) || gourmet.CookingFood == nil {
for _, order := range gourmet.Foods {
_gourmetcfg := this.module.configure.GetGourmetConfigData(order.FoodType, gourmet.Skill[order.FoodType]) // 美食家配置表
if order.FoodCount > 0 {
@ -109,7 +104,13 @@ func (this *modelGourmet) CalculationGourmet(uid string, gourmet *pb.DBGourmet)
gourmet.CookingFood = &pb.Cooking{}
gourmet.CookingFood.STime = configure.Now().Unix()
gourmet.CookingFood.ETime = configure.Now().Unix() + int64(szTime[order.FoodType])
// 如果此时跨天了 清除订单时常
if gourmet.CookingFood.STime < zeroTime && zeroTime <= gourmet.CookingFood.ETime { // 跨天清空订单耗时
gourmet.OrderCostTime = 0
for _, order := range gourmet.Foods { // 重新计算订单时常
gourmet.OrderCostTime += order.FoodCount * szTime[order.FoodType]
}
}
} else {
gourmet.CookingFood.STime += int64(szTime[order.FoodType])
oldTime := gourmet.CookingFood.ETime
@ -117,8 +118,7 @@ func (this *modelGourmet) CalculationGourmet(uid string, gourmet *pb.DBGourmet)
// 如果此时跨天了 清除订单时常
if oldTime < zeroTime && zeroTime <= gourmet.CookingFood.ETime { // 跨天清空订单耗时
gourmet.OrderCostTime = 0
// 重新计算订单时常
for _, order := range gourmet.Foods {
for _, order := range gourmet.Foods { // 重新计算订单时常
gourmet.OrderCostTime += order.FoodCount * szTime[order.FoodType]
}
}
@ -128,21 +128,14 @@ func (this *modelGourmet) CalculationGourmet(uid string, gourmet *pb.DBGourmet)
gourmet.Items = this.module.configure.GetMultipleDropReward(_gourmetcfg.Using, _gourmetcfg.Propsgroup, gourmet.Items) // 获取掉落奖励
// 记录下订单时间
gourmet.Ctime = gourmet.CookingFood.ETime
mapData["ctime"] = gourmet.Ctime
bRet = true
gourmet.TotalTime += szTime[order.FoodType]
mapData["totalTime"] = gourmet.TotalTime
}
}
if !bRet { // 没有订单可以做
if gourmet.CookingFood != nil {
if gourmet.CookingFood.ETime <= configure.Now().Unix() {
_gourmetcfg := this.module.configure.GetGourmetConfigData(gourmet.CookingFood.FoodType, gourmet.Skill[gourmet.CookingFood.FoodType])
gourmet.Items = this.module.configure.GetMultipleDropReward(_gourmetcfg.Using, _gourmetcfg.Propsgroup, gourmet.Items)
gourmet.CookingFood = nil
}
}
break
if gourmet.CookingFood != nil && gourmet.CookingFood.ETime <= configure.Now().Unix() {
_gourmetcfg := this.module.configure.GetGourmetConfigData(gourmet.CookingFood.FoodType, gourmet.Skill[gourmet.CookingFood.FoodType])
gourmet.Items = this.module.configure.GetMultipleDropReward(_gourmetcfg.Using, _gourmetcfg.Propsgroup, gourmet.Items)
gourmet.CookingFood = nil
}
}
@ -151,9 +144,9 @@ func (this *modelGourmet) CalculationGourmet(uid string, gourmet *pb.DBGourmet)
mapData["foods"] = gourmet.Foods
mapData["orderCostTime"] = gourmet.OrderCostTime
mapData["cookingFood"] = gourmet.CookingFood // 正在做的
mapData["totalTime"] = gourmet.TotalTime
mapData["ctime"] = gourmet.Ctime
this.module.ModifyGourmetData(uid, mapData) // 同步数据
}
// 技能等级提高了 重新计算订单时间(只对订单中数据有影响)

View File

@ -114,7 +114,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha
// 狩猎副本掉落觉醒材料
for _, v := range reward {
if _conf, err := this.module.configure.GetItemConfigureData(v.T); err == nil {
if _conf.Usetype == 8 {
if _conf.Usetype == comm.UseType8 {
this.module.ModuleRtask.SendToRtask(session, comm.Rtype154, v.N)
}
}
@ -122,7 +122,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha
if newChallenge && bWin {
for _, v := range cfgHunting.Firstprize {
if _conf, err := this.module.configure.GetItemConfigureData(v.T); err == nil {
if _conf.Usetype == 8 {
if _conf.Usetype == comm.UseType8 {
this.module.ModuleRtask.SendToRtask(session, comm.Rtype154, v.N)
}
}

View File

@ -37,7 +37,7 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq)
return
}
switch itemcf.Usetype {
case 1: //英雄碎片
case comm.UseType1: //英雄碎片
if prop = this.module.configure.GetDropData(itemcf.BoxId); prop == nil {
code = pb.ErrorCode_ConfigNoFound
return
@ -122,7 +122,7 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq)
return
}
break
case 8: //觉醒材料合成
case comm.UseType8: //觉醒材料合成
if prop = this.module.configure.GetDropData(itemcf.BoxId); prop == nil {
code = pb.ErrorCode_ConfigNoFound
return

View File

@ -42,39 +42,33 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MlineChallenge
}
}
if curChapter == nil { // 校验是不是新的数据
if stageConf.Previoustage == 0 { // 创建一条新的章节数据
chapter := this.module.configure.GetPreMainChapter(req.StageId) // 新章节数据校验
bCheck := false
if chapter == 0 {
bCheck = true
} else {
for _, v := range list {
if chapter == v.ChapterId { // 有上一章节数据
if _, ok := v.Star[stageConf.Previoustage]; ok {
bCheck = true
}
break
}
}
}
preStage := this.module.configure.GetPreMainChapter(req.StageId) // 新章节数据校验
preStageConf := this.module.configure.GetMainStageConf(preStage)
if stageConf == nil { // 配置文件校验
code = pb.ErrorCode_MainlineNotFindChapter
return
}
if bCheck {
newData := &pb.DBMline{
Id: primitive.NewObjectID().Hex(),
Uid: session.GetUserId(),
CType: stageConf.Episodetype,
ChapterId: stageConf.Chapterid,
StageId: stageConf.Id,
Star: map[int32]int32{},
Award: map[int32]bool{},
Ps: map[int32]int32{},
for _, v := range list {
if preStageConf.CaptainId == v.ChapterId { // 有上一章节数据
if _, ok := v.Star[v.StageId]; ok {
newData := &pb.DBMline{
Id: primitive.NewObjectID().Hex(),
Uid: session.GetUserId(),
CType: stageConf.Episodetype,
ChapterId: stageConf.Chapterid,
StageId: stageConf.Id,
Star: map[int32]int32{},
Award: map[int32]bool{},
Ps: map[int32]int32{},
}
this.module.modelMline.addNewChapter(session.GetUserId(), newData)
break
}
this.module.modelMline.addNewChapter(session.GetUserId(), newData)
} else {
code = pb.ErrorCode_MainlineNotFindChapter
return
}
}
code = pb.ErrorCode_MainlineNotFindChapter
return
}
if v, ok := curChapter.Ps[req.StageId]; ok && v > 0 {
@ -109,9 +103,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MlineChallenge
this.module.modelMline.modifyMlineData(session.GetUserId(), curChapter.Id, map[string]interface{}{
"ps": curChapter.Ps,
})
}
code, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
Ptype: pb.PlayType_mainline,
Title: "",

View File

@ -73,20 +73,13 @@ func (this *configureComp) GetMainStageConf(id int32) (data *cfg.GameMainStageDa
return
}
// 获取上一章节信息
func (this *configureComp) GetPreMainChapter(id int32) (stageID int32) {
if v, err := this.GetConfigure(game_mainchapter); err == nil {
if configure, ok := v.(*cfg.GameMainChapter); ok {
for index, v1 := range configure.GetDataList() {
if v1.Id == id {
if index > 0 {
data := configure.GetDataList()[index-1]
if v1.ChapterType != data.ChapterType { // 章节类型必须一致
stageID = data.Id
}
} else { // 第一章节
stageID = 0
}
// 获取上一关卡信息
func (this *configureComp) GetPreMainChapter(stageId int32) (preStageID int32) {
if v, err := this.GetConfigure(game_mainstage); err == nil {
if configure, ok := v.(*cfg.GameMainStage); ok {
for _, v1 := range configure.GetDataList() {
if v1.Previoustage == stageId {
preStageID = v1.Id
break
}
}

View File

@ -5,7 +5,6 @@ import (
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs"
"go_dreamfactory/utils"
"google.golang.org/protobuf/proto"
)
@ -46,10 +45,10 @@ func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.SmithyCreate
if _smithy.Ctime == 0 {
_smithy.Ctime = configure.Now().Unix()
}
if !utils.IsToday(_smithy.Ctime) {
_smithy.Ctime = configure.Now().Unix()
_smithy.OrderCostTime = 0
}
// if !utils.IsToday(_smithy.Ctime) {
// _smithy.Ctime = configure.Now().Unix()
// _smithy.OrderCostTime = 0
// }
_smithy.Orders = append(_smithy.Orders, req.Order...) // 直接追加订单数据
if _smithy.Clang == nil || (_smithy.Clang != nil && _smithy.Clang.ETime == 0) {
for _, v := range _smithy.Orders {

View File

@ -78,18 +78,13 @@ func (this *modelSmithy) CalculationSmithy(uid string, smithy *pb.DBSmithy) {
// 有订单在做
zeroTime = utils.GetTodayZeroTime(configure.Now().Unix())
for {
if smithy.Clang != nil {
if configure.Now().Unix() < smithy.Clang.ETime {
break
}
}
bRet := false
if (smithy.Clang != nil && smithy.Clang.ETime >= configure.Now().Unix()) || smithy.Clang == nil {
for _, order := range smithy.Orders {
_gourmetcfg := this.module.configure.GetSmithyConfigData(order.DeskType, smithy.Skill[order.DeskType]) // 美食家配置表
if order.Count > 0 {
if smithy.Clang.ETime > configure.Now().Unix() {
if smithy.Clang != nil && smithy.Clang.ETime > configure.Now().Unix() {
break
}
order.Count--
@ -101,7 +96,12 @@ func (this *modelSmithy) CalculationSmithy(uid string, smithy *pb.DBSmithy) {
smithy.Clang = &pb.Clang{}
smithy.Clang.STime = configure.Now().Unix()
smithy.Clang.ETime = configure.Now().Unix() + int64(szTime[order.DeskType])
if smithy.Clang.STime < zeroTime && zeroTime <= smithy.Clang.ETime { // 跨天清空订单耗时
smithy.OrderCostTime = 0
for _, order := range smithy.Orders { // 重新计算订单时常
smithy.OrderCostTime += order.Count * szTime[order.DeskType]
}
}
} else {
smithy.Clang.STime += int64(szTime[order.DeskType])
oldTime := smithy.Clang.ETime
@ -109,8 +109,7 @@ func (this *modelSmithy) CalculationSmithy(uid string, smithy *pb.DBSmithy) {
// 如果此时跨天了 清除订单时常
if oldTime < zeroTime && zeroTime <= smithy.Clang.ETime { // 跨天清空订单耗时
smithy.OrderCostTime = 0
// 重新计算订单时常
for _, order := range smithy.Orders {
for _, order := range smithy.Orders { // 重新计算订单时常
smithy.OrderCostTime += order.Count * szTime[order.DeskType]
}
}
@ -120,23 +119,17 @@ func (this *modelSmithy) CalculationSmithy(uid string, smithy *pb.DBSmithy) {
smithy.Items = this.module.configure.GetMultipleDropReward(_gourmetcfg.Using, _gourmetcfg.Drop, smithy.Items) // 获取掉落奖励
// 记录下订单时间
smithy.Ctime = smithy.Clang.ETime
mapData["ctime"] = smithy.Ctime
bRet = true
smithy.TotalTime += szTime[order.DeskType]
mapData["totalTime"] = smithy.TotalTime
}
}
if !bRet { // 没有订单可以做
if smithy.Clang != nil {
if smithy.Clang.ETime <= configure.Now().Unix() {
_gourmetcfg := this.module.configure.GetSmithyConfigData(smithy.Clang.DeskType, smithy.Skill[smithy.Clang.DeskType])
smithy.Items = this.module.configure.GetMultipleDropReward(_gourmetcfg.Using, _gourmetcfg.Drop, smithy.Items)
smithy.Clang = nil
}
}
break
if smithy.Clang != nil && smithy.Clang.ETime <= configure.Now().Unix() {
_gourmetcfg := this.module.configure.GetSmithyConfigData(smithy.Clang.DeskType, smithy.Skill[smithy.Clang.DeskType])
smithy.Items = this.module.configure.GetMultipleDropReward(_gourmetcfg.Using, _gourmetcfg.Drop, smithy.Items)
smithy.Clang = nil
}
}
// 清除数量为0 的订单
pos := 0
for _, order := range smithy.Orders {
@ -150,7 +143,8 @@ func (this *modelSmithy) CalculationSmithy(uid string, smithy *pb.DBSmithy) {
mapData["orders"] = smithy.Orders
mapData["orderCostTime"] = smithy.OrderCostTime
mapData["clang"] = smithy.Clang // 正在做的
mapData["ctime"] = smithy.Ctime
mapData["totalTime"] = smithy.TotalTime
this.module.ModifySmithyData(uid, mapData) // 同步数据
}

View File

@ -35,6 +35,9 @@ const (
SociatySubTypeAgreePush = "agree"
SociatySubTypeRecord = "record"
SociatySubTypeFormation = "formation"
SociatySubTypeChallengestart = "challengestart"
SociatySubTypeChallengefinish = "challengefinish"
SociatySubTypeBrank = "brank"
)
type apiComp struct {

View File

@ -0,0 +1,39 @@
package sociaty
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
// 公会BOSS 赛季排行榜
func (this *apiComp) BrankCheck(session comm.IUserSession, req *pb.SociatyBRankReq) (code pb.ErrorCode) {
return
}
func (this *apiComp) Brank(session comm.IUserSession, req *pb.SociatyBRankReq) (code pb.ErrorCode, data proto.Message) {
if code = this.BrankCheck(session, req); code != pb.ErrorCode_Success {
return
}
uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" {
code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return
}
sri := this.module.modelSociatyBoss.rank(sociaty.Name, req.RankType)
rsp := &pb.SociatyBRankResp{
Rank: sri,
}
if err := session.SendMsg(string(this.module.GetType()), SociatySubTypeBrank, rsp); err != nil {
code = pb.ErrorCode_SystemError
}
return
}

View File

@ -1,16 +0,0 @@
package sociaty
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.SociatyBChallengeReq) (code pb.ErrorCode) {
return
}
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.SociatyBChallengeReq) (code pb.ErrorCode, data proto.Message) {
return
}

View File

@ -0,0 +1,37 @@
package sociaty
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
// 结束挑战
func (this *apiComp) ChallengefinishCheck(session comm.IUserSession, req *pb.SociatyBChallengeFinishReq) (code pb.ErrorCode) {
return
}
func (this *apiComp) Challengefinish(session comm.IUserSession, req *pb.SociatyBChallengeFinishReq) (code pb.ErrorCode, data proto.Message) {
if code = this.ChallengefinishCheck(session, req); code != pb.ErrorCode_Success {
return
}
uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" {
code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return
}
this.module.modelSociatyBoss.challengefinish(sociaty, uid, req.Report)
rsp := &pb.SociatyBChallengeFinishResp{
Integral: this.module.modelSociatyBoss.transIntegral(req.Report.Harm),
}
if err := session.SendMsg(string(this.module.GetType()), SociatySubTypeChallengefinish, rsp); err != nil {
code = pb.ErrorCode_SystemError
}
return
}

View File

@ -0,0 +1,40 @@
package sociaty
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
// 开始挑战
func (this *apiComp) ChallengestartCheck(session comm.IUserSession, req *pb.SociatyBChallengeStartReq) (code pb.ErrorCode) {
return
}
func (this *apiComp) Challengestart(session comm.IUserSession, req *pb.SociatyBChallengeStartReq) (code pb.ErrorCode, data proto.Message) {
if code = this.ChallengestartCheck(session, req); code != pb.ErrorCode_Success {
return
}
uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" {
code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return
}
this.module.modelSociatyBoss.challengestart(session, sociaty)
rsp := &pb.SociatyBChallengeStartResp{
SociatyId: sociaty.Id,
Uid: uid,
}
if err := session.SendMsg(string(this.module.GetType()), SociatySubTypeChallengestart, rsp); err != nil {
code = pb.ErrorCode_SystemError
}
return
}

View File

@ -89,9 +89,10 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.SociatyCreateReq)
//会长
sociaty.Members = append(sociaty.Members, &pb.SociatyMember{
Uid: user.Uid,
Job: pb.SociatyJob_PRESIDENT, //创建人是会长
Ctime: configure.Now().Unix(),
Uid: user.Uid,
Job: pb.SociatyJob_PRESIDENT, //创建人是会长
Ctime: configure.Now().Unix(),
ChallengeTicket: 5, //TODO 初始化挑战券读配置
})
if err := this.module.modelSociaty.create(sociaty); err != nil {
var customError = new(comm.CustomError)
@ -126,12 +127,14 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.SociatyCreateReq)
}
// 初始化玩家公会任务
if err := this.module.modelSociatyTask.initSociatyTask(user.Uid, sociaty.Id); err != nil {
this.module.Error("初始化玩家公会任务",
log.Field{Key: "uid", Value: uid},
log.Field{Key: "err", Value: err.Error()},
)
}
go func() {
if err := this.module.modelSociatyTask.initSociatyTask(user.Uid, sociaty.Id); err != nil {
this.module.Error("初始化玩家公会任务",
log.Field{Key: "uid", Value: uid},
log.Field{Key: "err", Value: err.Error()},
)
}
}()
if err := session.SendMsg(string(this.module.GetType()), SociatySubTypeCreate, &pb.SociatyCreateResp{
Id: sociaty.Id,

View File

@ -404,9 +404,10 @@ func (this *ModelSociaty) addMember(uid string, sociaty *pb.DBSociaty) error {
return comm.NewCustomError(pb.ErrorCode_SociatyMemberCountLimit)
}
sociaty.Members = append(sociaty.Members, &pb.SociatyMember{
Uid: uid,
Job: pb.SociatyJob_MEMBER,
Ctime: configure.Now().Unix(),
Uid: uid,
Job: pb.SociatyJob_MEMBER,
Ctime: configure.Now().Unix(),
ChallengeTicket: 5, //TODO 初始化挑战券读配置
})
update := map[string]interface{}{
"members": sociaty.Members,

View File

@ -1,10 +1,16 @@
package sociaty
import (
"context"
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go_dreamfactory/lego/sys/redis/pipe"
"github.com/go-redis/redis/v8"
"go.mongodb.org/mongo-driver/bson/primitive"
)
type ModelSociatyBoss struct {
@ -22,7 +28,7 @@ func (this *ModelSociatyBoss) Init(service core.IService, module core.IModule, c
}
// 设置阵容
func (s *ModelSociatyBoss) setFormation(sociaty *pb.DBSociaty, uid string, teams map[int32]*pb.ChallengeTeams) error {
func (s *ModelSociatyBoss) setFormation(sociaty *pb.DBSociaty, uid string, teams map[int32]*pb.ChallengeTeam) error {
if !s.moduleSociaty.modelSociaty.isMember(uid, sociaty) {
return comm.NewCustomError(pb.ErrorCode_SociatyBelongTo)
}
@ -38,20 +44,160 @@ func (s *ModelSociatyBoss) setFormation(sociaty *pb.DBSociaty, uid string, teams
return s.moduleSociaty.modelSociaty.updateSociaty(sociaty.Id, update)
}
//挑战
func (s *ModelSociatyBoss) challenge(session comm.IUserSession) error {
//挑战开始
func (s *ModelSociatyBoss) challengestart(session comm.IUserSession, sociaty *pb.DBSociaty) error {
//阵容
var formations []*pb.BattleFormation
m := s.moduleSociaty.modelSociaty.getMemberInfo(sociaty, session.GetUserId())
for _, v := range m.Teams {
formations = append(formations, v.Formation)
}
iBattle, err := s.moduleSociaty.service.GetModule(comm.ModuleBattle)
if len(formations) == 0 {
return comm.NewCustomError(pb.ErrorCode_SociatyNoFormation)
}
iBattle, err := s.service.GetModule(comm.ModuleBattle)
if err != nil {
return err
}
if b, y := iBattle.(comm.IBattle); y {
b.CreatePveBattle(session, &pb.BattlePVEReq{
b.CreatePvbBattle(session, &pb.BattlePVBReq{
Ptype: pb.PlayType_sociaty,
Title: "公会BOSS",
Format: &pb.BattleFormation{},
Format: formations,
})
}
return nil
}
// 挑战结束
func (s *ModelSociatyBoss) challengefinish(sociaty *pb.DBSociaty, uid string, report *pb.BattleReport) error {
//扣除挑战券
sm := s.moduleSociaty.modelSociaty.getMemberInfo(sociaty, uid)
if sm.ChallengeTicket <= 0 {
return comm.NewCustomError(pb.ErrorCode_SociatyTicketsNoEnough)
}
// BOSS无伤害
if report.Harm == 0 {
return nil
}
//保存挑战记录
if err := s.addChallengeRecord(uid, &pb.DBSociatyBossRecord{
Uid: uid,
SociatyId: sociaty.Id,
Integral: s.transIntegral(report.Harm),
Duration: report.Costtime,
}); err != nil {
return err
}
return nil
}
// 挑战记录 作为阵容推荐的依据;
func (s *ModelSociatyBoss) addChallengeRecord(uid string, record *pb.DBSociatyBossRecord) error {
id := primitive.NewObjectID().Hex()
if err := s.AddList(uid, id, record); err != nil {
return err
}
return nil
}
// 记入排行
func (s *ModelSociatyBoss) addRank(uid string, integral int32) error {
var (
pipe *pipe.RedisPipe = s.Redis.RedisPipe(context.TODO())
m *redis.Z
)
m = &redis.Z{Score: float64(integral), Member: uid}
if cmd := pipe.ZAdd(s.TableName, m); cmd != nil {
_, err := cmd.Result()
if err != nil {
return err
}
}
if _, err := pipe.Exec(); err != nil {
return err
}
return nil
}
// 伤害转换积分
func (s *ModelSociatyBoss) transIntegral(harm int32) int64 {
return int64(harm)
}
// 查询排行榜
func (this *ModelSociatyBoss) queryRankUid(count int64) (ranks []string, err error) {
var (
result []string
)
if result, err = this.DBModel.Redis.ZRevRange(this.TableName, 0, count).Result(); err != nil {
return
}
ranks = make([]string, 0)
for i := 0; i < len(result); i += 1 {
ranks = append(ranks, result[i])
}
return
}
// 取积分
func (this *ModelSociatyBoss) getScoreByUid(uid string) int64 {
result, err := this.DBModel.Redis.ZScore(this.TableName, uid)
if err != nil {
return 0
}
return int64(result)
}
// 取排名
func (this *ModelSociatyBoss) getRankingByUid(uid string) int64 {
result, err := this.DBModel.Redis.ZRevRank(this.TableName, uid)
if err != nil {
return 0
}
return (result + 1)
}
func (s *ModelSociatyBoss) rank(sociatyName string, rankType int32) (res []*pb.SociatyRankInfo) {
var rankCount int64
switch rankType {
case 1: //个人
rankCount = 1000
case 2: //成员
rankCount = 50
case 3: //公会
rankCount = 50
}
// 所有排行记录
rankUids, err := s.queryRankUid(rankCount)
if err != nil {
return nil
}
for _, uid := range rankUids {
imodule, err := s.service.GetModule(comm.ModuleUser)
if err != nil {
return nil
}
if iuser, ok := imodule.(comm.IUser); ok {
if user := iuser.GetUser(uid); user != nil && user.Uid != "" {
res = append(res, &pb.SociatyRankInfo{
SociatyName: sociatyName,
Name: user.Name,
Head: user.Avatar,
Lv: user.Lv,
Ranking: s.getRankingByUid(user.Uid),
Integral: s.getScoreByUid(user.Uid),
})
}
}
}
return nil
}

View File

@ -12,6 +12,7 @@ const (
TrollRankListResp = "ranklist"
TrollRecordListResp = "recordlist"
TrollAfkSetResp = "afkset"
TrollSurpriseIdResp = "surpriseid"
)
type apiComp struct {

View File

@ -68,7 +68,7 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.TrollGetListReq)
return
}
if int32(configure.Now().Unix()-trolltrain.RefreshTime) < szTrain[trolltrain.TarinPos-1] {
session.SendMsg(string(this.module.GetType()), TrollGetListResp, &pb.TrollGetListResp{Data: trolltrain})
//session.SendMsg(string(this.module.GetType()), TrollGetListResp, &pb.TrollGetListResp{Data: trolltrain})
return
}
trainNum := this.configure.GetTrollMaxTraintNum()

View File

@ -0,0 +1,67 @@
package troll
import (
"crypto/rand"
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
"math/big"
"google.golang.org/protobuf/proto"
)
//参数校验
func (this *apiComp) SurpriseIdCheck(session comm.IUserSession, req *pb.TrollSurpriseIdReq) (code pb.ErrorCode) {
return
}
func (this *apiComp) SurpriseId(session comm.IUserSession, req *pb.TrollSurpriseIdReq) (code pb.ErrorCode, data proto.Message) {
var (
circletime int32 // 循环一个周期的时间
circleCount int32 // 循环的次数
update map[string]interface{}
)
update = make(map[string]interface{})
trolltrain, err := this.module.modelTroll.getTrollList(session.GetUserId())
if err != nil {
code = pb.ErrorCode_DBError
return
}
/// 计算经过了多少个周期
szTrain := this.configure.GetTrollAllTrain()
for _, v := range szTrain {
circletime += v
}
if int32(len(szTrain)) < trolltrain.TarinPos {
this.module.Errorf("TarinPos error: TarinPos:%d,maxLen:%d", trolltrain.TarinPos, len(szTrain))
code = pb.ErrorCode_ConfigNoFound
return
}
if int32(configure.Now().Unix()-trolltrain.RefreshTime) >= szTrain[trolltrain.TarinPos-1] {
trainNum := this.configure.GetTrollMaxTraintNum()
t := int32(configure.Now().Unix() - trolltrain.Ctime)
circleCount = t / circletime // 经过的周期数
if trolltrain.Circle != circleCount {
trolltrain.SurpriseID = make(map[int32]int32, 0)
n, _ := rand.Int(rand.Reader, big.NewInt(int64(trainNum)))
// 只算当前商人所属的货物
g := this.configure.GetTrollGoodsFor(int32(n.Int64()) + 1)
n2, _ := rand.Int(rand.Reader, big.NewInt(int64(len(g))))
trolltrain.SurpriseID[int32(n.Int64())+1] = g[int32(n2.Int64())]
update["surpriseID"] = trolltrain.SurpriseID
trolltrain.Circle = circleCount
update["circle"] = trolltrain.Circle
this.module.ModifyTrollData(session.GetUserId(), update)
}
return
}
session.SendMsg(string(this.module.GetType()), TrollSurpriseIdResp, &pb.TrollSurpriseIdResp{
SurpriseID: trolltrain.SurpriseID,
})
return
}

View File

@ -252,6 +252,8 @@ const (
ErrorCode_SociatyNameExist ErrorCode = 30032 //公会名存在
ErrorCode_SociatyQuitNoAllowed ErrorCode = 30033 //会长不允许退公会
ErrorCode_SociatyNoMaster ErrorCode = 30034 //无会长
ErrorCode_SociatyNoFormation ErrorCode = 30035 //无阵容
ErrorCode_SociatyTicketsNoEnough ErrorCode = 30036 //挑战券不足
// arena
ErrorCode_ArenaTicketBuyUp ErrorCode = 3101 //票据上限
ErrorCode_ArenaTicketNotEnough ErrorCode = 3102 //票据不足
@ -508,6 +510,8 @@ var (
30032: "SociatyNameExist",
30033: "SociatyQuitNoAllowed",
30034: "SociatyNoMaster",
30035: "SociatyNoFormation",
30036: "SociatyTicketsNoEnough",
3101: "ArenaTicketBuyUp",
3102: "ArenaTicketNotEnough",
3103: "ArenaTicketNpcInCd",
@ -751,6 +755,8 @@ var (
"SociatyNameExist": 30032,
"SociatyQuitNoAllowed": 30033,
"SociatyNoMaster": 30034,
"SociatyNoFormation": 30035,
"SociatyTicketsNoEnough": 30036,
"ArenaTicketBuyUp": 3101,
"ArenaTicketNotEnough": 3102,
"ArenaTicketNpcInCd": 3103,
@ -818,7 +824,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
var file_errorcode_proto_rawDesc = []byte{
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2a, 0x98, 0x2b, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x6f, 0x2a, 0xd0, 0x2b, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d,
0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12,
0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
@ -1114,57 +1120,61 @@ var file_errorcode_proto_rawDesc = []byte{
0x10, 0xd0, 0xea, 0x01, 0x12, 0x1a, 0x0a, 0x14, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x51,
0x75, 0x69, 0x74, 0x4e, 0x6f, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x10, 0xd1, 0xea, 0x01,
0x12, 0x15, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4e, 0x6f, 0x4d, 0x61, 0x73,
0x74, 0x65, 0x72, 0x10, 0xd2, 0xea, 0x01, 0x12, 0x15, 0x0a, 0x10, 0x41, 0x72, 0x65, 0x6e, 0x61,
0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x75, 0x79, 0x55, 0x70, 0x10, 0x9d, 0x18, 0x12, 0x19,
0x0a, 0x14, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x6f, 0x74,
0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x9e, 0x18, 0x12, 0x17, 0x0a, 0x12, 0x41, 0x72, 0x65,
0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x70, 0x63, 0x49, 0x6e, 0x43, 0x64, 0x10,
0x9f, 0x18, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x65,
0x61, 0x74, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x10, 0x81, 0x19, 0x12, 0x12, 0x0a, 0x0d, 0x54, 0x61,
0x6c, 0x65, 0x6e, 0x74, 0x45, 0x72, 0x72, 0x44, 0x61, 0x74, 0x61, 0x10, 0x82, 0x19, 0x12, 0x19,
0x0a, 0x14, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x55, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x72,
0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x10, 0x83, 0x19, 0x12, 0x15, 0x0a, 0x10, 0x54, 0x61, 0x6c,
0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x10, 0x84, 0x19,
0x12, 0x10, 0x0a, 0x0b, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x42, 0x75, 0x79, 0x4d, 0x61, 0x78, 0x10,
0xe5, 0x19, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x53, 0x65, 0x6c, 0x6c, 0x4d,
0x61, 0x78, 0x10, 0xe6, 0x19, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x4d, 0x61,
0x78, 0x53, 0x65, 0x6c, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0xe7, 0x19, 0x12, 0x16, 0x0a,
0x11, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x43, 0x6f, 0x75,
0x6e, 0x74, 0x10, 0xe8, 0x19, 0x12, 0x18, 0x0a, 0x13, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x52, 0x65,
0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe9, 0x19, 0x12,
0x19, 0x0a, 0x14, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x4e, 0x6f, 0x74, 0x54,
0x75, 0x72, 0x6e, 0x65, 0x64, 0x4f, 0x6e, 0x10, 0xc9, 0x1a, 0x12, 0x19, 0x0a, 0x14, 0x48, 0x6f,
0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x65, 0x73, 0x74, 0x43, 0x44, 0x4e, 0x6f, 0x45,
0x6e, 0x64, 0x10, 0xca, 0x1a, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65,
0x67, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xad, 0x1b, 0x12, 0x17, 0x0a,
0x12, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x54,
0x69, 0x6d, 0x65, 0x10, 0xae, 0x1b, 0x12, 0x0f, 0x0a, 0x0a, 0x56, 0x69, 0x70, 0x4c, 0x76, 0x45,
0x72, 0x72, 0x6f, 0x72, 0x10, 0xaf, 0x1b, 0x12, 0x11, 0x0a, 0x0c, 0x56, 0x69, 0x70, 0x47, 0x69,
0x66, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xb0, 0x1b, 0x12, 0x11, 0x0a, 0x0c, 0x56, 0x69,
0x70, 0x42, 0x75, 0x79, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x10, 0xb1, 0x1b, 0x12, 0x14, 0x0a,
0x0f, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65,
0x10, 0x91, 0x1c, 0x12, 0x17, 0x0a, 0x12, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x41,
0x64, 0x76, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x10, 0x92, 0x1c, 0x12, 0x17, 0x0a, 0x12,
0x50, 0x61, 0x79, 0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75,
0x67, 0x68, 0x10, 0xf5, 0x1c, 0x12, 0x14, 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x52, 0x65, 0x6e, 0x65,
0x77, 0x54, 0x69, 0x6d, 0x65, 0x45, 0x72, 0x72, 0x10, 0xf6, 0x1c, 0x12, 0x16, 0x0a, 0x11, 0x50,
0x61, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64,
0x10, 0xf7, 0x1c, 0x12, 0x14, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b,
0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x10, 0xd9, 0x1d, 0x12, 0x19, 0x0a, 0x14, 0x57, 0x6f, 0x72,
0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x76, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67,
0x68, 0x10, 0xda, 0x1d, 0x12, 0x16, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73,
0x6b, 0x4e, 0x6f, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x10, 0xdb, 0x1d, 0x12, 0x18, 0x0a, 0x13,
0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x6c,
0x65, 0x74, 0x65, 0x10, 0xdc, 0x1d, 0x12, 0x15, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74,
0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x68, 0x65, 0x64, 0x10, 0xdd, 0x1d, 0x12, 0x1c, 0x0a,
0x17, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x6e,
0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xde, 0x1d, 0x12, 0x1e, 0x0a, 0x19, 0x41,
0x63, 0x61, 0x64, 0x65, 0x6d, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x43, 0x6f, 0x6d, 0x70,
0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x10, 0xbd, 0x1e, 0x12, 0x15, 0x0a, 0x10, 0x41,
0x75, 0x74, 0x6f, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x10,
0xa1, 0x1f, 0x12, 0x18, 0x0a, 0x13, 0x41, 0x75, 0x74, 0x6f, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65,
0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x45, 0x72, 0x72, 0x10, 0xa2, 0x1f, 0x42, 0x06, 0x5a, 0x04,
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x74, 0x65, 0x72, 0x10, 0xd2, 0xea, 0x01, 0x12, 0x18, 0x0a, 0x12, 0x53, 0x6f, 0x63, 0x69, 0x61,
0x74, 0x79, 0x4e, 0x6f, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0xd3, 0xea,
0x01, 0x12, 0x1c, 0x0a, 0x16, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x54, 0x69, 0x63, 0x6b,
0x65, 0x74, 0x73, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xd4, 0xea, 0x01, 0x12,
0x15, 0x0a, 0x10, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x75,
0x79, 0x55, 0x70, 0x10, 0x9d, 0x18, 0x12, 0x19, 0x0a, 0x14, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x54,
0x69, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x9e,
0x18, 0x12, 0x17, 0x0a, 0x12, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74,
0x4e, 0x70, 0x63, 0x49, 0x6e, 0x43, 0x64, 0x10, 0x9f, 0x18, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x61,
0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x10,
0x81, 0x19, 0x12, 0x12, 0x0a, 0x0d, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x45, 0x72, 0x72, 0x44,
0x61, 0x74, 0x61, 0x10, 0x82, 0x19, 0x12, 0x19, 0x0a, 0x14, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74,
0x55, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x10, 0x83,
0x19, 0x12, 0x15, 0x0a, 0x10, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x65, 0x74,
0x53, 0x74, 0x61, 0x74, 0x65, 0x10, 0x84, 0x19, 0x12, 0x10, 0x0a, 0x0b, 0x54, 0x72, 0x6f, 0x6c,
0x6c, 0x42, 0x75, 0x79, 0x4d, 0x61, 0x78, 0x10, 0xe5, 0x19, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x72,
0x6f, 0x6c, 0x6c, 0x53, 0x65, 0x6c, 0x6c, 0x4d, 0x61, 0x78, 0x10, 0xe6, 0x19, 0x12, 0x16, 0x0a,
0x11, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x6c, 0x6c, 0x43, 0x6f, 0x75,
0x6e, 0x74, 0x10, 0xe7, 0x19, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x4d, 0x61,
0x78, 0x49, 0x74, 0x65, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0xe8, 0x19, 0x12, 0x18, 0x0a,
0x13, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65,
0x77, 0x61, 0x72, 0x64, 0x10, 0xe9, 0x19, 0x12, 0x19, 0x0a, 0x14, 0x48, 0x6f, 0x72, 0x6f, 0x73,
0x63, 0x6f, 0x70, 0x65, 0x4e, 0x6f, 0x74, 0x54, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x4f, 0x6e, 0x10,
0xc9, 0x1a, 0x12, 0x19, 0x0a, 0x14, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x52,
0x65, 0x73, 0x74, 0x43, 0x44, 0x4e, 0x6f, 0x45, 0x6e, 0x64, 0x10, 0xca, 0x1a, 0x12, 0x16, 0x0a,
0x11, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75,
0x6e, 0x64, 0x10, 0xad, 0x1b, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65,
0x67, 0x65, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x10, 0xae, 0x1b, 0x12, 0x0f,
0x0a, 0x0a, 0x56, 0x69, 0x70, 0x4c, 0x76, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xaf, 0x1b, 0x12,
0x11, 0x0a, 0x0c, 0x56, 0x69, 0x70, 0x47, 0x69, 0x66, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10,
0xb0, 0x1b, 0x12, 0x11, 0x0a, 0x0c, 0x56, 0x69, 0x70, 0x42, 0x75, 0x79, 0x52, 0x65, 0x70, 0x65,
0x61, 0x74, 0x10, 0xb1, 0x1b, 0x12, 0x14, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73,
0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x10, 0x91, 0x1c, 0x12, 0x17, 0x0a, 0x12, 0x47,
0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x41, 0x64, 0x76, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76,
0x65, 0x10, 0x92, 0x1c, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x42, 0x75, 0x79, 0x4e, 0x75,
0x6d, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xf5, 0x1c, 0x12, 0x14, 0x0a,
0x0f, 0x50, 0x61, 0x79, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x45, 0x72, 0x72,
0x10, 0xf6, 0x1c, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x61, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43,
0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x10, 0xf7, 0x1c, 0x12, 0x14, 0x0a, 0x0f, 0x57,
0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x10, 0xd9,
0x1d, 0x12, 0x19, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x76,
0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xda, 0x1d, 0x12, 0x16, 0x0a, 0x11,
0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x41, 0x63, 0x63, 0x65, 0x70,
0x74, 0x10, 0xdb, 0x1d, 0x12, 0x18, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73,
0x6b, 0x4e, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x10, 0xdc, 0x1d, 0x12, 0x15,
0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x68,
0x65, 0x64, 0x10, 0xdd, 0x1d, 0x12, 0x1c, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61,
0x73, 0x6b, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x6e, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64,
0x10, 0xde, 0x1d, 0x12, 0x1e, 0x0a, 0x19, 0x41, 0x63, 0x61, 0x64, 0x65, 0x6d, 0x79, 0x54, 0x61,
0x73, 0x6b, 0x4e, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b,
0x10, 0xbd, 0x1e, 0x12, 0x15, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x6f, 0x42, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x10, 0xa1, 0x1f, 0x12, 0x18, 0x0a, 0x13, 0x41, 0x75,
0x74, 0x6f, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x45, 0x72,
0x72, 0x10, 0xa2, 0x1f, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -321,12 +321,12 @@ type SociatyMember struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid" bson:"uid"` //成员ID
Job SociatyJob `protobuf:"varint,2,opt,name=job,proto3,enum=SociatyJob" json:"job" bson:"job"` //职位
Ctime int64 `protobuf:"varint,3,opt,name=ctime,proto3" json:"ctime" bson:"ctime"` //入会时间
Contribution int32 `protobuf:"varint,4,opt,name=contribution,proto3" json:"contribution" bson:"contribution"` //贡献值
ChallengeTicket int32 `protobuf:"varint,5,opt,name=challengeTicket,proto3" json:"challengeTicket" bson:"challengeTicket"` //挑战券
Teams map[int32]*ChallengeTeams `protobuf:"bytes,6,rep,name=teams,proto3" json:"teams" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3" bson:"teams"` // 公会BOSS 队伍
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid" bson:"uid"` //成员ID
Job SociatyJob `protobuf:"varint,2,opt,name=job,proto3,enum=SociatyJob" json:"job" bson:"job"` //职位
Ctime int64 `protobuf:"varint,3,opt,name=ctime,proto3" json:"ctime" bson:"ctime"` //入会时间
Contribution int32 `protobuf:"varint,4,opt,name=contribution,proto3" json:"contribution" bson:"contribution"` //贡献值
ChallengeTicket int32 `protobuf:"varint,5,opt,name=challengeTicket,proto3" json:"challengeTicket" bson:"challengeTicket"` //挑战券
Teams map[int32]*ChallengeTeam `protobuf:"bytes,6,rep,name=teams,proto3" json:"teams" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3" bson:"teams"` // 公会BOSS 队伍
}
func (x *SociatyMember) Reset() {
@ -396,7 +396,7 @@ func (x *SociatyMember) GetChallengeTicket() int32 {
return 0
}
func (x *SociatyMember) GetTeams() map[int32]*ChallengeTeams {
func (x *SociatyMember) GetTeams() map[int32]*ChallengeTeam {
if x != nil {
return x.Teams
}
@ -842,16 +842,16 @@ func (x *ChallengeTeamInfo) GetHeroId() string {
return ""
}
type ChallengeTeams struct {
type ChallengeTeam struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Infos []*ChallengeTeamInfo `protobuf:"bytes,1,rep,name=infos,proto3" json:"infos" bson:"teamInfo"` //队伍
Formation *BattleFormation `protobuf:"bytes,1,opt,name=formation,proto3" json:"formation" bson:"teamInfo"` //阵容
}
func (x *ChallengeTeams) Reset() {
*x = ChallengeTeams{}
func (x *ChallengeTeam) Reset() {
*x = ChallengeTeam{}
if protoimpl.UnsafeEnabled {
mi := &file_sociaty_sociaty_db_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -859,13 +859,13 @@ func (x *ChallengeTeams) Reset() {
}
}
func (x *ChallengeTeams) String() string {
func (x *ChallengeTeam) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChallengeTeams) ProtoMessage() {}
func (*ChallengeTeam) ProtoMessage() {}
func (x *ChallengeTeams) ProtoReflect() protoreflect.Message {
func (x *ChallengeTeam) ProtoReflect() protoreflect.Message {
mi := &file_sociaty_sociaty_db_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -877,14 +877,14 @@ func (x *ChallengeTeams) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use ChallengeTeams.ProtoReflect.Descriptor instead.
func (*ChallengeTeams) Descriptor() ([]byte, []int) {
// Deprecated: Use ChallengeTeam.ProtoReflect.Descriptor instead.
func (*ChallengeTeam) Descriptor() ([]byte, []int) {
return file_sociaty_sociaty_db_proto_rawDescGZIP(), []int{10}
}
func (x *ChallengeTeams) GetInfos() []*ChallengeTeamInfo {
func (x *ChallengeTeam) GetFormation() *BattleFormation {
if x != nil {
return x.Infos
return x.Formation
}
return nil
}
@ -895,13 +895,12 @@ type DBSociatyBossRecord struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SociatyId string `protobuf:"bytes,1,opt,name=sociatyId,proto3" json:"sociatyId" bson:"sociatyId"` //公会ID
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //玩家ID
Integral int32 `protobuf:"varint,3,opt,name=integral,proto3" json:"integral" bson:"integral"` //公会BOSS挑战积分
Evaluate int32 `protobuf:"varint,4,opt,name=evaluate,proto3" json:"evaluate" bson:"evaluate"` //评价
Teams map[int32]*ChallengeTeams `protobuf:"bytes,5,rep,name=teams,proto3" json:"teams" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3" bson:"teams"` //挑战队伍
Duration int32 `protobuf:"varint,6,opt,name=duration,proto3" json:"duration" bson:"duration"` //战斗耗时
Rtime int64 `protobuf:"varint,7,opt,name=rtime,proto3" json:"rtime" bson:"rtime"` //记录时间
SociatyId string `protobuf:"bytes,1,opt,name=sociatyId,proto3" json:"sociatyId" bson:"sociatyId"` //公会ID
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //玩家ID
Integral int64 `protobuf:"varint,3,opt,name=integral,proto3" json:"integral" bson:"integral"` //公会BOSS挑战积分
Teams map[int32]*ChallengeTeam `protobuf:"bytes,4,rep,name=teams,proto3" json:"teams" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3" bson:"teams"` //挑战队伍
Duration int32 `protobuf:"varint,5,opt,name=duration,proto3" json:"duration" bson:"duration"` //战斗耗时
Rtime int64 `protobuf:"varint,6,opt,name=rtime,proto3" json:"rtime" bson:"rtime"` //记录时间
}
func (x *DBSociatyBossRecord) Reset() {
@ -950,21 +949,14 @@ func (x *DBSociatyBossRecord) GetUid() string {
return ""
}
func (x *DBSociatyBossRecord) GetIntegral() int32 {
func (x *DBSociatyBossRecord) GetIntegral() int64 {
if x != nil {
return x.Integral
}
return 0
}
func (x *DBSociatyBossRecord) GetEvaluate() int32 {
if x != nil {
return x.Evaluate
}
return 0
}
func (x *DBSociatyBossRecord) GetTeams() map[int32]*ChallengeTeams {
func (x *DBSociatyBossRecord) GetTeams() map[int32]*ChallengeTeam {
if x != nil {
return x.Teams
}
@ -989,125 +981,125 @@ var File_sociaty_sociaty_db_proto protoreflect.FileDescriptor
var file_sociaty_sociaty_db_proto_rawDesc = []byte{
0x0a, 0x18, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x2f, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74,
0x79, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x81, 0x04, 0x0a, 0x09, 0x44,
0x42, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f,
0x74, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x74, 0x69,
0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52,
0x03, 0x65, 0x78, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05,
0x52, 0x02, 0x6c, 0x76, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43,
0x68, 0x65, 0x63, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x41, 0x70,
0x70, 0x6c, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x6c,
0x79, 0x4c, 0x76, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x61, 0x70, 0x70, 0x6c, 0x79,
0x4c, 0x76, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28,
0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x6c,
0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e,
0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x0b, 0x61, 0x70, 0x70,
0x6c, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x28, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62,
0x65, 0x72, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x53, 0x6f, 0x63, 0x69,
0x61, 0x74, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65,
0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x18, 0x0d,
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x1e,
0x0a, 0x0a, 0x61, 0x63, 0x63, 0x75, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01,
0x28, 0x03, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x75, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24,
0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18,
0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x43,
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x49, 0x64, 0x73, 0x18,
0x10, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x20,
0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x11, 0x20,
0x01, 0x28, 0x03, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65,
0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x43, 0x44, 0x18, 0x12, 0x20,
0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x43, 0x44, 0x22, 0x35,
0x0a, 0x0b, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a,
0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12,
0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
0x63, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xa0, 0x02, 0x0a, 0x0d, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x03, 0x6a, 0x6f, 0x62,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d,
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x22,
0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04,
0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x54,
0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x63, 0x68, 0x61,
0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x05,
0x74, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x53, 0x6f,
0x63, 0x69, 0x61, 0x74, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x54, 0x65, 0x61, 0x6d,
0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x1a, 0x49, 0x0a,
0x0a, 0x54, 0x65, 0x61, 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, 0x25, 0x0a,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x43,
0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3c, 0x0a, 0x0a, 0x53, 0x6f, 0x63, 0x69,
0x61, 0x74, 0x79, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x4d, 0x0a, 0x0c, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69,
0x61, 0x74, 0x79, 0x4c, 0x6f, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74,
0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61,
0x74, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4c, 0x6f, 0x67, 0x52,
0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0xc7, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69,
0x61, 0x74, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61,
0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69,
0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c,
0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x53, 0x6f, 0x63, 0x69,
0x61, 0x74, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73,
0x74, 0x12, 0x34, 0x0a, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4c, 0x69, 0x73,
0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x76,
0x69, 0x74, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52,
0x0e, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22,
0x59, 0x0a, 0x0b, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x16,
0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a,
0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x22, 0x39, 0x0a, 0x0f, 0x53, 0x6f,
0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x0e, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a,
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73,
0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69,
0x61, 0x74, 0x79, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61,
0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69,
0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18,
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x74,
0x69, 0x76, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61, 0x63, 0x74,
0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05,
0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x2b, 0x0a, 0x11, 0x43,
0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x22, 0x3a, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6c,
0x6c, 0x65, 0x6e, 0x67, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x28, 0x0a, 0x05, 0x69, 0x6e,
0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x43, 0x68, 0x61, 0x6c,
0x6c, 0x65, 0x6e, 0x67, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x69,
0x6e, 0x66, 0x6f, 0x73, 0x22, 0xb1, 0x02, 0x0a, 0x13, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69, 0x61,
0x74, 0x79, 0x42, 0x6f, 0x73, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1c, 0x0a, 0x09,
0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08,
0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x76, 0x61, 0x6c,
0x75, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x65, 0x76, 0x61, 0x6c,
0x75, 0x61, 0x74, 0x65, 0x12, 0x35, 0x0a, 0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x42,
0x6f, 0x73, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64,
0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64,
0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65,
0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x49, 0x0a,
0x0a, 0x54, 0x65, 0x61, 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, 0x25, 0x0a,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x43,
0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x05, 0x76,
0x79, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x62, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0x81, 0x04, 0x0a, 0x09, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69,
0x63, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x65,
0x78, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x0e, 0x0a,
0x02, 0x6c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x22, 0x0a,
0x0c, 0x69, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x08, 0x20,
0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x68, 0x65, 0x63,
0x6b, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x76, 0x18, 0x09, 0x20, 0x01,
0x28, 0x05, 0x52, 0x07, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x76, 0x12, 0x14, 0x0a, 0x05, 0x63,
0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d,
0x65, 0x12, 0x2e, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65,
0x63, 0x6f, 0x72, 0x64, 0x52, 0x0b, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72,
0x64, 0x12, 0x28, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x0c, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4d, 0x65, 0x6d, 0x62,
0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x61,
0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61,
0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x75, 0x73,
0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x63, 0x63,
0x75, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x53,
0x69, 0x67, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d,
0x6c, 0x61, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a,
0x07, 0x73, 0x69, 0x67, 0x6e, 0x49, 0x64, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07,
0x73, 0x69, 0x67, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6d, 0x69,
0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x64, 0x69,
0x73, 0x6d, 0x69, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x73,
0x6d, 0x69, 0x73, 0x73, 0x43, 0x44, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x69,
0x73, 0x6d, 0x69, 0x73, 0x73, 0x43, 0x44, 0x22, 0x35, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x6c, 0x79,
0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x9f,
0x02, 0x0a, 0x0d, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72,
0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
0x69, 0x64, 0x12, 0x1d, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x0b, 0x2e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f,
0x62, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72,
0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x63,
0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x63,
0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x05,
0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x54,
0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x06,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4d, 0x65,
0x6d, 0x62, 0x65, 0x72, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x1a, 0x48, 0x0a, 0x0a, 0x54, 0x65, 0x61, 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, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67,
0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x22, 0x3c, 0x0a, 0x0a, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4c, 0x6f, 0x67, 0x12, 0x18,
0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x4d,
0x0a, 0x0c, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4c, 0x6f, 0x67, 0x12, 0x1c,
0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x04,
0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x53, 0x6f, 0x63,
0x69, 0x61, 0x74, 0x79, 0x4c, 0x6f, 0x67, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0xc7, 0x01,
0x0a, 0x0d, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x12,
0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x10, 0x0a,
0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12,
0x28, 0x0a, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x0c, 0x2e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x52,
0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x0c, 0x61, 0x63, 0x74,
0x69, 0x76, 0x69, 0x74, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x10, 0x2e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
0x79, 0x52, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12,
0x26, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x59, 0x0a, 0x0b, 0x53, 0x6f, 0x63, 0x69, 0x61,
0x74, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x16,
0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76,
0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76,
0x65, 0x64, 0x22, 0x39, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x63, 0x74,
0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x83, 0x01,
0x0a, 0x0d, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x61, 0x6e, 0x6b, 0x12,
0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c,
0x76, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20,
0x01, 0x28, 0x05, 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a,
0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74,
0x69, 0x6d, 0x65, 0x22, 0x2b, 0x0a, 0x11, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65,
0x54, 0x65, 0x61, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f,
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64,
0x22, 0x3f, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x54, 0x65, 0x61,
0x6d, 0x12, 0x2e, 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72,
0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x22, 0x94, 0x02, 0x0a, 0x13, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x42,
0x6f, 0x73, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63,
0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f,
0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74,
0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74,
0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x35, 0x0a, 0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x04,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
0x42, 0x6f, 0x73, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x73,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x1a, 0x0a, 0x08,
0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d,
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x48,
0x0a, 0x0a, 0x54, 0x65, 0x61, 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, 0x24,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e,
0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x50, 0x0a, 0x0a, 0x53, 0x6f, 0x63, 0x69,
0x61, 0x74, 0x79, 0x4a, 0x6f, 0x62, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x4f, 0x4a, 0x4f, 0x42, 0x10,
0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x01, 0x12, 0x09, 0x0a,
@ -1143,10 +1135,11 @@ var file_sociaty_sociaty_db_proto_goTypes = []interface{}{
(*SociatyActivity)(nil), // 8: SociatyActivity
(*DBSociatyRank)(nil), // 9: DBSociatyRank
(*ChallengeTeamInfo)(nil), // 10: ChallengeTeamInfo
(*ChallengeTeams)(nil), // 11: ChallengeTeams
(*ChallengeTeam)(nil), // 11: ChallengeTeam
(*DBSociatyBossRecord)(nil), // 12: DBSociatyBossRecord
nil, // 13: SociatyMember.TeamsEntry
nil, // 14: DBSociatyBossRecord.TeamsEntry
(*BattleFormation)(nil), // 15: BattleFormation
}
var file_sociaty_sociaty_db_proto_depIdxs = []int32{
2, // 0: DBSociaty.applyRecord:type_name -> ApplyRecord
@ -1156,10 +1149,10 @@ var file_sociaty_sociaty_db_proto_depIdxs = []int32{
4, // 4: DBSociatyLog.list:type_name -> SociatyLog
7, // 5: DBSociatyTask.taskList:type_name -> SociatyTask
8, // 6: DBSociatyTask.activityList:type_name -> SociatyActivity
10, // 7: ChallengeTeams.infos:type_name -> ChallengeTeamInfo
15, // 7: ChallengeTeam.formation:type_name -> BattleFormation
14, // 8: DBSociatyBossRecord.teams:type_name -> DBSociatyBossRecord.TeamsEntry
11, // 9: SociatyMember.TeamsEntry.value:type_name -> ChallengeTeams
11, // 10: DBSociatyBossRecord.TeamsEntry.value:type_name -> ChallengeTeams
11, // 9: SociatyMember.TeamsEntry.value:type_name -> ChallengeTeam
11, // 10: DBSociatyBossRecord.TeamsEntry.value:type_name -> ChallengeTeam
11, // [11:11] is the sub-list for method output_type
11, // [11:11] is the sub-list for method input_type
11, // [11:11] is the sub-list for extension type_name
@ -1172,6 +1165,7 @@ func file_sociaty_sociaty_db_proto_init() {
if File_sociaty_sociaty_db_proto != nil {
return
}
file_battle_battle_msg_proto_init()
if !protoimpl.UnsafeEnabled {
file_sociaty_sociaty_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBSociaty); i {
@ -1294,7 +1288,7 @@ func file_sociaty_sociaty_db_proto_init() {
}
}
file_sociaty_sociaty_db_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChallengeTeams); i {
switch v := v.(*ChallengeTeam); i {
case 0:
return &v.state
case 1:

File diff suppressed because it is too large Load Diff

View File

@ -667,6 +667,93 @@ func (x *TrollRecordListResp) GetData() []*DBTrollRecord {
return nil
}
// 获取惊喜商品
type TrollSurpriseIdReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *TrollSurpriseIdReq) Reset() {
*x = TrollSurpriseIdReq{}
if protoimpl.UnsafeEnabled {
mi := &file_troll_troll_msg_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TrollSurpriseIdReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TrollSurpriseIdReq) ProtoMessage() {}
func (x *TrollSurpriseIdReq) ProtoReflect() protoreflect.Message {
mi := &file_troll_troll_msg_proto_msgTypes[13]
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 TrollSurpriseIdReq.ProtoReflect.Descriptor instead.
func (*TrollSurpriseIdReq) Descriptor() ([]byte, []int) {
return file_troll_troll_msg_proto_rawDescGZIP(), []int{13}
}
// 返回进度信息
type TrollSurpriseIdResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SurpriseID map[int32]int32 `protobuf:"bytes,1,rep,name=surpriseID,proto3" json:"surpriseID" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"surpriseID"` //key商人id value惊喜货物ID
}
func (x *TrollSurpriseIdResp) Reset() {
*x = TrollSurpriseIdResp{}
if protoimpl.UnsafeEnabled {
mi := &file_troll_troll_msg_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TrollSurpriseIdResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TrollSurpriseIdResp) ProtoMessage() {}
func (x *TrollSurpriseIdResp) ProtoReflect() protoreflect.Message {
mi := &file_troll_troll_msg_proto_msgTypes[14]
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 TrollSurpriseIdResp.ProtoReflect.Descriptor instead.
func (*TrollSurpriseIdResp) Descriptor() ([]byte, []int) {
return file_troll_troll_msg_proto_rawDescGZIP(), []int{14}
}
func (x *TrollSurpriseIdResp) GetSurpriseID() map[int32]int32 {
if x != nil {
return x.SurpriseID
}
return nil
}
var File_troll_troll_msg_proto protoreflect.FileDescriptor
var file_troll_troll_msg_proto_rawDesc = []byte{
@ -722,8 +809,19 @@ var file_troll_troll_msg_proto_rawDesc = []byte{
0x0a, 0x13, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c, 0x69, 0x73,
0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x52, 0x65, 0x63,
0x6f, 0x72, 0x64, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70,
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x6f, 0x72, 0x64, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x14, 0x0a, 0x12, 0x54, 0x72, 0x6f,
0x6c, 0x6c, 0x53, 0x75, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x49, 0x64, 0x52, 0x65, 0x71, 0x22,
0x9a, 0x01, 0x0a, 0x13, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x53, 0x75, 0x72, 0x70, 0x72, 0x69, 0x73,
0x65, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x44, 0x0a, 0x0a, 0x73, 0x75, 0x72, 0x70, 0x72,
0x69, 0x73, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x54, 0x72,
0x6f, 0x6c, 0x6c, 0x53, 0x75, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x49, 0x64, 0x52, 0x65, 0x73,
0x70, 0x2e, 0x53, 0x75, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x49, 0x44, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x52, 0x0a, 0x73, 0x75, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x49, 0x44, 0x1a, 0x3d, 0x0a,
0x0f, 0x53, 0x75, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x49, 0x44, 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, 0x42, 0x06, 0x5a, 0x04,
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -738,7 +836,7 @@ func file_troll_troll_msg_proto_rawDescGZIP() []byte {
return file_troll_troll_msg_proto_rawDescData
}
var file_troll_troll_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_troll_troll_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 17)
var file_troll_troll_msg_proto_goTypes = []interface{}{
(*TrollGetListReq)(nil), // 0: TrollGetListReq
(*TrollGetListResp)(nil), // 1: TrollGetListResp
@ -753,23 +851,27 @@ var file_troll_troll_msg_proto_goTypes = []interface{}{
(*TrollRankListResp)(nil), // 10: TrollRankListResp
(*TrollRecordListReq)(nil), // 11: TrollRecordListReq
(*TrollRecordListResp)(nil), // 12: TrollRecordListResp
nil, // 13: TrollBuyOrSellReq.ItemsEntry
(*DBTrollTrain)(nil), // 14: DBTrollTrain
(*DBTrollRecord)(nil), // 15: DBTrollRecord
(*TrollSurpriseIdReq)(nil), // 13: TrollSurpriseIdReq
(*TrollSurpriseIdResp)(nil), // 14: TrollSurpriseIdResp
nil, // 15: TrollBuyOrSellReq.ItemsEntry
nil, // 16: TrollSurpriseIdResp.SurpriseIDEntry
(*DBTrollTrain)(nil), // 17: DBTrollTrain
(*DBTrollRecord)(nil), // 18: DBTrollRecord
}
var file_troll_troll_msg_proto_depIdxs = []int32{
14, // 0: TrollGetListResp.data:type_name -> DBTrollTrain
13, // 1: TrollBuyOrSellReq.items:type_name -> TrollBuyOrSellReq.ItemsEntry
14, // 2: TrollBuyOrSellResp.data:type_name -> DBTrollTrain
14, // 3: TrollAfkSetResp.data:type_name -> DBTrollTrain
14, // 4: TrollNpcRewardResp.data:type_name -> DBTrollTrain
17, // 0: TrollGetListResp.data:type_name -> DBTrollTrain
15, // 1: TrollBuyOrSellReq.items:type_name -> TrollBuyOrSellReq.ItemsEntry
17, // 2: TrollBuyOrSellResp.data:type_name -> DBTrollTrain
17, // 3: TrollAfkSetResp.data:type_name -> DBTrollTrain
17, // 4: TrollNpcRewardResp.data:type_name -> DBTrollTrain
9, // 5: TrollRankListResp.data:type_name -> RankData
15, // 6: TrollRecordListResp.data:type_name -> DBTrollRecord
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
18, // 6: TrollRecordListResp.data:type_name -> DBTrollRecord
16, // 7: TrollSurpriseIdResp.surpriseID:type_name -> TrollSurpriseIdResp.SurpriseIDEntry
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_troll_troll_msg_proto_init() }
@ -935,6 +1037,30 @@ func file_troll_troll_msg_proto_init() {
return nil
}
}
file_troll_troll_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TrollSurpriseIdReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_troll_troll_msg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TrollSurpriseIdResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@ -942,7 +1068,7 @@ func file_troll_troll_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_troll_troll_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 14,
NumMessages: 17,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -125,3 +125,28 @@ func Test_Json_RTask(t *testing.T) {
// })
// fmt.Printf("ret:%v err:%v", ret, err)
}
func TestRa(t *testing.T) {
if sys, err := redis.NewSys(
redis.SetRedisType(redis.Redis_Single),
redis.SetRedis_Single_Addr("10.0.0.9:10011"),
redis.SetRedis_Single_Password("li13451234"),
redis.SetRedis_Single_DB(15),
); err != nil {
fmt.Printf("err:%v", err)
return
} else {
s, err2 := sys.ZRevRange("sociatybsoss", 0, 10).Result()
if err2 != nil {
t.Fatal(err2)
}
for _, v := range s {
fmt.Println(v)
score, _ := sys.ZScore("sociatybsoss", v)
ranking, _ := sys.ZRevRank("sociatybsoss", v)
fmt.Printf("%d %v - %d \n", (ranking + 1), v, int64(score))
}
}
}