赛季通行证
This commit is contained in:
parent
2805e4ca6c
commit
4c7abf167e
|
@ -149,6 +149,16 @@ func IsLocalGame(gameId int) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func IsDaZhong(gameId int) bool {
|
||||
switch gameId {
|
||||
case GameId_TienLenSelect,
|
||||
GameId_TienLenSelect_yl, GameId_TienLenSelect_toend,
|
||||
GameId_TienLenSelect_yl_toend:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 房间编号区间
|
||||
const (
|
||||
PrivateSceneStartId = 10000000
|
||||
|
@ -276,6 +286,11 @@ const (
|
|||
GainWay_PigrankGainDiamond = 90 //存钱罐打开获取钻石
|
||||
GainWaySign7Add = 91 // 累计签到进阶奖励获得
|
||||
GainWayItemChange = 92 //背包内使用道具兑换话费
|
||||
GainWayPermitAward = 93 // 赛季通行证普通奖励
|
||||
GainWayPermitAwardSupper = 93 // 赛季通行证典藏奖励
|
||||
GainWayPermitExchangeCost = 94 // 赛季通行证兑换消耗
|
||||
GainWayPermitExchangeGain = 95 // 赛季通行证兑换获得
|
||||
GainWayItemTaskPermit = 96 // 赛季通行证任务
|
||||
)
|
||||
|
||||
// 后台选择 金币变化类型 的充值 类型id号起始
|
||||
|
@ -678,6 +693,14 @@ const (
|
|||
TaskTypeTurnplate = 17 // 转盘抽奖次数
|
||||
TaskTypeInviteRecharge = 18 // 被邀请人充值金额*
|
||||
TaskTypeLoseCoin = 19 // 输的金币数量
|
||||
TaskType20 = 20 // 未使用
|
||||
TaskTypeOnlineTs = 21 // 在线时长,秒
|
||||
TaskTypeBuyPig = 22 // 购买任意存钱罐
|
||||
TaskTypeDaZhong = 23 // 大众场胜利
|
||||
TaskTypeInvitePlay = 24 // 邀请好友私人桌对局
|
||||
TaskTypeJoinMatch = 25 // 参与比赛场
|
||||
TaskTypeMatchRank10 = 26 // 比赛场前10名
|
||||
TaskTypeCostDiamond = 27 // 消耗钻石数量
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -693,6 +716,7 @@ const (
|
|||
TaskActivityTypeNovice = 3 // 新手任务
|
||||
TaskActivityTypeInvite = 4 // 邀请任务
|
||||
TaskActivityTypeAchieve = 5 // 成就任务
|
||||
TaskActivityTypePermit = 6 // 赛季通行证任务
|
||||
)
|
||||
|
||||
const HeadRange = 3 // 机器人头像id范围
|
||||
|
@ -762,4 +786,9 @@ const (
|
|||
// 特殊商品id
|
||||
const (
|
||||
ShopIdWeekCard = 970001 // 周卡
|
||||
ShopIdPermit = 990001 // 典藏通行证
|
||||
)
|
||||
|
||||
const PermitStartTsKey = "permit_start_ts"
|
||||
|
||||
const PermitTaskScore = 100
|
||||
|
|
|
@ -155,6 +155,13 @@ func GetWeekStartTs(ts int64) int64 {
|
|||
return st
|
||||
}
|
||||
|
||||
func GetDayStartTs(ts int64) int64 {
|
||||
now := time.Unix(ts, 0).Local()
|
||||
year, month, day := now.Date()
|
||||
today := time.Date(year, month, day, 0, 0, 0, 0, time.Local)
|
||||
return today.Unix()
|
||||
}
|
||||
|
||||
func GetMonthTimestamp() []int64 {
|
||||
now := time.Now().Local()
|
||||
year, month, _ := now.Date()
|
||||
|
|
Binary file not shown.
|
@ -32,6 +32,38 @@
|
|||
"Location": "10001",
|
||||
"Describe": "作用:用于升级,解锁宠物斗鸡;可在角色功能页面使用。\n"
|
||||
},
|
||||
{
|
||||
"Id": 11001,
|
||||
"Name": "技能碎片",
|
||||
"ShowLocation": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"Classify": [
|
||||
1,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"Type": 1,
|
||||
"Effect0": [
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"Effect": [
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"SaleType": 1,
|
||||
"SaleGold": 5000,
|
||||
"Composition": 1,
|
||||
"CompositionMax": 9999,
|
||||
"Location": "10001",
|
||||
"Describe": "作用:用于升级,解锁宠物斗鸡特殊技能;可在角色功能页面使用。\n"
|
||||
},
|
||||
{
|
||||
"Id": 20001,
|
||||
"Name": "酷帕碎片",
|
||||
|
@ -757,6 +789,38 @@
|
|||
"Location": "0",
|
||||
"Describe": "可在集字活动中兑换物品"
|
||||
},
|
||||
{
|
||||
"Id": 50013,
|
||||
"Name": "龙币",
|
||||
"ShowLocation": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"Classify": [
|
||||
1,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"Type": 13,
|
||||
"Effect0": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"Effect": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"SaleType": 1,
|
||||
"SaleGold": 5000,
|
||||
"Composition": 1,
|
||||
"CompositionMax": 9999,
|
||||
"Location": "0",
|
||||
"Describe": "可在通行证中兑换商品"
|
||||
},
|
||||
{
|
||||
"Id": 60001,
|
||||
"Name": "tienlen记牌器(1小时)",
|
||||
|
@ -1171,6 +1235,35 @@
|
|||
"Describe": "房间内互动表情",
|
||||
"Num": 1000
|
||||
},
|
||||
{
|
||||
"Id": 100011,
|
||||
"Name": "赛季积分",
|
||||
"ShowLocation": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Classify": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Type": 18,
|
||||
"Effect0": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Effect": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"CompositionMax": 1,
|
||||
"Location": "0",
|
||||
"Describe": "通行证中任务获得积分,可作为排行使用"
|
||||
},
|
||||
{
|
||||
"Id": 100135,
|
||||
"Name": "圣耀裁决",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
<18>‰z Łś
|
||||
|
||||
‘N ‘N
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"Arr": [
|
||||
{
|
||||
"Id": 1,
|
||||
"ShowType": 1,
|
||||
"ShowVolume": 2000003,
|
||||
"Location": 20003
|
||||
},
|
||||
{
|
||||
"Id": 2,
|
||||
"ShowType": 2,
|
||||
"ShowVolume": 10001,
|
||||
"Location": 10001
|
||||
}
|
||||
]
|
||||
}
|
Binary file not shown.
BIN
data/DB_Task.dat
BIN
data/DB_Task.dat
Binary file not shown.
|
@ -798,6 +798,148 @@
|
|||
"100001": 2000000,
|
||||
"100002": 20
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": 11001,
|
||||
"Order": 1,
|
||||
"ActivityType": 6,
|
||||
"TaskType": 17,
|
||||
"TargetTimes": 1,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100011": 50
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": 11002,
|
||||
"Order": 2,
|
||||
"ActivityType": 6,
|
||||
"TaskType": 21,
|
||||
"TargetTimes": 3600,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100011": 51
|
||||
},
|
||||
"Position": [
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 11003,
|
||||
"Order": 3,
|
||||
"ActivityType": 6,
|
||||
"TaskType": 2,
|
||||
"TargetTimes": 1,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100011": 52
|
||||
},
|
||||
"Position": [
|
||||
0,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 11004,
|
||||
"Order": 4,
|
||||
"ActivityType": 6,
|
||||
"TaskType": 22,
|
||||
"TargetTimes": 1,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100011": 53
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": 11005,
|
||||
"Order": 5,
|
||||
"ActivityType": 6,
|
||||
"TaskType": 23,
|
||||
"TargetTimes": 3,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100011": 54
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
{
|
||||
"Id": 11006,
|
||||
"Order": 6,
|
||||
"ActivityType": 6,
|
||||
"TaskType": 6,
|
||||
"TargetTimes": 3,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100011": 55
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
{
|
||||
"Id": 11007,
|
||||
"Order": 7,
|
||||
"ActivityType": 6,
|
||||
"TaskType": 24,
|
||||
"TargetTimes": 1,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100011": 56
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
{
|
||||
"Id": 11008,
|
||||
"Order": 8,
|
||||
"ActivityType": 6,
|
||||
"TaskType": 25,
|
||||
"TargetTimes": 3,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100011": 57
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
{
|
||||
"Id": 11009,
|
||||
"Order": 9,
|
||||
"ActivityType": 6,
|
||||
"TaskType": 26,
|
||||
"TargetTimes": 1,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100011": 58
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
{
|
||||
"Id": 11010,
|
||||
"Order": 10,
|
||||
"ActivityType": 6,
|
||||
"TaskType": 27,
|
||||
"TargetTimes": 100,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100011": 59
|
||||
},
|
||||
"Position": [
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 11011,
|
||||
"Order": 11,
|
||||
"ActivityType": 6,
|
||||
"TaskType": 7,
|
||||
"TargetTimes": 1,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100011": 60
|
||||
},
|
||||
"Position": [
|
||||
1,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -101,4 +101,32 @@ func init() {
|
|||
}
|
||||
return nil
|
||||
}, broker.Queue(model.MQRankPlayerLevel), broker.DisableAutoAck(), rabbitmq.DurableQueue())
|
||||
// 赛季通行证积分
|
||||
mq.RegisterSubscriber(model.MQRankPlayerPermit, func(e broker.Event) (err error) {
|
||||
msg := e.Message()
|
||||
if msg != nil {
|
||||
defer func() {
|
||||
e.Ack()
|
||||
}()
|
||||
|
||||
var log model.PermitScore
|
||||
err = json.Unmarshal(msg.Body, &log)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
logger.Logger.Tracef("SubscriberRankPlayerPermit: %+v", log)
|
||||
|
||||
core.CoreObject().SendCommand(basic.CommandWrapper(func(o *basic.Object) error {
|
||||
err := svc.RankPlayerPermitUpsert(&log)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("RankPlayerPermitUpsert err: %v", err)
|
||||
}
|
||||
return nil
|
||||
}), true)
|
||||
|
||||
return
|
||||
}
|
||||
return nil
|
||||
}, broker.Queue(model.MQRankPlayerPermit), broker.DisableAutoAck(), rabbitmq.DurableQueue())
|
||||
}
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
package svc
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/globalsign/mgo"
|
||||
"github.com/globalsign/mgo/bson"
|
||||
"mongo.games.com/game/dbproxy/mongo"
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"net/rpc"
|
||||
)
|
||||
|
||||
var (
|
||||
RankPlayerPermitDBName = "log"
|
||||
RankPlayerPermitCollName = "log_rankplayerpermit"
|
||||
RankPlayerPermitColError = errors.New("RankPlayerPermit collection open failed")
|
||||
)
|
||||
|
||||
func RankPlayerPermitCollection(plt string) *mongo.Collection {
|
||||
s := mongo.MgoSessionMgrSington.GetPltMgoSession(plt, RankPlayerPermitDBName)
|
||||
if s != nil {
|
||||
c, first := s.DB().C(RankPlayerPermitCollName)
|
||||
if first {
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"startts", "-exp"}, Background: true, Sparse: true})
|
||||
}
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func RankPlayerPermitUpsert(args *model.PermitScore) error {
|
||||
cc := RankPlayerPermitCollection(args.Platform)
|
||||
if cc == nil {
|
||||
return RankPlayerPermitColError
|
||||
}
|
||||
_, err := cc.Upsert(bson.M{"startts": args.StartTs, "snid": args.SnId}, args)
|
||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
||||
logger.Logger.Error("RankPlayerPermitSvc.Upsert is err: ", err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type RankPlayerPermitSvc struct {
|
||||
}
|
||||
|
||||
func (svc *RankPlayerPermitSvc) Upsert(args *model.PermitScore, ret *bool) error {
|
||||
err := RankPlayerPermitUpsert(args)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*ret = true
|
||||
return nil
|
||||
}
|
||||
|
||||
func (svc *RankPlayerPermitSvc) Find(args *model.FindPlayerPermitListArgs, ret *model.FindPlayerPermitListReply) error {
|
||||
fc := RankPlayerPermitCollection(args.Platform)
|
||||
if fc == nil {
|
||||
return RankPlayerPermitColError
|
||||
}
|
||||
|
||||
err := fc.Find(bson.M{"startts": args.StartTs}).Sort("-exp").Limit(int(model.GameParamData.RankPlayerPermitMaxNum)).All(&ret.List)
|
||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
||||
logger.Logger.Error("QueryPermit is err: ", err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func init() {
|
||||
rpc.Register(new(RankPlayerPermitSvc))
|
||||
}
|
|
@ -32,4 +32,5 @@ const (
|
|||
ETCDKEY_ACT_PHONELOTTERY = "/game/act_phoneLottery"
|
||||
ETCDKEY_ChannelSwitch = "/game/channel/switch" // 渠道开关
|
||||
ETCDKEY_ACT_Invite = "/game/act_invite" // 邀请活动配置
|
||||
ETCDKEY_ACT_Permit = "/game/act_permit" // 赛季通行证配置
|
||||
)
|
||||
|
|
|
@ -119,6 +119,10 @@ type AllConfig struct {
|
|||
ChannelSwitch map[int32]*webapi.ChannelSwitchConfig
|
||||
// 邀请活动
|
||||
*webapi.ActInviteConfig
|
||||
// 赛季通行证活动
|
||||
*webapi.ActPermitConfig
|
||||
PermitStartTs int64 // 开始时间戳
|
||||
PermitEndTs int64 // 结束时间戳
|
||||
}
|
||||
|
||||
type GlobalConfig struct {
|
||||
|
@ -221,3 +225,41 @@ func (cm *ConfigMgr) GetShopInfo(plt string, shopId int32) *ShopInfo {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (cm *ConfigMgr) GetPermitLevel(plt, channel string, score int64) int64 {
|
||||
cfg := cm.GetConfig(plt).ActPermitConfig
|
||||
if cfg == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
level := 0
|
||||
for _, v := range cfg.Configs {
|
||||
if v.Channel == channel {
|
||||
for _, vv := range v.LevelConfig {
|
||||
if score >= vv.Score {
|
||||
level = int(vv.Rank)
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return int64(level)
|
||||
}
|
||||
|
||||
func (cm *ConfigMgr) GetPermitConfig(plt, channel string) *webapi.PermitChannelConfig {
|
||||
cfg := cm.GetConfig(plt).ActPermitConfig
|
||||
if cfg == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
for _, v := range cfg.Configs {
|
||||
if v.Channel == channel {
|
||||
return v
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -184,3 +184,7 @@ func UptIntArrKVGameData(key string, arr []int64) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type PermitStartTs struct {
|
||||
StartTs, EndTs int64
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@ type GameParam struct {
|
|||
BackendTimeLocal int //后台时区
|
||||
GameStaticsFightVersion int // 对战场统计数据版本
|
||||
TestRankMatchAward bool // 测试段位奖励领取通知,直接改玩家排位积分使玩家获得奖励
|
||||
RankPlayerPermitMaxNum int32 // 赛季通行证积分排行榜最大人数
|
||||
}
|
||||
|
||||
var GameParamPath = "../data/gameparam.json"
|
||||
|
@ -204,4 +205,7 @@ func InitGameParam() {
|
|||
if GameParamData.BackendTimeLocal == 0 {
|
||||
GameParamData.BackendTimeLocal = 8
|
||||
}
|
||||
if GameParamData.RankPlayerPermitMaxNum == 0 {
|
||||
GameParamData.RankPlayerPermitMaxNum = 100
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,6 +109,9 @@ const (
|
|||
SystemFreeGive_GiveType_TaskAchievement // 成就任务
|
||||
SystemFreeGive_GiveType_TaskEveryDay // 每日任务
|
||||
SystemFreeGive_GiveType_TaskWeekActive // 周活跃奖励
|
||||
SystemFreeGive_GiveType_PermitAward // 赛季通行证普通奖励
|
||||
SystemFreeGive_GiveType_PermitAwardSupper // 赛季通行证典藏奖励
|
||||
SystemFreeGive_GiveType_TaskPermit // 赛季通行证任务
|
||||
)
|
||||
const (
|
||||
SystemFreeGive_CoinType_Coin int32 = iota //金币
|
||||
|
@ -468,6 +471,7 @@ type PlayerData struct {
|
|||
IMoney int64 // 邀请人充值金额
|
||||
IScoreTs time.Time // 邀请积分更新时间
|
||||
Permit time.Time // 赛季通行证领取时间
|
||||
PermitStartTs int64 // 赛季通行证开始时间戳
|
||||
}
|
||||
|
||||
// 七日签到数据
|
||||
|
@ -513,7 +517,8 @@ type WelfareData struct {
|
|||
PhoneLotteryTask map[int32]*TaskData // 抽手机任务
|
||||
PigBank *PigBankData // 存钱罐
|
||||
DiamondBank *DiamondBankData // 钻石储存罐
|
||||
|
||||
PermitAward map[int32]int64 // 赛季通行证奖励领取时间
|
||||
PermitExchange map[int32][]int64 // 赛季通行证兑换次数, 多次的兑换时间
|
||||
}
|
||||
|
||||
func NewWelfareData() *WelfareData {
|
||||
|
@ -524,6 +529,8 @@ func NewWelfareData() *WelfareData {
|
|||
PhoneLotteryTask: make(map[int32]*TaskData),
|
||||
PigBank: &PigBankData{},
|
||||
DiamondBank: &DiamondBankData{},
|
||||
PermitAward: make(map[int32]int64),
|
||||
PermitExchange: make(map[int32][]int64),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1082,6 +1089,7 @@ func GetPlayerDataBySnId(plt string, snid int32, correctData, createIfNotExist b
|
|||
ret.Pd.LastLoginTime = ret.Pd.LastLoginTime.Local()
|
||||
ret.Pd.LastLogoutTime = ret.Pd.LastLogoutTime.Local()
|
||||
ret.Pd.IScoreTs = ret.Pd.IScoreTs.Local()
|
||||
ret.Pd.Permit = ret.Pd.Permit.Local()
|
||||
|
||||
return ret.Pd, ret.IsNew
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ const (
|
|||
MQRankPlayerCoin = "log_rankplayercoin"
|
||||
MQRankPlayerInvite = "log_rankplayerinvite"
|
||||
MQRankPlayerLevel = "log_rankplayerlevel"
|
||||
MQRankPlayerPermit = "log_rankplayerpermit" // 赛季通行证排行榜
|
||||
)
|
||||
|
||||
type PlayerRankScore struct {
|
||||
|
@ -275,3 +276,36 @@ func FindPlayerLevelList(args *FindPlayerLevelListArgs) (*FindPlayerLevelListRep
|
|||
}
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
// PermitScore 赛季通行证排行榜
|
||||
type PermitScore struct {
|
||||
Platform string `bson:"-"`
|
||||
SnId int32
|
||||
Name string
|
||||
Exp int64
|
||||
ModId int32 //头像
|
||||
StartTs int64 // 赛季开始时间戳
|
||||
}
|
||||
|
||||
type FindPlayerPermitListArgs struct {
|
||||
Platform string
|
||||
StartTs int64
|
||||
}
|
||||
type FindPlayerPermitListReply struct {
|
||||
List []*PermitScore
|
||||
}
|
||||
|
||||
func FindPlayerPermitList(args *FindPlayerPermitListArgs) (*FindPlayerPermitListReply, error) {
|
||||
if rpcCli == nil {
|
||||
logger.Logger.Error("model.FindPlayerLevelList rpcCli == nil")
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
ret := new(FindPlayerPermitListReply)
|
||||
err := rpcCli.CallWithTimeout("RankPlayerPermitSvc.Find", args, ret, time.Second*30)
|
||||
if err != nil {
|
||||
logger.Logger.Error("GetPlayerLevelList error:", err)
|
||||
return ret, err
|
||||
}
|
||||
return ret, nil
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1237,6 +1237,22 @@ message DB_NewPlayerArray {
|
|||
repeated DB_NewPlayer Arr = 1;
|
||||
}
|
||||
|
||||
message DB_PassShow {
|
||||
|
||||
int32 Id = 1;
|
||||
|
||||
int32 ShowType = 2;
|
||||
|
||||
int32 ShowVolume = 3;
|
||||
|
||||
int32 Location = 4;
|
||||
|
||||
}
|
||||
|
||||
message DB_PassShowArray {
|
||||
repeated DB_PassShow Arr = 1;
|
||||
}
|
||||
|
||||
message DB_PetSkill {
|
||||
|
||||
int32 Id = 1;
|
||||
|
|
|
@ -6520,10 +6520,10 @@ type ActPermitConfig struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Platform string `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform,omitempty"` // 平台
|
||||
StartTs int64 `protobuf:"varint,2,opt,name=StartTs,proto3" json:"StartTs,omitempty"` // 开始日期
|
||||
OnChannelName []string `protobuf:"bytes,3,rep,name=OnChannelName,proto3" json:"OnChannelName,omitempty"` // 开启渠道
|
||||
Configs []*PermitChannelConfig `protobuf:"bytes,4,rep,name=Configs,proto3" json:"Configs,omitempty"` // 渠道配置
|
||||
Platform string `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform,omitempty"` // 平台
|
||||
StartTs int64 `protobuf:"varint,2,opt,name=StartTs,proto3" json:"StartTs,omitempty"` // 开始日期
|
||||
Days int32 `protobuf:"varint,3,opt,name=Days,proto3" json:"Days,omitempty"` // 持续天数
|
||||
Configs []*PermitChannelConfig `protobuf:"bytes,4,rep,name=Configs,proto3" json:"Configs,omitempty"` // 渠道配置
|
||||
}
|
||||
|
||||
func (x *ActPermitConfig) Reset() {
|
||||
|
@ -6572,11 +6572,11 @@ func (x *ActPermitConfig) GetStartTs() int64 {
|
|||
return 0
|
||||
}
|
||||
|
||||
func (x *ActPermitConfig) GetOnChannelName() []string {
|
||||
func (x *ActPermitConfig) GetDays() int32 {
|
||||
if x != nil {
|
||||
return x.OnChannelName
|
||||
return x.Days
|
||||
}
|
||||
return nil
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ActPermitConfig) GetConfigs() []*PermitChannelConfig {
|
||||
|
@ -7636,21 +7636,20 @@ var file_common_proto_rawDesc = []byte{
|
|||
0x69, 0x67, 0x12, 0x38, 0x0a, 0x0a, 0x52, 0x61, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||
0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||
0x52, 0x0a, 0x52, 0x61, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xa4, 0x01, 0x0a,
|
||||
0x52, 0x0a, 0x52, 0x61, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x92, 0x01, 0x0a,
|
||||
0x0f, 0x41, 0x63, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||
0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x18, 0x0a, 0x07,
|
||||
0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x53,
|
||||
0x74, 0x61, 0x72, 0x74, 0x54, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x4f, 0x6e, 0x43, 0x68, 0x61, 0x6e,
|
||||
0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x4f,
|
||||
0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x07,
|
||||
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e,
|
||||
0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x43, 0x68, 0x61,
|
||||
0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x73, 0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d,
|
||||
0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
0x74, 0x61, 0x72, 0x74, 0x54, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x79, 0x73, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x44, 0x61, 0x79, 0x73, 0x12, 0x35, 0x0a, 0x07, 0x43, 0x6f,
|
||||
0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x65,
|
||||
0x62, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e,
|
||||
0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||
0x73, 0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
|
||||
0x6f, 0x6c, 0x2f, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
|
@ -725,6 +725,6 @@ message PermitChannelConfig{
|
|||
message ActPermitConfig{
|
||||
string Platform = 1; // 平台
|
||||
int64 StartTs = 2; // 开始日期
|
||||
repeated string OnChannelName = 3; // 开启渠道
|
||||
int32 Days = 3; // 持续天数
|
||||
repeated PermitChannelConfig Configs = 4; // 渠道配置
|
||||
}
|
|
@ -36,6 +36,11 @@ const (
|
|||
OpResultCode_OPRC_DiamondLess OpResultCode = 9 // 钻石不足
|
||||
OpResultCode_OPRC_PigbankNotFull OpResultCode = 10 // 存钱罐未满
|
||||
OpResultCode_OPRC_PigbankOverTakeTimes OpResultCode = 11 // 存钱罐超过每日领取次数
|
||||
OpResultCode_OPRC_ExchangeLimit OpResultCode = 12 // 兑换次数不足
|
||||
OpResultCode_OPRC_ExchangeLevelLimit OpResultCode = 13 // 兑换等级不足
|
||||
OpResultCode_OPRC_NeedPermit OpResultCode = 14 // 需要典藏通行证
|
||||
OpResultCode_OPRC_ErrCost OpResultCode = 15 // 消耗道具不足
|
||||
OpResultCode_OPRC_NotFound OpResultCode = 16 // 商品没找到
|
||||
)
|
||||
|
||||
// Enum value maps for OpResultCode.
|
||||
|
@ -53,6 +58,11 @@ var (
|
|||
9: "OPRC_DiamondLess",
|
||||
10: "OPRC_PigbankNotFull",
|
||||
11: "OPRC_PigbankOverTakeTimes",
|
||||
12: "OPRC_ExchangeLimit",
|
||||
13: "OPRC_ExchangeLevelLimit",
|
||||
14: "OPRC_NeedPermit",
|
||||
15: "OPRC_ErrCost",
|
||||
16: "OPRC_NotFound",
|
||||
}
|
||||
OpResultCode_value = map[string]int32{
|
||||
"OPRC_Sucess": 0,
|
||||
|
@ -67,6 +77,11 @@ var (
|
|||
"OPRC_DiamondLess": 9,
|
||||
"OPRC_PigbankNotFull": 10,
|
||||
"OPRC_PigbankOverTakeTimes": 11,
|
||||
"OPRC_ExchangeLimit": 12,
|
||||
"OPRC_ExchangeLevelLimit": 13,
|
||||
"OPRC_NeedPermit": 14,
|
||||
"OPRC_ErrCost": 15,
|
||||
"OPRC_NotFound": 16,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -147,6 +162,8 @@ const (
|
|||
SPacketID_PACKET_SCPermitAward SPacketID = 2922 // 领取通行证奖励
|
||||
SPacketID_PACKET_CSPermitExchange SPacketID = 2923 // 通行证兑换
|
||||
SPacketID_PACKET_SCPermitExchange SPacketID = 2924 // 通行证兑换
|
||||
SPacketID_PACKET_CSPermitShop SPacketID = 2925 // 典藏通行证商品信息
|
||||
SPacketID_PACKET_SCPermitShop SPacketID = 2956 // 典藏通行证商品信息
|
||||
)
|
||||
|
||||
// Enum value maps for SPacketID.
|
||||
|
@ -196,6 +213,8 @@ var (
|
|||
2922: "PACKET_SCPermitAward",
|
||||
2923: "PACKET_CSPermitExchange",
|
||||
2924: "PACKET_SCPermitExchange",
|
||||
2925: "PACKET_CSPermitShop",
|
||||
2956: "PACKET_SCPermitShop",
|
||||
}
|
||||
SPacketID_value = map[string]int32{
|
||||
"PACKET_SHOP_ZERO": 0,
|
||||
|
@ -242,6 +261,8 @@ var (
|
|||
"PACKET_SCPermitAward": 2922,
|
||||
"PACKET_CSPermitExchange": 2923,
|
||||
"PACKET_SCPermitExchange": 2924,
|
||||
"PACKET_CSPermitShop": 2925,
|
||||
"PACKET_SCPermitShop": 2956,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -3249,10 +3270,10 @@ type PermitAward struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Exp int64 `protobuf:"varint,1,opt,name=Exp,proto3" json:"Exp,omitempty"` // 赛季经验
|
||||
Level int64 `protobuf:"varint,2,opt,name=Level,proto3" json:"Level,omitempty"` // 等级
|
||||
Award1 []*PropItem `protobuf:"bytes,3,rep,name=Award1,proto3" json:"Award1,omitempty"` // 普通奖励
|
||||
Award2 []*PropItem `protobuf:"bytes,4,rep,name=Award2,proto3" json:"Award2,omitempty"` // 典藏奖励
|
||||
Exp int64 `protobuf:"varint,1,opt,name=Exp,proto3" json:"Exp,omitempty"` // 赛季经验
|
||||
Level int64 `protobuf:"varint,2,opt,name=Level,proto3" json:"Level,omitempty"` // 等级
|
||||
Award1 *PropItem `protobuf:"bytes,3,opt,name=Award1,proto3" json:"Award1,omitempty"` // 普通奖励
|
||||
Award2 *PropItem `protobuf:"bytes,4,opt,name=Award2,proto3" json:"Award2,omitempty"` // 典藏奖励
|
||||
}
|
||||
|
||||
func (x *PermitAward) Reset() {
|
||||
|
@ -3301,14 +3322,14 @@ func (x *PermitAward) GetLevel() int64 {
|
|||
return 0
|
||||
}
|
||||
|
||||
func (x *PermitAward) GetAward1() []*PropItem {
|
||||
func (x *PermitAward) GetAward1() *PropItem {
|
||||
if x != nil {
|
||||
return x.Award1
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *PermitAward) GetAward2() []*PropItem {
|
||||
func (x *PermitAward) GetAward2() *PropItem {
|
||||
if x != nil {
|
||||
return x.Award2
|
||||
}
|
||||
|
@ -3383,8 +3404,9 @@ type PermitRankAward struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Rank int32 `protobuf:"varint,1,opt,name=Rank,proto3" json:"Rank,omitempty"` // 名次
|
||||
Award []*PropInfo `protobuf:"bytes,2,rep,name=Award,proto3" json:"Award,omitempty"` // 奖励
|
||||
Start int32 `protobuf:"varint,1,opt,name=Start,proto3" json:"Start,omitempty"` // 开始排名;第一名为0
|
||||
End int32 `protobuf:"varint,2,opt,name=End,proto3" json:"End,omitempty"` // 结束排名
|
||||
ItemId []*PropInfo `protobuf:"bytes,3,rep,name=ItemId,proto3" json:"ItemId,omitempty"` // 奖励
|
||||
}
|
||||
|
||||
func (x *PermitRankAward) Reset() {
|
||||
|
@ -3419,16 +3441,23 @@ func (*PermitRankAward) Descriptor() ([]byte, []int) {
|
|||
return file_welfare_proto_rawDescGZIP(), []int{49}
|
||||
}
|
||||
|
||||
func (x *PermitRankAward) GetRank() int32 {
|
||||
func (x *PermitRankAward) GetStart() int32 {
|
||||
if x != nil {
|
||||
return x.Rank
|
||||
return x.Start
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PermitRankAward) GetAward() []*PropInfo {
|
||||
func (x *PermitRankAward) GetEnd() int32 {
|
||||
if x != nil {
|
||||
return x.Award
|
||||
return x.End
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PermitRankAward) GetItemId() []*PropInfo {
|
||||
if x != nil {
|
||||
return x.ItemId
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -3536,7 +3565,8 @@ type CSPermitAward struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` // 奖励id; 0:一键领取
|
||||
Tp int32 `protobuf:"varint,1,opt,name=Tp,proto3" json:"Tp,omitempty"` // 0奖励 1普通奖励 2典藏奖励
|
||||
Id int32 `protobuf:"varint,2,opt,name=Id,proto3" json:"Id,omitempty"` // 奖励id; 0:一键领取
|
||||
}
|
||||
|
||||
func (x *CSPermitAward) Reset() {
|
||||
|
@ -3571,6 +3601,13 @@ func (*CSPermitAward) Descriptor() ([]byte, []int) {
|
|||
return file_welfare_proto_rawDescGZIP(), []int{51}
|
||||
}
|
||||
|
||||
func (x *CSPermitAward) GetTp() int32 {
|
||||
if x != nil {
|
||||
return x.Tp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CSPermitAward) GetId() int32 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
|
@ -3588,6 +3625,7 @@ type SCPermitAward struct {
|
|||
Award1 []*PropInfo `protobuf:"bytes,2,rep,name=Award1,proto3" json:"Award1,omitempty"` // 普通奖励
|
||||
Award2 []*PropInfo `protobuf:"bytes,3,rep,name=Award2,proto3" json:"Award2,omitempty"` // 典藏奖励
|
||||
Id int32 `protobuf:"varint,4,opt,name=Id,proto3" json:"Id,omitempty"` // 奖励id; 0:一键领取
|
||||
Tp int32 `protobuf:"varint,5,opt,name=Tp,proto3" json:"Tp,omitempty"` // 0奖励 1普通奖励 2典藏奖励
|
||||
}
|
||||
|
||||
func (x *SCPermitAward) Reset() {
|
||||
|
@ -3650,6 +3688,13 @@ func (x *SCPermitAward) GetId() int32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
func (x *SCPermitAward) GetTp() int32 {
|
||||
if x != nil {
|
||||
return x.Tp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 赛季通行证兑换商城
|
||||
//PACKET_CSPermitExchangeList
|
||||
type CSPermitExchangeList struct {
|
||||
|
@ -3700,9 +3745,9 @@ type ShopInfo struct {
|
|||
Cost []*PropInfo `protobuf:"bytes,3,rep,name=Cost,proto3" json:"Cost,omitempty"` // 消耗商品
|
||||
ExchangeTimes int32 `protobuf:"varint,4,opt,name=ExchangeTimes,proto3" json:"ExchangeTimes,omitempty"` // 最大兑换次数
|
||||
RemainTimes int32 `protobuf:"varint,5,opt,name=RemainTimes,proto3" json:"RemainTimes,omitempty"` // 剩余兑换次数
|
||||
Status int64 `protobuf:"varint,6,opt,name=Status,proto3" json:"Status,omitempty"` // 兑换状态 0默认 1可领取 2已领取
|
||||
Level int64 `protobuf:"varint,7,opt,name=Level,proto3" json:"Level,omitempty"` // 兑换所需等级
|
||||
NeedPermit bool `protobuf:"varint,8,opt,name=NeedPermit,proto3" json:"NeedPermit,omitempty"` // 需要典藏通行证
|
||||
Level int64 `protobuf:"varint,6,opt,name=Level,proto3" json:"Level,omitempty"` // 兑换所需等级
|
||||
NeedPermit bool `protobuf:"varint,7,opt,name=NeedPermit,proto3" json:"NeedPermit,omitempty"` // 需要典藏通行证
|
||||
SortId int32 `protobuf:"varint,8,opt,name=SortId,proto3" json:"SortId,omitempty"` // 序号
|
||||
}
|
||||
|
||||
func (x *ShopInfo) Reset() {
|
||||
|
@ -3772,13 +3817,6 @@ func (x *ShopInfo) GetRemainTimes() int32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
func (x *ShopInfo) GetStatus() int64 {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ShopInfo) GetLevel() int64 {
|
||||
if x != nil {
|
||||
return x.Level
|
||||
|
@ -3793,6 +3831,13 @@ func (x *ShopInfo) GetNeedPermit() bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func (x *ShopInfo) GetSortId() int32 {
|
||||
if x != nil {
|
||||
return x.SortId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
//PACKET_SCPermitExchangeList
|
||||
type SCPermitExchangeList struct {
|
||||
state protoimpl.MessageState
|
||||
|
@ -3938,6 +3983,117 @@ func (x *SCPermitExchange) GetOpRetCode() OpResultCode {
|
|||
return OpResultCode_OPRC_Sucess
|
||||
}
|
||||
|
||||
//PACKET_CSPermitShop
|
||||
type CSPermitShop struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *CSPermitShop) Reset() {
|
||||
*x = CSPermitShop{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_welfare_proto_msgTypes[58]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CSPermitShop) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CSPermitShop) ProtoMessage() {}
|
||||
|
||||
func (x *CSPermitShop) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_welfare_proto_msgTypes[58]
|
||||
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 CSPermitShop.ProtoReflect.Descriptor instead.
|
||||
func (*CSPermitShop) Descriptor() ([]byte, []int) {
|
||||
return file_welfare_proto_rawDescGZIP(), []int{58}
|
||||
}
|
||||
|
||||
//PACKET_SCPermitShop
|
||||
type SCPermitShop struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` // 序号
|
||||
Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` // 名称
|
||||
Consume int32 `protobuf:"varint,3,opt,name=Consume,proto3" json:"Consume,omitempty"` // 购买消耗类型 1金币 2钻石
|
||||
Price int64 `protobuf:"varint,4,opt,name=price,proto3" json:"price,omitempty"` // 价格
|
||||
}
|
||||
|
||||
func (x *SCPermitShop) Reset() {
|
||||
*x = SCPermitShop{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_welfare_proto_msgTypes[59]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SCPermitShop) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SCPermitShop) ProtoMessage() {}
|
||||
|
||||
func (x *SCPermitShop) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_welfare_proto_msgTypes[59]
|
||||
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 SCPermitShop.ProtoReflect.Descriptor instead.
|
||||
func (*SCPermitShop) Descriptor() ([]byte, []int) {
|
||||
return file_welfare_proto_rawDescGZIP(), []int{59}
|
||||
}
|
||||
|
||||
func (x *SCPermitShop) GetId() int32 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCPermitShop) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SCPermitShop) GetConsume() int32 {
|
||||
if x != nil {
|
||||
return x.Consume
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCPermitShop) GetPrice() int64 {
|
||||
if x != nil {
|
||||
return x.Price
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_welfare_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_welfare_proto_rawDesc = []byte{
|
||||
|
@ -4276,9 +4432,9 @@ var file_welfare_proto_rawDesc = []byte{
|
|||
0x03, 0x45, 0x78, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x45, 0x78, 0x70, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
|
||||
0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x29, 0x0a, 0x06, 0x41, 0x77, 0x61, 0x72, 0x64, 0x31, 0x18,
|
||||
0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x2e,
|
||||
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x2e,
|
||||
0x50, 0x72, 0x6f, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x06, 0x41, 0x77, 0x61, 0x72, 0x64, 0x31,
|
||||
0x12, 0x29, 0x0a, 0x06, 0x41, 0x77, 0x61, 0x72, 0x64, 0x32, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x12, 0x29, 0x0a, 0x06, 0x41, 0x77, 0x61, 0x72, 0x64, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x11, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x49,
|
||||
0x74, 0x65, 0x6d, 0x52, 0x06, 0x41, 0x77, 0x61, 0x72, 0x64, 0x32, 0x22, 0x64, 0x0a, 0x0a, 0x50,
|
||||
0x65, 0x72, 0x6d, 0x69, 0x74, 0x53, 0x68, 0x6f, 0x77, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x68, 0x6f,
|
||||
|
@ -4287,176 +4443,196 @@ var file_welfare_proto_rawDesc = []byte{
|
|||
0x75, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x53, 0x68, 0x6f, 0x77, 0x56,
|
||||
0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x22, 0x4e, 0x0a, 0x0f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x41,
|
||||
0x77, 0x61, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x52, 0x61, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x04, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x27, 0x0a, 0x05, 0x41, 0x77, 0x61, 0x72,
|
||||
0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72,
|
||||
0x65, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x41, 0x77, 0x61, 0x72,
|
||||
0x64, 0x22, 0x85, 0x02, 0x0a, 0x0c, 0x53, 0x43, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x45, 0x78, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x03, 0x45, 0x78, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x2a, 0x0a, 0x05, 0x41, 0x77,
|
||||
0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x77, 0x65, 0x6c, 0x66,
|
||||
0x61, 0x72, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52,
|
||||
0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
|
||||
0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x03, 0x28, 0x03, 0x52, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x73,
|
||||
0x74, 0x61, 0x6d, 0x70, 0x12, 0x2f, 0x0a, 0x08, 0x53, 0x68, 0x6f, 0x77, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65,
|
||||
0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x08, 0x53, 0x68, 0x6f,
|
||||
0x77, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x49, 0x73, 0x50, 0x65, 0x72, 0x6d, 0x69,
|
||||
0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x49, 0x73, 0x50, 0x65, 0x72, 0x6d, 0x69,
|
||||
0x74, 0x12, 0x36, 0x0a, 0x09, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x07,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x2e, 0x50,
|
||||
0x65, 0x72, 0x6d, 0x69, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x09,
|
||||
0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x22, 0x1f, 0x0a, 0x0d, 0x43, 0x53, 0x50,
|
||||
0x65, 0x72, 0x6d, 0x69, 0x74, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x22, 0xaa, 0x01, 0x0a, 0x0d, 0x53,
|
||||
0x43, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x33, 0x0a, 0x09,
|
||||
0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32,
|
||||
0x15, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75,
|
||||
0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64,
|
||||
0x65, 0x12, 0x29, 0x0a, 0x06, 0x41, 0x77, 0x61, 0x72, 0x64, 0x31, 0x18, 0x02, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x11, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x70,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x41, 0x77, 0x61, 0x72, 0x64, 0x31, 0x12, 0x29, 0x0a, 0x06,
|
||||
0x41, 0x77, 0x61, 0x72, 0x64, 0x32, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77,
|
||||
0x6e, 0x22, 0x64, 0x0a, 0x0f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x41,
|
||||
0x77, 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x05, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x45, 0x6e,
|
||||
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x45, 0x6e, 0x64, 0x12, 0x29, 0x0a, 0x06,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77,
|
||||
0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||
0x06, 0x41, 0x77, 0x61, 0x72, 0x64, 0x32, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x43, 0x53, 0x50, 0x65, 0x72,
|
||||
0x6d, 0x69, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22,
|
||||
0xfe, 0x01, 0x0a, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02,
|
||||
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x04,
|
||||
0x47, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77, 0x65, 0x6c,
|
||||
0x66, 0x61, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x47,
|
||||
0x61, 0x69, 0x6e, 0x12, 0x25, 0x0a, 0x04, 0x43, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x11, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x70,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x45, 0x78,
|
||||
0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x0d, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73,
|
||||
0x12, 0x20, 0x0a, 0x0b, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x54, 0x69, 0x6d,
|
||||
0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x4c, 0x65,
|
||||
0x76, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c,
|
||||
0x12, 0x1e, 0x0a, 0x0a, 0x4e, 0x65, 0x65, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x18, 0x08,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x4e, 0x65, 0x65, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74,
|
||||
0x22, 0x3d, 0x0a, 0x14, 0x53, 0x43, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x63, 0x68,
|
||||
0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65,
|
||||
0x2e, 0x53, 0x68, 0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x22,
|
||||
0x22, 0x0a, 0x10, 0x43, 0x53, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61,
|
||||
0x6e, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x02, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x10, 0x53, 0x43, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x45,
|
||||
0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74,
|
||||
0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x77, 0x65, 0x6c,
|
||||
0x66, 0x61, 0x72, 0x65, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64,
|
||||
0x65, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x2a, 0x86, 0x02, 0x0a,
|
||||
0x0c, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a,
|
||||
0x0b, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x53, 0x75, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0e,
|
||||
0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x10,
|
||||
0x0a, 0x0c, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4e, 0x6f, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x10, 0x02,
|
||||
0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x43, 0x6f, 0x69, 0x6e, 0x54, 0x6f, 0x6f,
|
||||
0x4d, 0x6f, 0x72, 0x65, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x45,
|
||||
0x72, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x52, 0x43,
|
||||
0x5f, 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x42, 0x69, 0x6e, 0x64, 0x10, 0x05, 0x12, 0x11,
|
||||
0x0a, 0x0d, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x42, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x66, 0x10,
|
||||
0x06, 0x12, 0x11, 0x0a, 0x0d, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4d, 0x79, 0x49, 0x6e, 0x76, 0x69,
|
||||
0x74, 0x65, 0x10, 0x07, 0x12, 0x11, 0x0a, 0x0d, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4e, 0x6f, 0x74,
|
||||
0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x52, 0x43, 0x5f,
|
||||
0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x4c, 0x65, 0x73, 0x73, 0x10, 0x09, 0x12, 0x17, 0x0a,
|
||||
0x13, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x50, 0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b, 0x4e, 0x6f, 0x74,
|
||||
0x46, 0x75, 0x6c, 0x6c, 0x10, 0x0a, 0x12, 0x1d, 0x0a, 0x19, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x50,
|
||||
0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b, 0x4f, 0x76, 0x65, 0x72, 0x54, 0x61, 0x6b, 0x65, 0x54, 0x69,
|
||||
0x6d, 0x65, 0x73, 0x10, 0x0b, 0x2a, 0xe9, 0x0a, 0x0a, 0x09, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65,
|
||||
0x74, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x48,
|
||||
0x4f, 0x50, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43,
|
||||
0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54, 0x52,
|
||||
0x45, 0x4c, 0x49, 0x45, 0x46, 0x46, 0x55, 0x4e, 0x44, 0x10, 0x94, 0x14, 0x12, 0x21, 0x0a, 0x1c,
|
||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47,
|
||||
0x45, 0x54, 0x52, 0x45, 0x4c, 0x49, 0x45, 0x46, 0x46, 0x55, 0x4e, 0x44, 0x10, 0x95, 0x14, 0x12,
|
||||
0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c,
|
||||
0x46, 0x5f, 0x47, 0x45, 0x54, 0x54, 0x55, 0x52, 0x4e, 0x50, 0x4c, 0x41, 0x54, 0x45, 0x10, 0x96,
|
||||
0x14, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57,
|
||||
0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54, 0x54, 0x55, 0x52, 0x4e, 0x50, 0x4c, 0x41, 0x54, 0x45,
|
||||
0x10, 0x97, 0x14, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53,
|
||||
0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54, 0x41, 0x44, 0x44, 0x55, 0x50, 0x53, 0x49,
|
||||
0x47, 0x4e, 0x10, 0x98, 0x14, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
|
||||
0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54, 0x41, 0x44, 0x44, 0x55, 0x50,
|
||||
0x53, 0x49, 0x47, 0x4e, 0x10, 0x99, 0x14, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||
0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x41, 0x52,
|
||||
0x45, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x9a, 0x14, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x41,
|
||||
0x52, 0x45, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x9b, 0x14, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43,
|
||||
0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x42, 0x4c, 0x49, 0x4e,
|
||||
0x42, 0x4f, 0x58, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x9c, 0x14, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x42, 0x4c, 0x49,
|
||||
0x4e, 0x42, 0x4f, 0x58, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x9d, 0x14, 0x12, 0x1e, 0x0a, 0x19, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45,
|
||||
0x54, 0x42, 0x4c, 0x49, 0x4e, 0x42, 0x4f, 0x58, 0x10, 0x9e, 0x14, 0x12, 0x1e, 0x0a, 0x19, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45,
|
||||
0x54, 0x42, 0x4c, 0x49, 0x4e, 0x42, 0x4f, 0x58, 0x10, 0x9f, 0x14, 0x12, 0x20, 0x0a, 0x1b, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x46, 0x49,
|
||||
0x52, 0x53, 0x54, 0x50, 0x41, 0x59, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xa0, 0x14, 0x12, 0x20, 0x0a,
|
||||
0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f,
|
||||
0x46, 0x49, 0x52, 0x53, 0x54, 0x50, 0x41, 0x59, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xa1, 0x14, 0x12,
|
||||
0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c,
|
||||
0x46, 0x5f, 0x46, 0x49, 0x52, 0x53, 0x54, 0x50, 0x41, 0x59, 0x10, 0xa2, 0x14, 0x12, 0x1c, 0x0a,
|
||||
0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f,
|
||||
0x46, 0x49, 0x52, 0x53, 0x54, 0x50, 0x41, 0x59, 0x10, 0xa3, 0x14, 0x12, 0x21, 0x0a, 0x1c, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x43, 0x4f,
|
||||
0x4e, 0x54, 0x49, 0x4e, 0x50, 0x41, 0x59, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xa4, 0x14, 0x12, 0x21,
|
||||
0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46,
|
||||
0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x50, 0x41, 0x59, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xa5,
|
||||
0x14, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57,
|
||||
0x45, 0x4c, 0x46, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x50, 0x41, 0x59, 0x10, 0xa6, 0x14,
|
||||
0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45,
|
||||
0x4c, 0x46, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x50, 0x41, 0x59, 0x10, 0xa7, 0x14, 0x12,
|
||||
0x22, 0x0a, 0x1d, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x53, 0x69, 0x67,
|
||||
0x6e, 0x44, 0x61, 0x79, 0x5f, 0x41, 0x64, 0x64, 0x75, 0x70, 0x32, 0x41, 0x77, 0x61, 0x72, 0x64,
|
||||
0x10, 0xa8, 0x14, 0x12, 0x22, 0x0a, 0x1d, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43,
|
||||
0x5f, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x61, 0x79, 0x5f, 0x41, 0x64, 0x64, 0x75, 0x70, 0x32, 0x41,
|
||||
0x77, 0x61, 0x72, 0x64, 0x10, 0xa9, 0x14, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||
0x54, 0x5f, 0x43, 0x53, 0x57, 0x65, 0x6c, 0x66, 0x52, 0x65, 0x6c, 0x69, 0x65, 0x66, 0x10, 0xd4,
|
||||
0x16, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x57, 0x65,
|
||||
0x6c, 0x66, 0x52, 0x65, 0x6c, 0x69, 0x65, 0x66, 0x10, 0xd5, 0x16, 0x12, 0x18, 0x0a, 0x13, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x10, 0xd6, 0x16, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
|
||||
0x53, 0x43, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xd7, 0x16, 0x12,
|
||||
0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x42, 0x69, 0x6e, 0x64,
|
||||
0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x10, 0xd8, 0x16, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43,
|
||||
0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x42, 0x69, 0x6e, 0x64, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65,
|
||||
0x10, 0xd9, 0x16, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53,
|
||||
0x50, 0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xde,
|
||||
0x16, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x50, 0x69,
|
||||
0x67, 0x62, 0x61, 0x6e, 0x6b, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xdf, 0x16, 0x12,
|
||||
0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x50, 0x69, 0x67, 0x62,
|
||||
0x61, 0x6e, 0x6b, 0x54, 0x61, 0x6b, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0xe0, 0x16, 0x12, 0x1d,
|
||||
0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x50, 0x69, 0x67, 0x62, 0x61,
|
||||
0x6e, 0x6b, 0x54, 0x61, 0x6b, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0xe1, 0x16, 0x12, 0x20, 0x0a,
|
||||
0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e,
|
||||
0x64, 0x42, 0x61, 0x6e, 0x6b, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xe2, 0x16, 0x12,
|
||||
0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x44, 0x69, 0x61, 0x6d,
|
||||
0x6f, 0x6e, 0x64, 0x42, 0x61, 0x6e, 0x6b, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xe3,
|
||||
0x16, 0x12, 0x24, 0x0a, 0x1f, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x44, 0x69,
|
||||
0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x42, 0x61, 0x6e, 0x6b, 0x54, 0x61, 0x6b, 0x65, 0x44, 0x69, 0x61,
|
||||
0x6d, 0x6f, 0x6e, 0x64, 0x10, 0xe4, 0x16, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||
0x54, 0x5f, 0x43, 0x53, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xe5,
|
||||
0x16, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x50, 0x65,
|
||||
0x72, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xe6, 0x16, 0x12, 0x20, 0x0a, 0x1b, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x45, 0x78,
|
||||
0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x10, 0xe7, 0x16, 0x12, 0x20, 0x0a,
|
||||
0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74,
|
||||
0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x10, 0xe8, 0x16, 0x12,
|
||||
0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x50, 0x65, 0x72, 0x6d,
|
||||
0x69, 0x74, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe9, 0x16, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x41, 0x77, 0x61,
|
||||
0x72, 0x64, 0x10, 0xea, 0x16, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
|
||||
0x43, 0x53, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65,
|
||||
0x10, 0xeb, 0x16, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43,
|
||||
0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x10, 0xec,
|
||||
0x16, 0x42, 0x27, 0x5a, 0x25, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
|
||||
0x6f, 0x6c, 0x2f, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x22, 0x85, 0x02, 0x0a, 0x0c, 0x53, 0x43, 0x50, 0x65,
|
||||
0x72, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x45, 0x78, 0x70, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x45, 0x78, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x4c, 0x65,
|
||||
0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c,
|
||||
0x12, 0x2a, 0x0a, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x14, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74,
|
||||
0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1c, 0x0a, 0x09,
|
||||
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x03, 0x28, 0x03, 0x52,
|
||||
0x09, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2f, 0x0a, 0x08, 0x53, 0x68,
|
||||
0x6f, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x77,
|
||||
0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x53, 0x68, 0x6f,
|
||||
0x77, 0x52, 0x08, 0x53, 0x68, 0x6f, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x49,
|
||||
0x73, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x49,
|
||||
0x73, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x12, 0x36, 0x0a, 0x09, 0x52, 0x61, 0x6e, 0x6b, 0x41,
|
||||
0x77, 0x61, 0x72, 0x64, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x77, 0x65, 0x6c,
|
||||
0x66, 0x61, 0x72, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x41,
|
||||
0x77, 0x61, 0x72, 0x64, 0x52, 0x09, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x22,
|
||||
0x2f, 0x0a, 0x0d, 0x43, 0x53, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x41, 0x77, 0x61, 0x72, 0x64,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x54, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x54, 0x70,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64,
|
||||
0x22, 0xba, 0x01, 0x0a, 0x0d, 0x53, 0x43, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x41, 0x77, 0x61,
|
||||
0x72, 0x64, 0x12, 0x33, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x2e,
|
||||
0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x4f, 0x70,
|
||||
0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x41, 0x77, 0x61, 0x72, 0x64,
|
||||
0x31, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72,
|
||||
0x65, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x41, 0x77, 0x61, 0x72,
|
||||
0x64, 0x31, 0x12, 0x29, 0x0a, 0x06, 0x41, 0x77, 0x61, 0x72, 0x64, 0x32, 0x18, 0x03, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f,
|
||||
0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x41, 0x77, 0x61, 0x72, 0x64, 0x32, 0x12, 0x0e, 0x0a,
|
||||
0x02, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x0e, 0x0a,
|
||||
0x02, 0x54, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x54, 0x70, 0x22, 0x16, 0x0a,
|
||||
0x14, 0x43, 0x53, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67,
|
||||
0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xfe, 0x01, 0x0a, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02,
|
||||
0x49, 0x64, 0x12, 0x25, 0x0a, 0x04, 0x47, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x11, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x52, 0x04, 0x47, 0x61, 0x69, 0x6e, 0x12, 0x25, 0x0a, 0x04, 0x43, 0x6f, 0x73,
|
||||
0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72,
|
||||
0x65, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x43, 0x6f, 0x73, 0x74,
|
||||
0x12, 0x24, 0x0a, 0x0d, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x6d, 0x65,
|
||||
0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67,
|
||||
0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e,
|
||||
0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x52, 0x65, 0x6d,
|
||||
0x61, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x4c, 0x65, 0x76, 0x65,
|
||||
0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1e,
|
||||
0x0a, 0x0a, 0x4e, 0x65, 0x65, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x0a, 0x4e, 0x65, 0x65, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x53, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
||||
0x53, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x22, 0x3d, 0x0a, 0x14, 0x53, 0x43, 0x50, 0x65, 0x72, 0x6d,
|
||||
0x69, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x25,
|
||||
0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77,
|
||||
0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||
0x04, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x22, 0x0a, 0x10, 0x43, 0x53, 0x50, 0x65, 0x72, 0x6d, 0x69,
|
||||
0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x10, 0x53, 0x43, 0x50,
|
||||
0x65, 0x72, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x33, 0x0a,
|
||||
0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x15, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73,
|
||||
0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f,
|
||||
0x64, 0x65, 0x22, 0x0e, 0x0a, 0x0c, 0x43, 0x53, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x53, 0x68,
|
||||
0x6f, 0x70, 0x22, 0x62, 0x0a, 0x0c, 0x53, 0x43, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x53, 0x68,
|
||||
0x6f, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02,
|
||||
0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d,
|
||||
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x2a, 0xf5, 0x02, 0x0a, 0x0c, 0x4f, 0x70, 0x52, 0x65, 0x73,
|
||||
0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x50, 0x52, 0x43, 0x5f,
|
||||
0x53, 0x75, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43,
|
||||
0x5f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x50, 0x52, 0x43,
|
||||
0x5f, 0x4e, 0x6f, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50,
|
||||
0x52, 0x43, 0x5f, 0x43, 0x6f, 0x69, 0x6e, 0x54, 0x6f, 0x6f, 0x4d, 0x6f, 0x72, 0x65, 0x10, 0x03,
|
||||
0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x45, 0x72, 0x72, 0x43, 0x6f, 0x69, 0x6e,
|
||||
0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x41, 0x6c, 0x72, 0x65, 0x61,
|
||||
0x64, 0x79, 0x42, 0x69, 0x6e, 0x64, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x4f, 0x50, 0x52, 0x43,
|
||||
0x5f, 0x42, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x66, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x4f,
|
||||
0x50, 0x52, 0x43, 0x5f, 0x4d, 0x79, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x10, 0x07, 0x12, 0x11,
|
||||
0x0a, 0x0d, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10,
|
||||
0x08, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e,
|
||||
0x64, 0x4c, 0x65, 0x73, 0x73, 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x4f, 0x50, 0x52, 0x43, 0x5f,
|
||||
0x50, 0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b, 0x4e, 0x6f, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x10, 0x0a,
|
||||
0x12, 0x1d, 0x0a, 0x19, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x50, 0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b,
|
||||
0x4f, 0x76, 0x65, 0x72, 0x54, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x10, 0x0b, 0x12,
|
||||
0x16, 0x0a, 0x12, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65,
|
||||
0x4c, 0x69, 0x6d, 0x69, 0x74, 0x10, 0x0c, 0x12, 0x1b, 0x0a, 0x17, 0x4f, 0x50, 0x52, 0x43, 0x5f,
|
||||
0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4c, 0x69, 0x6d,
|
||||
0x69, 0x74, 0x10, 0x0d, 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4e, 0x65, 0x65,
|
||||
0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x10, 0x0e, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x50, 0x52,
|
||||
0x43, 0x5f, 0x45, 0x72, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x4f,
|
||||
0x50, 0x52, 0x43, 0x5f, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x10, 0x2a, 0x9d,
|
||||
0x0b, 0x0a, 0x09, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x10,
|
||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x48, 0x4f, 0x50, 0x5f, 0x5a, 0x45, 0x52, 0x4f,
|
||||
0x10, 0x00, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f,
|
||||
0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54, 0x52, 0x45, 0x4c, 0x49, 0x45, 0x46, 0x46, 0x55,
|
||||
0x4e, 0x44, 0x10, 0x94, 0x14, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
|
||||
0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54, 0x52, 0x45, 0x4c, 0x49, 0x45,
|
||||
0x46, 0x46, 0x55, 0x4e, 0x44, 0x10, 0x95, 0x14, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54, 0x54, 0x55,
|
||||
0x52, 0x4e, 0x50, 0x4c, 0x41, 0x54, 0x45, 0x10, 0x96, 0x14, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54,
|
||||
0x54, 0x55, 0x52, 0x4e, 0x50, 0x4c, 0x41, 0x54, 0x45, 0x10, 0x97, 0x14, 0x12, 0x20, 0x0a, 0x1b,
|
||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47,
|
||||
0x45, 0x54, 0x41, 0x44, 0x44, 0x55, 0x50, 0x53, 0x49, 0x47, 0x4e, 0x10, 0x98, 0x14, 0x12, 0x20,
|
||||
0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46,
|
||||
0x5f, 0x47, 0x45, 0x54, 0x41, 0x44, 0x44, 0x55, 0x50, 0x53, 0x49, 0x47, 0x4e, 0x10, 0x99, 0x14,
|
||||
0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45,
|
||||
0x4c, 0x46, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x41, 0x52, 0x45, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x9a,
|
||||
0x14, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57,
|
||||
0x45, 0x4c, 0x46, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x41, 0x52, 0x45, 0x49, 0x4e, 0x46, 0x4f, 0x10,
|
||||
0x9b, 0x14, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f,
|
||||
0x57, 0x45, 0x4c, 0x46, 0x5f, 0x42, 0x4c, 0x49, 0x4e, 0x42, 0x4f, 0x58, 0x49, 0x4e, 0x46, 0x4f,
|
||||
0x10, 0x9c, 0x14, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43,
|
||||
0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x42, 0x4c, 0x49, 0x4e, 0x42, 0x4f, 0x58, 0x49, 0x4e, 0x46,
|
||||
0x4f, 0x10, 0x9d, 0x14, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43,
|
||||
0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54, 0x42, 0x4c, 0x49, 0x4e, 0x42, 0x4f,
|
||||
0x58, 0x10, 0x9e, 0x14, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53,
|
||||
0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54, 0x42, 0x4c, 0x49, 0x4e, 0x42, 0x4f,
|
||||
0x58, 0x10, 0x9f, 0x14, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43,
|
||||
0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x46, 0x49, 0x52, 0x53, 0x54, 0x50, 0x41, 0x59, 0x49,
|
||||
0x4e, 0x46, 0x4f, 0x10, 0xa0, 0x14, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
|
||||
0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x46, 0x49, 0x52, 0x53, 0x54, 0x50, 0x41,
|
||||
0x59, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xa1, 0x14, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x46, 0x49, 0x52, 0x53, 0x54,
|
||||
0x50, 0x41, 0x59, 0x10, 0xa2, 0x14, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
|
||||
0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x46, 0x49, 0x52, 0x53, 0x54, 0x50, 0x41,
|
||||
0x59, 0x10, 0xa3, 0x14, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43,
|
||||
0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x50, 0x41, 0x59,
|
||||
0x49, 0x4e, 0x46, 0x4f, 0x10, 0xa4, 0x14, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||
0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e,
|
||||
0x50, 0x41, 0x59, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xa5, 0x14, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x43, 0x4f, 0x4e,
|
||||
0x54, 0x49, 0x4e, 0x50, 0x41, 0x59, 0x10, 0xa6, 0x14, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43,
|
||||
0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x43, 0x4f, 0x4e, 0x54,
|
||||
0x49, 0x4e, 0x50, 0x41, 0x59, 0x10, 0xa7, 0x14, 0x12, 0x22, 0x0a, 0x1d, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x61, 0x79, 0x5f, 0x41, 0x64,
|
||||
0x64, 0x75, 0x70, 0x32, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0xa8, 0x14, 0x12, 0x22, 0x0a, 0x1d,
|
||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x61,
|
||||
0x79, 0x5f, 0x41, 0x64, 0x64, 0x75, 0x70, 0x32, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0xa9, 0x14,
|
||||
0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x57, 0x65, 0x6c,
|
||||
0x66, 0x52, 0x65, 0x6c, 0x69, 0x65, 0x66, 0x10, 0xd4, 0x16, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x57, 0x65, 0x6c, 0x66, 0x52, 0x65, 0x6c, 0x69, 0x65,
|
||||
0x66, 0x10, 0xd5, 0x16, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43,
|
||||
0x53, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xd6, 0x16, 0x12, 0x18,
|
||||
0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x49, 0x6e, 0x76, 0x69, 0x74,
|
||||
0x65, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xd7, 0x16, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x43, 0x53, 0x42, 0x69, 0x6e, 0x64, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x10,
|
||||
0xd8, 0x16, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x42,
|
||||
0x69, 0x6e, 0x64, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x10, 0xd9, 0x16, 0x12, 0x1c, 0x0a, 0x17,
|
||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x50, 0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b,
|
||||
0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xde, 0x16, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x50, 0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b, 0x47, 0x65,
|
||||
0x74, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xdf, 0x16, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x43, 0x53, 0x50, 0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b, 0x54, 0x61, 0x6b, 0x65,
|
||||
0x43, 0x6f, 0x69, 0x6e, 0x10, 0xe0, 0x16, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||
0x54, 0x5f, 0x53, 0x43, 0x50, 0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b, 0x54, 0x61, 0x6b, 0x65, 0x43,
|
||||
0x6f, 0x69, 0x6e, 0x10, 0xe1, 0x16, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
|
||||
0x5f, 0x43, 0x53, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x42, 0x61, 0x6e, 0x6b, 0x47, 0x65,
|
||||
0x74, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xe2, 0x16, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x53, 0x43, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x42, 0x61, 0x6e, 0x6b,
|
||||
0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xe3, 0x16, 0x12, 0x24, 0x0a, 0x1f, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x42, 0x61,
|
||||
0x6e, 0x6b, 0x54, 0x61, 0x6b, 0x65, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x10, 0xe4, 0x16,
|
||||
0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x50, 0x65, 0x72,
|
||||
0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xe5, 0x16, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x10, 0xe6, 0x16, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43,
|
||||
0x53, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x10, 0xe7, 0x16, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
|
||||
0x5f, 0x53, 0x43, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67,
|
||||
0x65, 0x4c, 0x69, 0x73, 0x74, 0x10, 0xe8, 0x16, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x43, 0x53, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x41, 0x77, 0x61, 0x72, 0x64,
|
||||
0x10, 0xe9, 0x16, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43,
|
||||
0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0xea, 0x16, 0x12, 0x1c,
|
||||
0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x50, 0x65, 0x72, 0x6d, 0x69,
|
||||
0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x10, 0xeb, 0x16, 0x12, 0x1c, 0x0a, 0x17,
|
||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x45,
|
||||
0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x10, 0xec, 0x16, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x53, 0x68, 0x6f,
|
||||
0x70, 0x10, 0xed, 0x16, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53,
|
||||
0x43, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x8c, 0x17, 0x42, 0x27,
|
||||
0x5a, 0x25, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f,
|
||||
0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -4472,7 +4648,7 @@ func file_welfare_proto_rawDescGZIP() []byte {
|
|||
}
|
||||
|
||||
var file_welfare_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_welfare_proto_msgTypes = make([]protoimpl.MessageInfo, 59)
|
||||
var file_welfare_proto_msgTypes = make([]protoimpl.MessageInfo, 61)
|
||||
var file_welfare_proto_goTypes = []interface{}{
|
||||
(OpResultCode)(0), // 0: welfare.OpResultCode
|
||||
(SPacketID)(0), // 1: welfare.SPacketID
|
||||
|
@ -4534,7 +4710,9 @@ var file_welfare_proto_goTypes = []interface{}{
|
|||
(*SCPermitExchangeList)(nil), // 57: welfare.SCPermitExchangeList
|
||||
(*CSPermitExchange)(nil), // 58: welfare.CSPermitExchange
|
||||
(*SCPermitExchange)(nil), // 59: welfare.SCPermitExchange
|
||||
nil, // 60: welfare.SCInviteInfo.PayScoreEntry
|
||||
(*CSPermitShop)(nil), // 60: welfare.CSPermitShop
|
||||
(*SCPermitShop)(nil), // 61: welfare.SCPermitShop
|
||||
nil, // 62: welfare.SCInviteInfo.PayScoreEntry
|
||||
}
|
||||
var file_welfare_proto_depIdxs = []int32{
|
||||
0, // 0: welfare.SCGetReliefFund.OpRetCode:type_name -> welfare.OpResultCode
|
||||
|
@ -4561,7 +4739,7 @@ var file_welfare_proto_depIdxs = []int32{
|
|||
0, // 21: welfare.SCWelfareContinuousPayData.OpRetCode:type_name -> welfare.OpResultCode
|
||||
23, // 22: welfare.SCWelfareContinuousPayData.List:type_name -> welfare.WelfareSpree
|
||||
0, // 23: welfare.SCWelfareContinuousPay.OpRetCode:type_name -> welfare.OpResultCode
|
||||
60, // 24: welfare.SCInviteInfo.PayScore:type_name -> welfare.SCInviteInfo.PayScoreEntry
|
||||
62, // 24: welfare.SCInviteInfo.PayScore:type_name -> welfare.SCInviteInfo.PayScoreEntry
|
||||
35, // 25: welfare.SCInviteInfo.Awards1:type_name -> welfare.RankAward
|
||||
35, // 26: welfare.SCInviteInfo.Awards2:type_name -> welfare.RankAward
|
||||
35, // 27: welfare.SCInviteInfo.Awards3:type_name -> welfare.RankAward
|
||||
|
@ -4573,7 +4751,7 @@ var file_welfare_proto_depIdxs = []int32{
|
|||
47, // 33: welfare.PropItem.Award:type_name -> welfare.PropInfo
|
||||
48, // 34: welfare.PermitAward.Award1:type_name -> welfare.PropItem
|
||||
48, // 35: welfare.PermitAward.Award2:type_name -> welfare.PropItem
|
||||
47, // 36: welfare.PermitRankAward.Award:type_name -> welfare.PropInfo
|
||||
47, // 36: welfare.PermitRankAward.ItemId:type_name -> welfare.PropInfo
|
||||
49, // 37: welfare.SCPermitInfo.Award:type_name -> welfare.PermitAward
|
||||
50, // 38: welfare.SCPermitInfo.ShowList:type_name -> welfare.PermitShow
|
||||
51, // 39: welfare.SCPermitInfo.RankAward:type_name -> welfare.PermitRankAward
|
||||
|
@ -5293,6 +5471,30 @@ func file_welfare_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_welfare_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CSPermitShop); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_welfare_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SCPermitShop); 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{
|
||||
|
@ -5300,7 +5502,7 @@ func file_welfare_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_welfare_proto_rawDesc,
|
||||
NumEnums: 2,
|
||||
NumMessages: 59,
|
||||
NumMessages: 61,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
|
|
@ -15,7 +15,11 @@ enum OpResultCode {
|
|||
OPRC_DiamondLess = 9; // 钻石不足
|
||||
OPRC_PigbankNotFull = 10; // 存钱罐未满
|
||||
OPRC_PigbankOverTakeTimes = 11; // 存钱罐超过每日领取次数
|
||||
|
||||
OPRC_ExchangeLimit = 12; // 兑换次数不足
|
||||
OPRC_ExchangeLevelLimit = 13; // 兑换等级不足
|
||||
OPRC_NeedPermit = 14; // 需要典藏通行证
|
||||
OPRC_ErrCost = 15; // 消耗道具不足
|
||||
OPRC_NotFound = 16; // 商品没找到
|
||||
}
|
||||
// 福利大厅
|
||||
enum SPacketID {
|
||||
|
@ -72,6 +76,9 @@ enum SPacketID {
|
|||
|
||||
PACKET_CSPermitExchange = 2923; // 通行证兑换
|
||||
PACKET_SCPermitExchange = 2924; // 通行证兑换
|
||||
|
||||
PACKET_CSPermitShop = 2925; // 典藏通行证商品信息
|
||||
PACKET_SCPermitShop = 2956; // 典藏通行证商品信息
|
||||
}
|
||||
|
||||
//救济金领取
|
||||
|
@ -407,8 +414,8 @@ message PropItem{
|
|||
message PermitAward{
|
||||
int64 Exp = 1; // 赛季经验
|
||||
int64 Level = 2; // 等级
|
||||
repeated PropItem Award1 = 3; // 普通奖励
|
||||
repeated PropItem Award2 = 4; // 典藏奖励
|
||||
PropItem Award1 = 3; // 普通奖励
|
||||
PropItem Award2 = 4; // 典藏奖励
|
||||
}
|
||||
|
||||
message PermitShow{
|
||||
|
@ -418,8 +425,9 @@ message PermitShow{
|
|||
}
|
||||
|
||||
message PermitRankAward{
|
||||
int32 Rank = 1; // 名次
|
||||
repeated PropInfo Award = 2; // 奖励
|
||||
int32 Start = 1; // 开始排名;第一名为0
|
||||
int32 End = 2; // 结束排名
|
||||
repeated PropInfo ItemId = 3; // 奖励
|
||||
}
|
||||
|
||||
//PACKET_SCPermitInfo
|
||||
|
@ -436,7 +444,8 @@ message SCPermitInfo{
|
|||
// 领取赛季通行证奖励
|
||||
//PACKET_CSPermitAward
|
||||
message CSPermitAward{
|
||||
int32 Id = 1; // 奖励id; 0:一键领取
|
||||
int32 Tp = 1; // 0奖励 1普通奖励 2典藏奖励
|
||||
int32 Id = 2; // 奖励id; 0:一键领取
|
||||
}
|
||||
//PACKET_SCPermitAward
|
||||
message SCPermitAward{
|
||||
|
@ -444,6 +453,7 @@ message SCPermitAward{
|
|||
repeated PropInfo Award1 = 2; // 普通奖励
|
||||
repeated PropInfo Award2 = 3; // 典藏奖励
|
||||
int32 Id = 4; // 奖励id; 0:一键领取
|
||||
int32 Tp = 5; // 0奖励 1普通奖励 2典藏奖励
|
||||
}
|
||||
|
||||
// 赛季通行证兑换商城
|
||||
|
@ -457,9 +467,9 @@ message ShopInfo{
|
|||
repeated PropInfo Cost = 3; // 消耗商品
|
||||
int32 ExchangeTimes = 4; // 最大兑换次数
|
||||
int32 RemainTimes = 5; // 剩余兑换次数
|
||||
int64 Status = 6; // 兑换状态 0默认 1可领取 2已领取
|
||||
int64 Level = 7; // 兑换所需等级
|
||||
bool NeedPermit = 8; // 需要典藏通行证
|
||||
int64 Level = 6; // 兑换所需等级
|
||||
bool NeedPermit = 7; // 需要典藏通行证
|
||||
int32 SortId = 8; // 序号
|
||||
}
|
||||
|
||||
//PACKET_SCPermitExchangeList
|
||||
|
@ -475,4 +485,15 @@ message CSPermitExchange{
|
|||
//PACKET_SCPermitExchange
|
||||
message SCPermitExchange{
|
||||
OpResultCode OpRetCode = 1; // 错误码
|
||||
}
|
||||
|
||||
//PACKET_CSPermitShop
|
||||
message CSPermitShop{
|
||||
}
|
||||
//PACKET_SCPermitShop
|
||||
message SCPermitShop{
|
||||
int32 Id = 1; // 序号
|
||||
string Name = 2; // 名称
|
||||
int32 Consume = 3; // 购买消耗类型 1金币 2钻石
|
||||
int64 price = 4; // 价格
|
||||
}
|
2
public
2
public
|
@ -1 +1 @@
|
|||
Subproject commit e3cbc9f58234727bd5f859f86083ad584b66009b
|
||||
Subproject commit 286243fa926c275ff53b9d1f3ef501a8bd9020c3
|
|
@ -26,6 +26,8 @@ func init() {
|
|||
com.Register(int(rankproto.Rank_PACKET_RANK_CSWinCoin), rankproto.CSWinCoin{}, CSWinCoin)
|
||||
//等级榜
|
||||
com.Register(int(rankproto.Rank_PACKET_RANK_CSLevel), rankproto.CSPlayerLevelRank{}, CSPlayerLevelRank)
|
||||
// 赛季通行证积分排行
|
||||
com.Register(int(rankproto.Rank_PACKET_RANK_CSPermit), rankproto.CSPermit{}, CSPermit)
|
||||
}
|
||||
|
||||
func CSRankMatch(s *netlib.Session, d *rankproto.GateTransmit, packetId int, data interface{}, sid int64) error {
|
||||
|
@ -477,3 +479,69 @@ func CSPlayerLevelRank(s *netlib.Session, d *rankproto.GateTransmit, packetId in
|
|||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
func CSPermit(s *netlib.Session, d *rankproto.GateTransmit, packetId int, data interface{}, sid int64) error {
|
||||
logger.Logger.Trace("CSPermit data:", data)
|
||||
msg, ok := data.(*rankproto.CSPermit)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
rank.RankPermitMgrInstance.Take(d.Platform, 0, func(list []*model.PermitScore, err error) {
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("CSPermit error: %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
start, end := com.SkipLimitToStartEnd(msg.GetSkip(), msg.GetLimit(), len(list))
|
||||
|
||||
IsEndNum := false
|
||||
if end == int32(len(list)) {
|
||||
IsEndNum = true
|
||||
}
|
||||
|
||||
var i int32
|
||||
var ranks []*rankproto.PermitRank
|
||||
if end > start && int(start) < len(list) {
|
||||
for _, v := range list[start:end] {
|
||||
r := &rankproto.PermitRank{
|
||||
Snid: v.SnId,
|
||||
Name: v.Name,
|
||||
Rank: start + i,
|
||||
Score: v.Exp,
|
||||
ModId: v.ModId,
|
||||
}
|
||||
ranks = append(ranks, r)
|
||||
i++
|
||||
}
|
||||
}
|
||||
|
||||
var me *rankproto.PermitRank
|
||||
for k, v := range list {
|
||||
if v.SnId == d.Snid {
|
||||
me = &rankproto.PermitRank{
|
||||
Snid: v.SnId,
|
||||
Name: v.Name,
|
||||
Score: v.Exp,
|
||||
Rank: int32(k),
|
||||
ModId: v.ModId,
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
f := func() {
|
||||
pack := &rankproto.SCPermit{
|
||||
Ranks: ranks,
|
||||
Me: me,
|
||||
Skip: msg.GetSkip(),
|
||||
IsEndNum: IsEndNum,
|
||||
RankMaxNum: model.GameParamData.RankPlayerPermitMaxNum,
|
||||
}
|
||||
common.SendToGate(sid, int(rankproto.Rank_PACKET_RANK_SCPermit), pack, s)
|
||||
logger.Logger.Tracef("SCPermit: %v", pack)
|
||||
}
|
||||
f()
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
package rank
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/game/ranksrv/com"
|
||||
)
|
||||
|
||||
var RankPermitMgrInstance = com.NewListMgr[*model.PermitScore](
|
||||
func() int64 {
|
||||
return int64(model.GameParamData.RankTimeout)
|
||||
},
|
||||
func(platform string, index int32) ([]*model.PermitScore, error) {
|
||||
logger.Logger.Tracef("load rank permit platform:%s rankType:%d", platform, index)
|
||||
se := new(model.PermitStartTs)
|
||||
b := model.GetStrKVGameData(common.PermitStartTsKey + platform)
|
||||
json.Unmarshal([]byte(b), se)
|
||||
seasonList, err := model.FindPlayerPermitList(&model.FindPlayerPermitListArgs{
|
||||
Platform: platform,
|
||||
StartTs: se.StartTs,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return seasonList.List, nil
|
||||
})
|
|
@ -0,0 +1,77 @@
|
|||
|
||||
// Code generated by xlsx2proto.
|
||||
// DO NOT EDIT!
|
||||
|
||||
package srvdata
|
||||
|
||||
import (
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"mongo.games.com/game/protocol/server"
|
||||
)
|
||||
|
||||
var PBDB_PassShowMgr = &DB_PassShowMgr{
|
||||
Datas: &server.DB_PassShowArray{},
|
||||
pool: make(map[int32]*server.DB_PassShow),
|
||||
|
||||
}
|
||||
|
||||
type DB_PassShowMgr struct {
|
||||
Datas *server.DB_PassShowArray
|
||||
pool map[int32]*server.DB_PassShow
|
||||
|
||||
}
|
||||
|
||||
func (this *DB_PassShowMgr) unmarshal(data []byte) error {
|
||||
err := proto.Unmarshal(data, this.Datas)
|
||||
if err == nil {
|
||||
this.arrangeData()
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (this *DB_PassShowMgr) reunmarshal(data []byte) error {
|
||||
newDatas := &server.DB_PassShowArray{}
|
||||
err := proto.Unmarshal(data, newDatas)
|
||||
if err == nil {
|
||||
for _, item := range newDatas.Arr {
|
||||
existItem := this.GetData(item.GetId())
|
||||
if existItem == nil {
|
||||
this.pool[item.GetId()] = item
|
||||
this.Datas.Arr = append(this.Datas.Arr, item)
|
||||
|
||||
} else {
|
||||
*existItem = *item
|
||||
}
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (this *DB_PassShowMgr) arrangeData() {
|
||||
if this.Datas == nil {
|
||||
return
|
||||
}
|
||||
|
||||
dataArr := this.Datas.GetArr()
|
||||
if dataArr == nil {
|
||||
return
|
||||
}
|
||||
|
||||
for _, data := range dataArr {
|
||||
this.pool[data.GetId()] = data
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
func (this *DB_PassShowMgr) GetData(id int32) *server.DB_PassShow {
|
||||
if data, ok := this.pool[id]; ok {
|
||||
return data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
func init() {
|
||||
DataMgr.register("DB_PassShow.dat", &ProtobufDataLoader{dh: PBDB_PassShowMgr})
|
||||
}
|
|
@ -309,6 +309,13 @@ func (this *CSInviteFriendHandler) Process(s *netlib.Session, packetid int, data
|
|||
proto.SetDefaults(pack)
|
||||
player.SendToClient(int(friend.FriendPacketID_PACKET_SCInviteFriend), pack)
|
||||
logger.Logger.Trace("SCInviteFriendHandler: ", pack)
|
||||
|
||||
// 记录邀请记录
|
||||
if opRetCode == friend.OpResultCode_OPRC_Sucess {
|
||||
if p.SnId != player.SnId {
|
||||
p.TaskInviteList[player.SnId] = p.scene.sceneId
|
||||
}
|
||||
}
|
||||
}
|
||||
//不能邀请自己
|
||||
if p.SnId == friendSnid {
|
||||
|
|
|
@ -167,6 +167,22 @@ func (this *CSEnterRoomHandler) Process(s *netlib.Session, packetid int, data in
|
|||
|
||||
if !scene.PlayerEnter(p, -1, true) {
|
||||
code = gamehall.OpResultCode_Game_OPRC_Error_Game
|
||||
} else {
|
||||
// 进入成功
|
||||
for _, v := range scene.players {
|
||||
if v == nil || len(v.TaskInviteList) == 0 || v.SnId == p.SnId {
|
||||
continue
|
||||
}
|
||||
if v.TaskInviteList[p.SnId] == scene.sceneId {
|
||||
delete(v.TaskInviteList, p.SnId)
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeInvitePlay, &TaskData{
|
||||
SnId: v.SnId,
|
||||
GameID: scene.gameId,
|
||||
GameFreeID: scene.dbGameFree.GetId(),
|
||||
Num: 1,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
failed:
|
||||
|
|
|
@ -454,6 +454,15 @@ func init() {
|
|||
GameFreeID: scene.dbGameFree.GetId(),
|
||||
Num: 1,
|
||||
})
|
||||
// 大众场
|
||||
if common.IsDaZhong(scene.gameId) {
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeDaZhong, &TaskData{
|
||||
SnId: player.SnId,
|
||||
GameID: scene.gameId,
|
||||
GameFreeID: scene.dbGameFree.GetId(),
|
||||
Num: 1,
|
||||
})
|
||||
}
|
||||
}
|
||||
// task 游戏局数
|
||||
TaskSubjectSingleton.Touch(common.TaskTypePlayTimes, &TaskData{
|
||||
|
|
|
@ -98,6 +98,9 @@ func SendReward(p *Player, m map[int64]int64, tp int32) {
|
|||
case 5:
|
||||
gain = common.GainWayItemTaskAchievement
|
||||
giveType = model.SystemFreeGive_GiveType_TaskAchievement
|
||||
case 6:
|
||||
gain = common.GainWayItemTaskPermit
|
||||
giveType = model.SystemFreeGive_GiveType_TaskPermit
|
||||
}
|
||||
BagMgrSingleton.AddItems(p, items, 0, gain, "system", "任务奖励", 0, 0, false)
|
||||
for _, v := range items {
|
||||
|
@ -164,19 +167,46 @@ func CSTaskReward(s *netlib.Session, packetId int, data interface{}, sid int64)
|
|||
return nil
|
||||
}
|
||||
|
||||
isPermit := p.GetIsPermit()
|
||||
|
||||
ret := &taskproto.SCTaskReward{
|
||||
OpCode: taskproto.OpResultCode_OPRC_Error,
|
||||
Tp: msg.GetTp(),
|
||||
Id: msg.GetId(),
|
||||
Reward: make(map[int64]int64),
|
||||
}
|
||||
|
||||
if IsTaskFinish(p, msg.GetId()) && !IsTaskReward(p, msg.GetId()) {
|
||||
p.WelfData.Task[msg.GetId()].Ts = time.Now().Unix()
|
||||
data := srvdata.PBDB_TaskMgr.GetData(msg.GetId())
|
||||
if data != nil {
|
||||
SendReward(p, data.Award, msg.Tp)
|
||||
f := func(id int32) {
|
||||
if IsTaskFinish(p, id) && !IsTaskReward(p, id) {
|
||||
p.WelfData.Task[id].Ts = time.Now().Unix()
|
||||
data := srvdata.PBDB_TaskMgr.GetData(id)
|
||||
if data != nil {
|
||||
SendReward(p, data.Award, msg.Tp)
|
||||
for k, vv := range data.GetAward() {
|
||||
ret.Reward[k] = ret.Reward[k] + vv
|
||||
}
|
||||
// 赛季通行证积分
|
||||
if data.GetActivityType() == common.TaskActivityTypePermit {
|
||||
ret.Reward[common.ItemIDPermit] = common.PermitTaskScore
|
||||
if isPermit {
|
||||
ret.Reward[common.ItemIDPermit] = common.PermitTaskScore * 1.5
|
||||
}
|
||||
BagMgrSingleton.AddItem(
|
||||
p, common.ItemIDPermit, ret.Reward[common.ItemIDPermit], 0, 0,
|
||||
"system", "任务获得赛季通行证积分", 0, 0, true)
|
||||
}
|
||||
}
|
||||
ret.OpCode = taskproto.OpResultCode_OPRC_Success
|
||||
}
|
||||
ret.OpCode = taskproto.OpResultCode_OPRC_Success
|
||||
}
|
||||
|
||||
if msg.Tp > 0 && msg.Id == 0 {
|
||||
// 一键领取
|
||||
for _, v := range srvdata.TaskMgr.GetActivityType(msg.GetTp()) {
|
||||
f(v.GetId())
|
||||
}
|
||||
} else {
|
||||
f(msg.GetId())
|
||||
}
|
||||
|
||||
p.SendToClient(int(taskproto.TaskPacketID_PACKET_SCTaskReward), ret)
|
||||
|
|
|
@ -469,6 +469,646 @@ func CSBindInvite(s *netlib.Session, packetid int, data interface{}, sid int64)
|
|||
return nil
|
||||
}
|
||||
|
||||
// IsPermitReward 是否已经领取
|
||||
func IsPermitReward(p *Player, id int32) bool {
|
||||
channelConfig := PlatformMgrSingleton.GetPermitConfig(p.Platform, p.LastChannel)
|
||||
if channelConfig == nil {
|
||||
return true
|
||||
}
|
||||
|
||||
startTs := PlatformMgrSingleton.GetConfig(p.Platform).PermitStartTs
|
||||
endTs := PlatformMgrSingleton.GetConfig(p.Platform).PermitEndTs
|
||||
|
||||
if p.WelfData != nil && p.WelfData.Task != nil {
|
||||
ts := p.WelfData.PermitAward[id]
|
||||
if ts == 0 {
|
||||
return false
|
||||
}
|
||||
if ts >= startTs && ts < endTs {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// IsPermitCanReward 是否可以领取
|
||||
func IsPermitCanReward(p *Player, id int32) bool {
|
||||
if IsPermitReward(p, id) {
|
||||
return false
|
||||
}
|
||||
|
||||
channelConfig := PlatformMgrSingleton.GetPermitConfig(p.Platform, p.LastChannel)
|
||||
if channelConfig == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
exp := int64(0)
|
||||
item := BagMgrSingleton.GetItem(p.SnId, common.ItemIDPermit)
|
||||
if item != nil {
|
||||
exp = item.ItemNum
|
||||
}
|
||||
level := PlatformMgrSingleton.GetPermitLevel(p.Platform, p.LastChannel, exp)
|
||||
|
||||
for _, v := range channelConfig.GetLevelConfig() {
|
||||
if v.GetRank() == id || v.GetRank()*1000 == id {
|
||||
if v.GetRank() == id {
|
||||
return level >= int64(v.GetRank())
|
||||
} else {
|
||||
return p.GetIsPermit() && level >= int64(v.GetRank())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SendPermitReward 发赛季通行证奖励
|
||||
// tp 1普通,2典藏
|
||||
func SendPermitReward(p *Player, m map[int64]int64, tp int32) {
|
||||
var items []*Item
|
||||
for k, v := range m {
|
||||
items = append(items, &Item{
|
||||
ItemId: int32(k),
|
||||
ItemNum: v,
|
||||
})
|
||||
}
|
||||
gain := int32(0)
|
||||
giveType := int32(-1)
|
||||
switch tp {
|
||||
case 1:
|
||||
gain = common.GainWayPermitAward
|
||||
giveType = model.SystemFreeGive_GiveType_PermitAward
|
||||
case 2:
|
||||
gain = common.GainWayPermitAwardSupper
|
||||
giveType = model.SystemFreeGive_GiveType_PermitAwardSupper
|
||||
}
|
||||
BagMgrSingleton.AddItems(p, items, 0, gain, "system", "通行证奖励", 0, 0, false)
|
||||
for _, v := range items {
|
||||
tp1 := int32(-1)
|
||||
if v.ItemId == common.ItemIDCoin {
|
||||
tp1 = model.SystemFreeGive_CoinType_Coin
|
||||
} else if v.ItemId == common.ItemIDDiamond {
|
||||
tp1 = model.SystemFreeGive_CoinType_Diamond
|
||||
}
|
||||
if !p.IsRob && tp1 >= 0 && giveType >= 0 {
|
||||
LogChannelSingleton.WriteMQData(
|
||||
model.GenerateSystemFreeGive(p.SnId, p.Name, p.Platform, p.Channel, giveType, tp1, v.ItemNum))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func CSPermitInfo(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||
logger.Logger.Tracef("CSPermitInfo Process recv %v", data)
|
||||
_, ok := data.(*welfare.CSPermitInfo)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
p := PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
if p.LastChannel == "" {
|
||||
logger.Logger.Errorf("CSPermitInfo not channel %v", p.SnId)
|
||||
return nil
|
||||
}
|
||||
|
||||
channelConfig := PlatformMgrSingleton.GetPermitConfig(p.Platform, p.LastChannel)
|
||||
if channelConfig == nil {
|
||||
logger.Logger.Errorf("CSPermitInfo not channelConfig %v", p.SnId)
|
||||
return nil
|
||||
}
|
||||
startTs := PlatformMgrSingleton.GetConfig(p.Platform).PermitStartTs
|
||||
endTs := PlatformMgrSingleton.GetConfig(p.Platform).PermitEndTs
|
||||
if startTs == 0 || endTs == 0 {
|
||||
logger.Logger.Errorf("CSPermitInfo not startTs %v", p.SnId)
|
||||
return nil
|
||||
}
|
||||
// 赛季积分
|
||||
exp := int64(0)
|
||||
item := BagMgrSingleton.GetItem(p.SnId, common.ItemIDPermit)
|
||||
if item != nil {
|
||||
exp = item.ItemNum
|
||||
}
|
||||
// 等级
|
||||
level := PlatformMgrSingleton.GetPermitLevel(p.Platform, p.LastChannel, exp)
|
||||
|
||||
pack := &welfare.SCPermitInfo{
|
||||
Exp: exp,
|
||||
Level: level,
|
||||
Timestamp: []int64{startTs, endTs},
|
||||
IsPermit: p.GetIsPermit(),
|
||||
}
|
||||
// 等级奖励
|
||||
for _, v := range channelConfig.GetLevelConfig() {
|
||||
var a1, a2 []*welfare.PropInfo
|
||||
for _, vv := range v.GetAward1() {
|
||||
a1 = append(a1, &welfare.PropInfo{
|
||||
ItemId: vv.GetItemId(),
|
||||
ItemNum: vv.GetItemNum(),
|
||||
})
|
||||
}
|
||||
for _, vv := range v.GetAward2() {
|
||||
a2 = append(a2, &welfare.PropInfo{
|
||||
ItemId: vv.GetItemId(),
|
||||
ItemNum: vv.GetItemNum(),
|
||||
})
|
||||
}
|
||||
|
||||
status1 := 0
|
||||
if IsPermitReward(p, v.GetRank()) {
|
||||
status1 = 2
|
||||
} else {
|
||||
if IsPermitCanReward(p, v.GetRank()) {
|
||||
status1 = 1
|
||||
}
|
||||
}
|
||||
|
||||
status2 := 0
|
||||
if IsPermitReward(p, v.GetRank()*1000) {
|
||||
status2 = 2
|
||||
} else {
|
||||
if IsPermitCanReward(p, v.GetRank()*1000) {
|
||||
status2 = 1
|
||||
}
|
||||
}
|
||||
|
||||
pack.Award = append(pack.Award, &welfare.PermitAward{
|
||||
Exp: v.GetScore(),
|
||||
Level: int64(v.GetRank()),
|
||||
Award1: &welfare.PropItem{
|
||||
Award: a1,
|
||||
Status: int64(status1),
|
||||
Id: v.GetRank(),
|
||||
},
|
||||
Award2: &welfare.PropItem{
|
||||
Award: a2,
|
||||
Status: int64(status2),
|
||||
Id: v.GetRank() * 1000,
|
||||
},
|
||||
})
|
||||
}
|
||||
// 排行奖励
|
||||
for _, v := range channelConfig.GetRankConfig() {
|
||||
var items []*welfare.PropInfo
|
||||
for _, vv := range v.GetItemId() {
|
||||
items = append(items, &welfare.PropInfo{
|
||||
ItemId: vv.GetItemId(),
|
||||
ItemNum: vv.GetItemNum(),
|
||||
})
|
||||
}
|
||||
pack.RankAward = append(pack.RankAward, &welfare.PermitRankAward{
|
||||
Start: v.GetStart(),
|
||||
End: v.GetEnd(),
|
||||
ItemId: items,
|
||||
})
|
||||
}
|
||||
// 客户端轮播配置
|
||||
for _, v := range srvdata.PBDB_PassShowMgr.Datas.GetArr() {
|
||||
pack.ShowList = append(pack.ShowList, &welfare.PermitShow{
|
||||
ShowType: v.GetShowType(),
|
||||
ShowVolume: v.GetShowVolume(),
|
||||
Location: v.GetLocation(),
|
||||
})
|
||||
}
|
||||
p.SendToClient(int(welfare.SPacketID_PACKET_SCPermitInfo), pack)
|
||||
logger.Logger.Tracef("SCPermitInfo: %v", pack)
|
||||
return nil
|
||||
}
|
||||
|
||||
func CSPermitAward(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||
logger.Logger.Tracef("CSPermitAward Process recv %v", data)
|
||||
msg, ok := data.(*welfare.CSPermitAward)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
p := PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
if p.LastChannel == "" {
|
||||
logger.Logger.Errorf("CSPermitAward not channel %v", p.SnId)
|
||||
return nil
|
||||
}
|
||||
|
||||
channelConfig := PlatformMgrSingleton.GetPermitConfig(p.Platform, p.LastChannel)
|
||||
if channelConfig == nil {
|
||||
logger.Logger.Errorf("CSPermitAward not channelConfig %v", p.SnId)
|
||||
return nil
|
||||
}
|
||||
startTs := PlatformMgrSingleton.GetConfig(p.Platform).PermitStartTs
|
||||
endTs := PlatformMgrSingleton.GetConfig(p.Platform).PermitEndTs
|
||||
if startTs == 0 || endTs == 0 {
|
||||
logger.Logger.Errorf("CSPermitAward not startTs %v", p.SnId)
|
||||
return nil
|
||||
}
|
||||
|
||||
now := time.Now()
|
||||
|
||||
pack := &welfare.SCPermitAward{
|
||||
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
||||
Tp: msg.GetTp(),
|
||||
Id: msg.GetId(),
|
||||
}
|
||||
|
||||
switch msg.GetTp() {
|
||||
case 0: // 所有
|
||||
for _, v := range channelConfig.GetLevelConfig() {
|
||||
if IsPermitCanReward(p, v.GetRank()) {
|
||||
for _, vv := range v.GetAward1() {
|
||||
pack.Award1 = append(pack.Award1, &welfare.PropInfo{
|
||||
ItemId: vv.GetItemId(),
|
||||
ItemNum: vv.GetItemNum(),
|
||||
})
|
||||
}
|
||||
p.WelfData.PermitAward[v.GetRank()] = now.Unix()
|
||||
}
|
||||
if IsPermitCanReward(p, v.GetRank()*1000) {
|
||||
for _, vv := range v.GetAward2() {
|
||||
pack.Award2 = append(pack.Award2, &welfare.PropInfo{
|
||||
ItemId: vv.GetItemId(),
|
||||
ItemNum: vv.GetItemNum(),
|
||||
})
|
||||
}
|
||||
p.WelfData.PermitAward[v.GetRank()*1000] = now.Unix()
|
||||
}
|
||||
}
|
||||
|
||||
case 1: // 普通
|
||||
for _, v := range channelConfig.GetLevelConfig() {
|
||||
if msg.GetId() == 0 {
|
||||
if IsPermitCanReward(p, v.GetRank()) {
|
||||
for _, vv := range v.GetAward1() {
|
||||
pack.Award1 = append(pack.Award1, &welfare.PropInfo{
|
||||
ItemId: vv.GetItemId(),
|
||||
ItemNum: vv.GetItemNum(),
|
||||
})
|
||||
}
|
||||
p.WelfData.PermitAward[v.GetRank()] = now.Unix()
|
||||
}
|
||||
} else {
|
||||
if v.GetRank() == msg.GetId() {
|
||||
if IsPermitCanReward(p, v.GetRank()) {
|
||||
for _, vv := range v.GetAward1() {
|
||||
pack.Award1 = append(pack.Award1, &welfare.PropInfo{
|
||||
ItemId: vv.GetItemId(),
|
||||
ItemNum: vv.GetItemNum(),
|
||||
})
|
||||
}
|
||||
p.WelfData.PermitAward[v.GetRank()] = now.Unix()
|
||||
} else {
|
||||
pack.OpRetCode = welfare.OpResultCode_OPRC_NoTimes
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
case 2: // 典藏
|
||||
for _, v := range channelConfig.GetLevelConfig() {
|
||||
if msg.GetId() == 0 {
|
||||
if IsPermitCanReward(p, v.GetRank()*1000) {
|
||||
for _, vv := range v.GetAward2() {
|
||||
pack.Award2 = append(pack.Award2, &welfare.PropInfo{
|
||||
ItemId: vv.GetItemId(),
|
||||
ItemNum: vv.GetItemNum(),
|
||||
})
|
||||
}
|
||||
p.WelfData.PermitAward[v.GetRank()*1000] = now.Unix()
|
||||
}
|
||||
} else {
|
||||
if v.GetRank() == msg.GetId() {
|
||||
if IsPermitCanReward(p, v.GetRank()*1000) {
|
||||
for _, vv := range v.GetAward2() {
|
||||
pack.Award2 = append(pack.Award2, &welfare.PropInfo{
|
||||
ItemId: vv.GetItemId(),
|
||||
ItemNum: vv.GetItemNum(),
|
||||
})
|
||||
}
|
||||
p.WelfData.PermitAward[v.GetRank()*1000] = now.Unix()
|
||||
} else {
|
||||
pack.OpRetCode = welfare.OpResultCode_OPRC_NoTimes
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 奖励合并
|
||||
var award1 = map[int32]*welfare.PropInfo{}
|
||||
var award2 = map[int32]*welfare.PropInfo{}
|
||||
var awards1 = map[int64]int64{}
|
||||
var awards2 = map[int64]int64{}
|
||||
for _, v := range pack.GetAward1() {
|
||||
e, ok := award1[v.GetItemId()]
|
||||
if !ok {
|
||||
e = &welfare.PropInfo{
|
||||
ItemId: v.GetItemId(),
|
||||
ItemNum: v.GetItemNum(),
|
||||
}
|
||||
award1[v.GetItemId()] = e
|
||||
} else {
|
||||
e.ItemNum = e.GetItemNum() + v.GetItemNum()
|
||||
}
|
||||
awards1[int64(v.GetItemId())] = awards1[int64(v.GetItemId())] + v.GetItemNum()
|
||||
}
|
||||
for _, v := range pack.GetAward2() {
|
||||
e, ok := award2[v.GetItemId()]
|
||||
if !ok {
|
||||
e = &welfare.PropInfo{
|
||||
ItemId: v.GetItemId(),
|
||||
ItemNum: v.GetItemNum(),
|
||||
}
|
||||
award2[v.GetItemId()] = e
|
||||
} else {
|
||||
e.ItemNum = e.GetItemNum() + v.GetItemNum()
|
||||
}
|
||||
awards2[int64(v.GetItemId())] = awards2[int64(v.GetItemId())] + v.GetItemNum()
|
||||
}
|
||||
// 发奖
|
||||
SendPermitReward(p, awards1, 1)
|
||||
SendPermitReward(p, awards2, 2)
|
||||
pack.Award1 = nil
|
||||
pack.Award2 = nil
|
||||
for _, v := range award1 {
|
||||
pack.Award1 = append(pack.Award1, &welfare.PropInfo{
|
||||
ItemId: v.GetItemId(),
|
||||
ItemNum: v.GetItemNum(),
|
||||
})
|
||||
}
|
||||
for _, v := range award2 {
|
||||
pack.Award2 = append(pack.Award2, &welfare.PropInfo{
|
||||
ItemId: v.GetItemId(),
|
||||
ItemNum: v.GetItemNum(),
|
||||
})
|
||||
}
|
||||
p.SendToClient(int(welfare.SPacketID_PACKET_SCPermitAward), pack)
|
||||
logger.Logger.Tracef("SCPermitAward: %v", pack)
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetPermitExchangeNum 获取已兑换次数
|
||||
func GetPermitExchangeNum(p *Player, id int32) int {
|
||||
channelConfig := PlatformMgrSingleton.GetPermitConfig(p.Platform, p.LastChannel)
|
||||
if channelConfig == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
return len(p.WelfData.PermitExchange[id])
|
||||
}
|
||||
|
||||
// GetPermitCanExchange 是否可以兑换
|
||||
// 1等级不足 2需要典藏通行证 3兑换次数不足 4商品不存在
|
||||
func GetPermitCanExchange(p *Player, id int32) (bool, int) {
|
||||
channelConfig := PlatformMgrSingleton.GetPermitConfig(p.Platform, p.LastChannel)
|
||||
if channelConfig == nil {
|
||||
return false, 0
|
||||
}
|
||||
|
||||
times := GetPermitExchangeNum(p, id)
|
||||
exp := int64(0)
|
||||
item := BagMgrSingleton.GetItem(p.SnId, common.ItemIDPermit)
|
||||
if item != nil {
|
||||
exp = item.ItemNum
|
||||
}
|
||||
level := PlatformMgrSingleton.GetPermitLevel(p.Platform, p.LastChannel, exp)
|
||||
|
||||
for _, v := range channelConfig.GetExchangeConfig() {
|
||||
if v.GetId() == id {
|
||||
// 等级
|
||||
if level < v.GetLevel() {
|
||||
return false, 1
|
||||
}
|
||||
// 通行证
|
||||
if v.GetIsPermit() && !p.GetIsPermit() {
|
||||
return false, 2
|
||||
}
|
||||
// 剩余兑换次数
|
||||
if v.GetTimes() > 0 && int64(times) >= v.GetTimes() {
|
||||
return false, 3
|
||||
}
|
||||
return true, 0
|
||||
}
|
||||
}
|
||||
|
||||
return false, 4
|
||||
}
|
||||
|
||||
func CSPermitExchangeList(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||
logger.Logger.Tracef("CSPermitExchangeList Process recv %v", data)
|
||||
_, ok := data.(*welfare.CSPermitExchangeList)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
p := PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
if p.LastChannel == "" {
|
||||
logger.Logger.Errorf("CSPermitExchangeList not channel %v", p.SnId)
|
||||
return nil
|
||||
}
|
||||
|
||||
channelConfig := PlatformMgrSingleton.GetPermitConfig(p.Platform, p.LastChannel)
|
||||
if channelConfig == nil {
|
||||
logger.Logger.Errorf("CSPermitExchangeList not channelConfig %v", p.SnId)
|
||||
return nil
|
||||
}
|
||||
startTs := PlatformMgrSingleton.GetConfig(p.Platform).PermitStartTs
|
||||
endTs := PlatformMgrSingleton.GetConfig(p.Platform).PermitEndTs
|
||||
if startTs == 0 || endTs == 0 {
|
||||
logger.Logger.Errorf("CSPermitExchangeList not startTs %v", p.SnId)
|
||||
return nil
|
||||
}
|
||||
|
||||
pack := &welfare.SCPermitExchangeList{}
|
||||
|
||||
for _, v := range channelConfig.GetExchangeConfig() {
|
||||
var gain, cost []*welfare.PropInfo
|
||||
for _, vv := range v.GetGain() {
|
||||
gain = append(gain, &welfare.PropInfo{
|
||||
ItemId: vv.GetItemId(),
|
||||
ItemNum: vv.GetItemNum(),
|
||||
})
|
||||
}
|
||||
for _, vv := range v.GetCost() {
|
||||
cost = append(cost, &welfare.PropInfo{
|
||||
ItemId: vv.GetItemId(),
|
||||
ItemNum: vv.GetItemNum(),
|
||||
})
|
||||
}
|
||||
|
||||
times := int32(v.GetTimes()) - int32(GetPermitExchangeNum(p, v.GetId()))
|
||||
|
||||
pack.List = append(pack.List, &welfare.ShopInfo{
|
||||
Id: v.GetId(),
|
||||
Gain: gain,
|
||||
Cost: cost,
|
||||
ExchangeTimes: int32(v.GetTimes()),
|
||||
RemainTimes: times,
|
||||
Level: v.GetLevel(),
|
||||
NeedPermit: v.GetIsPermit(),
|
||||
SortId: v.GetSortId(),
|
||||
})
|
||||
}
|
||||
p.SendToClient(int(welfare.SPacketID_PACKET_SCPermitExchangeList), pack)
|
||||
logger.Logger.Tracef("SCPermitExchangeList: %v", pack)
|
||||
return nil
|
||||
}
|
||||
|
||||
func CSPermitExchange(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||
logger.Logger.Tracef("CSPermitExchange Process recv %v", data)
|
||||
msg, ok := data.(*welfare.CSPermitExchange)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
p := PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
if p.LastChannel == "" {
|
||||
logger.Logger.Errorf("CSPermitExchange not channel %v", p.SnId)
|
||||
return nil
|
||||
}
|
||||
channelConfig := PlatformMgrSingleton.GetPermitConfig(p.Platform, p.LastChannel)
|
||||
if channelConfig == nil {
|
||||
logger.Logger.Errorf("CSPermitExchange not channelConfig %v", p.SnId)
|
||||
return nil
|
||||
}
|
||||
startTs := PlatformMgrSingleton.GetConfig(p.Platform).PermitStartTs
|
||||
endTs := PlatformMgrSingleton.GetConfig(p.Platform).PermitEndTs
|
||||
if startTs == 0 || endTs == 0 {
|
||||
logger.Logger.Errorf("CSPermitExchange not startTs %v", p.SnId)
|
||||
return nil
|
||||
}
|
||||
|
||||
now := time.Now()
|
||||
|
||||
isExchange, code := GetPermitCanExchange(p, msg.GetId())
|
||||
pack := &welfare.SCPermitExchange{
|
||||
OpRetCode: welfare.OpResultCode_OPRC_Sucess,
|
||||
}
|
||||
send := func(d welfare.OpResultCode) {
|
||||
// 1等级不足 2需要典藏通行证 3兑换次数不足 4商品不存在
|
||||
switch code {
|
||||
case 1:
|
||||
pack.OpRetCode = welfare.OpResultCode_OPRC_ExchangeLevelLimit
|
||||
case 2:
|
||||
pack.OpRetCode = welfare.OpResultCode_OPRC_NeedPermit
|
||||
case 3:
|
||||
pack.OpRetCode = welfare.OpResultCode_OPRC_ExchangeLimit
|
||||
case 4:
|
||||
pack.OpRetCode = welfare.OpResultCode_OPRC_NotFound
|
||||
}
|
||||
if code == 0 {
|
||||
pack.OpRetCode = d
|
||||
}
|
||||
p.SendToClient(int(welfare.SPacketID_PACKET_SCPermitExchange), pack)
|
||||
logger.Logger.Tracef("SCPermitExchange: %v", pack)
|
||||
}
|
||||
|
||||
if isExchange {
|
||||
var exchangeConfig *webapi_proto.PermitExchangeConfig
|
||||
for _, v := range channelConfig.GetExchangeConfig() {
|
||||
if v.GetId() == msg.GetId() {
|
||||
exchangeConfig = v
|
||||
break
|
||||
}
|
||||
}
|
||||
if exchangeConfig != nil {
|
||||
// 检查背包是否足够
|
||||
var items []*Item
|
||||
var costItems []*Item
|
||||
for k, v := range exchangeConfig.GetCost() {
|
||||
item := BagMgrSingleton.GetItem(p.SnId, int32(k))
|
||||
if item == nil || item.ItemNum < v.GetItemNum() {
|
||||
send(welfare.OpResultCode_OPRC_ErrCost)
|
||||
return nil
|
||||
}
|
||||
info := srvdata.PBDB_GameItemMgr.GetData(int32(k))
|
||||
if info != nil {
|
||||
costItems = append(costItems, &Item{
|
||||
ItemId: int32(k),
|
||||
ItemNum: v.GetItemNum(),
|
||||
Name: info.Name,
|
||||
})
|
||||
}
|
||||
}
|
||||
for k, v := range exchangeConfig.GetGain() {
|
||||
info := srvdata.PBDB_GameItemMgr.GetData(int32(k))
|
||||
if info != nil {
|
||||
items = append(items, &Item{
|
||||
ItemId: int32(k),
|
||||
ItemNum: v.GetItemNum(),
|
||||
Name: info.Name,
|
||||
})
|
||||
}
|
||||
}
|
||||
// 扣除背包物品
|
||||
for _, item := range costItems {
|
||||
BagMgrSingleton.AddItem(p, int64(item.ItemId), -item.ItemNum, 0, common.GainWayPermitExchangeCost, "system", "赛季通行证兑换消耗", 0, 0, false)
|
||||
}
|
||||
// 增加背包物品
|
||||
BagMgrSingleton.AddItems(p, items, 0, common.GainWayPermitExchangeGain, "system", "赛季通行证兑换获得", 0, 0, false)
|
||||
p.WelfData.PermitExchange[msg.GetId()] = append(p.WelfData.PermitExchange[msg.GetId()], now.Unix())
|
||||
}
|
||||
}
|
||||
|
||||
if !isExchange {
|
||||
pack.OpRetCode = welfare.OpResultCode_OPRC_Error
|
||||
}
|
||||
p.SendToClient(int(welfare.SPacketID_PACKET_SCPermitExchange), pack)
|
||||
logger.Logger.Tracef("SCPermitExchange: %v", pack)
|
||||
return nil
|
||||
}
|
||||
|
||||
func CSPermitShop(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||
logger.Logger.Tracef("CSPermitShop Process recv %v", data)
|
||||
_, ok := data.(*welfare.CSPermitShop)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
p := PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
if p.LastChannel == "" {
|
||||
logger.Logger.Errorf("CSPermitShop not channel %v", p.SnId)
|
||||
return nil
|
||||
}
|
||||
channelConfig := PlatformMgrSingleton.GetPermitConfig(p.Platform, p.LastChannel)
|
||||
if channelConfig == nil {
|
||||
logger.Logger.Errorf("CSPermitShop not channelConfig %v", p.SnId)
|
||||
return nil
|
||||
}
|
||||
startTs := PlatformMgrSingleton.GetConfig(p.Platform).PermitStartTs
|
||||
endTs := PlatformMgrSingleton.GetConfig(p.Platform).PermitEndTs
|
||||
if startTs == 0 || endTs == 0 {
|
||||
logger.Logger.Errorf("CSPermitShop not startTs %v", p.SnId)
|
||||
return nil
|
||||
}
|
||||
|
||||
shopInfo := ShopMgrSington.GetShopInfo(common.ShopIdPermit, p)
|
||||
if shopInfo == nil {
|
||||
logger.Logger.Errorf("CSPermitShop is null %v", p.SnId)
|
||||
return nil
|
||||
}
|
||||
price := int64(0)
|
||||
if len(shopInfo.CostArea) > 0 {
|
||||
price = int64(shopInfo.CostArea[0])
|
||||
}
|
||||
|
||||
pack := &welfare.SCPermitShop{
|
||||
Id: shopInfo.Id,
|
||||
Name: shopInfo.Name,
|
||||
Consume: shopInfo.ConstType,
|
||||
Price: price,
|
||||
}
|
||||
p.SendToClient(int(welfare.SPacketID_PACKET_SCPermitShop), pack)
|
||||
logger.Logger.Tracef("SCPermitShop: %v", pack)
|
||||
return nil
|
||||
}
|
||||
|
||||
// ------------------------------------------------
|
||||
type CSPigBankGetInfoPacketFactory struct {
|
||||
}
|
||||
|
@ -647,4 +1287,15 @@ func init() {
|
|||
//领取钻石储存罐
|
||||
/* common.RegisterHandler(int(welfare.SPacketID_PACKET_CSDiamondBankTakeDiamond), &CSDiamondBankTakeDiamondHandler{})
|
||||
netlib.RegisterFactory(int(welfare.SPacketID_PACKET_CSDiamondBankTakeDiamond), &CSDiamondBankTakeDiamondPacketFactory{})*/
|
||||
|
||||
// 赛季通行证信息
|
||||
common.Register(int(welfare.SPacketID_PACKET_CSPermitInfo), welfare.CSPermitInfo{}, CSPermitInfo)
|
||||
// 赛季通行证奖励领取
|
||||
common.Register(int(welfare.SPacketID_PACKET_CSPermitAward), welfare.CSPermitAward{}, CSPermitAward)
|
||||
// 赛季通行证兑换列表
|
||||
common.Register(int(welfare.SPacketID_PACKET_CSPermitExchangeList), welfare.CSPermitExchangeList{}, CSPermitExchangeList)
|
||||
// 赛季通行证兑换
|
||||
common.Register(int(welfare.SPacketID_PACKET_CSPermitExchange), welfare.CSPermitExchange{}, CSPermitExchange)
|
||||
// 赛季典藏通行证商品信息
|
||||
common.Register(int(welfare.SPacketID_PACKET_CSPermitShop), welfare.CSPermitShop{}, CSPermitShop)
|
||||
}
|
||||
|
|
|
@ -290,12 +290,32 @@ func (this *BagMgr) AddItems(p *Player, addItems []*Item, add int64, gainWay int
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
if len(changeItems) > 0 {
|
||||
newBagInfo.dirty = true
|
||||
p.dirty = true
|
||||
this.PlayerBag[p.SnId] = newBagInfo
|
||||
this.SyncBagData(p.SnId, changeItems...)
|
||||
}
|
||||
|
||||
for _, v := range changeItems {
|
||||
if v == common.ItemIDPermit {
|
||||
item := this.GetItem(p.SnId, v)
|
||||
startTs := PlatformMgrSingleton.GetConfig(p.Platform).PermitStartTs
|
||||
if item != nil && item.ItemNum > 0 && startTs > 0 {
|
||||
// 赛季积分排行榜
|
||||
LogChannelSingleton.WriteLog(&model.PermitScore{
|
||||
Platform: p.Platform,
|
||||
SnId: p.SnId,
|
||||
Name: p.Name,
|
||||
Exp: item.ItemNum,
|
||||
ModId: p.Roles.ModId,
|
||||
StartTs: startTs,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if code != bag.OpResultCode_OPRC_Sucess {
|
||||
return newBagInfo, code, false
|
||||
}
|
||||
|
|
142
worldsrv/etcd.go
142
worldsrv/etcd.go
|
@ -2,17 +2,22 @@ package main
|
|||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"go.etcd.io/etcd/client/v3"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/basic"
|
||||
"mongo.games.com/goserver/core/task"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/etcd"
|
||||
"mongo.games.com/game/model"
|
||||
hallproto "mongo.games.com/game/protocol/gamehall"
|
||||
loginproto "mongo.games.com/game/protocol/login"
|
||||
playerproto "mongo.games.com/game/protocol/player"
|
||||
"mongo.games.com/game/protocol/webapi"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -68,6 +73,8 @@ func init() {
|
|||
etcd.Register(etcd.ETCDKEY_ACT_PHONELOTTERY, webapi.WelfarePhoneLotteryStatus{}, platformConfigEvent)
|
||||
// 邀请活动
|
||||
etcd.Register(etcd.ETCDKEY_ACT_Invite, webapi.ActInviteConfig{}, platformConfigEvent)
|
||||
// 赛季通行证
|
||||
etcd.Register(etcd.ETCDKEY_ACT_Permit, webapi.ActPermitConfig{}, platformConfigEvent)
|
||||
}
|
||||
|
||||
func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||
|
@ -199,9 +206,142 @@ func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, e
|
|||
WelfareMgrSington.UpdatePhoneLotteryStatus(config)
|
||||
case *webapi.ActInviteConfig:
|
||||
PlatformMgrSingleton.GetConfig(config.Platform).ActInviteConfig = config
|
||||
case *webapi.ActPermitConfig:
|
||||
break
|
||||
PlatformMgrSingleton.GetConfig(config.Platform).ActPermitConfig = config
|
||||
st := new(model.PermitStartTs)
|
||||
permit := model.GetStrKVGameData(common.PermitStartTsKey + config.Platform)
|
||||
if permit != "" {
|
||||
if err := json.Unmarshal([]byte(permit), st); err != nil {
|
||||
logger.Logger.Errorf("permit startts error: %v", err)
|
||||
return
|
||||
}
|
||||
// 修改循环周期
|
||||
endTs := st.StartTs + int64(config.GetDays()*24*3600)
|
||||
if st.StartTs > 0 && endTs != st.EndTs {
|
||||
st.EndTs = endTs
|
||||
}
|
||||
PlatformMgrSingleton.GetConfig(config.Platform).PermitStartTs = st.StartTs
|
||||
PlatformMgrSingleton.GetConfig(config.Platform).PermitEndTs = st.EndTs
|
||||
} else {
|
||||
startTs := common.GetDayStartTs(config.StartTs)
|
||||
endTs := startTs + int64(config.Days*24*3600)
|
||||
st.StartTs = startTs
|
||||
st.EndTs = endTs
|
||||
PlatformMgrSingleton.GetConfig(config.Platform).PermitStartTs = startTs
|
||||
PlatformMgrSingleton.GetConfig(config.Platform).PermitEndTs = endTs
|
||||
}
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
if st.StartTs <= 0 || st.EndTs <= 0 {
|
||||
return nil
|
||||
}
|
||||
b, err := json.Marshal(st)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("permit startts save error: %v", err)
|
||||
} else {
|
||||
logger.Logger.Infof("update permit startts: %v %v", st.StartTs, st.EndTs)
|
||||
err := model.UptStrKVGameData(common.PermitStartTsKey+config.Platform, string(b))
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("permit startts update error:%v", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}), nil).StartByExecutor("permit_start_ts")
|
||||
|
||||
default:
|
||||
logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey)
|
||||
}
|
||||
// test
|
||||
actConfig := &webapi.ActPermitConfig{
|
||||
Platform: "1",
|
||||
StartTs: 1719646575,
|
||||
Days: 7,
|
||||
}
|
||||
channelConfig := webapi.PermitChannelConfig{
|
||||
Channel: "Official",
|
||||
}
|
||||
for i := 0; i < 100; i++ {
|
||||
channelConfig.LevelConfig = append(channelConfig.LevelConfig, &webapi.PermitLevelConfig{
|
||||
Rank: int32(i + 1),
|
||||
Score: int64((i + 1) * 100),
|
||||
Award1: []*webapi.ItemInfo{
|
||||
{
|
||||
ItemId: common.ItemIDCoin,
|
||||
ItemNum: 100,
|
||||
},
|
||||
},
|
||||
Award2: []*webapi.ItemInfo{
|
||||
{
|
||||
ItemId: common.ItemIDCoin,
|
||||
ItemNum: 100,
|
||||
},
|
||||
{
|
||||
ItemId: common.ItemIDDiamond,
|
||||
ItemNum: 100,
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
itemId := []int32{100001, 100002, 10001, 20001, 20002, 20003}
|
||||
for i := 0; i < 10; i++ {
|
||||
level := 0
|
||||
if common.RandInt(0, 3) == 0 {
|
||||
level = common.RandInt(1, 101)
|
||||
}
|
||||
channelConfig.ExchangeConfig = append(channelConfig.ExchangeConfig, &webapi.PermitExchangeConfig{
|
||||
Id: int32(i + 1),
|
||||
SortId: int32(100 - i),
|
||||
Gain: []*webapi.ItemInfo{
|
||||
{
|
||||
ItemId: itemId[common.RandInt(len(itemId))],
|
||||
ItemNum: 1,
|
||||
},
|
||||
},
|
||||
Cost: []*webapi.ItemInfo{{
|
||||
ItemId: common.ItemIDLong,
|
||||
ItemNum: int64(common.RandInt(50, 101)),
|
||||
}},
|
||||
IsPermit: common.RandInt(0, 3) == 0,
|
||||
Level: int64(level),
|
||||
Times: int64(common.RandInt(0, 5)),
|
||||
IsShow: common.RandInt(0, 4) != 0,
|
||||
})
|
||||
}
|
||||
rankN := 1
|
||||
for i := 0; i < 3; i++ {
|
||||
sub := common.RandInt(0, 3)
|
||||
items := []*webapi.ItemInfo{
|
||||
{
|
||||
ItemId: common.ItemIDCoin,
|
||||
ItemNum: 100,
|
||||
},
|
||||
}
|
||||
if common.RandInt(2) == 0 {
|
||||
items = append(items, &webapi.ItemInfo{
|
||||
ItemId: common.ItemIDDiamond,
|
||||
ItemNum: 100,
|
||||
})
|
||||
}
|
||||
channelConfig.RankConfig = append(channelConfig.RankConfig, &webapi.PermitRankConfig{
|
||||
Start: int32(rankN),
|
||||
End: int32(rankN + sub),
|
||||
ItemId: items,
|
||||
})
|
||||
rankN = rankN + sub + 1
|
||||
}
|
||||
|
||||
actConfig.Configs = append(actConfig.Configs, &channelConfig)
|
||||
webConfig := channelConfig
|
||||
webConfig.Channel = "Web"
|
||||
actConfig.Configs = append(actConfig.Configs, &webConfig)
|
||||
googleConfig := channelConfig
|
||||
googleConfig.Channel = "GooglePlay"
|
||||
actConfig.Configs = append(actConfig.Configs, &googleConfig)
|
||||
PlatformMgrSingleton.GetConfig("1").ActPermitConfig = actConfig
|
||||
PlatformMgrSingleton.GetConfig("1").PermitStartTs = common.GetDayStartTs(1719646575)
|
||||
PlatformMgrSingleton.GetConfig("1").PermitEndTs = common.GetDayStartTs(1719646575) + int64(actConfig.GetDays()*24*3600)
|
||||
logger.Logger.Tracef("==> PermitConfig: %v ", actConfig)
|
||||
// test
|
||||
}
|
||||
|
||||
func handlerEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||
|
|
|
@ -60,4 +60,5 @@ func init() {
|
|||
LogChannelSingleton.RegisterLogCName(mq.BackReliefund, &model.ReliefFundLog{})
|
||||
LogChannelSingleton.RegisterLogCName(model.EvtInvite, &model.EvtInviteMsg{})
|
||||
LogChannelSingleton.RegisterLogCName(model.MQRankPlayerLevel, &model.PlayerLevelInfo{})
|
||||
LogChannelSingleton.RegisterLogCName(model.MQRankPlayerPermit, &model.PermitScore{})
|
||||
}
|
||||
|
|
|
@ -29,20 +29,23 @@ func main() {
|
|||
core.LoadPackages("config.json")
|
||||
// core hook
|
||||
core.RegisteHook(core.HOOK_BEFORE_START, func() error {
|
||||
etcd.Start()
|
||||
model.StartupRPClient(common.CustomConfig.GetString("MgoRpcCliNet"), common.CustomConfig.GetString("MgoRpcCliAddr"), time.Duration(common.CustomConfig.GetInt("MgoRpcCliReconnInterV"))*time.Second)
|
||||
mq.StartConsumer(common.CustomConfig.GetString("RabbitMQURL"), common.CustomConfig.GetString("RMQExchange"), true)
|
||||
mq.StartPublisher(common.CustomConfig.GetString("RabbitMQURL"), common.CustomConfig.GetString("RMQExchange"), true, common.CustomConfig.GetInt("RMQPublishBacklog"))
|
||||
err := model.InitGameKVData()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
var err error
|
||||
CacheMemory, err = cache.NewCache("memory", `{"interval":60}`)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
etcd.Start()
|
||||
gameStateMgr.Init()
|
||||
HorseRaceLampMgrSington.InitHorseRaceLamp()
|
||||
model.InitGameKVData()
|
||||
|
||||
model.GetAllCoinPoolSettingData()
|
||||
MsgMgrSington.InitMsg()
|
||||
return nil
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"mongo.games.com/goserver/core/basic"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/task"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/model"
|
||||
)
|
||||
|
||||
var PermitMgrInst = new(PermitMgr)
|
||||
|
||||
type PermitMgr struct {
|
||||
BaseClockSinker
|
||||
}
|
||||
|
||||
func (r *PermitMgr) InterestClockEvent() int {
|
||||
return 1 << CLOCK_EVENT_DAY
|
||||
}
|
||||
|
||||
func (r *PermitMgr) OnDayTimer() {
|
||||
logger.Logger.Info("(this *PermitMgr) OnDayTimer")
|
||||
now := time.Now()
|
||||
for _, v := range PlatformMgrSingleton.GetPlatforms() {
|
||||
pl := PlatformMgrSingleton.GetConfig(v.IdStr).ActPermitConfig
|
||||
if pl == nil {
|
||||
continue
|
||||
}
|
||||
b := model.GetStrKVGameData(common.PermitStartTsKey + v.IdStr)
|
||||
if b == "" {
|
||||
logger.Logger.Errorf("(this *PermitMgr) OnDayTimer GetStrKVGameData not found")
|
||||
continue
|
||||
}
|
||||
se := new(model.PermitStartTs)
|
||||
if err := json.Unmarshal([]byte(b), se); err != nil {
|
||||
logger.Logger.Errorf("(this *PermitMgr) OnDayTimer json.Unmarshal err:%v", err)
|
||||
continue
|
||||
}
|
||||
if se.StartTs <= now.Unix() && now.Unix() < se.EndTs {
|
||||
// 在活动内
|
||||
continue
|
||||
}
|
||||
if now.Unix() < se.StartTs {
|
||||
// 活动未开始
|
||||
continue
|
||||
}
|
||||
if now.Unix() >= se.EndTs {
|
||||
// 活动已结束, 新开始
|
||||
se.StartTs = se.EndTs
|
||||
se.EndTs = se.EndTs + int64(pl.Days*24*3600)
|
||||
if now.Unix() < se.StartTs || now.Unix() >= se.EndTs {
|
||||
se.StartTs = common.GetDayStartTs(now.Unix())
|
||||
se.EndTs = se.StartTs + int64(pl.Days*24*3600)
|
||||
}
|
||||
PlatformMgrSingleton.GetConfig(v.IdStr).PermitStartTs = se.StartTs
|
||||
PlatformMgrSingleton.GetConfig(v.IdStr).PermitEndTs = se.EndTs
|
||||
b, err := json.Marshal(se)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("(this *PermitMgr) OnDayTimer json.Marshal err:%v", err)
|
||||
continue
|
||||
}
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
model.UptStrKVGameData(common.PermitStartTsKey+v.IdStr, string(b))
|
||||
return nil
|
||||
}), nil).StartByExecutor("permit_start_ts")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
ClockMgrSington.RegisteSinker(PermitMgrInst)
|
||||
}
|
|
@ -144,9 +144,10 @@ type Player struct {
|
|||
BuildVersion string // app构建版本
|
||||
AppChannel string // app渠道(玩家本次登录使用的包的渠道类型,换登录包,这个值也会变;玩家model.PlayerData存储的渠道是玩家第一次登录的渠道,不会修改)
|
||||
// 最后玩的游戏id
|
||||
LastGameId int
|
||||
GameID []int32 // 最近三天玩的游戏
|
||||
ApplyList []int32 //玩家申请好友记录
|
||||
LastGameId int
|
||||
GameID []int32 // 最近三天玩的游戏
|
||||
ApplyList []int32 //玩家申请好友记录
|
||||
TaskInviteList map[int32]int // 邀请好友私人桌对局 好友id:房间id
|
||||
}
|
||||
|
||||
func NewPlayer(sid int64, pd *model.PlayerData, s *netlib.Session) *Player {
|
||||
|
@ -164,6 +165,7 @@ func NewPlayer(sid int64, pd *model.PlayerData, s *netlib.Session) *Player {
|
|||
thirdBalanceRefreshMark: make(map[string]bool),
|
||||
layered: make(map[int]bool),
|
||||
miniScene: make(map[int32]*Scene),
|
||||
TaskInviteList: make(map[int32]int),
|
||||
}
|
||||
if p.IsRob {
|
||||
p.RobotRandName()
|
||||
|
@ -265,6 +267,9 @@ func (this *Player) OnLogined() {
|
|||
if this.CreateTime.Unix() > this.LastLogoutTime.Unix() {
|
||||
isFirstLogin = true
|
||||
}
|
||||
if !this.IsRob {
|
||||
this.ResetPermit()
|
||||
}
|
||||
|
||||
// 跨天业务处理
|
||||
tNow := time.Now()
|
||||
|
@ -1891,6 +1896,10 @@ func (this *Player) AddDiamond(num, add int64, gainWay int32, oper, remark strin
|
|||
} else {
|
||||
this.Diamond += num
|
||||
}
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeCostDiamond, &TaskData{
|
||||
SnId: this.SnId,
|
||||
Num: -num,
|
||||
})
|
||||
}
|
||||
|
||||
this.SendDiffData()
|
||||
|
@ -2176,6 +2185,10 @@ func (this *Player) OnSecTimer() {
|
|||
|
||||
func (this *Player) OnMiniTimer() {
|
||||
FirePlayerMiniTimer(this)
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeOnlineTs, &TaskData{
|
||||
SnId: this.SnId,
|
||||
Num: 60,
|
||||
})
|
||||
}
|
||||
|
||||
func (this *Player) OnHourTimer() {
|
||||
|
@ -2221,6 +2234,9 @@ func (this *Player) OnDayTimer(login, continuous bool, t int) {
|
|||
for _, v := range srvdata.TaskMgr.GetActivityType(common.TaskActivityTypeEveryDay) {
|
||||
this.WelfData.Task[v.GetId()] = &model.TaskData{}
|
||||
}
|
||||
for _, v := range srvdata.TaskMgr.GetActivityType(common.TaskActivityTypePermit) {
|
||||
this.WelfData.Task[v.GetId()] = &model.TaskData{}
|
||||
}
|
||||
}
|
||||
}
|
||||
//周卡数据更新
|
||||
|
@ -2243,10 +2259,36 @@ func (this *Player) OnDayTimer(login, continuous bool, t int) {
|
|||
this.GetWeekCardAwary(id)
|
||||
}
|
||||
}
|
||||
// 赛季通行证活动
|
||||
this.ResetPermit()
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeFirstLogin, &TaskData{SnId: this.SnId, Num: 1}) // 首次登录游戏
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeLogin, &TaskData{SnId: this.SnId, Num: 1}) // 登录游戏
|
||||
}
|
||||
|
||||
func (this *Player) ResetPermit() {
|
||||
permitStartTs := PlatformMgrSingleton.GetConfig(this.Platform).PermitStartTs
|
||||
if (this.PermitStartTs == 0 || this.PermitStartTs < permitStartTs) && permitStartTs > 0 {
|
||||
this.PermitStartTs = permitStartTs
|
||||
// 清理数据
|
||||
bag := BagMgrSingleton.GetBagInfo(this.SnId)
|
||||
if bag != nil {
|
||||
delete(bag.BagItem, common.ItemIDPermit)
|
||||
//todo 上线前删除
|
||||
bagInfo := BagMgrSingleton.GetBagInfo(this.SnId)
|
||||
if bagInfo != nil {
|
||||
bagInfo.BagItem[common.ItemIDPermit] = &Item{
|
||||
ItemId: common.ItemIDPermit,
|
||||
ItemNum: 845,
|
||||
ObtainTime: time.Now().Unix(),
|
||||
}
|
||||
}
|
||||
//todo 上线前删除
|
||||
}
|
||||
this.WelfData.PermitAward = make(map[int32]int64)
|
||||
this.WelfData.PermitExchange = make(map[int32][]int64)
|
||||
}
|
||||
}
|
||||
|
||||
//func (this *Player) OnTimeDayTotal(continuous bool, t int) {
|
||||
// for k, tgd := range this.TotalGameData {
|
||||
// for i := 0; i < t; i++ {
|
||||
|
@ -3873,6 +3915,9 @@ func (this *Player) GetPayGoodsInfo() {
|
|||
if info.PageId == ShopPageDiamondBank {
|
||||
WelfareMgrSington.DiamondBankTakeCoin(this)
|
||||
}
|
||||
if info.PageId == ShopPagePermit {
|
||||
this.Permit = info.CreateTs.Local()
|
||||
}
|
||||
switch info.Remark {
|
||||
case "BlindBox":
|
||||
if len(info.OtherParams) > 0 {
|
||||
|
@ -4630,3 +4675,16 @@ func (this *Player) AddItemRecExpireTime(itemId int32, num, add int64, gainWay i
|
|||
this.SendDiffData()
|
||||
}
|
||||
}
|
||||
|
||||
func (this *Player) GetIsPermit() bool {
|
||||
startTs := PlatformMgrSingleton.GetConfig(this.Platform).PermitStartTs
|
||||
if startTs == 0 {
|
||||
return false
|
||||
}
|
||||
endTs := PlatformMgrSingleton.GetConfig(this.Platform).PermitEndTs
|
||||
|
||||
if this.Permit.Unix() >= startTs && this.Permit.Unix() < endTs {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
|
@ -246,4 +246,11 @@ func init() {
|
|||
TaskSubjectSingleton.Attach(common.TaskTypeTurnplate, taskHandle)
|
||||
TaskSubjectSingleton.Attach(common.TaskTypeInviteRecharge, taskHandle)
|
||||
TaskSubjectSingleton.Attach(common.TaskTypeLoseCoin, taskHandle)
|
||||
TaskSubjectSingleton.Attach(common.TaskTypeOnlineTs, taskHandle)
|
||||
TaskSubjectSingleton.Attach(common.TaskTypeBuyPig, taskHandle)
|
||||
TaskSubjectSingleton.Attach(common.TaskTypeDaZhong, taskHandle)
|
||||
TaskSubjectSingleton.Attach(common.TaskTypeInvitePlay, taskHandle)
|
||||
TaskSubjectSingleton.Attach(common.TaskTypeJoinMatch, taskHandle)
|
||||
TaskSubjectSingleton.Attach(common.TaskTypeMatchRank10, taskHandle)
|
||||
TaskSubjectSingleton.Attach(common.TaskTypeCostDiamond, taskHandle)
|
||||
}
|
||||
|
|
|
@ -716,6 +716,12 @@ func (this *Tournament) Start(platform string, tmId int32) {
|
|||
// 开始比赛,清除报名数据
|
||||
for _, v := range signInfo.signup {
|
||||
delete(this.singleSignupPlayers, v.SnId)
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeJoinMatch, &TaskData{
|
||||
SnId: v.SnId,
|
||||
GameID: int(tm.dbGameFree.GetGameId()),
|
||||
GameFreeID: tm.dbGameFree.GetId(),
|
||||
Num: 1,
|
||||
})
|
||||
}
|
||||
this.signupPlayers[platform][tmId].signup = make(map[int32]*TmPlayer)
|
||||
}
|
||||
|
@ -1521,6 +1527,12 @@ func (this *Tournament) MakeMatchLog(platform string, tmId int32, sortId int64)
|
|||
Item: items,
|
||||
Rank: rankId,
|
||||
})
|
||||
if rankId >= 10 {
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeMatchRank10, &TaskData{
|
||||
SnId: v.p.SnId,
|
||||
Num: 1,
|
||||
})
|
||||
}
|
||||
}
|
||||
matchLog.MatchId = tmId
|
||||
matchLog.MatchName = gameMatchDate.MatchName
|
||||
|
|
|
@ -4124,6 +4124,9 @@ func init() {
|
|||
if info.PageId == ShopPageDiamondBank {
|
||||
WelfareMgrSington.DiamondBankTakeCoin(player)
|
||||
}
|
||||
if info.PageId == ShopPagePermit {
|
||||
player.Permit = info.CreateTs.Local()
|
||||
}
|
||||
switch info.Remark {
|
||||
case "BlindBox":
|
||||
if len(info.OtherParams) > 0 {
|
||||
|
|
|
@ -1765,6 +1765,10 @@ func (this *WelfareMgr) PigbankTakeCoin(p *Player) {
|
|||
if p.Diamond >= costDiamond {
|
||||
logger.Logger.Trace("开存钱罐消耗钻石", costDiamond)
|
||||
p.AddDiamond(-costDiamond, 0, common.GainWay_PigrankTakeCoin, "system", "-开存钱罐消耗钻石")
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeBuyPig, &TaskData{
|
||||
SnId: p.SnId,
|
||||
Num: 1,
|
||||
})
|
||||
} else {
|
||||
pack.OpRetCode = welfare.OpResultCode_OPRC_DiamondLess
|
||||
logger.Logger.Trace("钻石不足")
|
||||
|
@ -1884,6 +1888,10 @@ func (this *WelfareMgr) DiamondBankTakeCoin(p *Player) {
|
|||
pack.OpRetCode = welfare.OpResultCode_OPRC_Sucess
|
||||
addDiamond := int64(math.Ceil(p.WelfData.DiamondBank.BankDiamond))
|
||||
p.AddDiamond(addDiamond, 0, common.GainWay_PigrankGainDiamond, "sys", "存钱罐领取钻石")
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeBuyPig, &TaskData{
|
||||
SnId: p.SnId,
|
||||
Num: 1,
|
||||
})
|
||||
|
||||
// 领取完之后 设置为0
|
||||
p.WelfData.DiamondBank.BankDiamond = 0.0
|
||||
|
@ -1954,6 +1962,7 @@ func (this *WelfareMgr) UpdateDiamondBankData(p *Player, coinNum int64, isWin bo
|
|||
}
|
||||
logger.Logger.Tracef("玩家更新钻石存储罐数据 snid = %d,coinNum = %d,isWin = %s,当前钻石存储罐钻石数量:%f,本次增加钻石数量:%f", p.SnId, coinNum, isWin, p.WelfData.DiamondBank.BankDiamond, addDiamond)
|
||||
}
|
||||
|
||||
func (this *WelfareMgr) Update() {
|
||||
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue