收益排行
This commit is contained in:
parent
249eb04ad6
commit
9cb562262a
@ -12,6 +12,7 @@ const (
|
||||
GourmetSkillLvResp = "skilllv"
|
||||
TrollNpcRewardResp = "npcreward"
|
||||
GourmetGetRandUserResp = "getranduser"
|
||||
TrollRankListResp = "ranklist"
|
||||
)
|
||||
|
||||
type apiComp struct {
|
||||
|
@ -161,6 +161,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.TrollBuyOrSell
|
||||
update["gridNum"] = trolltrain.GridNum
|
||||
update["shop"] = trolltrain.Shop
|
||||
this.module.ModifyTrollData(session.GetUserId(), update)
|
||||
this.module.SeTrollRankList(trolltrain.TotalEarn, session.GetUserId())
|
||||
session.SendMsg(string(this.module.GetType()), TrollBuyOrSellResp, &pb.TrollBuyOrSellResp{Data: trolltrain})
|
||||
return
|
||||
}
|
||||
|
@ -13,12 +13,7 @@ import (
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.TrollGetListReq) (code pb.ErrorCode) {
|
||||
// sz := make(map[int32]int32, 0)
|
||||
// sz[1] = -20
|
||||
// sz[2] = -10
|
||||
// this.BuyOrSell(session, &pb.TrollBuyOrSellReq{
|
||||
// Items: sz,
|
||||
// })
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
40
modules/troll/api_ranklist.go
Normal file
40
modules/troll/api_ranklist.go
Normal file
@ -0,0 +1,40 @@
|
||||
package troll
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
func (this *apiComp) RankListCheck(session comm.IUserSession, req *pb.TrollRankListReq) (code pb.ErrorCode) {
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) RankList(session comm.IUserSession, req *pb.TrollRankListReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var (
|
||||
rank []*pb.RankData
|
||||
)
|
||||
list, gold, err := this.module.QueryRankList()
|
||||
if err == nil {
|
||||
for index, v := range list {
|
||||
if user := this.module.ModuleUser.GetUser(v); user != nil {
|
||||
rank = append(rank, &pb.RankData{
|
||||
RankId: int32(index + 1),
|
||||
Uid: v,
|
||||
Name: user.Name,
|
||||
Gold: gold[index],
|
||||
Figure: user.Figure,
|
||||
Title: user.Title,
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), TrollRankListResp, &pb.TrollRankListResp{
|
||||
Data: rank,
|
||||
})
|
||||
|
||||
return
|
||||
}
|
@ -6,12 +6,16 @@
|
||||
package troll
|
||||
|
||||
import (
|
||||
"context"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/redis/pipe"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
"math"
|
||||
"time"
|
||||
|
||||
"github.com/go-redis/redis/v8"
|
||||
)
|
||||
|
||||
type Troll struct {
|
||||
@ -107,6 +111,7 @@ func (this *Troll) TrollAI(session comm.IUserSession, troll *pb.DBTrollTrain, ai
|
||||
if sellGold-preGold > 0 {
|
||||
troll.TotalEarn += int64(sellGold - preGold)
|
||||
}
|
||||
this.SeTrollRankList(troll.TotalEarn, session.GetUserId()) // 设置排行数据
|
||||
troll.AiCount++
|
||||
if troll.AiCount > aiCount { //达到最大交易次数
|
||||
break
|
||||
@ -121,15 +126,7 @@ func (this *Troll) TrollAI(session comm.IUserSession, troll *pb.DBTrollTrain, ai
|
||||
}
|
||||
} else { // 超过当前时间
|
||||
troll.RefreshTime -= int64(sz[index])
|
||||
update["refreshTime"] = troll.RefreshTime
|
||||
update["tarinPos"] = troll.TarinPos
|
||||
update["rangeId"] = troll.RangeId
|
||||
update["shop"] = troll.Shop
|
||||
update["items"] = troll.Items
|
||||
update["price"] = troll.Price
|
||||
update["aiCount"] = troll.AiCount
|
||||
update["gridNum"] = troll.GridNum
|
||||
this.ModifyTrollData(session.GetUserId(), update)
|
||||
|
||||
break
|
||||
}
|
||||
if index > iCount*maxCoefficient { // ai挂机最大限制
|
||||
@ -137,7 +134,17 @@ func (this *Troll) TrollAI(session comm.IUserSession, troll *pb.DBTrollTrain, ai
|
||||
}
|
||||
}
|
||||
this.ModuleUser.AddAttributeValue(session, comm.ResGold, totalGold, true)
|
||||
update["refreshTime"] = troll.RefreshTime
|
||||
update["tarinPos"] = troll.TarinPos
|
||||
update["rangeId"] = troll.RangeId
|
||||
update["shop"] = troll.Shop
|
||||
update["items"] = troll.Items
|
||||
update["price"] = troll.Price
|
||||
update["aiCount"] = troll.AiCount
|
||||
update["gridNum"] = troll.GridNum
|
||||
update["totalEarn"] = troll.TotalEarn
|
||||
|
||||
this.ModifyTrollData(session.GetUserId(), update)
|
||||
return
|
||||
}
|
||||
|
||||
@ -216,3 +223,46 @@ func (this *Troll) BuyAllItem(uid string, troll *pb.DBTrollTrain, price map[int3
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (this *Troll) SeTrollRankList(gold int64, uid string) {
|
||||
tableName := "trollRank"
|
||||
var (
|
||||
pipe *pipe.RedisPipe = this.modelTroll.Redis.RedisPipe(context.TODO())
|
||||
menbers *redis.Z
|
||||
)
|
||||
|
||||
menbers = &redis.Z{Score: float64(gold), Member: uid}
|
||||
|
||||
if cmd := pipe.ZAdd(tableName, menbers); cmd != nil {
|
||||
|
||||
dock, err1 := cmd.Result()
|
||||
if err1 != nil {
|
||||
this.Errorln(dock, err1)
|
||||
}
|
||||
}
|
||||
if _, err := pipe.Exec(); err != nil {
|
||||
this.Errorln(err)
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
func (this *Troll) QueryRankList() (ranks []string, gold []int64, err error) {
|
||||
var (
|
||||
result []string
|
||||
)
|
||||
tableName := "trollRank"
|
||||
|
||||
if result, err = this.modelTroll.Redis.ZRevRange(tableName, 0, 50).Result(); err != nil {
|
||||
this.Errorln(err)
|
||||
return
|
||||
}
|
||||
|
||||
ranks = make([]string, 0)
|
||||
for i := 0; i < len(result); i++ {
|
||||
if _d, err := this.modelTroll.Redis.ZScore(tableName, result[i]); err == nil {
|
||||
gold = append(gold, int64(_d))
|
||||
ranks = append(ranks, result[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -60,6 +60,13 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
|
||||
return
|
||||
}
|
||||
newChallenge = true
|
||||
viking.Boss[req.BossId]++
|
||||
// 校验是不是达到最大难度
|
||||
maxDifficulity := this.module.configure.GetMaxDifficultyByBossID(req.BossId)
|
||||
if viking.Boss[req.BossId] > maxDifficulity {
|
||||
viking.Boss[req.BossId] = maxDifficulity
|
||||
}
|
||||
mapData["boss"] = viking.Boss
|
||||
}
|
||||
|
||||
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 && value == req.Difficulty {
|
||||
|
@ -19,6 +19,7 @@ type configureComp struct {
|
||||
hlock sync.RWMutex
|
||||
modules.MCompConfigure
|
||||
_vikingMap map[int64]*cfg.GameVikingBossData
|
||||
boos map[int32]int32 // key bossid value difficulty
|
||||
}
|
||||
|
||||
//组件初始化接口
|
||||
@ -26,6 +27,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
|
||||
err = this.MCompConfigure.Init(service, module, comp, options)
|
||||
|
||||
this._vikingMap = make(map[int64]*cfg.GameVikingBossData, 0)
|
||||
this.boos = make(map[int32]int32, 0)
|
||||
configure.RegisterConfigure(game_vikingboss, cfg.NewGameVikingBoss, func() {
|
||||
if v, err := this.GetConfigure(game_vikingboss); err == nil {
|
||||
if configure, ok := v.(*cfg.GameVikingBoss); ok {
|
||||
@ -33,6 +35,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
|
||||
defer this.hlock.Unlock()
|
||||
for _, value := range configure.GetDataList() {
|
||||
this._vikingMap[int64(value.Bossid<<16)+int64(value.Difficulty)] = value
|
||||
this.boos[value.Bossid]++
|
||||
}
|
||||
return
|
||||
}
|
||||
@ -113,3 +116,11 @@ func (this *configureComp) GetMaxBuyChallengeCount() int32 {
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
// 获取boss 最大难点
|
||||
func (this *configureComp) GetMaxDifficultyByBossID(bossId int32) int32 {
|
||||
if v, ok := this.boos[bossId]; ok {
|
||||
return v
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
@ -467,7 +467,6 @@ type BattleReport struct {
|
||||
|
||||
Info *BattleInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info"`
|
||||
Costtime int32 `protobuf:"varint,2,opt,name=Costtime,proto3" json:"Costtime"` //战斗时长 单位ms
|
||||
Process []byte `protobuf:"bytes,3,opt,name=process,proto3" json:"process"` //战斗过程数据
|
||||
}
|
||||
|
||||
func (x *BattleReport) Reset() {
|
||||
@ -516,13 +515,6 @@ func (x *BattleReport) GetCosttime() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *BattleReport) GetProcess() []byte {
|
||||
if x != nil {
|
||||
return x.Process
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_battle_battle_msg_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_battle_battle_msg_proto_rawDesc = []byte{
|
||||
@ -582,15 +574,13 @@ var file_battle_battle_msg_proto_rawDesc = []byte{
|
||||
0x28, 0x09, 0x52, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2c,
|
||||
0x0a, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x08, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d,
|
||||
0x74, 0x52, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x65, 0x0a, 0x0c,
|
||||
0x74, 0x52, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x0c,
|
||||
0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x04,
|
||||
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74,
|
||||
0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x43, 0x6f, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x08, 0x43, 0x6f, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f,
|
||||
0x63, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63,
|
||||
0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
0x08, 0x43, 0x6f, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70,
|
||||
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -34,6 +34,7 @@ type DBMailData struct {
|
||||
Check bool `protobuf:"varint,7,opt,name=Check,proto3" json:"Check"` // 是否查看
|
||||
Reward bool `protobuf:"varint,8,opt,name=Reward,proto3" json:"Reward"` // 附件领取状态
|
||||
Items []*UserAssets `protobuf:"bytes,9,rep,name=Items,proto3" json:"Items"` // 附件
|
||||
Cid string `protobuf:"bytes,10,opt,name=Cid,proto3" json:"Cid"` // 邮件的配置表ID
|
||||
}
|
||||
|
||||
func (x *DBMailData) Reset() {
|
||||
@ -131,12 +132,19 @@ func (x *DBMailData) GetItems() []*UserAssets {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBMailData) GetCid() string {
|
||||
if x != nil {
|
||||
return x.Cid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_mail_mail_db_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_mail_mail_db_proto_rawDesc = []byte{
|
||||
0x0a, 0x12, 0x6d, 0x61, 0x69, 0x6c, 0x2f, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x64, 0x62, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x22, 0xed, 0x01, 0x0a, 0x0a, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12,
|
||||
0x22, 0xff, 0x01, 0x0a, 0x0a, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
|
||||
0x4f, 0x62, 0x6a, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x55, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x69, 0x74, 0x6c, 0x65,
|
||||
@ -151,7 +159,9 @@ var file_mail_mail_db_proto_rawDesc = []byte{
|
||||
0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x21, 0x0a,
|
||||
0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55,
|
||||
0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73,
|
||||
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x43, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x43,
|
||||
0x69, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -408,6 +408,179 @@ func (x *TrollNpcRewardResp) GetData() *DBTrollTrain {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 获取收益排行榜
|
||||
type TrollRankListReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *TrollRankListReq) Reset() {
|
||||
*x = TrollRankListReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_troll_troll_msg_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TrollRankListReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TrollRankListReq) ProtoMessage() {}
|
||||
|
||||
func (x *TrollRankListReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_troll_troll_msg_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TrollRankListReq.ProtoReflect.Descriptor instead.
|
||||
func (*TrollRankListReq) Descriptor() ([]byte, []int) {
|
||||
return file_troll_troll_msg_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
type RankData struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
RankId int32 `protobuf:"varint,1,opt,name=rankId,proto3" json:"rankId"` // 排名
|
||||
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name"` // 昵称
|
||||
Gold int64 `protobuf:"varint,4,opt,name=gold,proto3" json:"gold"` // 收益金币
|
||||
Figure int32 `protobuf:"varint,5,opt,name=figure,proto3" json:"figure"` // 形象
|
||||
Title int32 `protobuf:"varint,6,opt,name=title,proto3" json:"title"`
|
||||
}
|
||||
|
||||
func (x *RankData) Reset() {
|
||||
*x = RankData{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_troll_troll_msg_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RankData) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RankData) ProtoMessage() {}
|
||||
|
||||
func (x *RankData) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_troll_troll_msg_proto_msgTypes[9]
|
||||
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 RankData.ProtoReflect.Descriptor instead.
|
||||
func (*RankData) Descriptor() ([]byte, []int) {
|
||||
return file_troll_troll_msg_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *RankData) GetRankId() int32 {
|
||||
if x != nil {
|
||||
return x.RankId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RankData) GetUid() string {
|
||||
if x != nil {
|
||||
return x.Uid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RankData) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RankData) GetGold() int64 {
|
||||
if x != nil {
|
||||
return x.Gold
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RankData) GetFigure() int32 {
|
||||
if x != nil {
|
||||
return x.Figure
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RankData) GetTitle() int32 {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type TrollRankListResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data []*RankData `protobuf:"bytes,1,rep,name=data,proto3" json:"data"`
|
||||
}
|
||||
|
||||
func (x *TrollRankListResp) Reset() {
|
||||
*x = TrollRankListResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_troll_troll_msg_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TrollRankListResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TrollRankListResp) ProtoMessage() {}
|
||||
|
||||
func (x *TrollRankListResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_troll_troll_msg_proto_msgTypes[10]
|
||||
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 TrollRankListResp.ProtoReflect.Descriptor instead.
|
||||
func (*TrollRankListResp) Descriptor() ([]byte, []int) {
|
||||
return file_troll_troll_msg_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *TrollRankListResp) GetData() []*RankData {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_troll_troll_msg_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_troll_troll_msg_proto_rawDesc = []byte{
|
||||
@ -445,8 +618,21 @@ var file_troll_troll_msg_proto_rawDesc = []byte{
|
||||
0x6f, 0x6c, 0x6c, 0x4e, 0x70, 0x63, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70,
|
||||
0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d,
|
||||
0x2e, 0x44, 0x42, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x04, 0x64,
|
||||
0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
0x61, 0x74, 0x61, 0x22, 0x12, 0x0a, 0x10, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x52, 0x61, 0x6e, 0x6b,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x8a, 0x01, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b,
|
||||
0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74,
|
||||
0x69, 0x74, 0x6c, 0x65, 0x22, 0x32, 0x0a, 0x11, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x52, 0x61, 0x6e,
|
||||
0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74,
|
||||
0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61,
|
||||
0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -461,7 +647,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, 9)
|
||||
var file_troll_troll_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
||||
var file_troll_troll_msg_proto_goTypes = []interface{}{
|
||||
(*TrollGetListReq)(nil), // 0: TrollGetListReq
|
||||
(*TrollGetListResp)(nil), // 1: TrollGetListResp
|
||||
@ -471,20 +657,24 @@ var file_troll_troll_msg_proto_goTypes = []interface{}{
|
||||
(*TrollAfkSetResp)(nil), // 5: TrollAfkSetResp
|
||||
(*TrollNpcRewardReq)(nil), // 6: TrollNpcRewardReq
|
||||
(*TrollNpcRewardResp)(nil), // 7: TrollNpcRewardResp
|
||||
nil, // 8: TrollBuyOrSellReq.ItemsEntry
|
||||
(*DBTrollTrain)(nil), // 9: DBTrollTrain
|
||||
(*TrollRankListReq)(nil), // 8: TrollRankListReq
|
||||
(*RankData)(nil), // 9: RankData
|
||||
(*TrollRankListResp)(nil), // 10: TrollRankListResp
|
||||
nil, // 11: TrollBuyOrSellReq.ItemsEntry
|
||||
(*DBTrollTrain)(nil), // 12: DBTrollTrain
|
||||
}
|
||||
var file_troll_troll_msg_proto_depIdxs = []int32{
|
||||
9, // 0: TrollGetListResp.data:type_name -> DBTrollTrain
|
||||
8, // 1: TrollBuyOrSellReq.items:type_name -> TrollBuyOrSellReq.ItemsEntry
|
||||
9, // 2: TrollBuyOrSellResp.data:type_name -> DBTrollTrain
|
||||
9, // 3: TrollAfkSetResp.data:type_name -> DBTrollTrain
|
||||
9, // 4: TrollNpcRewardResp.data:type_name -> DBTrollTrain
|
||||
5, // [5:5] is the sub-list for method output_type
|
||||
5, // [5:5] is the sub-list for method input_type
|
||||
5, // [5:5] is the sub-list for extension type_name
|
||||
5, // [5:5] is the sub-list for extension extendee
|
||||
0, // [0:5] is the sub-list for field type_name
|
||||
12, // 0: TrollGetListResp.data:type_name -> DBTrollTrain
|
||||
11, // 1: TrollBuyOrSellReq.items:type_name -> TrollBuyOrSellReq.ItemsEntry
|
||||
12, // 2: TrollBuyOrSellResp.data:type_name -> DBTrollTrain
|
||||
12, // 3: TrollAfkSetResp.data:type_name -> DBTrollTrain
|
||||
12, // 4: TrollNpcRewardResp.data:type_name -> DBTrollTrain
|
||||
9, // 5: TrollRankListResp.data:type_name -> RankData
|
||||
6, // [6:6] is the sub-list for method output_type
|
||||
6, // [6:6] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
6, // [6:6] is the sub-list for extension extendee
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_troll_troll_msg_proto_init() }
|
||||
@ -590,6 +780,42 @@ func file_troll_troll_msg_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_troll_troll_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TrollRankListReq); 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[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RankData); 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[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TrollRankListResp); 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{
|
||||
@ -597,7 +823,7 @@ func file_troll_troll_msg_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_troll_troll_msg_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 9,
|
||||
NumMessages: 12,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user