Compare commits
52 Commits
2bd4411420
...
5e283880ab
| Author | SHA1 | Date |
|---|---|---|
|
|
5e283880ab | |
|
|
45cb4ac678 | |
|
|
4e55ce186d | |
|
|
d230bbd745 | |
|
|
894c28fa0e | |
|
|
aefb7c97cd | |
|
|
7feca84930 | |
|
|
ceb83a8eb4 | |
|
|
6827d11019 | |
|
|
72778de447 | |
|
|
be4fd38ca7 | |
|
|
c885055c71 | |
|
|
87bca00698 | |
|
|
fc14c2a467 | |
|
|
2bdc7f51ce | |
|
|
c0d37ed643 | |
|
|
bdb9faa471 | |
|
|
05581aa1e8 | |
|
|
e2ce12b74d | |
|
|
0b3c9e76bf | |
|
|
87a9a65643 | |
|
|
6db4ceec10 | |
|
|
f5d7e36611 | |
|
|
26ac8c302e | |
|
|
9a1bccf14c | |
|
|
438e868342 | |
|
|
fb56a50a3b | |
|
|
d67df0a3cd | |
|
|
2820f26132 | |
|
|
1e0572c537 | |
|
|
0f3508b2f8 | |
|
|
91eea97695 | |
|
|
1d52b88bdd | |
|
|
a92a04a81d | |
|
|
62f27c4723 | |
|
|
6dffae7546 | |
|
|
cf196814e0 | |
|
|
ac0daa39a4 | |
|
|
c8df34e266 | |
|
|
88e548bf6a | |
|
|
88f2bf7f7c | |
|
|
d494205ede | |
|
|
33b93131a0 | |
|
|
f6d0fa3b02 | |
|
|
a40b25d437 | |
|
|
ab6427c18c | |
|
|
97c826b5f8 | |
|
|
ff09361a1c | |
|
|
2beffda5b6 | |
|
|
8462343715 | |
|
|
ebc662d636 | |
|
|
756f52dd63 |
|
|
@ -0,0 +1,105 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"mongo.games.com/game/protocol/activity"
|
||||
"mongo.games.com/goserver/core/timer"
|
||||
"time"
|
||||
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/netlib"
|
||||
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/game/proto"
|
||||
loginproto "mongo.games.com/game/protocol/login"
|
||||
playerproto "mongo.games.com/game/protocol/player"
|
||||
)
|
||||
|
||||
func init() {
|
||||
// 心跳
|
||||
netlib.Register(int(loginproto.GatePacketID_PACKET_SC_PONG), loginproto.SCPong{}, SCPong)
|
||||
// 登录
|
||||
netlib.Register(int(loginproto.LoginPacketID_PACKET_SC_LOGIN), loginproto.SCLogin{}, SCLogin)
|
||||
// 玩家信息
|
||||
netlib.Register(int(playerproto.PlayerPacketID_PACKET_SC_PLAYERDATA), playerproto.SCPlayerData{}, SCPlayerData)
|
||||
|
||||
netlib.Register(int(activity.PushCoinPacketID_PACKET_SCPushCoinInfo), activity.SCPushCoinInfo{}, SCPrint)
|
||||
}
|
||||
|
||||
func SCPong(s *netlib.Session, packetid int, data interface{}) error {
|
||||
accountID := s.GetAttribute(SessionAttributeClientAccountId)
|
||||
logger.Logger.Tracef("SCPong username:%v %v", accountID, data)
|
||||
return nil
|
||||
}
|
||||
|
||||
func SCLogin(s *netlib.Session, packetid int, data interface{}) error {
|
||||
logger.Logger.Trace("SCLogin ", data)
|
||||
|
||||
msg, ok := data.(*loginproto.SCLogin)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
if msg.GetOpRetCode() != loginproto.OpResultCode_OPRC_Sucess {
|
||||
accountID := s.GetAttribute(SessionAttributeClientAccountId)
|
||||
logger.Logger.Error("登录失败 ", accountID)
|
||||
s.Close()
|
||||
return nil
|
||||
}
|
||||
|
||||
csPlayerData := &playerproto.CSPlayerData{
|
||||
AccId: msg.GetAccId(),
|
||||
}
|
||||
pp := &model.PlayerParams{
|
||||
Platform: 1,
|
||||
Ip: fmt.Sprintf("%v.%v.%v.%v", 1+rand.Int31n(255), 1+rand.Int31n(255), 1+rand.Int31n(255), 1+rand.Int31n(255)),
|
||||
City: "北京",
|
||||
Logininmodel: "app",
|
||||
}
|
||||
d, err := json.Marshal(pp)
|
||||
if err == nil {
|
||||
csPlayerData.Params = proto.String(string(d))
|
||||
}
|
||||
|
||||
s.Send(int(playerproto.PlayerPacketID_PACKET_CS_PLAYERDATA), csPlayerData)
|
||||
logger.Logger.Info("登录成功 ", msg.GetAccId())
|
||||
return nil
|
||||
}
|
||||
|
||||
func SCPlayerData(s *netlib.Session, packetid int, data interface{}) error {
|
||||
logger.Logger.Trace("SCPlayerData ", data)
|
||||
msg, ok := data.(*playerproto.SCPlayerData)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
if msg.GetOpRetCode() != playerproto.OpResultCode_OPRC_Sucess {
|
||||
accountID := s.GetAttribute(SessionAttributeClientAccountId)
|
||||
logger.Logger.Errorf("获取玩家信息失败 %v", accountID)
|
||||
s.Close()
|
||||
return nil
|
||||
}
|
||||
|
||||
s.SetAttribute(SessionAttributeUser, msg)
|
||||
|
||||
StartSessionPingTimer(s, timer.TimerActionWrapper(func(h timer.TimerHandle, ud interface{}) bool {
|
||||
if !s.IsConned() {
|
||||
StopSessionPingTimer(s)
|
||||
return false
|
||||
}
|
||||
pack := &loginproto.CSPing{}
|
||||
s.Send(int(loginproto.GatePacketID_PACKET_CS_PING), pack)
|
||||
return true
|
||||
}), nil, time.Second*time.Duration(60+rand.Int31n(100)), -1)
|
||||
|
||||
s.Send(int(activity.PushCoinPacketID_PACKET_CSPushCoinInfo), &activity.CSPushCoinInfo{})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func SCPrint(s *netlib.Session, packetid int, data interface{}) error {
|
||||
logger.Logger.Info("SCPrint ", data)
|
||||
return nil
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"mongo.games.com/goserver/core"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/netlib"
|
||||
)
|
||||
|
||||
var Config = &Configuration{}
|
||||
|
||||
type Configuration struct {
|
||||
Count int // 机器人总数
|
||||
AppId string // appID
|
||||
Connects netlib.SessionConfig // 网络连接配置
|
||||
}
|
||||
|
||||
func (this *Configuration) Name() string {
|
||||
return "benchmark"
|
||||
}
|
||||
|
||||
func (this *Configuration) Init() error {
|
||||
logger.Logger.Tracef("%+v", *this)
|
||||
if this.Count == 0 {
|
||||
this.Count = 20
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this *Configuration) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
core.RegistePackage(Config)
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
netlib:
|
||||
SrvInfo:
|
||||
Name: BenchmarkServer
|
||||
Type: 9
|
||||
Id: 902
|
||||
AreaID: 1
|
||||
Banner:
|
||||
- =================
|
||||
- benchmark server
|
||||
- =================
|
||||
IoServices: []
|
||||
module:
|
||||
Options:
|
||||
QueueBacklog: 1024
|
||||
MaxDone: 1024
|
||||
Interval: 100
|
||||
executor:
|
||||
Options:
|
||||
QueueBacklog: 1024
|
||||
MaxDone: 1024
|
||||
Interval: 0
|
||||
Worker:
|
||||
WorkerCnt: 8
|
||||
Options:
|
||||
QueueBacklog: 1024
|
||||
MaxDone: 1024
|
||||
Interval: 0
|
||||
timer:
|
||||
Options:
|
||||
QueueBacklog: 1024
|
||||
MaxDone: 1024
|
||||
Interval: 100
|
||||
signal:
|
||||
SupportSignal: true
|
||||
cmdline:
|
||||
SupportCmdline: true
|
||||
benchmark:
|
||||
Count: 1
|
||||
AppId: 5c56d1644966f078bfb90c71
|
||||
Connects:
|
||||
Id: 402
|
||||
Type: 4
|
||||
AreaId: 1
|
||||
Name: ClientService
|
||||
Ip: 127.0.0.1
|
||||
Port: 11001
|
||||
Protocol: tcp
|
||||
Path: /
|
||||
MaxDone: 200
|
||||
MaxPend: 200
|
||||
MaxPacket: 65535
|
||||
MaxConn: 2000
|
||||
RcvBuff: 4096
|
||||
SndBuff: 4096
|
||||
WriteTimeout: 3600
|
||||
ReadTimeout: 3600
|
||||
SoLinger: 10
|
||||
IsInnerLink: true
|
||||
NoDelay: true
|
||||
SupportFragment: true
|
||||
AuthKey: www.jxjy.games.cn
|
||||
IsClient: true
|
||||
AllowMultiConn: true
|
||||
FilterChain:
|
||||
- session-filter-auth
|
||||
HandlerChain:
|
||||
- handler-gate-session
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/module"
|
||||
"mongo.games.com/goserver/core/netlib"
|
||||
)
|
||||
|
||||
const (
|
||||
// RobotSessionStartId 机器人session开始id
|
||||
RobotSessionStartId = 100000000
|
||||
)
|
||||
|
||||
var (
|
||||
BenchMarkModule = &BenchMark{}
|
||||
WaitConnectSessions []*netlib.SessionConfig
|
||||
)
|
||||
|
||||
// NewSession 新建session
|
||||
// id 连接id, 默认自动分配
|
||||
func NewSession(id ...int) {
|
||||
cfg := Config.Connects
|
||||
if len(id) > 0 && id[0] > 0 {
|
||||
cfg.Id = id[0]
|
||||
} else {
|
||||
BenchMarkModule.idx++
|
||||
cfg.Id = BenchMarkModule.idx
|
||||
}
|
||||
cfg.Init()
|
||||
logger.Logger.Info("waite connect session id=", cfg.Id)
|
||||
WaitConnectSessions = append(WaitConnectSessions, &cfg)
|
||||
}
|
||||
|
||||
type BenchMark struct {
|
||||
idx int
|
||||
}
|
||||
|
||||
func (m *BenchMark) ModuleName() string {
|
||||
return "benchmark-module"
|
||||
}
|
||||
|
||||
func (m *BenchMark) Init() {
|
||||
m.idx = RobotSessionStartId
|
||||
for i := 0; i < Config.Count; i++ {
|
||||
NewSession()
|
||||
}
|
||||
}
|
||||
|
||||
// Update 机器开始连接游戏服务器
|
||||
func (m *BenchMark) Update() {
|
||||
n := len(WaitConnectSessions)
|
||||
if n > 0 {
|
||||
config := WaitConnectSessions[n-1]
|
||||
WaitConnectSessions = WaitConnectSessions[:n-1]
|
||||
if err := netlib.Connect(config); err != nil {
|
||||
logger.Logger.Error("netlib.Connect error", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (m *BenchMark) Shutdown() {
|
||||
module.UnregisteModule(m)
|
||||
}
|
||||
|
||||
func init() {
|
||||
module.RegisteModule(BenchMarkModule, time.Millisecond, 1)
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"mongo.games.com/goserver/core/netlib"
|
||||
"mongo.games.com/goserver/core/timer"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
SessionAttributeClientAccountId int = iota // 账号
|
||||
SessionAttributeUser
|
||||
SessionAttributePingTimer
|
||||
)
|
||||
|
||||
func StartSessionPingTimer(s *netlib.Session, act timer.TimerAction, ud interface{}, interval time.Duration, times int) bool {
|
||||
StopSessionPingTimer(s)
|
||||
if hTimer, ok := timer.StartTimer(act, ud, interval, times); ok {
|
||||
s.SetAttribute(SessionAttributePingTimer, hTimer)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func StopSessionPingTimer(s *netlib.Session) {
|
||||
if h, ok := s.GetAttribute(SessionAttributePingTimer).(timer.TimerHandle); ok {
|
||||
if h != timer.TimerHandle(0) {
|
||||
timer.StopTimer(h)
|
||||
s.RemoveAttribute(SessionAttributePingTimer)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"math/rand"
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/model"
|
||||
loginproto "mongo.games.com/game/protocol/login"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/netlib"
|
||||
"strconv"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
)
|
||||
|
||||
/*
|
||||
添加到客户端管理器,管理器负责登录
|
||||
当连接断开时,从管理器中移除,判断是否需要重连
|
||||
*/
|
||||
|
||||
const (
|
||||
GateSessionHandlerName = "handler-gate-session"
|
||||
)
|
||||
|
||||
type GateSessionHandler struct {
|
||||
netlib.BasicSessionHandler
|
||||
}
|
||||
|
||||
func (g *GateSessionHandler) GetName() string {
|
||||
return GateSessionHandlerName
|
||||
}
|
||||
|
||||
func (g *GateSessionHandler) GetInterestOps() uint {
|
||||
return 1<<netlib.InterestOps_Opened |
|
||||
1<<netlib.InterestOps_Closed
|
||||
}
|
||||
|
||||
func (g *GateSessionHandler) OnSessionOpened(s *netlib.Session) {
|
||||
// 登录账号
|
||||
StartLogin(s)
|
||||
return
|
||||
}
|
||||
|
||||
func (g *GateSessionHandler) OnSessionClosed(s *netlib.Session) {
|
||||
|
||||
}
|
||||
|
||||
func init() {
|
||||
netlib.RegisteSessionHandlerCreator(GateSessionHandlerName, func() netlib.SessionHandler {
|
||||
return &GateSessionHandler{}
|
||||
})
|
||||
}
|
||||
|
||||
var UserNameIndex int64
|
||||
|
||||
func StartLogin(s *netlib.Session) {
|
||||
ts := time.Now().UnixNano()
|
||||
username := fmt.Sprintf("benchmark-%v", atomic.AddInt64(&UserNameIndex, 1))
|
||||
s.SetAttribute(SessionAttributeClientAccountId, username)
|
||||
csLogin := &loginproto.CSLogin{
|
||||
Username: username,
|
||||
TimeStamp: ts,
|
||||
Platform: "1",
|
||||
Channel: "",
|
||||
PlatformTag: "test.win88.yy_android",
|
||||
}
|
||||
|
||||
params := &model.PlayerParams{
|
||||
Ip: fmt.Sprintf("%v.%v.%v.%v", 1+rand.Int31n(255), 1+rand.Int31n(255), 1+rand.Int31n(255), 1+rand.Int31n(255)),
|
||||
City: "北京",
|
||||
Platform: 1,
|
||||
Logininmodel: "app",
|
||||
}
|
||||
data, err := json.Marshal(params)
|
||||
if err == nil {
|
||||
csLogin.Params = string(data[:])
|
||||
}
|
||||
|
||||
h := md5.New()
|
||||
io.WriteString(h, fmt.Sprintf("%v%v", username, Config.AppId))
|
||||
pwd := hex.EncodeToString(h.Sum(nil))
|
||||
h.Reset()
|
||||
io.WriteString(h, fmt.Sprintf("%v%v%v", pwd, Config.AppId, ts))
|
||||
pwd = hex.EncodeToString(h.Sum(nil))
|
||||
csLogin.Password = pwd
|
||||
|
||||
csLogin.LoginType = 0
|
||||
csLogin.Sign = common.MakeMd5String(csLogin.GetUsername(), csLogin.GetPassword(),
|
||||
strconv.Itoa(int(csLogin.GetTimeStamp())), csLogin.GetParams(), Config.AppId)
|
||||
|
||||
s.Send(int(loginproto.LoginPacketID_PACKET_CS_LOGIN), csLogin)
|
||||
logger.Logger.Infof("账号 [%v] 开始登录", username)
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<seelog type="adaptive" mininterval="2000000" maxinterval="100000000" critmsgcount="500" minlevel="trace">
|
||||
<exceptions>
|
||||
<exception filepattern="test*" minlevel="error"/>
|
||||
</exceptions>
|
||||
<outputs formatid="all">
|
||||
<rollingfile formatid="all" type="size" filename="./all.log" maxsize="50000000" maxrolls="5" />
|
||||
<filter levels="info,trace,warn,error">
|
||||
<console formatid="fmtinfo"/>
|
||||
</filter>
|
||||
<filter levels="error,critical" formatid="fmterror">
|
||||
<console/>
|
||||
<file path="errors.log"/>
|
||||
</filter>
|
||||
</outputs>
|
||||
<formats>
|
||||
<format id="fmtinfo" format="[%Date][%Time] [%Level] %Msg%n"/>
|
||||
<format id="fmterror" format="[%Date][%Time] [%LEVEL] [%FuncShort @ %File.%Line] %Msg%n"/>
|
||||
<format id="all" format="[%Date][%Time] [%Level] [@ %File.%Line] %Msg%n"/>
|
||||
<format id="criticalemail" format="Critical error on our server!\n %Time %Date %RelFile %Func %Msg \nSent by Seelog"/>
|
||||
</formats>
|
||||
</seelog>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
_ "mongo.games.com/game"
|
||||
"mongo.games.com/goserver/core"
|
||||
"mongo.games.com/goserver/core/module"
|
||||
)
|
||||
|
||||
func main() {
|
||||
defer core.ClosePackages()
|
||||
core.LoadPackages("config.yaml")
|
||||
// core hook
|
||||
core.RegisteHook(core.HOOK_BEFORE_START, func() error {
|
||||
|
||||
return nil
|
||||
})
|
||||
core.RegisteHook(core.HOOK_AFTER_STOP, func() error {
|
||||
|
||||
return nil
|
||||
})
|
||||
// module模块
|
||||
waiter := module.Start()
|
||||
waiter.Wait("main()")
|
||||
}
|
||||
|
|
@ -99,6 +99,7 @@ const (
|
|||
GameId_AngerUncle = 606 // 愤怒大叔
|
||||
GameId_SmallRoket = 607 // 小火箭
|
||||
GameId_Clawdoll = 608 // 娃娃机
|
||||
GameId_PushCoin = 609 // 推币机
|
||||
__GameId_ThrGame_Min__ = 700 //################三方类################
|
||||
GameId_Thr_Dg = 701 //DG Game
|
||||
GameId_Thr_XHJ = 901 ///DG Game
|
||||
|
|
@ -118,6 +119,7 @@ const (
|
|||
GameDifFruits = "306" // 水果机
|
||||
GameDifRichblessed = "307" // 多彩多福
|
||||
GameDifClawdoll = "608" // 娃娃机
|
||||
GameDifPushCoin = "609" // 推币机
|
||||
)
|
||||
|
||||
// IsTienLenYuLe TienLen娱乐
|
||||
|
|
@ -343,6 +345,10 @@ const (
|
|||
GainWayNianGain_EveryDayTask = 132 //年兽活动每日任务
|
||||
GainWayNianGain_Task = 133 //年兽活动任务
|
||||
GainWayConsume = 134 //累消活动获得
|
||||
GainWayPushCoinExchangeCost = 135 // 推币机兑换消耗
|
||||
GainWatPushCoinExchangeGain = 136 // 推币机兑换获得
|
||||
GainWayPushCoinGain = 137 // 推币机掉落获得
|
||||
GainWayPushCoinCost = 138 // 推币机消耗
|
||||
)
|
||||
|
||||
// 后台选择 金币变化类型 的充值 类型id号起始
|
||||
|
|
@ -598,6 +604,12 @@ const (
|
|||
ItemIDRoomCard = 40002 // 房卡
|
||||
ItemIDLittleGuaranteed = 50014 //小爆竹
|
||||
ItemIDBigGuaranteed = 50015 //大爆竹
|
||||
ItemIDPlum = 50016 //梅花(推币机)
|
||||
ItemIDBigCoin = 50017 //大金币
|
||||
ItemIDCoin1 = 50018 //金币1
|
||||
ItemIDCoin2 = 50019 //金币2
|
||||
ItemIDCoin3 = 50020 //金币3
|
||||
ItemIDShake = 50021 //震动效果
|
||||
)
|
||||
|
||||
func ToItemId(id int32) int32 {
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ type RedPacketColumns struct {
|
|||
|
||||
var redPacketColumns = &RedPacketColumns{
|
||||
ID: "_id",
|
||||
Cid: "Cid", // 红包活动id
|
||||
Use: "Use", // 已发红包 红包奖励数量:已发个数
|
||||
Ts: "Ts", // 更新时间戳
|
||||
Cid: "cid", // 红包活动id
|
||||
Use: "use", // 已发红包 红包奖励数量:已发个数
|
||||
Ts: "ts", // 更新时间戳
|
||||
}
|
||||
|
||||
func NewRedPacket() *RedPacket {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,283 @@
|
|||
// --------------------------------------------------------------------------------------------
|
||||
// The following code is automatically generated by the mongo-dao-generator tool.
|
||||
// Please do not modify this code manually to avoid being overwritten in the next generation.
|
||||
// For more tool details, please click the link to view https://github.com/dobyte/mongo-dao-generator
|
||||
// --------------------------------------------------------------------------------------------
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
modelpkg "mongo.games.com/game/model"
|
||||
)
|
||||
|
||||
type RedPacketHistoryFilterFunc func(cols *RedPacketHistoryColumns) interface{}
|
||||
type RedPacketHistoryUpdateFunc func(cols *RedPacketHistoryColumns) interface{}
|
||||
type RedPacketHistoryPipelineFunc func(cols *RedPacketHistoryColumns) interface{}
|
||||
type RedPacketHistoryCountOptionsFunc func(cols *RedPacketHistoryColumns) *options.CountOptions
|
||||
type RedPacketHistoryAggregateOptionsFunc func(cols *RedPacketHistoryColumns) *options.AggregateOptions
|
||||
type RedPacketHistoryFindOneOptionsFunc func(cols *RedPacketHistoryColumns) *options.FindOneOptions
|
||||
type RedPacketHistoryFindManyOptionsFunc func(cols *RedPacketHistoryColumns) *options.FindOptions
|
||||
type RedPacketHistoryUpdateOptionsFunc func(cols *RedPacketHistoryColumns) *options.UpdateOptions
|
||||
type RedPacketHistoryDeleteOptionsFunc func(cols *RedPacketHistoryColumns) *options.DeleteOptions
|
||||
type RedPacketHistoryInsertOneOptionsFunc func(cols *RedPacketHistoryColumns) *options.InsertOneOptions
|
||||
type RedPacketHistoryInsertManyOptionsFunc func(cols *RedPacketHistoryColumns) *options.InsertManyOptions
|
||||
|
||||
type RedPacketHistory struct {
|
||||
Columns *RedPacketHistoryColumns
|
||||
Database *mongo.Database
|
||||
Collection *mongo.Collection
|
||||
}
|
||||
|
||||
type RedPacketHistoryColumns struct {
|
||||
Platform string // 平台
|
||||
ID string
|
||||
Cid string // 红包活动id
|
||||
Snid string // 玩家id
|
||||
Ts string // 时间戳
|
||||
ItemId string // 道具id
|
||||
ItemNum string // 道具数量
|
||||
}
|
||||
|
||||
var redPacketHistoryColumns = &RedPacketHistoryColumns{
|
||||
Platform: "-", // 平台
|
||||
ID: "_id",
|
||||
Cid: "cid", // 红包活动id
|
||||
Snid: "snid", // 玩家id
|
||||
Ts: "ts", // 时间戳
|
||||
ItemId: "itemid", // 道具id
|
||||
ItemNum: "itemnum",// 道具数量
|
||||
}
|
||||
|
||||
func NewRedPacketHistory() *RedPacketHistory {
|
||||
return &RedPacketHistory{
|
||||
Columns: redPacketHistoryColumns,
|
||||
}
|
||||
}
|
||||
|
||||
// Count returns the number of documents in the collection.
|
||||
func (dao *RedPacketHistory) Count(ctx context.Context, filterFunc RedPacketHistoryFilterFunc, optionsFunc ...RedPacketHistoryCountOptionsFunc) (int64, error) {
|
||||
var (
|
||||
opts *options.CountOptions
|
||||
filter = filterFunc(dao.Columns)
|
||||
)
|
||||
|
||||
if len(optionsFunc) > 0 {
|
||||
opts = optionsFunc[0](dao.Columns)
|
||||
}
|
||||
|
||||
return dao.Collection.CountDocuments(ctx, filter, opts)
|
||||
}
|
||||
|
||||
// Aggregate executes an aggregate command against the collection and returns a cursor over the resulting documents.
|
||||
func (dao *RedPacketHistory) Aggregate(ctx context.Context, pipelineFunc RedPacketHistoryPipelineFunc, optionsFunc ...RedPacketHistoryAggregateOptionsFunc) (*mongo.Cursor, error) {
|
||||
var (
|
||||
opts *options.AggregateOptions
|
||||
pipeline = pipelineFunc(dao.Columns)
|
||||
)
|
||||
|
||||
if len(optionsFunc) > 0 {
|
||||
opts = optionsFunc[0](dao.Columns)
|
||||
}
|
||||
|
||||
return dao.Collection.Aggregate(ctx, pipeline, opts)
|
||||
}
|
||||
|
||||
// InsertOne executes an insert command to insert a single document into the collection.
|
||||
func (dao *RedPacketHistory) InsertOne(ctx context.Context, model *modelpkg.RedPacketHistory, optionsFunc ...RedPacketHistoryInsertOneOptionsFunc) (*mongo.InsertOneResult, error) {
|
||||
if model == nil {
|
||||
return nil, errors.New("model is nil")
|
||||
}
|
||||
|
||||
if err := dao.autofill(ctx, model); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var opts *options.InsertOneOptions
|
||||
|
||||
if len(optionsFunc) > 0 {
|
||||
opts = optionsFunc[0](dao.Columns)
|
||||
}
|
||||
|
||||
return dao.Collection.InsertOne(ctx, model, opts)
|
||||
}
|
||||
|
||||
// InsertMany executes an insert command to insert multiple documents into the collection.
|
||||
func (dao *RedPacketHistory) InsertMany(ctx context.Context, models []*modelpkg.RedPacketHistory, optionsFunc ...RedPacketHistoryInsertManyOptionsFunc) (*mongo.InsertManyResult, error) {
|
||||
if len(models) == 0 {
|
||||
return nil, errors.New("models is empty")
|
||||
}
|
||||
|
||||
documents := make([]interface{}, 0, len(models))
|
||||
for i := range models {
|
||||
model := models[i]
|
||||
if err := dao.autofill(ctx, model); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
documents = append(documents, model)
|
||||
}
|
||||
|
||||
var opts *options.InsertManyOptions
|
||||
|
||||
if len(optionsFunc) > 0 {
|
||||
opts = optionsFunc[0](dao.Columns)
|
||||
}
|
||||
|
||||
return dao.Collection.InsertMany(ctx, documents, opts)
|
||||
}
|
||||
|
||||
// UpdateOne executes an update command to update at most one document in the collection.
|
||||
func (dao *RedPacketHistory) UpdateOne(ctx context.Context, filterFunc RedPacketHistoryFilterFunc, updateFunc RedPacketHistoryUpdateFunc, optionsFunc ...RedPacketHistoryUpdateOptionsFunc) (*mongo.UpdateResult, error) {
|
||||
var (
|
||||
opts *options.UpdateOptions
|
||||
filter = filterFunc(dao.Columns)
|
||||
update = updateFunc(dao.Columns)
|
||||
)
|
||||
|
||||
if len(optionsFunc) > 0 {
|
||||
opts = optionsFunc[0](dao.Columns)
|
||||
}
|
||||
|
||||
return dao.Collection.UpdateOne(ctx, filter, update, opts)
|
||||
}
|
||||
|
||||
// UpdateOneByID executes an update command to update at most one document in the collection.
|
||||
func (dao *RedPacketHistory) UpdateOneByID(ctx context.Context, id string, updateFunc RedPacketHistoryUpdateFunc, optionsFunc ...RedPacketHistoryUpdateOptionsFunc) (*mongo.UpdateResult, error) {
|
||||
objectID, err := primitive.ObjectIDFromHex(id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return dao.UpdateOne(ctx, func(cols *RedPacketHistoryColumns) interface{} {
|
||||
return bson.M{"_id": objectID}
|
||||
}, updateFunc, optionsFunc...)
|
||||
}
|
||||
|
||||
// UpdateMany executes an update command to update documents in the collection.
|
||||
func (dao *RedPacketHistory) UpdateMany(ctx context.Context, filterFunc RedPacketHistoryFilterFunc, updateFunc RedPacketHistoryUpdateFunc, optionsFunc ...RedPacketHistoryUpdateOptionsFunc) (*mongo.UpdateResult, error) {
|
||||
var (
|
||||
opts *options.UpdateOptions
|
||||
filter = filterFunc(dao.Columns)
|
||||
update = updateFunc(dao.Columns)
|
||||
)
|
||||
|
||||
if len(optionsFunc) > 0 {
|
||||
opts = optionsFunc[0](dao.Columns)
|
||||
}
|
||||
|
||||
return dao.Collection.UpdateMany(ctx, filter, update, opts)
|
||||
}
|
||||
|
||||
// FindOne executes a find command and returns a model for one document in the collection.
|
||||
func (dao *RedPacketHistory) FindOne(ctx context.Context, filterFunc RedPacketHistoryFilterFunc, optionsFunc ...RedPacketHistoryFindOneOptionsFunc) (*modelpkg.RedPacketHistory, error) {
|
||||
var (
|
||||
opts *options.FindOneOptions
|
||||
model = &modelpkg.RedPacketHistory{}
|
||||
filter = filterFunc(dao.Columns)
|
||||
)
|
||||
|
||||
if len(optionsFunc) > 0 {
|
||||
opts = optionsFunc[0](dao.Columns)
|
||||
}
|
||||
|
||||
err := dao.Collection.FindOne(ctx, filter, opts).Decode(model)
|
||||
if err != nil {
|
||||
if err == mongo.ErrNoDocuments {
|
||||
return nil, nil
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return model, nil
|
||||
}
|
||||
|
||||
// FindOneByID executes a find command and returns a model for one document in the collection.
|
||||
func (dao *RedPacketHistory) FindOneByID(ctx context.Context, id string, optionsFunc ...RedPacketHistoryFindOneOptionsFunc) (*modelpkg.RedPacketHistory, error) {
|
||||
objectID, err := primitive.ObjectIDFromHex(id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return dao.FindOne(ctx, func(cols *RedPacketHistoryColumns) interface{} {
|
||||
return bson.M{"_id": objectID}
|
||||
}, optionsFunc...)
|
||||
}
|
||||
|
||||
// FindMany executes a find command and returns many models the matching documents in the collection.
|
||||
func (dao *RedPacketHistory) FindMany(ctx context.Context, filterFunc RedPacketHistoryFilterFunc, optionsFunc ...RedPacketHistoryFindManyOptionsFunc) ([]*modelpkg.RedPacketHistory, error) {
|
||||
var (
|
||||
opts *options.FindOptions
|
||||
filter = filterFunc(dao.Columns)
|
||||
)
|
||||
|
||||
if len(optionsFunc) > 0 {
|
||||
opts = optionsFunc[0](dao.Columns)
|
||||
}
|
||||
|
||||
cur, err := dao.Collection.Find(ctx, filter, opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
models := make([]*modelpkg.RedPacketHistory, 0)
|
||||
|
||||
if err = cur.All(ctx, &models); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return models, nil
|
||||
}
|
||||
|
||||
// DeleteOne executes a delete command to delete at most one document from the collection.
|
||||
func (dao *RedPacketHistory) DeleteOne(ctx context.Context, filterFunc RedPacketHistoryFilterFunc, optionsFunc ...RedPacketHistoryDeleteOptionsFunc) (*mongo.DeleteResult, error) {
|
||||
var (
|
||||
opts *options.DeleteOptions
|
||||
filter = filterFunc(dao.Columns)
|
||||
)
|
||||
|
||||
if len(optionsFunc) > 0 {
|
||||
opts = optionsFunc[0](dao.Columns)
|
||||
}
|
||||
|
||||
return dao.Collection.DeleteOne(ctx, filter, opts)
|
||||
}
|
||||
|
||||
// DeleteOneByID executes a delete command to delete at most one document from the collection.
|
||||
func (dao *RedPacketHistory) DeleteOneByID(ctx context.Context, id string, optionsFunc ...RedPacketHistoryDeleteOptionsFunc) (*mongo.DeleteResult, error) {
|
||||
objectID, err := primitive.ObjectIDFromHex(id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return dao.DeleteOne(ctx, func(cols *RedPacketHistoryColumns) interface{} {
|
||||
return bson.M{"_id": objectID}
|
||||
}, optionsFunc...)
|
||||
}
|
||||
|
||||
// DeleteMany executes a delete command to delete documents from the collection.
|
||||
func (dao *RedPacketHistory) DeleteMany(ctx context.Context, filterFunc RedPacketHistoryFilterFunc, optionsFunc ...RedPacketHistoryDeleteOptionsFunc) (*mongo.DeleteResult, error) {
|
||||
var (
|
||||
opts *options.DeleteOptions
|
||||
filter = filterFunc(dao.Columns)
|
||||
)
|
||||
|
||||
if len(optionsFunc) > 0 {
|
||||
opts = optionsFunc[0](dao.Columns)
|
||||
}
|
||||
|
||||
return dao.Collection.DeleteMany(ctx, filter, opts)
|
||||
}
|
||||
|
||||
// autofill when inserting data
|
||||
func (dao *RedPacketHistory) autofill(ctx context.Context, model *modelpkg.RedPacketHistory) error {
|
||||
if model.ID.IsZero() {
|
||||
model.ID = primitive.NewObjectID()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
package dao
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/mongox"
|
||||
|
||||
"mongo.games.com/game/dao/internal"
|
||||
modelpkg "mongo.games.com/game/model"
|
||||
)
|
||||
|
||||
var (
|
||||
_ = context.Background()
|
||||
_ = logger.Logger
|
||||
_ = bson.M{}
|
||||
_ = mongo.Database{}
|
||||
)
|
||||
|
||||
type RedPacketHistoryColumns = internal.RedPacketHistoryColumns
|
||||
|
||||
type RedPacketHistory struct {
|
||||
*internal.RedPacketHistory
|
||||
}
|
||||
|
||||
func GetRedPacketHistory(key string) (*RedPacketHistory, error) {
|
||||
return mongox.GetDao(key, NewRedPacketHistory)
|
||||
}
|
||||
|
||||
func NewRedPacketHistory(db *mongo.Database, c *mongo.Collection) (*RedPacketHistory, any) {
|
||||
if db == nil || c == nil {
|
||||
return &RedPacketHistory{}, &modelpkg.RedPacketHistory{}
|
||||
}
|
||||
|
||||
v := internal.NewRedPacketHistory()
|
||||
v.Database = db
|
||||
v.Collection = c
|
||||
c.Indexes().CreateMany(context.Background(), []mongo.IndexModel{
|
||||
{
|
||||
Keys: bson.D{{"snid", 1}, {"cid", 1}, {"ts", -1}}, // 1 表示升序,-1 表示降序
|
||||
Options: options.Index().SetBackground(true).SetSparse(true), // 后台创建索引,稀疏索引
|
||||
},
|
||||
{
|
||||
Keys: bson.D{{"snid", 1}, {"ts", -1}},
|
||||
Options: options.Index().SetBackground(true).SetSparse(true),
|
||||
},
|
||||
{
|
||||
Keys: bson.D{{"cid", 1}}, // 1 表示升序,-1 表示降序
|
||||
Options: options.Index().SetBackground(true).SetSparse(true), // 后台创建索引,稀疏索引
|
||||
},
|
||||
{
|
||||
Keys: bson.D{{"ts", 1}}, // 1 表示升序,-1 表示降序
|
||||
Options: options.Index().SetBackground(true).SetSparse(true), // 后台创建索引,稀疏索引
|
||||
},
|
||||
{
|
||||
Keys: bson.D{{"itemid", -1}}, // 1 表示升序,-1 表示降序
|
||||
Options: options.Index().SetBackground(true).SetSparse(true), // 后台创建索引,稀疏索引
|
||||
},
|
||||
{
|
||||
Keys: bson.D{{"itemnum", -1}}, // 1 表示升序,-1 表示降序
|
||||
Options: options.Index().SetBackground(true).SetSparse(true), // 后台创建索引,稀疏索引
|
||||
},
|
||||
})
|
||||
|
||||
return &RedPacketHistory{RedPacketHistory: v}, &modelpkg.RedPacketHistory{}
|
||||
}
|
||||
|
||||
func (r *RedPacketHistory) GetHistory(snid int32, cid int64) ([]*modelpkg.RedPacketHistory, error) {
|
||||
res, err := r.FindMany(context.Background(), func(cols *internal.RedPacketHistoryColumns) interface{} {
|
||||
if cid > 0 {
|
||||
return bson.M{cols.Snid: snid, cols.Cid: cid}
|
||||
}
|
||||
return bson.M{cols.Snid: snid}
|
||||
}, func(cols *internal.RedPacketHistoryColumns) *options.FindOptions {
|
||||
return options.Find().SetSort(bson.D{{cols.Ts, -1}}).SetLimit(30)
|
||||
})
|
||||
if err != nil {
|
||||
logger.Logger.Error("RedPacketHistory.GetHistory ", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res, err
|
||||
}
|
||||
|
||||
func (r *RedPacketHistory) Save(history *modelpkg.RedPacketHistory) error {
|
||||
_, err := r.InsertOne(context.Background(), history)
|
||||
if err != nil {
|
||||
logger.Logger.Error("RedPacketHistory.Insert ", err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
в† ЁГ
|
||||
ив†
|
||||
Р†
|
||||
Вв† Ќ
|
||||
Ь±к ђN
|
||||
о±к Р†
|
||||
ъўЌ Ќ
|
||||
иб† Р†
|
||||
¶а† °к
|
||||
d»к ЂВЧ/
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
{
|
||||
"Arr": [
|
||||
{
|
||||
"Id": 1,
|
||||
"Rate": 4000,
|
||||
"Gain": {
|
||||
"50018": 5
|
||||
},
|
||||
"Value": 25000
|
||||
},
|
||||
{
|
||||
"Id": 2,
|
||||
"Rate": 1000,
|
||||
"Gain": {
|
||||
"50018": 10
|
||||
},
|
||||
"Value": 50000
|
||||
},
|
||||
{
|
||||
"Id": 3,
|
||||
"Rate": 450,
|
||||
"Gain": {
|
||||
"50018": 20
|
||||
},
|
||||
"Value": 100000
|
||||
},
|
||||
{
|
||||
"Id": 4,
|
||||
"Rate": 1500,
|
||||
"Gain": {
|
||||
"30001": 1
|
||||
},
|
||||
"Value": 10000
|
||||
},
|
||||
{
|
||||
"Id": 5,
|
||||
"Rate": 750,
|
||||
"Gain": {
|
||||
"30001": 5
|
||||
},
|
||||
"Value": 50000
|
||||
},
|
||||
{
|
||||
"Id": 6,
|
||||
"Rate": 250,
|
||||
"Gain": {
|
||||
"100002": 1
|
||||
},
|
||||
"Value": 100000
|
||||
},
|
||||
{
|
||||
"Id": 7,
|
||||
"Rate": 1000,
|
||||
"Gain": {
|
||||
"50017": 1
|
||||
},
|
||||
"Value": 50000
|
||||
},
|
||||
{
|
||||
"Id": 8,
|
||||
"Rate": 950,
|
||||
"Gain": {
|
||||
"50016": 1
|
||||
},
|
||||
"Value": 30000
|
||||
},
|
||||
{
|
||||
"Id": 9,
|
||||
"Rate": 100,
|
||||
"Gain": {
|
||||
"30011": 1
|
||||
},
|
||||
"Value": 100000000
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
|
|
@ -4520,7 +4520,7 @@
|
|||
{
|
||||
"Id": 2110001,
|
||||
"Name": "十三张四人",
|
||||
"Title": "1",
|
||||
"Title": "新手场",
|
||||
"GameId": 211,
|
||||
"GameRule": 21100,
|
||||
"GameType": 2,
|
||||
|
|
@ -4574,7 +4574,7 @@
|
|||
{
|
||||
"Id": 2110002,
|
||||
"Name": "十三张四人",
|
||||
"Title": "2",
|
||||
"Title": "中级场",
|
||||
"GameId": 211,
|
||||
"GameRule": 21100,
|
||||
"GameType": 2,
|
||||
|
|
@ -4628,7 +4628,7 @@
|
|||
{
|
||||
"Id": 2110003,
|
||||
"Name": "十三张四人",
|
||||
"Title": "3",
|
||||
"Title": "高级场",
|
||||
"GameId": 211,
|
||||
"GameRule": 21100,
|
||||
"GameType": 2,
|
||||
|
|
@ -4682,7 +4682,7 @@
|
|||
{
|
||||
"Id": 2110004,
|
||||
"Name": "十三张四人",
|
||||
"Title": "4",
|
||||
"Title": "富豪场",
|
||||
"GameId": 211,
|
||||
"GameRule": 21100,
|
||||
"GameType": 2,
|
||||
|
|
@ -4736,7 +4736,7 @@
|
|||
{
|
||||
"Id": 2110005,
|
||||
"Name": "十三张四人",
|
||||
"Title": "5",
|
||||
"Title": "至尊场",
|
||||
"GameId": 211,
|
||||
"GameRule": 21100,
|
||||
"GameType": 2,
|
||||
|
|
@ -4790,7 +4790,7 @@
|
|||
{
|
||||
"Id": 2110006,
|
||||
"Name": "十三张四人",
|
||||
"Title": "6",
|
||||
"Title": "大神场",
|
||||
"GameId": 211,
|
||||
"GameRule": 21100,
|
||||
"GameType": 2,
|
||||
|
|
@ -4843,7 +4843,7 @@
|
|||
{
|
||||
"Id": 2120001,
|
||||
"Name": "十三张八人",
|
||||
"Title": "1",
|
||||
"Title": "新手场",
|
||||
"GameId": 212,
|
||||
"GameRule": 21200,
|
||||
"GameType": 2,
|
||||
|
|
@ -4897,7 +4897,7 @@
|
|||
{
|
||||
"Id": 2120002,
|
||||
"Name": "十三张八人",
|
||||
"Title": "2",
|
||||
"Title": "中级场",
|
||||
"GameId": 212,
|
||||
"GameRule": 21200,
|
||||
"GameType": 2,
|
||||
|
|
@ -4951,7 +4951,7 @@
|
|||
{
|
||||
"Id": 2120003,
|
||||
"Name": "十三张八人",
|
||||
"Title": "3",
|
||||
"Title": "高级场",
|
||||
"GameId": 212,
|
||||
"GameRule": 21200,
|
||||
"GameType": 2,
|
||||
|
|
@ -5005,7 +5005,7 @@
|
|||
{
|
||||
"Id": 2120004,
|
||||
"Name": "十三张八人",
|
||||
"Title": "4",
|
||||
"Title": "富豪场",
|
||||
"GameId": 212,
|
||||
"GameRule": 21200,
|
||||
"GameType": 2,
|
||||
|
|
@ -5059,7 +5059,7 @@
|
|||
{
|
||||
"Id": 2120005,
|
||||
"Name": "十三张八人",
|
||||
"Title": "5",
|
||||
"Title": "至尊场",
|
||||
"GameId": 212,
|
||||
"GameRule": 21200,
|
||||
"GameType": 2,
|
||||
|
|
@ -5113,7 +5113,7 @@
|
|||
{
|
||||
"Id": 2120006,
|
||||
"Name": "十三张八人",
|
||||
"Title": "6",
|
||||
"Title": "大神场",
|
||||
"GameId": 212,
|
||||
"GameRule": 21200,
|
||||
"GameType": 2,
|
||||
|
|
@ -7019,6 +7019,41 @@
|
|||
"PlayerWaterRate": 100,
|
||||
"BetWaterRate": 100,
|
||||
"GameName": "娃娃机"
|
||||
},
|
||||
{
|
||||
"Id": 6090001,
|
||||
"Name": "推币机",
|
||||
"Title": "推币机",
|
||||
"GameId": 609,
|
||||
"GameRule": 60900,
|
||||
"GameType": 5,
|
||||
"SceneType": 1,
|
||||
"Desc": "0",
|
||||
"ShowType": 3,
|
||||
"ShowId": 60900,
|
||||
"Turn": 60900,
|
||||
"BetDec": "0",
|
||||
"Ai": [
|
||||
0
|
||||
],
|
||||
"OtherIntParams": [
|
||||
5000,
|
||||
10000,
|
||||
15000
|
||||
],
|
||||
"RobotNumRng": [
|
||||
0
|
||||
],
|
||||
"SameIpLimit": 1,
|
||||
"GameDif": "609",
|
||||
"GameClass": 2,
|
||||
"PlatformName": "越南棋牌",
|
||||
"MaxBetCoin": [
|
||||
0
|
||||
],
|
||||
"PlayerWaterRate": 100,
|
||||
"BetWaterRate": 100,
|
||||
"GameName": "推币机"
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
|
|
@ -7300,6 +7300,228 @@
|
|||
"CompositionMax": 9999,
|
||||
"Location": "0",
|
||||
"Describe": "可在年兽活动中击退年兽,获得奖品"
|
||||
},
|
||||
{
|
||||
"Id": 50016,
|
||||
"Name": "梅花",
|
||||
"ShowLocation": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Classify": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Type": 29,
|
||||
"Effect0": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Effect": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"SaleType": 1,
|
||||
"SaleGold": 5000,
|
||||
"Composition": 1,
|
||||
"CompositionMax": 9999,
|
||||
"Location": "0",
|
||||
"Describe": "可在推币机活动兑换道具"
|
||||
},
|
||||
{
|
||||
"Id": 50017,
|
||||
"Name": "大金币",
|
||||
"ShowLocation": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Classify": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Type": 29,
|
||||
"Effect0": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Effect": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"SaleType": 1,
|
||||
"SaleGold": 5000,
|
||||
"Composition": 1,
|
||||
"CompositionMax": 9999,
|
||||
"Location": "0",
|
||||
"Describe": "推币机活动中掉落的3D道具",
|
||||
"Num": 50000
|
||||
},
|
||||
{
|
||||
"Id": 50018,
|
||||
"Name": "3D金币5K",
|
||||
"ShowLocation": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Classify": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Type": 29,
|
||||
"Effect0": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Effect": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"SaleType": 1,
|
||||
"SaleGold": 5000,
|
||||
"Composition": 1,
|
||||
"CompositionMax": 9999,
|
||||
"Location": "0",
|
||||
"Describe": "推币机活动中掉落的3D道具",
|
||||
"Num": 5000
|
||||
},
|
||||
{
|
||||
"Id": 50019,
|
||||
"Name": "3D金币10K",
|
||||
"ShowLocation": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Classify": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Type": 29,
|
||||
"Effect0": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Effect": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"SaleType": 1,
|
||||
"SaleGold": 5000,
|
||||
"Composition": 1,
|
||||
"CompositionMax": 9999,
|
||||
"Location": "0",
|
||||
"Describe": "推币机活动中掉落的3D道具",
|
||||
"Num": 10000
|
||||
},
|
||||
{
|
||||
"Id": 50020,
|
||||
"Name": "3D金币15K",
|
||||
"ShowLocation": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Classify": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Type": 29,
|
||||
"Effect0": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Effect": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"SaleType": 1,
|
||||
"SaleGold": 5000,
|
||||
"Composition": 1,
|
||||
"CompositionMax": 9999,
|
||||
"Location": "0",
|
||||
"Describe": "推币机活动中掉落的3D道具",
|
||||
"Num": 15000
|
||||
},
|
||||
{
|
||||
"Id": 50021,
|
||||
"Name": "震动效果",
|
||||
"ShowLocation": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Classify": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Type": 29,
|
||||
"Effect0": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Effect": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Location": "0",
|
||||
"Describe": "推币机震动次数"
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
|
|
@ -267,6 +267,12 @@
|
|||
"Name": "娃娃机",
|
||||
"GameId": 608,
|
||||
"GameDif": "608"
|
||||
},
|
||||
{
|
||||
"Id": 60900,
|
||||
"Name": "推币机",
|
||||
"GameId": 609,
|
||||
"GameDif": "609"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -4,10 +4,10 @@ SignReward50014,10;100001,100000"签到奖励
|
|||
.
SignExcReward50015,1"签到额外奖励
|
||||
=SignExcRewardMax2"$签到额外奖励赠送次数上限
|
||||
9SignExcRewardProp30"签到额外奖励赠送概率
|
||||
BossExp6000000"
|
||||
BossExp6800000"
|
||||
BOSS血量
|
||||
9
|
||||
BossReward100001,100000;100002,10"BOSS击杀奖励
|
||||
:
|
||||
BossReward100001,1000000;100002,10"BOSS击杀奖励
|
||||
/
LuckyRankNeed10000"幸运榜上榜条件
|
||||
/RankNeed7000000"总伤害榜上榜条件
|
||||
> LittleHurtGold
|
||||
|
|
@ -26,4 +26,4 @@ GiftShopID991001,991002,991003"礼包ID
|
|||
@
GiftShopLimit3,0,0"&礼包每日限购次数,0为不限购
|
||||
4BossExcLimit30"年兽死亡额外掉落要求
|
||||
" BuffCount1"Buff生效次数
|
||||
oExchangeDiamond30,5,1000000"L单次兑换爆竹所需要消耗的钻石,获得数量,获得金币数量
|
||||
oExchangeDiamond30,5,1500000"L单次兑换爆竹所需要消耗的钻石,获得数量,获得金币数量
|
||||
|
|
@ -27,13 +27,13 @@
|
|||
{
|
||||
"Id": 5,
|
||||
"PorpName": "BossExp",
|
||||
"PropValue": "6000000",
|
||||
"PropValue": "6800000",
|
||||
"PropDec": "BOSS血量"
|
||||
},
|
||||
{
|
||||
"Id": 6,
|
||||
"PorpName": "BossReward",
|
||||
"PropValue": "100001,100000;100002,10",
|
||||
"PropValue": "100001,1000000;100002,10",
|
||||
"PropDec": "BOSS击杀奖励"
|
||||
},
|
||||
{
|
||||
|
|
@ -123,7 +123,7 @@
|
|||
{
|
||||
"Id": 21,
|
||||
"PorpName": "ExchangeDiamond",
|
||||
"PropValue": "30,5,1000000",
|
||||
"PropValue": "30,5,1500000",
|
||||
"PropDec": "单次兑换爆竹所需要消耗的钻石,获得数量,获得金币数量"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,84 @@
|
|||
|
||||
"¹ê"¡<>"¢<>d
|
||||
"¡<>"¢<>d"¸ê
|
||||
"¡<>"¢<>d"¸ê
|
||||
"¡<>"¢<>d
|
||||
"¡<>"¢<>c
|
||||
"¡<>"¢<>b
|
||||
"¡<>"¢<>a
|
||||
"¡<>"¢<>`
|
||||
"¡<>"¢<>_
|
||||
|
||||
|
||||
"¡<>"¢<>^
|
||||
"¡<>"¢<>]
|
||||
"¢<>\"¡<>
|
||||
"¡<>"¢<>[
|
||||
"¢<>Z"¡<>
|
||||
"¡<>"¢<>Y
|
||||
"¡<>"¢<>X
|
||||
"¡<>"¢<>W
|
||||
"¡<>"¢<>V
|
||||
"¡<>"¢<>U
|
||||
"¡<>"¢<>T
|
||||
"¡<>"¢<>S
|
||||
"¡<>"¢<>R
|
||||
"¡<>"¢<>Q
|
||||
"¡<>"¢<>P
|
||||
"¡<>"¢<>O
|
||||
"¡<>"¢<>N
|
||||
"¢<>M"¡<>
|
||||
"¢<>L"¡<>
|
||||
"¡<>"¢<>K
|
||||
"¡<>"¢<>J
|
||||
"¡<>"¢<>I
|
||||
"¢<>H"¡<>
|
||||
!!"¡<>"¢<>G
|
||||
"""¡<>"¢<>F
|
||||
##"¡<>"¢<>E
|
||||
$$"¡<>"¢<>D
|
||||
%%"¡<>"¢<>C
|
||||
&&"¡<>"¢<>B
|
||||
''"¡<>"¢<>A
|
||||
(("¡<>"¢<>@
|
||||
)"¡<>"¢<>d"¹ê
|
||||
*"¡<>"¢<>d"¸ê
|
||||
+"¡<>"¢<>d"¸ê
|
||||
,"¡<>"¢<>d
|
||||
-"¡<>"¢<>c
|
||||
."¡<>"¢<>b
|
||||
/"¢<>a"¡<>
|
||||
0"¡<>"¢<>`
|
||||
1 "¢<>_"¡<>
|
||||
2
|
||||
"¡<>"¢<>^
|
||||
3"¡<>"¢<>]
|
||||
4"¡<>"¢<>\
|
||||
5
"¡<>"¢<>[
|
||||
6"¢<>Z"¡<>
|
||||
7"¡<>"¢<>Y
|
||||
8"¢<>X"¡<>
|
||||
9"¡<>"¢<>W
|
||||
:"¡<>"¢<>V
|
||||
;"¡<>"¢<>U
|
||||
<"¡<>"¢<>T
|
||||
="¡<>"¢<>S
|
||||
>"¡<>"¢<>R
|
||||
?"¢<>Q"¡<>
|
||||
@"¡<>"¢<>P
|
||||
A"¡<>"¢<>O
|
||||
B"¡<>"¢<>N
|
||||
C"¡<>"¢<>M
|
||||
D"¡<>"¢<>L
|
||||
E"¡<>"¢<>K
|
||||
F"¡<>"¢<>J
|
||||
G"¡<>"¢<>I
|
||||
H "¡<>"¢<>H
|
||||
I!"¢<>G"¡<>
|
||||
J""¡<>"¢<>F
|
||||
K#"¡<>"¢<>E
|
||||
L$"¡<>"¢<>D
|
||||
M%"¡<>"¢<>C
|
||||
N&"¡<>"¢<>B
|
||||
O'"¡<>"¢<>A
|
||||
P("¡<>"¢<>@
|
||||
Binary file not shown.
|
|
@ -64,12 +64,70 @@
|
|||
"100002": 500
|
||||
}
|
||||
},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{
|
||||
"Id": 5,
|
||||
"Group": 2,
|
||||
"Cost": {
|
||||
"50016": 30
|
||||
},
|
||||
"Gain": {
|
||||
"40002": 1
|
||||
},
|
||||
"Times": 5
|
||||
},
|
||||
{
|
||||
"Id": 6,
|
||||
"Group": 2,
|
||||
"Cost": {
|
||||
"50016": 10
|
||||
},
|
||||
"Gain": {
|
||||
"100002": 3
|
||||
},
|
||||
"Times": 10
|
||||
},
|
||||
{
|
||||
"Id": 7,
|
||||
"Group": 2,
|
||||
"Cost": {
|
||||
"50016": 5
|
||||
},
|
||||
"Gain": {
|
||||
"30001": 15
|
||||
},
|
||||
"Times": 15
|
||||
},
|
||||
{
|
||||
"Id": 8,
|
||||
"Group": 2,
|
||||
"Cost": {
|
||||
"50016": 1
|
||||
},
|
||||
"Gain": {
|
||||
"20003": 1
|
||||
},
|
||||
"Times": 20
|
||||
},
|
||||
{
|
||||
"Id": 9,
|
||||
"Group": 2,
|
||||
"Cost": {
|
||||
"50016": 1
|
||||
},
|
||||
"Gain": {
|
||||
"100001": 30000
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": 10,
|
||||
"Group": 2,
|
||||
"Cost": {
|
||||
"50016": 1
|
||||
},
|
||||
"Gain": {
|
||||
"50021": 1
|
||||
}
|
||||
},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
|
|
|
|||
BIN
data/DB_Task.dat
BIN
data/DB_Task.dat
Binary file not shown.
|
|
@ -1245,7 +1245,8 @@
|
|||
"TargetTimes": 1,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50014": 10
|
||||
"50001": 5,
|
||||
"50014": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1258,6 +1259,7 @@
|
|||
"TargetTimes": 3600,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 100000,
|
||||
"50014": 10
|
||||
}
|
||||
},
|
||||
|
|
@ -1271,7 +1273,8 @@
|
|||
"TargetTimes": 1,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50014": 10
|
||||
"50001": 5,
|
||||
"50014": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1284,7 +1287,8 @@
|
|||
"TargetTimes": 1,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50014": 10
|
||||
"100002": 5,
|
||||
"50014": 5
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
|
@ -1298,7 +1302,8 @@
|
|||
"TargetTimes": 10,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50014": 10
|
||||
"100001": 30000,
|
||||
"50014": 5
|
||||
},
|
||||
"GameType": 2
|
||||
},
|
||||
|
|
@ -1312,7 +1317,7 @@
|
|||
"TargetTimes": 1000000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50014": 10
|
||||
"50014": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1325,7 +1330,7 @@
|
|||
"TargetTimes": 100,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50014": 10
|
||||
"50014": 20
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1351,7 +1356,7 @@
|
|||
"TargetTimes": 10000000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50014": 10
|
||||
"50014": 15
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1364,7 +1369,7 @@
|
|||
"TargetTimes": 20000000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50014": 10
|
||||
"50014": 20
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1390,7 +1395,7 @@
|
|||
"TargetTimes": 500,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50014": 10
|
||||
"50015": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1403,7 +1408,7 @@
|
|||
"TargetTimes": 199,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50015": 10
|
||||
"50015": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1416,7 +1421,7 @@
|
|||
"TargetTimes": 1,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50015": 10
|
||||
"50014": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1429,7 +1434,7 @@
|
|||
"TargetTimes": 1000000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50015": 10
|
||||
"100001": 500000
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1442,7 +1447,7 @@
|
|||
"TargetTimes": 10000000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50015": 10
|
||||
"100002": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1455,7 +1460,8 @@
|
|||
"TargetTimes": 999,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50015": 10
|
||||
"100001": 1000000,
|
||||
"50015": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1468,6 +1474,7 @@
|
|||
"TargetTimes": 1999,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 10000000,
|
||||
"50015": 10
|
||||
}
|
||||
},
|
||||
|
|
@ -1481,7 +1488,8 @@
|
|||
"TargetTimes": 5999,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50014": 10
|
||||
"100001": 30000000,
|
||||
"50015": 20
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1494,7 +1502,8 @@
|
|||
"TargetTimes": 9999,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50014": 10
|
||||
"100001": 50000000,
|
||||
"50015": 45
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1507,72 +1516,72 @@
|
|||
"TargetTimes": 1,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50014": 10
|
||||
"50015": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": 13022,
|
||||
"Order": 22,
|
||||
"Name": "年兽活动",
|
||||
"Des": "成功击杀2只年兽",
|
||||
"ActivityType": 9,
|
||||
"TaskType": 33,
|
||||
"TargetTimes": 2,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50014": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": 13023,
|
||||
"Order": 23,
|
||||
"Name": "年兽活动",
|
||||
"Des": "成功击杀3只年兽",
|
||||
"ActivityType": 9,
|
||||
"TaskType": 33,
|
||||
"TargetTimes": 3,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50014": 10
|
||||
"50015": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": 13023,
|
||||
"Order": 23,
|
||||
"Name": "年兽活动",
|
||||
"Des": "成功击杀6只年兽",
|
||||
"ActivityType": 9,
|
||||
"TaskType": 33,
|
||||
"TargetTimes": 6,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50015": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": 13024,
|
||||
"Order": 24,
|
||||
"Name": "年兽活动",
|
||||
"Des": "成功击杀5只年兽",
|
||||
"Des": "成功击杀9只年兽",
|
||||
"ActivityType": 9,
|
||||
"TaskType": 33,
|
||||
"TargetTimes": 5,
|
||||
"TargetTimes": 9,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50014": 10
|
||||
"50015": 15
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": 13025,
|
||||
"Order": 25,
|
||||
"Name": "年兽活动",
|
||||
"Des": "成功击杀8只年兽",
|
||||
"Des": "成功击杀12只年兽",
|
||||
"ActivityType": 9,
|
||||
"TaskType": 33,
|
||||
"TargetTimes": 8,
|
||||
"TargetTimes": 12,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50014": 10
|
||||
"50015": 20
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": 13026,
|
||||
"Order": 26,
|
||||
"Name": "年兽活动",
|
||||
"Des": "成功击杀10只年兽",
|
||||
"Des": "成功击杀20只年兽",
|
||||
"ActivityType": 9,
|
||||
"TaskType": 33,
|
||||
"TargetTimes": 10,
|
||||
"TargetTimes": 20,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"50014": 10
|
||||
"50015": 45
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1586,7 +1595,7 @@
|
|||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 100000,
|
||||
"100002": 1
|
||||
"50014": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1600,7 +1609,7 @@
|
|||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 200000,
|
||||
"100002": 2
|
||||
"50015": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1614,7 +1623,7 @@
|
|||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 300000,
|
||||
"100002": 3
|
||||
"50015": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1628,7 +1637,7 @@
|
|||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 500000,
|
||||
"100002": 5
|
||||
"50015": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1642,7 +1651,7 @@
|
|||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 1000000,
|
||||
"100002": 10
|
||||
"50015": 15
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -1656,7 +1665,7 @@
|
|||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 2000000,
|
||||
"100002": 20
|
||||
"50015": 25
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"GameName":"推币机",
|
||||
"GameId":609,
|
||||
"GameMode":[0],
|
||||
"SceneType":[1],
|
||||
"CanForceStart":true,
|
||||
"MinPlayerCnt":1,
|
||||
"DefaultPlayerCnt":1
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ package mq
|
|||
import (
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
|
||||
"mongo.games.com/game/dao"
|
||||
"mongo.games.com/game/dbproxy/svc"
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/game/mq"
|
||||
|
|
@ -27,4 +28,28 @@ func init() {
|
|||
return
|
||||
},
|
||||
})
|
||||
|
||||
mq.RegisterHandler(&mq.RegisterHandlerParam{
|
||||
Name: mq.DBRedPacket,
|
||||
Data: &model.RedPacketHistory{},
|
||||
Handler: func(data interface{}) (err error) {
|
||||
log, ok := data.(*model.RedPacketHistory)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
d, err := dao.GetRedPacketHistory(log.Platform)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("get RedPacketHistory failed: %v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
err = d.Save(log)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("Save RedPacketHistory failed: %v", err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,9 @@ func (svc *FriendUnreadSvc) UpsertFriendUnread(args *model.FriendUnreadByKey, re
|
|||
if cc == nil {
|
||||
return FriendUnreadColError
|
||||
}
|
||||
if ret == nil {
|
||||
ret = &model.FriendUnreadRet{}
|
||||
}
|
||||
err := cc.Find(bson.M{"snid": args.SnId}).One(&ret.FU)
|
||||
if err != nil && err != mgo.ErrNotFound {
|
||||
logger.Logger.Error("UpsertFriendUnread Find is err: ", err)
|
||||
|
|
@ -76,6 +79,9 @@ func (svc *FriendUnreadSvc) UpdateFriendUnread(args *model.FriendUnreadByKey, re
|
|||
if cc == nil {
|
||||
return FriendUnreadColError
|
||||
}
|
||||
if ret == nil {
|
||||
ret = &model.FriendUnreadRet{}
|
||||
}
|
||||
err := cc.Find(bson.M{"snid": args.SnId}).One(&ret.FU)
|
||||
if err != nil && err != mgo.ErrNotFound {
|
||||
logger.Logger.Error("UpdateFriendUnread Find is err: ", err)
|
||||
|
|
@ -98,6 +104,9 @@ func (svc *FriendUnreadSvc) QueryFriendUnreadByKey(args *model.FriendUnreadByKey
|
|||
if fc == nil {
|
||||
return FriendUnreadColError
|
||||
}
|
||||
if ret == nil {
|
||||
ret = &model.FriendUnreadRet{}
|
||||
}
|
||||
err := fc.Find(bson.M{"snid": args.SnId}).One(&ret.FU)
|
||||
if err != nil && err != mgo.ErrNotFound {
|
||||
logger.Logger.Error("QueryFriendUnreadByKey is err: ", err)
|
||||
|
|
|
|||
|
|
@ -52,3 +52,20 @@ func (r *RedPacketService) UpdateAll(req *model.UpdateRedPacketAllReq, res *bool
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *RedPacketService) GetHistory(req *model.GetRedPacketHistoryReq, res *[]*model.RedPacketHistory) error {
|
||||
d, err := dao.GetRedPacketHistory(req.Plt)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
list, err := d.GetHistory(req.Snid, req.Cid)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("RedPacketService.GetHistory error: %v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
*res = list
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,10 @@ func (svc *FriendSvc) QueryFriendByKey(args *model.FriendByKey, ret *model.Frien
|
|||
if fc == nil {
|
||||
return FriendColError
|
||||
}
|
||||
if ret == nil {
|
||||
ret = &model.FriendRet{}
|
||||
ret.Fri = &model.Friend{}
|
||||
}
|
||||
err := fc.Find(bson.M{"platform": args.Platform, "snid": args.SnId}).One(&ret.Fri)
|
||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
||||
logger.Logger.Error("QueryFriendByKey is err: ", err)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
newMongo "go.mongodb.org/mongo-driver/mongo"
|
||||
|
|
@ -68,6 +69,7 @@ func PlayerDelBackupDataCollection(plt string) *mongo.Collection {
|
|||
}
|
||||
|
||||
type PlayerDataSvc struct {
|
||||
mu sync.Mutex // 互斥锁
|
||||
}
|
||||
|
||||
func (svc *PlayerDataSvc) InsertPlayerData(args *model.InsertPlayerDataParam, ret *model.PlayerDataRet) (err error) {
|
||||
|
|
@ -323,6 +325,8 @@ func SavePlayerData(pd *model.PlayerData) (err error) {
|
|||
* 保存玩家的全部信息
|
||||
*/
|
||||
func (svc *PlayerDataSvc) SavePlayerData(pd *model.PlayerData, ret *bool) (err error) {
|
||||
svc.mu.Lock()
|
||||
defer svc.mu.Unlock()
|
||||
err = SavePlayerData(pd)
|
||||
*ret = err == nil
|
||||
return
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ const (
|
|||
ETCDKEY_ACT_Invite = "/game/act_invite" // 邀请活动配置
|
||||
ETCDKEY_ACT_Permit = "/game/act_permit" // 赛季通行证配置
|
||||
ETCDKEY_DIAMOND_LOTTERY = "/game/diamond_lottery" // 钻石抽奖配置
|
||||
ETCDKEY_Item = "/game/item" // 道具列表
|
||||
ETCDKEY_Item = "/game/item/" // 道具列表
|
||||
ETCDKEY_SKin = "/game/skin_config" // 皮肤配置
|
||||
ETCDKEY_RANK_TYPE = "/game/RankType" // 排行榜奖励配置
|
||||
ETCDKEY_AWARD_CONFIG = "/game/awardlog_config" //获奖记录
|
||||
|
|
@ -53,6 +53,7 @@ const (
|
|||
ETCDKEY_PigBankProp = "/game/pigbank_prop" //存钱罐属性
|
||||
ETCDKEY_NianConfig = "/game/activity_nian" //年兽活动配置
|
||||
ETCDKEY_NianRankConfig = "/game/activity_nian_rank" //年兽排行榜配置
|
||||
KeyRedPacket = "/game/act_redpacket" //红包配置
|
||||
KeyActConsume = "/game/act_consume" //累计消耗活动配置
|
||||
KeyRedPacket = "/game/act_redpacket" //红包配置
|
||||
KeyActConsume = "/game/act_consume" //累计消耗活动配置
|
||||
KeyActPushCoin = "/game/act_pushcoin" //推金币活动配置
|
||||
)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
package pushcoin
|
||||
|
||||
const (
|
||||
GameStatePlay = iota
|
||||
GameStateMax
|
||||
)
|
||||
|
||||
const (
|
||||
PowerMax = 700000
|
||||
PowerInit = 400000
|
||||
)
|
||||
|
|
@ -62,6 +62,14 @@ func (nsa *NpcServerAgent) SyncDBGameFree(roomId int, DBGameFree *server.DB_Game
|
|||
}
|
||||
}
|
||||
|
||||
func (nsa *NpcServerAgent) DestroyScene(sceneId int) {
|
||||
pack := &server.GRDestroyScene{
|
||||
SceneId: proto.Int(sceneId),
|
||||
}
|
||||
nsa.sendPacket(int(server.SSPacketID_PACKET_GR_DESTROYSCENE), pack)
|
||||
|
||||
}
|
||||
|
||||
// Invite 邀请机器人
|
||||
func (nsa *NpcServerAgent) Invite(roomId, cnt int, gameFreeId int32) bool {
|
||||
//logger.Logger.Trace("(nsa *NpcServerAgent) Invite", roomId, cnt, isAgent, gameFreeId)
|
||||
|
|
|
|||
|
|
@ -908,6 +908,9 @@ func (this *Scene) Destroy(force bool) {
|
|||
}
|
||||
proto.SetDefaults(pack)
|
||||
this.SendToWorld(int(server.SSPacketID_PACKET_GW_DESTROYSCENE), pack)
|
||||
|
||||
NpcServerAgentSingleton.DestroyScene(int(this.SceneId))
|
||||
|
||||
logger.Logger.Trace("(this *Scene) Destroy(force bool) isCompleted", isCompleted)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,13 +46,6 @@ type ScenePolicy interface {
|
|||
CanAddCoin(s *Scene, p *Player, val int64) bool
|
||||
//当前状态能否换桌
|
||||
CanChangeCoinScene(s *Scene, p *Player) bool
|
||||
//创建场景扩展数据
|
||||
CreateSceneExData(s *Scene) interface{}
|
||||
//创建玩家扩展数据
|
||||
CreatePlayerExData(s *Scene, p *Player) interface{}
|
||||
//
|
||||
PacketGameData(s *Scene) interface{}
|
||||
InterventionGame(s *Scene, data interface{}) interface{}
|
||||
//通知分场状态
|
||||
NotifyGameState(s *Scene)
|
||||
|
||||
|
|
@ -237,18 +230,14 @@ func (bsp *BaseScenePolicy) OnAudienceDropLine(s *Scene, p *Player) {
|
|||
}
|
||||
}
|
||||
}
|
||||
func (bsp *BaseScenePolicy) GetSceneState(s *Scene, stateid int) SceneState { return G_BaseSceneState }
|
||||
func (bsp *BaseScenePolicy) IsCompleted(s *Scene) bool { return false }
|
||||
func (bsp *BaseScenePolicy) IsCanForceStart(s *Scene) bool { return false }
|
||||
func (bsp *BaseScenePolicy) ForceStart(s *Scene) {}
|
||||
func (bsp *BaseScenePolicy) CanAddCoin(s *Scene, p *Player, val int64) bool { return true } /*百人牛牛,百人金华多倍结算,且当前是减币的情况下,需要判断*/
|
||||
func (bsp *BaseScenePolicy) CanChangeCoinScene(s *Scene, p *Player) bool { return false }
|
||||
func (bsp *BaseScenePolicy) CreateSceneExData(s *Scene) interface{} { return false }
|
||||
func (bsp *BaseScenePolicy) CreatePlayerExData(s *Scene, p *Player) interface{} { return false }
|
||||
func (bsp *BaseScenePolicy) PacketGameData(s *Scene) interface{} { return nil }
|
||||
func (bsp *BaseScenePolicy) InterventionGame(s *Scene, data interface{}) interface{} { return nil }
|
||||
func (bsp *BaseScenePolicy) NotifyGameState(s *Scene) {}
|
||||
func (bsp *BaseScenePolicy) GetJackPotVal(s *Scene) int64 { return 0 }
|
||||
func (bsp *BaseScenePolicy) GetSceneState(s *Scene, stateid int) SceneState { return G_BaseSceneState }
|
||||
func (bsp *BaseScenePolicy) IsCompleted(s *Scene) bool { return false }
|
||||
func (bsp *BaseScenePolicy) IsCanForceStart(s *Scene) bool { return false }
|
||||
func (bsp *BaseScenePolicy) ForceStart(s *Scene) {}
|
||||
func (bsp *BaseScenePolicy) CanAddCoin(s *Scene, p *Player, val int64) bool { return true } /*百人牛牛,百人金华多倍结算,且当前是减币的情况下,需要判断*/
|
||||
func (bsp *BaseScenePolicy) CanChangeCoinScene(s *Scene, p *Player) bool { return false }
|
||||
func (bsp *BaseScenePolicy) NotifyGameState(s *Scene) {}
|
||||
func (bsp *BaseScenePolicy) GetJackPotVal(s *Scene) int64 { return 0 }
|
||||
|
||||
var G_BaseSceneState = &BaseSceneState{}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
package thirteen
|
||||
|
||||
import (
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/gamesrv/base"
|
||||
"mongo.games.com/game/protocol/pushcoin"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/netlib"
|
||||
)
|
||||
|
||||
func init() {
|
||||
common.Register(int(pushcoin.PushCoinPacketID_PACKET_CSPushCoinPlayerOp), &pushcoin.CSPushCoinPlayerOp{}, CSPushCoinPlayerOp)
|
||||
}
|
||||
|
||||
func CSPushCoinPlayerOp(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||
logger.Logger.Trace("CSPlayerOpHandler Process recv ", data)
|
||||
if msg, ok := data.(*pushcoin.CSPushCoinPlayerOp); ok {
|
||||
p := base.PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
logger.Logger.Warn("CSPlayerOpHandler p == nil")
|
||||
return nil
|
||||
}
|
||||
scene := p.GetScene()
|
||||
if scene == nil {
|
||||
logger.Logger.Warn("CSPlayerOpHandler p.scene == nil")
|
||||
return nil
|
||||
}
|
||||
if scene.KeyGameDif != common.GameDifPushCoin {
|
||||
logger.Logger.Error("CSPlayerOpHandler gameId Error ", scene.GameId)
|
||||
return nil
|
||||
}
|
||||
if !scene.HasPlayer(p) {
|
||||
return nil
|
||||
}
|
||||
sp := scene.GetScenePolicy()
|
||||
if sp != nil {
|
||||
sp.OnPlayerOp(scene, p, int(msg.GetOpCode()), msg.GetOpParam())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package thirteen
|
||||
|
||||
import (
|
||||
"mongo.games.com/game/gamesrv/base"
|
||||
)
|
||||
|
||||
type GameData struct {
|
||||
Shake int32 // 震动次数
|
||||
Refresh int64 // 刷新次数
|
||||
Power int64 // 能量值
|
||||
Base int64 // 底注
|
||||
}
|
||||
|
||||
type PlayerEx struct {
|
||||
*base.Player //玩家信息
|
||||
*GameData
|
||||
}
|
||||
|
||||
func NewPushCoinPlayerData(p *base.Player, data *GameData) *PlayerEx {
|
||||
playerEx := &PlayerEx{
|
||||
Player: p,
|
||||
GameData: data,
|
||||
}
|
||||
return playerEx
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
package thirteen
|
||||
|
||||
import (
|
||||
"mongo.games.com/game/common"
|
||||
rule "mongo.games.com/game/gamerule/pushcoin"
|
||||
"mongo.games.com/game/gamesrv/base"
|
||||
"mongo.games.com/game/protocol/pushcoin"
|
||||
"mongo.games.com/game/srvdata"
|
||||
)
|
||||
|
||||
type SceneEx struct {
|
||||
*base.Scene //场景
|
||||
}
|
||||
|
||||
func NewPushCoinSceneData(s *base.Scene) *SceneEx {
|
||||
sceneEx := &SceneEx{
|
||||
Scene: s,
|
||||
}
|
||||
return sceneEx
|
||||
}
|
||||
|
||||
func (this *SceneEx) CreateRoomInfoPacket(s *base.Scene, p *base.Player) *pushcoin.SCPushCoinRoomInfo {
|
||||
playerEx, ok := p.ExtraData.(*PlayerEx)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
roomInfo := &pushcoin.SCPushCoinRoomInfo{
|
||||
RoomId: int32(s.GetSceneId()),
|
||||
GameId: s.GameId,
|
||||
RoomMode: int32(s.GetSceneMode()),
|
||||
Params: common.CopySliceInt64ToInt32(s.GetParams()),
|
||||
State: int32(s.GetSceneState().GetState()),
|
||||
TimeOut: int32(s.GetSceneState().GetTimeout(s)),
|
||||
BetList: s.GetDBGameFree().GetOtherIntParams(),
|
||||
}
|
||||
|
||||
player := pushcoin.PushCoinPlayerData{
|
||||
Name: p.Name,
|
||||
SnId: p.SnId,
|
||||
Head: p.Head,
|
||||
Sex: p.Sex,
|
||||
Coin: p.Coin,
|
||||
Flag: int32(p.Flags),
|
||||
VIP: p.VIP,
|
||||
RoleId: p.Roles.ModId,
|
||||
Level: p.Level,
|
||||
Exp: p.Exp,
|
||||
ShakeTimes: playerEx.Shake,
|
||||
BaseCoin: playerEx.Base,
|
||||
PowerLine: playerEx.Power,
|
||||
PowerLineMax: rule.PowerMax,
|
||||
RefreshTimes: playerEx.Refresh,
|
||||
}
|
||||
if p.Roles != nil {
|
||||
player.RoleId = p.Roles.ModId
|
||||
}
|
||||
if p.Skin != nil {
|
||||
player.SkinId = p.Skin.ModId
|
||||
}
|
||||
|
||||
roomInfo.Players = append(roomInfo.Players, &player)
|
||||
|
||||
for _, v := range srvdata.PBDB_PropExchangeMgr.Datas.Arr {
|
||||
if v.GetGroup() == 2 {
|
||||
roomInfo.ExchangeList = append(roomInfo.ExchangeList, &pushcoin.ExchangeInfo{
|
||||
Id: v.GetId(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return roomInfo
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,332 @@
|
|||
package thirteen
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"mongo.games.com/goserver/core"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
rule "mongo.games.com/game/gamerule/pushcoin"
|
||||
"mongo.games.com/game/gamesrv/base"
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/game/protocol/pushcoin"
|
||||
)
|
||||
|
||||
var PolicySingleton = &Policy{}
|
||||
|
||||
type Policy struct {
|
||||
base.BaseScenePolicy
|
||||
states [rule.GameStateMax]base.SceneState
|
||||
}
|
||||
|
||||
func (this *Policy) OnStart(s *base.Scene) {
|
||||
logger.Logger.Trace("(this *PushCoinPolicy) OnStart, sceneId=", s.GetSceneId())
|
||||
sceneEx := NewPushCoinSceneData(s)
|
||||
if sceneEx != nil {
|
||||
s.ExtraData = sceneEx
|
||||
s.ChangeSceneState(rule.GameStatePlay)
|
||||
}
|
||||
}
|
||||
|
||||
func (this *Policy) OnStop(s *base.Scene) {
|
||||
logger.Logger.Trace("(this *Policy) OnStop , sceneId=", s.GetSceneId())
|
||||
}
|
||||
|
||||
func (this *Policy) OnTick(s *base.Scene) {
|
||||
if s == nil {
|
||||
return
|
||||
}
|
||||
if s.SceneState != nil {
|
||||
s.SceneState.OnTick(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (this *Policy) OnPlayerEnter(s *base.Scene, p *base.Player) {
|
||||
if s == nil || p == nil {
|
||||
return
|
||||
}
|
||||
logger.Logger.Trace("(this *Policy) OnPlayerEnter, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
||||
sceneEx, ok := s.ExtraData.(*SceneEx)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
data := p.GDatas[s.KeyGamefreeId]
|
||||
if data == nil {
|
||||
data = &model.PlayerGameInfo{}
|
||||
p.GDatas[s.KeyGamefreeId] = data
|
||||
}
|
||||
|
||||
gamedata := &GameData{}
|
||||
if data.DataEx != nil {
|
||||
err := json.Unmarshal(data.DataEx, gamedata)
|
||||
if err != nil {
|
||||
logger.Logger.Error("OnPlayerEnter, json.Unmarshal error, err=", err)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 底注
|
||||
baseCoins := s.GetDBGameFree().GetOtherIntParams()
|
||||
if len(baseCoins) > 0 {
|
||||
gamedata.Base = baseCoins[0]
|
||||
} else {
|
||||
gamedata.Base = 5000
|
||||
}
|
||||
gamedata.Power = rule.PowerInit
|
||||
}
|
||||
|
||||
p.ExtraData = NewPushCoinPlayerData(p, gamedata)
|
||||
//给自己发送房间信息
|
||||
this.SendRoomInfo(s, p, sceneEx)
|
||||
s.FirePlayerEvent(p, base.PlayerEventEnter, nil)
|
||||
}
|
||||
|
||||
func (this *Policy) OnPlayerLeave(s *base.Scene, p *base.Player, reason int) {
|
||||
if s == nil || p == nil {
|
||||
return
|
||||
}
|
||||
logger.Logger.Trace("(this *Policy) OnPlayerLeave, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
||||
|
||||
playerEx, ok := p.ExtraData.(*PlayerEx)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
data := p.GDatas[s.KeyGamefreeId]
|
||||
if data == nil {
|
||||
data = &model.PlayerGameInfo{}
|
||||
p.GDatas[s.KeyGamefreeId] = data
|
||||
}
|
||||
|
||||
b, err := json.Marshal(playerEx.GameData)
|
||||
if err != nil {
|
||||
logger.Logger.Error("OnPlayerLeave, json.Marshal error, err=", err)
|
||||
return
|
||||
}
|
||||
data.DataEx = b
|
||||
|
||||
s.FirePlayerEvent(p, base.PlayerEventLeave, nil)
|
||||
}
|
||||
|
||||
func (this *Policy) OnPlayerDropLine(s *base.Scene, p *base.Player) {
|
||||
if s == nil || p == nil {
|
||||
return
|
||||
}
|
||||
logger.Logger.Trace("(this *Policy) OnPlayerDropLine, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
||||
s.FirePlayerEvent(p, base.PlayerEventDropLine, nil)
|
||||
}
|
||||
|
||||
func (this *Policy) OnPlayerRehold(s *base.Scene, p *base.Player) {
|
||||
if s == nil || p == nil {
|
||||
return
|
||||
}
|
||||
logger.Logger.Trace("(this *Policy) OnPlayerRehold, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
||||
sceneEx, ok := s.ExtraData.(*SceneEx)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
this.SendRoomInfo(s, p, sceneEx)
|
||||
s.FirePlayerEvent(p, base.PlayerEventRehold, nil)
|
||||
}
|
||||
|
||||
func (this *Policy) OnPlayerReturn(s *base.Scene, p *base.Player) {
|
||||
if s == nil || p == nil {
|
||||
return
|
||||
}
|
||||
logger.Logger.Trace("(this *Policy) OnPlayerRehold, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
||||
sceneEx, ok := s.ExtraData.(*SceneEx)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
this.SendRoomInfo(s, p, sceneEx)
|
||||
s.FirePlayerEvent(p, base.PlayerEventReturn, nil)
|
||||
}
|
||||
|
||||
func (this *Policy) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
|
||||
if s == nil || p == nil {
|
||||
return false
|
||||
}
|
||||
logger.Logger.Trace("(this *Policy) OnPlayerOp, sceneId=", s.GetSceneId(), " player=", p.SnId, " opcode=", opcode, " params=", params)
|
||||
if s.SceneState != nil {
|
||||
p.LastOPTimer = time.Now()
|
||||
return s.SceneState.OnPlayerOp(s, p, opcode, params)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (this *Policy) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) {
|
||||
if s == nil || p == nil {
|
||||
return
|
||||
}
|
||||
logger.Logger.Trace("(this *Policy) OnPlayerEvent, sceneId=", s.GetSceneId(), " player=", p.SnId, " eventcode=", evtcode, " params=", params)
|
||||
if s.SceneState != nil {
|
||||
s.SceneState.OnPlayerEvent(s, p, evtcode, params)
|
||||
}
|
||||
}
|
||||
|
||||
func (this *Policy) OnAudienceEnter(s *base.Scene, p *base.Player) {
|
||||
if s == nil || p == nil {
|
||||
return
|
||||
}
|
||||
logger.Logger.Trace("(this *Policy) OnAudienceEnter, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
||||
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
|
||||
//给自己发送房间信息
|
||||
this.SendRoomInfo(s, p, sceneEx)
|
||||
s.FirePlayerEvent(p, base.AudienceEventEnter, nil)
|
||||
}
|
||||
}
|
||||
|
||||
func (this *Policy) OnAudienceLeave(s *base.Scene, p *base.Player, reason int) {
|
||||
if s == nil || p == nil {
|
||||
return
|
||||
}
|
||||
logger.Logger.Trace("(this *Policy) OnAudienceLeave, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
||||
s.FirePlayerEvent(p, base.AudienceEventLeave, nil)
|
||||
}
|
||||
|
||||
func (this *Policy) OnAudienceDropLine(s *base.Scene, p *base.Player) {
|
||||
if s == nil || p == nil {
|
||||
return
|
||||
}
|
||||
logger.Logger.Trace("(this *Policy) OnAudienceDropLine, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
||||
s.AudienceLeave(p, common.PlayerLeaveReason_DropLine)
|
||||
s.FirePlayerEvent(p, base.AudienceEventDropLine, nil)
|
||||
}
|
||||
|
||||
func (this *Policy) OnAudienceSit(s *base.Scene, p *base.Player) {
|
||||
|
||||
}
|
||||
|
||||
func (this *Policy) IsCompleted(s *base.Scene) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (this *Policy) IsCanForceStart(s *base.Scene) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (this *Policy) ForceStart(s *base.Scene) {
|
||||
|
||||
}
|
||||
|
||||
func (this *Policy) CanChangeCoinScene(s *base.Scene, p *base.Player) bool {
|
||||
if s == nil || p == nil {
|
||||
return false
|
||||
}
|
||||
if s.SceneState != nil {
|
||||
return s.SceneState.CanChangeCoinScene(s, p)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (this *Policy) SendRoomInfo(s *base.Scene, p *base.Player, sceneEx *SceneEx) {
|
||||
pack := sceneEx.CreateRoomInfoPacket(s, p)
|
||||
p.SendToClient(int(pushcoin.PushCoinPacketID_PACKET_SCPushCoinRoomInfo), pack)
|
||||
}
|
||||
|
||||
//=====================================
|
||||
// StateGaming 游戏中
|
||||
//=====================================
|
||||
|
||||
type StateGaming struct {
|
||||
}
|
||||
|
||||
func (this *StateGaming) CanChangeCoinScene(s *base.Scene, p *base.Player) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (this *StateGaming) OnLeave(s *base.Scene) {
|
||||
|
||||
}
|
||||
|
||||
func (this *StateGaming) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) {
|
||||
|
||||
}
|
||||
|
||||
func (this *StateGaming) GetState() int {
|
||||
return rule.GameStatePlay
|
||||
}
|
||||
|
||||
func (this *StateGaming) CanChangeTo(s base.SceneState) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (this *StateGaming) GetTimeout(s *base.Scene) int {
|
||||
if sceneEx, ok := s.GetExtraData().(*SceneEx); ok {
|
||||
return int(time.Now().Sub(sceneEx.StateStartTime) / time.Second)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (this *StateGaming) OnEnter(s *base.Scene) {
|
||||
|
||||
}
|
||||
|
||||
func (this *StateGaming) OnTick(s *base.Scene) {
|
||||
|
||||
}
|
||||
|
||||
func (this *StateGaming) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
|
||||
logger.Logger.Trace("(this *StateGaming) OnPlayerOp, sceneId=", s.GetSceneId(), " player=", p.SnId, " opcode=", opcode, " params=", params)
|
||||
_, ok := s.ExtraData.(*SceneEx)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
_, ok = p.ExtraData.(*PlayerEx)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
|
||||
pack := &pushcoin.SCPushCoinPlayerOp{
|
||||
OpRetCode: pushcoin.OpResultCode_OPRC_Error,
|
||||
OpCode: pushcoin.OpCodes(opcode),
|
||||
}
|
||||
|
||||
switch pushcoin.OpCodes(opcode) {
|
||||
case pushcoin.OpCodes_OP_Bet:
|
||||
|
||||
case pushcoin.OpCodes_OP_Gain:
|
||||
|
||||
case pushcoin.OpCodes_OP_Shake:
|
||||
|
||||
case pushcoin.OpCodes_OP_Refresh:
|
||||
|
||||
case pushcoin.OpCodes_OP_Exchange:
|
||||
|
||||
case pushcoin.OpCodes_OP_Draw:
|
||||
|
||||
default:
|
||||
return true
|
||||
}
|
||||
|
||||
p.SendToClient(int(pushcoin.PushCoinPacketID_PACKET_SCPushCoinPlayerOp), pack)
|
||||
return true
|
||||
}
|
||||
|
||||
func (this *Policy) RegisteSceneState(state base.SceneState) {
|
||||
if state == nil {
|
||||
return
|
||||
}
|
||||
id := state.GetState()
|
||||
if id < 0 || id >= rule.GameStateMax {
|
||||
return
|
||||
}
|
||||
this.states[id] = state
|
||||
}
|
||||
|
||||
func (this *Policy) GetSceneState(s *base.Scene, stateid int) base.SceneState {
|
||||
if stateid >= 0 && stateid < rule.GameStateMax {
|
||||
return this.states[stateid]
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
PolicySingleton.RegisteSceneState(&StateGaming{})
|
||||
core.RegisteHook(core.HOOK_BEFORE_START, func() error {
|
||||
base.RegisteScenePolicy(common.GameId_PushCoin, 0, PolicySingleton)
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
|
@ -1257,7 +1257,7 @@ func (this *SceneEx) CountBilled() {
|
|||
for _, v := range this.players {
|
||||
if v != nil && v.IsGameing() {
|
||||
if v.totalScore > 0 {
|
||||
v.gainCoin = int64(float64(v.totalScore) * float64(totalLoseScore) / float64(totalWinScore))
|
||||
v.gainCoin = int64(float64(v.totalScore*totalLoseScore) / float64(totalWinScore))
|
||||
} else if v.totalScore < 0 {
|
||||
v.gainCoin = v.totalScore
|
||||
}
|
||||
|
|
@ -1270,7 +1270,7 @@ func (this *SceneEx) CountBilled() {
|
|||
if v.totalScore > 0 {
|
||||
v.gainCoin = v.totalScore
|
||||
} else if v.totalScore < 0 {
|
||||
v.gainCoin = int64(float64(v.totalScore) * float64(totalLoseScore) / float64(totalWinScore))
|
||||
v.gainCoin = int64(float64(v.totalScore*totalWinScore) / float64(totalLoseScore))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ const (
|
|||
OpCollect = 6
|
||||
OpNian = 7
|
||||
OpConsume = 8 // 累计消耗活动
|
||||
OpPushCoin = 9 // 推金币活动
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -175,6 +176,8 @@ type AllConfig struct {
|
|||
*webapi.RedPacketConfig
|
||||
// 累计消耗活动配置
|
||||
*webapi.ConsumeConfig
|
||||
// 推金币活动配置
|
||||
*webapi.PushCoinConfig
|
||||
}
|
||||
|
||||
type GlobalConfig struct {
|
||||
|
|
|
|||
|
|
@ -557,6 +557,15 @@ type RedPacketData struct {
|
|||
JN int32 // 参与次数
|
||||
}
|
||||
|
||||
type PushCoinData struct {
|
||||
Shake int32 // 震动次数
|
||||
Refresh int64 // 刷新次数
|
||||
Power int64 // 能量值
|
||||
Exchange map[int32]int32 // 兑换次数 兑换id:兑换次数
|
||||
Dram int // 抽奖次数
|
||||
Items map[int32]int64 // 道具
|
||||
}
|
||||
|
||||
type WelfareData struct {
|
||||
ReliefFundTimes int32 //救济金领取次数
|
||||
Sign7 *NewSignData //七日签到
|
||||
|
|
@ -575,6 +584,7 @@ type WelfareData struct {
|
|||
PermitExchange map[int32][]int64 // 赛季通行证兑换次数, 多次的兑换时间
|
||||
NianData *NianData //年兽活动数据
|
||||
RedPacket map[int64]*RedPacketData // 红包活动 活动id:领取次数
|
||||
PushCoin *PushCoinData // 推币机活动
|
||||
}
|
||||
|
||||
func NewWelfareData() *WelfareData {
|
||||
|
|
@ -689,19 +699,21 @@ type WebPlayerDataParam struct {
|
|||
}
|
||||
|
||||
type NianData struct {
|
||||
ActivityStartTime int64 //活动开始时间
|
||||
ActivityEndTime int64 //活动结束时间
|
||||
BossHp int64 //Boss当前血量
|
||||
BuffStatus bool //Buff领取状态
|
||||
BuffCount int64 //Buff剩余生效次数
|
||||
SignAwardTime int64 //签到奖励领取时间
|
||||
BossDieCount int32 //BOSS死亡次数
|
||||
LittleHurt int32 //小爆竹次数
|
||||
BigHurt int32 //大爆竹次数
|
||||
OtherAwardNum map[int32]int32 //奖励掉落数量
|
||||
AttackMaxHp int64 //单次攻击最大血量
|
||||
AttackSumHp int64 //攻击总伤害
|
||||
GiftShop map[int32]int32 //购买每日礼包记录
|
||||
ActivityStartTime int64 //活动开始时间
|
||||
ActivityEndTime int64 //活动结束时间
|
||||
BossHp int64 //Boss当前血量
|
||||
BuffStatus bool //Buff领取状态
|
||||
BuffCount int64 //Buff剩余生效次数
|
||||
SignAwardTime int64 //签到奖励领取时间
|
||||
SignOtherAwardCount int32 //签到额外奖励掉落数量
|
||||
SignOtherAwardProp int32 //签到额外奖励掉落概率
|
||||
BossDieCount int32 //BOSS死亡次数
|
||||
LittleHurt int32 //小爆竹次数
|
||||
BigHurt int32 //大爆竹次数
|
||||
OtherAwardNum map[int32]int32 //奖励掉落数量
|
||||
AttackMaxHp int64 //单次攻击最大血量
|
||||
AttackSumHp int64 //攻击总伤害
|
||||
GiftShop map[int32]int32 //购买每日礼包记录
|
||||
}
|
||||
|
||||
func ConvertPlayerDataToWebData(param *WebPlayerDataParam) *webapi.PlayerData {
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import (
|
|||
//go:generate mongoctl -model-dir=. -model-names=RedPacket -dao-dir=../dao/
|
||||
type RedPacket struct {
|
||||
ID primitive.ObjectID `bson:"_id" gen:"autoFill"`
|
||||
Cid int64 // 红包活动id
|
||||
Use map[int64]int64 // 已发红包 红包奖励数量:已发个数
|
||||
Ts int64 // 更新时间戳
|
||||
Cid int64 `bson:"cid"` // 红包活动id
|
||||
Use map[int64]int64 `bson:"use"` // 已发红包 红包奖励数量:已发个数
|
||||
Ts int64 `bson:"ts"` // 更新时间戳
|
||||
}
|
||||
|
||||
func (r *RedPacket) DatabaseName() string {
|
||||
|
|
@ -75,3 +75,50 @@ type BackRedPacket struct {
|
|||
ItemNum int64 // 道具数量
|
||||
Ts int64 // 时间戳
|
||||
}
|
||||
|
||||
//go:generate mongoctl -model-dir=. -model-names=RedPacketHistory -dao-dir=../dao/
|
||||
type RedPacketHistory struct {
|
||||
Platform string `bson:"-"` // 平台
|
||||
ID primitive.ObjectID `bson:"_id" gen:"autoFill"`
|
||||
Cid int64 `bson:"cid"` // 红包活动id
|
||||
Snid int32 `bson:"snid"` // 玩家id
|
||||
Ts int64 `bson:"ts"` // 时间戳
|
||||
ItemId int32 `bson:"itemid"` // 道具id
|
||||
ItemNum int64 `bson:"itemnum"` // 道具数量
|
||||
}
|
||||
|
||||
func (r *RedPacketHistory) DatabaseName() string {
|
||||
return "log"
|
||||
}
|
||||
|
||||
func (r *RedPacketHistory) CollectionName() string {
|
||||
return "log_redpackethistory"
|
||||
}
|
||||
|
||||
type GetRedPacketHistoryReq struct {
|
||||
Plt string
|
||||
Snid int32
|
||||
Cid int64
|
||||
}
|
||||
|
||||
func GetRedPacketHistory(plt string, snid int32, cid int64) (res []*RedPacketHistory, err error) {
|
||||
if rpcCli == nil {
|
||||
logger.Logger.Error("model.GetRedPacketHistory rpcCli == nil")
|
||||
return nil, errors.New("rpc client is nil")
|
||||
}
|
||||
|
||||
req := &GetRedPacketHistoryReq{
|
||||
Plt: plt,
|
||||
Snid: snid,
|
||||
Cid: cid,
|
||||
}
|
||||
res = make([]*RedPacketHistory, 0)
|
||||
|
||||
err = rpcCli.CallWithTimeout("RedPacketService.GetHistory", req, &res, time.Second*30)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("GetRedPacketHistory error: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,8 +46,9 @@ const (
|
|||
DBInvite = "db_invite"
|
||||
DBAPILog = "db_apilog"
|
||||
DBGiveLog = "db_givelog"
|
||||
DBLotteryCode = "db_lotterycode" // 玩家抽奖码
|
||||
DBLotteryLog = "db_lotterylog" // 中奖记录
|
||||
DBLotteryCode = "db_lotterycode" // 玩家抽奖码
|
||||
DBLotteryLog = "db_lotterylog" // 中奖记录
|
||||
DBRedPacket = "db_redpackethistory" // 红包记录
|
||||
)
|
||||
|
||||
// ranksrv 消息
|
||||
|
|
|
|||
|
|
@ -1,515 +0,0 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1-devel
|
||||
// protoc v3.19.4
|
||||
// source: protocol/activity/actsign.proto
|
||||
|
||||
package activity
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
//操作结果
|
||||
type OpResultCode_ActSign int32
|
||||
|
||||
const (
|
||||
OpResultCode_ActSign_OPRC_Activity_Sign_Sucess OpResultCode_ActSign = 0 //成功
|
||||
OpResultCode_ActSign_OPRC_Activity_Sign_Error OpResultCode_ActSign = 1 //失败
|
||||
OpResultCode_ActSign_OPRC_Activity_Sign_Close OpResultCode_ActSign = 1001 //活动未开启
|
||||
OpResultCode_ActSign_OPRC_Activity_Sign_PayNum_Low OpResultCode_ActSign = 1002 //未达到最低充值金额
|
||||
OpResultCode_ActSign_OPRC_Activity_Sign_Config_Vip_Error OpResultCode_ActSign = 1003 //vip不匹配
|
||||
OpResultCode_ActSign_OPRC_Activity_Sign_Config_Day_Error OpResultCode_ActSign = 1004 //签到天数不匹配
|
||||
OpResultCode_ActSign_OPRC_Activity_Sign_Repeat OpResultCode_ActSign = 1005 //重复签到
|
||||
)
|
||||
|
||||
// Enum value maps for OpResultCode_ActSign.
|
||||
var (
|
||||
OpResultCode_ActSign_name = map[int32]string{
|
||||
0: "OPRC_Activity_Sign_Sucess",
|
||||
1: "OPRC_Activity_Sign_Error",
|
||||
1001: "OPRC_Activity_Sign_Close",
|
||||
1002: "OPRC_Activity_Sign_PayNum_Low",
|
||||
1003: "OPRC_Activity_Sign_Config_Vip_Error",
|
||||
1004: "OPRC_Activity_Sign_Config_Day_Error",
|
||||
1005: "OPRC_Activity_Sign_Repeat",
|
||||
}
|
||||
OpResultCode_ActSign_value = map[string]int32{
|
||||
"OPRC_Activity_Sign_Sucess": 0,
|
||||
"OPRC_Activity_Sign_Error": 1,
|
||||
"OPRC_Activity_Sign_Close": 1001,
|
||||
"OPRC_Activity_Sign_PayNum_Low": 1002,
|
||||
"OPRC_Activity_Sign_Config_Vip_Error": 1003,
|
||||
"OPRC_Activity_Sign_Config_Day_Error": 1004,
|
||||
"OPRC_Activity_Sign_Repeat": 1005,
|
||||
}
|
||||
)
|
||||
|
||||
func (x OpResultCode_ActSign) Enum() *OpResultCode_ActSign {
|
||||
p := new(OpResultCode_ActSign)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x OpResultCode_ActSign) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (OpResultCode_ActSign) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_protocol_activity_actsign_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (OpResultCode_ActSign) Type() protoreflect.EnumType {
|
||||
return &file_protocol_activity_actsign_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x OpResultCode_ActSign) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use OpResultCode_ActSign.Descriptor instead.
|
||||
func (OpResultCode_ActSign) EnumDescriptor() ([]byte, []int) {
|
||||
return file_protocol_activity_actsign_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// 签到
|
||||
type ActSignPacketID int32
|
||||
|
||||
const (
|
||||
ActSignPacketID_PACKET_SignZero ActSignPacketID = 0 // 弃用消息号
|
||||
ActSignPacketID_PACKET_CSSign ActSignPacketID = 2662 // 签到
|
||||
ActSignPacketID_PACKET_SCSign ActSignPacketID = 2663
|
||||
ActSignPacketID_PACKET_CSSignData ActSignPacketID = 2664 // 签到数据
|
||||
ActSignPacketID_PACKET_SCSignData ActSignPacketID = 2665
|
||||
)
|
||||
|
||||
// Enum value maps for ActSignPacketID.
|
||||
var (
|
||||
ActSignPacketID_name = map[int32]string{
|
||||
0: "PACKET_SignZero",
|
||||
2662: "PACKET_CSSign",
|
||||
2663: "PACKET_SCSign",
|
||||
2664: "PACKET_CSSignData",
|
||||
2665: "PACKET_SCSignData",
|
||||
}
|
||||
ActSignPacketID_value = map[string]int32{
|
||||
"PACKET_SignZero": 0,
|
||||
"PACKET_CSSign": 2662,
|
||||
"PACKET_SCSign": 2663,
|
||||
"PACKET_CSSignData": 2664,
|
||||
"PACKET_SCSignData": 2665,
|
||||
}
|
||||
)
|
||||
|
||||
func (x ActSignPacketID) Enum() *ActSignPacketID {
|
||||
p := new(ActSignPacketID)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x ActSignPacketID) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (ActSignPacketID) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_protocol_activity_actsign_proto_enumTypes[1].Descriptor()
|
||||
}
|
||||
|
||||
func (ActSignPacketID) Type() protoreflect.EnumType {
|
||||
return &file_protocol_activity_actsign_proto_enumTypes[1]
|
||||
}
|
||||
|
||||
func (x ActSignPacketID) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ActSignPacketID.Descriptor instead.
|
||||
func (ActSignPacketID) EnumDescriptor() ([]byte, []int) {
|
||||
return file_protocol_activity_actsign_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
//PACKET_CSSign
|
||||
type CSSign struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SignIndex int32 `protobuf:"varint,1,opt,name=SignIndex,proto3" json:"SignIndex,omitempty"`
|
||||
SignType int32 `protobuf:"varint,2,opt,name=SignType,proto3" json:"SignType,omitempty"` //0.普通签到 1.双倍签到
|
||||
}
|
||||
|
||||
func (x *CSSign) Reset() {
|
||||
*x = CSSign{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protocol_activity_actsign_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CSSign) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CSSign) ProtoMessage() {}
|
||||
|
||||
func (x *CSSign) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_protocol_activity_actsign_proto_msgTypes[0]
|
||||
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 CSSign.ProtoReflect.Descriptor instead.
|
||||
func (*CSSign) Descriptor() ([]byte, []int) {
|
||||
return file_protocol_activity_actsign_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *CSSign) GetSignIndex() int32 {
|
||||
if x != nil {
|
||||
return x.SignIndex
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CSSign) GetSignType() int32 {
|
||||
if x != nil {
|
||||
return x.SignType
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
//PACKET_SCSign
|
||||
type SCSign struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SignIndex int32 `protobuf:"varint,1,opt,name=SignIndex,proto3" json:"SignIndex,omitempty"`
|
||||
SignType int32 `protobuf:"varint,2,opt,name=SignType,proto3" json:"SignType,omitempty"` //0.普通签到 1.双倍签到
|
||||
OpRetCode OpResultCode_ActSign `protobuf:"varint,3,opt,name=OpRetCode,proto3,enum=activity.OpResultCode_ActSign" json:"OpRetCode,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SCSign) Reset() {
|
||||
*x = SCSign{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protocol_activity_actsign_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SCSign) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SCSign) ProtoMessage() {}
|
||||
|
||||
func (x *SCSign) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_protocol_activity_actsign_proto_msgTypes[1]
|
||||
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 SCSign.ProtoReflect.Descriptor instead.
|
||||
func (*SCSign) Descriptor() ([]byte, []int) {
|
||||
return file_protocol_activity_actsign_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *SCSign) GetSignIndex() int32 {
|
||||
if x != nil {
|
||||
return x.SignIndex
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCSign) GetSignType() int32 {
|
||||
if x != nil {
|
||||
return x.SignType
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCSign) GetOpRetCode() OpResultCode_ActSign {
|
||||
if x != nil {
|
||||
return x.OpRetCode
|
||||
}
|
||||
return OpResultCode_ActSign_OPRC_Activity_Sign_Sucess
|
||||
}
|
||||
|
||||
//PACKET_CSSignData
|
||||
type CSSignData struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *CSSignData) Reset() {
|
||||
*x = CSSignData{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protocol_activity_actsign_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CSSignData) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CSSignData) ProtoMessage() {}
|
||||
|
||||
func (x *CSSignData) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_protocol_activity_actsign_proto_msgTypes[2]
|
||||
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 CSSignData.ProtoReflect.Descriptor instead.
|
||||
func (*CSSignData) Descriptor() ([]byte, []int) {
|
||||
return file_protocol_activity_actsign_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
//PACKET_SCSignData
|
||||
type SCSignData struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SignCount int32 `protobuf:"varint,1,opt,name=SignCount,proto3" json:"SignCount,omitempty"`
|
||||
TodaySign int32 `protobuf:"varint,2,opt,name=TodaySign,proto3" json:"TodaySign,omitempty"` //0.未签到 1.已签到
|
||||
}
|
||||
|
||||
func (x *SCSignData) Reset() {
|
||||
*x = SCSignData{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protocol_activity_actsign_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SCSignData) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SCSignData) ProtoMessage() {}
|
||||
|
||||
func (x *SCSignData) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_protocol_activity_actsign_proto_msgTypes[3]
|
||||
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 SCSignData.ProtoReflect.Descriptor instead.
|
||||
func (*SCSignData) Descriptor() ([]byte, []int) {
|
||||
return file_protocol_activity_actsign_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *SCSignData) GetSignCount() int32 {
|
||||
if x != nil {
|
||||
return x.SignCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCSignData) GetTodaySign() int32 {
|
||||
if x != nil {
|
||||
return x.TodaySign
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_protocol_activity_actsign_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protocol_activity_actsign_proto_rawDesc = []byte{
|
||||
0x0a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76,
|
||||
0x69, 0x74, 0x79, 0x2f, 0x61, 0x63, 0x74, 0x73, 0x69, 0x67, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x12, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x22, 0x42, 0x0a, 0x06, 0x43,
|
||||
0x53, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x64,
|
||||
0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e,
|
||||
0x64, 0x65, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22,
|
||||
0x80, 0x01, 0x0a, 0x06, 0x53, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x69,
|
||||
0x67, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x53,
|
||||
0x69, 0x67, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x69, 0x67, 0x6e,
|
||||
0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x53, 0x69, 0x67, 0x6e,
|
||||
0x54, 0x79, 0x70, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64,
|
||||
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69,
|
||||
0x74, 0x79, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x5f,
|
||||
0x41, 0x63, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f,
|
||||
0x64, 0x65, 0x22, 0x0c, 0x0a, 0x0a, 0x43, 0x53, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x61, 0x74, 0x61,
|
||||
0x22, 0x48, 0x0a, 0x0a, 0x53, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1c,
|
||||
0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09,
|
||||
0x54, 0x6f, 0x64, 0x61, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x09, 0x54, 0x6f, 0x64, 0x61, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x2a, 0x8a, 0x02, 0x0a, 0x14, 0x4f,
|
||||
0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x5f, 0x41, 0x63, 0x74, 0x53,
|
||||
0x69, 0x67, 0x6e, 0x12, 0x1d, 0x0a, 0x19, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x41, 0x63, 0x74, 0x69,
|
||||
0x76, 0x69, 0x74, 0x79, 0x5f, 0x53, 0x69, 0x67, 0x6e, 0x5f, 0x53, 0x75, 0x63, 0x65, 0x73, 0x73,
|
||||
0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x41, 0x63, 0x74, 0x69, 0x76,
|
||||
0x69, 0x74, 0x79, 0x5f, 0x53, 0x69, 0x67, 0x6e, 0x5f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01,
|
||||
0x12, 0x1d, 0x0a, 0x18, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
|
||||
0x79, 0x5f, 0x53, 0x69, 0x67, 0x6e, 0x5f, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x10, 0xe9, 0x07, 0x12,
|
||||
0x22, 0x0a, 0x1d, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
|
||||
0x5f, 0x53, 0x69, 0x67, 0x6e, 0x5f, 0x50, 0x61, 0x79, 0x4e, 0x75, 0x6d, 0x5f, 0x4c, 0x6f, 0x77,
|
||||
0x10, 0xea, 0x07, 0x12, 0x28, 0x0a, 0x23, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x41, 0x63, 0x74, 0x69,
|
||||
0x76, 0x69, 0x74, 0x79, 0x5f, 0x53, 0x69, 0x67, 0x6e, 0x5f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||
0x5f, 0x56, 0x69, 0x70, 0x5f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xeb, 0x07, 0x12, 0x28, 0x0a,
|
||||
0x23, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x53,
|
||||
0x69, 0x67, 0x6e, 0x5f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x44, 0x61, 0x79, 0x5f, 0x45,
|
||||
0x72, 0x72, 0x6f, 0x72, 0x10, 0xec, 0x07, 0x12, 0x1e, 0x0a, 0x19, 0x4f, 0x50, 0x52, 0x43, 0x5f,
|
||||
0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x53, 0x69, 0x67, 0x6e, 0x5f, 0x52, 0x65,
|
||||
0x70, 0x65, 0x61, 0x74, 0x10, 0xed, 0x07, 0x2a, 0x7e, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x53, 0x69,
|
||||
0x67, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x69, 0x67, 0x6e, 0x5a, 0x65, 0x72, 0x6f, 0x10, 0x00, 0x12,
|
||||
0x12, 0x0a, 0x0d, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x53, 0x69, 0x67, 0x6e,
|
||||
0x10, 0xe6, 0x14, 0x12, 0x12, 0x0a, 0x0d, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43,
|
||||
0x53, 0x69, 0x67, 0x6e, 0x10, 0xe7, 0x14, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||
0x54, 0x5f, 0x43, 0x53, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x10, 0xe8, 0x14, 0x12,
|
||||
0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x53, 0x69, 0x67, 0x6e,
|
||||
0x44, 0x61, 0x74, 0x61, 0x10, 0xe9, 0x14, 0x42, 0x28, 0x5a, 0x26, 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, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
|
||||
0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_protocol_activity_actsign_proto_rawDescOnce sync.Once
|
||||
file_protocol_activity_actsign_proto_rawDescData = file_protocol_activity_actsign_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_protocol_activity_actsign_proto_rawDescGZIP() []byte {
|
||||
file_protocol_activity_actsign_proto_rawDescOnce.Do(func() {
|
||||
file_protocol_activity_actsign_proto_rawDescData = protoimpl.X.CompressGZIP(file_protocol_activity_actsign_proto_rawDescData)
|
||||
})
|
||||
return file_protocol_activity_actsign_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protocol_activity_actsign_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_protocol_activity_actsign_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_protocol_activity_actsign_proto_goTypes = []interface{}{
|
||||
(OpResultCode_ActSign)(0), // 0: activity.OpResultCode_ActSign
|
||||
(ActSignPacketID)(0), // 1: activity.ActSignPacketID
|
||||
(*CSSign)(nil), // 2: activity.CSSign
|
||||
(*SCSign)(nil), // 3: activity.SCSign
|
||||
(*CSSignData)(nil), // 4: activity.CSSignData
|
||||
(*SCSignData)(nil), // 5: activity.SCSignData
|
||||
}
|
||||
var file_protocol_activity_actsign_proto_depIdxs = []int32{
|
||||
0, // 0: activity.SCSign.OpRetCode:type_name -> activity.OpResultCode_ActSign
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_protocol_activity_actsign_proto_init() }
|
||||
func file_protocol_activity_actsign_proto_init() {
|
||||
if File_protocol_activity_actsign_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_protocol_activity_actsign_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CSSign); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protocol_activity_actsign_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SCSign); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protocol_activity_actsign_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CSSignData); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protocol_activity_actsign_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SCSignData); 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{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protocol_activity_actsign_proto_rawDesc,
|
||||
NumEnums: 2,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_protocol_activity_actsign_proto_goTypes,
|
||||
DependencyIndexes: file_protocol_activity_actsign_proto_depIdxs,
|
||||
EnumInfos: file_protocol_activity_actsign_proto_enumTypes,
|
||||
MessageInfos: file_protocol_activity_actsign_proto_msgTypes,
|
||||
}.Build()
|
||||
File_protocol_activity_actsign_proto = out.File
|
||||
file_protocol_activity_actsign_proto_rawDesc = nil
|
||||
file_protocol_activity_actsign_proto_goTypes = nil
|
||||
file_protocol_activity_actsign_proto_depIdxs = nil
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
syntax = "proto3";
|
||||
package activity;
|
||||
option go_package = "mongo.games.com/game/protocol/activity";
|
||||
|
||||
//操作结果
|
||||
enum OpResultCode_ActSign {
|
||||
OPRC_Activity_Sign_Sucess = 0; //成功
|
||||
OPRC_Activity_Sign_Error = 1; //失败
|
||||
OPRC_Activity_Sign_Close = 1001; //活动未开启
|
||||
OPRC_Activity_Sign_PayNum_Low = 1002; //未达到最低充值金额
|
||||
OPRC_Activity_Sign_Config_Vip_Error = 1003; //vip不匹配
|
||||
OPRC_Activity_Sign_Config_Day_Error = 1004; //签到天数不匹配
|
||||
OPRC_Activity_Sign_Repeat = 1005; //重复签到
|
||||
}
|
||||
// 签到
|
||||
enum ActSignPacketID {
|
||||
PACKET_SignZero = 0;// 弃用消息号
|
||||
PACKET_CSSign = 2662;// 签到
|
||||
PACKET_SCSign = 2663;
|
||||
PACKET_CSSignData = 2664;// 签到数据
|
||||
PACKET_SCSignData = 2665;
|
||||
}
|
||||
|
||||
//PACKET_CSSign
|
||||
message CSSign {
|
||||
int32 SignIndex = 1;
|
||||
int32 SignType = 2; //0.普通签到 1.双倍签到
|
||||
}
|
||||
//PACKET_SCSign
|
||||
message SCSign {
|
||||
int32 SignIndex = 1;
|
||||
int32 SignType = 2; //0.普通签到 1.双倍签到
|
||||
OpResultCode_ActSign OpRetCode = 3;
|
||||
}
|
||||
|
||||
//PACKET_CSSignData
|
||||
message CSSignData {
|
||||
}
|
||||
//PACKET_SCSignData
|
||||
message SCSignData {
|
||||
int32 SignCount = 1;
|
||||
int32 TodaySign = 2; //0.未签到 1.已签到
|
||||
}
|
||||
|
|
@ -192,22 +192,28 @@ type SCNianData struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ActivityStartTime int64 `protobuf:"varint,1,opt,name=ActivityStartTime,proto3" json:"ActivityStartTime,omitempty"` //活动开始时间
|
||||
ActivityEndTime int64 `protobuf:"varint,2,opt,name=ActivityEndTime,proto3" json:"ActivityEndTime,omitempty"` //活动结束时间
|
||||
BossMaxHp int64 `protobuf:"varint,3,opt,name=BossMaxHp,proto3" json:"BossMaxHp,omitempty"` //Boss最大血量
|
||||
BossHp int64 `protobuf:"varint,4,opt,name=BossHp,proto3" json:"BossHp,omitempty"` //Boss当前血量
|
||||
RankData []*NianRankData `protobuf:"bytes,5,rep,name=RankData,proto3" json:"RankData,omitempty"` //排行榜奖励配置
|
||||
AwardTime int64 `protobuf:"varint,6,opt,name=AwardTime,proto3" json:"AwardTime,omitempty"` //每日签到领取时间
|
||||
BuffCount int64 `protobuf:"varint,7,opt,name=BuffCount,proto3" json:"BuffCount,omitempty"` //Buff剩余次数
|
||||
BuffStatus bool `protobuf:"varint,8,opt,name=BuffStatus,proto3" json:"BuffStatus,omitempty"` //Buff领取状态
|
||||
SignAwardTime int64 `protobuf:"varint,9,opt,name=SignAwardTime,proto3" json:"SignAwardTime,omitempty"` //签到领取时间 0-未领取
|
||||
BuffStartTime int64 `protobuf:"varint,10,opt,name=BuffStartTime,proto3" json:"BuffStartTime,omitempty"` //Buff开始领取时间
|
||||
BuffEndTime int64 `protobuf:"varint,11,opt,name=BuffEndTime,proto3" json:"BuffEndTime,omitempty"` //Buff结束领取时间
|
||||
ShopData []*ShopData `protobuf:"bytes,12,rep,name=shopData,proto3" json:"shopData,omitempty"` //购买礼包数量
|
||||
ChangeData string `protobuf:"bytes,13,opt,name=ChangeData,proto3" json:"ChangeData,omitempty"` //兑换数据
|
||||
LuckyRankNeed string `protobuf:"bytes,14,opt,name=LuckyRankNeed,proto3" json:"LuckyRankNeed,omitempty"` //幸运榜上榜条件
|
||||
RankNeed string `protobuf:"bytes,15,opt,name=RankNeed,proto3" json:"RankNeed,omitempty"` //总伤害榜上榜条件
|
||||
Switch int32 `protobuf:"varint,16,opt,name=Switch,proto3" json:"Switch,omitempty"` //活动开关 1.开启 2.关闭
|
||||
ActivityStartTime int64 `protobuf:"varint,1,opt,name=ActivityStartTime,proto3" json:"ActivityStartTime,omitempty"` //活动开始时间
|
||||
ActivityEndTime int64 `protobuf:"varint,2,opt,name=ActivityEndTime,proto3" json:"ActivityEndTime,omitempty"` //活动结束时间
|
||||
BossMaxHp int64 `protobuf:"varint,3,opt,name=BossMaxHp,proto3" json:"BossMaxHp,omitempty"` //Boss最大血量
|
||||
BossHp int64 `protobuf:"varint,4,opt,name=BossHp,proto3" json:"BossHp,omitempty"` //Boss当前血量
|
||||
RankData []*NianRankData `protobuf:"bytes,5,rep,name=RankData,proto3" json:"RankData,omitempty"` //排行榜奖励配置
|
||||
AwardTime int64 `protobuf:"varint,6,opt,name=AwardTime,proto3" json:"AwardTime,omitempty"` //每日签到领取时间
|
||||
BuffCount int64 `protobuf:"varint,7,opt,name=BuffCount,proto3" json:"BuffCount,omitempty"` //Buff剩余次数
|
||||
BuffStatus bool `protobuf:"varint,8,opt,name=BuffStatus,proto3" json:"BuffStatus,omitempty"` //Buff领取状态
|
||||
SignAwardTime int64 `protobuf:"varint,9,opt,name=SignAwardTime,proto3" json:"SignAwardTime,omitempty"` //签到领取时间 0-未领取
|
||||
BuffStartTime int64 `protobuf:"varint,10,opt,name=BuffStartTime,proto3" json:"BuffStartTime,omitempty"` //Buff开始领取时间
|
||||
BuffEndTime int64 `protobuf:"varint,11,opt,name=BuffEndTime,proto3" json:"BuffEndTime,omitempty"` //Buff结束领取时间
|
||||
ShopData []*ShopData `protobuf:"bytes,12,rep,name=shopData,proto3" json:"shopData,omitempty"` //购买礼包数量
|
||||
ChangeData string `protobuf:"bytes,13,opt,name=ChangeData,proto3" json:"ChangeData,omitempty"` //兑换数据
|
||||
LuckyRankNeed string `protobuf:"bytes,14,opt,name=LuckyRankNeed,proto3" json:"LuckyRankNeed,omitempty"` //幸运榜上榜条件
|
||||
RankNeed string `protobuf:"bytes,15,opt,name=RankNeed,proto3" json:"RankNeed,omitempty"` //总伤害榜上榜条件
|
||||
Switch int32 `protobuf:"varint,16,opt,name=Switch,proto3" json:"Switch,omitempty"` //活动开关 1.开启 2.关闭
|
||||
OtherSignAwardCount int32 `protobuf:"varint,17,opt,name=OtherSignAwardCount,proto3" json:"OtherSignAwardCount,omitempty"` //额外奖励领取次数
|
||||
OtherSignAwardProp int32 `protobuf:"varint,18,opt,name=OtherSignAwardProp,proto3" json:"OtherSignAwardProp,omitempty"` //额外奖励概率
|
||||
OtherSignAward []*RankAwardData `protobuf:"bytes,19,rep,name=OtherSignAward,proto3" json:"OtherSignAward,omitempty"` //签到额外奖励
|
||||
OtherSignMaxCount int32 `protobuf:"varint,20,opt,name=OtherSignMaxCount,proto3" json:"OtherSignMaxCount,omitempty"` //额外奖励领取次数上限
|
||||
AttackMaxHp int64 `protobuf:"varint,21,opt,name=AttackMaxHp,proto3" json:"AttackMaxHp,omitempty"` //单次攻击最大血量
|
||||
AttackSumHp int64 `protobuf:"varint,22,opt,name=AttackSumHp,proto3" json:"AttackSumHp,omitempty"` //攻击总伤害
|
||||
}
|
||||
|
||||
func (x *SCNianData) Reset() {
|
||||
|
|
@ -354,6 +360,48 @@ func (x *SCNianData) GetSwitch() int32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
func (x *SCNianData) GetOtherSignAwardCount() int32 {
|
||||
if x != nil {
|
||||
return x.OtherSignAwardCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCNianData) GetOtherSignAwardProp() int32 {
|
||||
if x != nil {
|
||||
return x.OtherSignAwardProp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCNianData) GetOtherSignAward() []*RankAwardData {
|
||||
if x != nil {
|
||||
return x.OtherSignAward
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SCNianData) GetOtherSignMaxCount() int32 {
|
||||
if x != nil {
|
||||
return x.OtherSignMaxCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCNianData) GetAttackMaxHp() int64 {
|
||||
if x != nil {
|
||||
return x.AttackMaxHp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCNianData) GetAttackSumHp() int64 {
|
||||
if x != nil {
|
||||
return x.AttackSumHp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ShopData struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
|
@ -734,15 +782,17 @@ type SCNianAttackData struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
TypeId int32 `protobuf:"varint,1,opt,name=TypeId,proto3" json:"TypeId,omitempty"` //1-小爆竹 2-小爆竹*10 3-大爆竹
|
||||
BossHp int64 `protobuf:"varint,2,opt,name=BossHp,proto3" json:"BossHp,omitempty"` //BOSS当前血量
|
||||
Award []*RankAwardData `protobuf:"bytes,3,rep,name=Award,proto3" json:"Award,omitempty"` //获得道具
|
||||
AttackHp int64 `protobuf:"varint,4,opt,name=AttackHp,proto3" json:"AttackHp,omitempty"` // 攻击伤害
|
||||
IsDie bool `protobuf:"varint,5,opt,name=IsDie,proto3" json:"IsDie,omitempty"` //BOSS是否死亡
|
||||
DieAward []*RankAwardData `protobuf:"bytes,6,rep,name=DieAward,proto3" json:"DieAward,omitempty"` //BOSS死亡奖励
|
||||
BuffCount int64 `protobuf:"varint,7,opt,name=BuffCount,proto3" json:"BuffCount,omitempty"` //BUFF剩余次数
|
||||
ExtraDrop []*RankAwardData `protobuf:"bytes,8,rep,name=ExtraDrop,proto3" json:"ExtraDrop,omitempty"` //大爆竹额外掉落
|
||||
FloorReward []*RankAwardData `protobuf:"bytes,9,rep,name=FloorReward,proto3" json:"FloorReward,omitempty"` //保底奖励
|
||||
TypeId int32 `protobuf:"varint,1,opt,name=TypeId,proto3" json:"TypeId,omitempty"` //1-小爆竹 2-小爆竹*10 3-大爆竹
|
||||
BossHp int64 `protobuf:"varint,2,opt,name=BossHp,proto3" json:"BossHp,omitempty"` //BOSS当前血量
|
||||
Award []*RankAwardData `protobuf:"bytes,3,rep,name=Award,proto3" json:"Award,omitempty"` //获得道具
|
||||
AttackHp int64 `protobuf:"varint,4,opt,name=AttackHp,proto3" json:"AttackHp,omitempty"` // 攻击伤害
|
||||
IsDie bool `protobuf:"varint,5,opt,name=IsDie,proto3" json:"IsDie,omitempty"` //BOSS是否死亡
|
||||
DieAward []*RankAwardData `protobuf:"bytes,6,rep,name=DieAward,proto3" json:"DieAward,omitempty"` //BOSS死亡奖励
|
||||
BuffCount int64 `protobuf:"varint,7,opt,name=BuffCount,proto3" json:"BuffCount,omitempty"` //BUFF剩余次数
|
||||
ExtraDrop []*RankAwardData `protobuf:"bytes,8,rep,name=ExtraDrop,proto3" json:"ExtraDrop,omitempty"` //大爆竹额外掉落
|
||||
FloorReward []*RankAwardData `protobuf:"bytes,9,rep,name=FloorReward,proto3" json:"FloorReward,omitempty"` //保底奖励
|
||||
AttackMaxHp int64 `protobuf:"varint,10,opt,name=AttackMaxHp,proto3" json:"AttackMaxHp,omitempty"` //单次攻击最大血量
|
||||
AttackSumHp int64 `protobuf:"varint,11,opt,name=AttackSumHp,proto3" json:"AttackSumHp,omitempty"` //攻击总伤害
|
||||
}
|
||||
|
||||
func (x *SCNianAttackData) Reset() {
|
||||
|
|
@ -840,6 +890,20 @@ func (x *SCNianAttackData) GetFloorReward() []*RankAwardData {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (x *SCNianAttackData) GetAttackMaxHp() int64 {
|
||||
if x != nil {
|
||||
return x.AttackMaxHp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCNianAttackData) GetAttackSumHp() int64 {
|
||||
if x != nil {
|
||||
return x.AttackSumHp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
//领取签到奖励
|
||||
//PACKET_CSNianSignAward
|
||||
type CSNianSignAward struct {
|
||||
|
|
@ -886,9 +950,12 @@ type SCNianSignAward struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SignAwardTime int64 `protobuf:"varint,1,opt,name=SignAwardTime,proto3" json:"SignAwardTime,omitempty"`
|
||||
SignAward []*RankAwardData `protobuf:"bytes,2,rep,name=SignAward,proto3" json:"SignAward,omitempty"` //签到奖励
|
||||
OpRetCode OpResultCode_Nian `protobuf:"varint,3,opt,name=OpRetCode,proto3,enum=activity.OpResultCode_Nian" json:"OpRetCode,omitempty"` // 返回错误码
|
||||
SignAwardTime int64 `protobuf:"varint,1,opt,name=SignAwardTime,proto3" json:"SignAwardTime,omitempty"`
|
||||
SignAward []*RankAwardData `protobuf:"bytes,2,rep,name=SignAward,proto3" json:"SignAward,omitempty"` //签到奖励
|
||||
OtherSignAward []*RankAwardData `protobuf:"bytes,3,rep,name=OtherSignAward,proto3" json:"OtherSignAward,omitempty"` //签到额外奖励
|
||||
OtherSignAwardCount int32 `protobuf:"varint,4,opt,name=OtherSignAwardCount,proto3" json:"OtherSignAwardCount,omitempty"` //额外奖励领取次数
|
||||
OtherSignAwardProp int32 `protobuf:"varint,5,opt,name=OtherSignAwardProp,proto3" json:"OtherSignAwardProp,omitempty"` //额外奖励概率
|
||||
OpRetCode OpResultCode_Nian `protobuf:"varint,6,opt,name=OpRetCode,proto3,enum=activity.OpResultCode_Nian" json:"OpRetCode,omitempty"` // 返回错误码
|
||||
}
|
||||
|
||||
func (x *SCNianSignAward) Reset() {
|
||||
|
|
@ -937,6 +1004,27 @@ func (x *SCNianSignAward) GetSignAward() []*RankAwardData {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (x *SCNianSignAward) GetOtherSignAward() []*RankAwardData {
|
||||
if x != nil {
|
||||
return x.OtherSignAward
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SCNianSignAward) GetOtherSignAwardCount() int32 {
|
||||
if x != nil {
|
||||
return x.OtherSignAwardCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCNianSignAward) GetOtherSignAwardProp() int32 {
|
||||
if x != nil {
|
||||
return x.OtherSignAwardProp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCNianSignAward) GetOpRetCode() OpResultCode_Nian {
|
||||
if x != nil {
|
||||
return x.OpRetCode
|
||||
|
|
@ -1063,7 +1151,7 @@ var file_protocol_activity_nian_proto_rawDesc = []byte{
|
|||
0x0a, 0x1c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76,
|
||||
0x69, 0x74, 0x79, 0x2f, 0x6e, 0x69, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08,
|
||||
0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x22, 0x0c, 0x0a, 0x0a, 0x43, 0x53, 0x4e, 0x69,
|
||||
0x61, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x22, 0xc2, 0x04, 0x0a, 0x0a, 0x53, 0x43, 0x4e, 0x69, 0x61,
|
||||
0x61, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x22, 0xd7, 0x06, 0x0a, 0x0a, 0x53, 0x43, 0x4e, 0x69, 0x61,
|
||||
0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x11, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
|
||||
0x79, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x11, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54,
|
||||
|
|
@ -1099,113 +1187,144 @@ var file_protocol_activity_nian_proto_rawDesc = []byte{
|
|||
0x61, 0x6e, 0x6b, 0x4e, 0x65, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x4e,
|
||||
0x65, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x4e,
|
||||
0x65, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x10, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x06, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x22, 0x5c, 0x0a, 0x08, 0x53,
|
||||
0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x68, 0x6f, 0x70, 0x49,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x53, 0x68, 0x6f, 0x70, 0x49, 0x64, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x53, 0x68, 0x6f, 0x70, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x07, 0x53, 0x68, 0x6f, 0x70, 0x4e, 0x75, 0x6d, 0x12, 0x1e, 0x0a, 0x0a, 0x4d, 0x61, 0x78,
|
||||
0x53, 0x68, 0x6f, 0x70, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x4d,
|
||||
0x61, 0x78, 0x53, 0x68, 0x6f, 0x70, 0x4e, 0x75, 0x6d, 0x22, 0x0c, 0x0a, 0x0a, 0x43, 0x53, 0x4e,
|
||||
0x69, 0x61, 0x6e, 0x42, 0x75, 0x66, 0x66, 0x22, 0x65, 0x0a, 0x0a, 0x53, 0x43, 0x4e, 0x69, 0x61,
|
||||
0x6e, 0x42, 0x75, 0x66, 0x66, 0x12, 0x1c, 0x0a, 0x09, 0x42, 0x75, 0x66, 0x66, 0x43, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x42, 0x75, 0x66, 0x66, 0x43, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
|
||||
0x79, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x5f, 0x4e,
|
||||
0x69, 0x61, 0x6e, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x52,
|
||||
0x0a, 0x0c, 0x4e, 0x69, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16,
|
||||
0x01, 0x28, 0x05, 0x52, 0x06, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x30, 0x0a, 0x13, 0x4f,
|
||||
0x74, 0x68, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x53,
|
||||
0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a,
|
||||
0x12, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x50,
|
||||
0x72, 0x6f, 0x70, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x4f, 0x74, 0x68, 0x65, 0x72,
|
||||
0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x12, 0x3f, 0x0a,
|
||||
0x0e, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18,
|
||||
0x13, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
|
||||
0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0e,
|
||||
0x4f, 0x74, 0x68, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x2c,
|
||||
0x0a, 0x11, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x61, 0x78, 0x43, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x4f, 0x74, 0x68, 0x65, 0x72,
|
||||
0x53, 0x69, 0x67, 0x6e, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b,
|
||||
0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x4d, 0x61, 0x78, 0x48, 0x70, 0x18, 0x15, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x0b, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x4d, 0x61, 0x78, 0x48, 0x70, 0x12, 0x20,
|
||||
0x0a, 0x0b, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x53, 0x75, 0x6d, 0x48, 0x70, 0x18, 0x16, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x0b, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x53, 0x75, 0x6d, 0x48, 0x70,
|
||||
0x22, 0x5c, 0x0a, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x53, 0x68, 0x6f, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x53, 0x68,
|
||||
0x6f, 0x70, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x68, 0x6f, 0x70, 0x4e, 0x75, 0x6d, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x53, 0x68, 0x6f, 0x70, 0x4e, 0x75, 0x6d, 0x12, 0x1e,
|
||||
0x0a, 0x0a, 0x4d, 0x61, 0x78, 0x53, 0x68, 0x6f, 0x70, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x0a, 0x4d, 0x61, 0x78, 0x53, 0x68, 0x6f, 0x70, 0x4e, 0x75, 0x6d, 0x22, 0x0c,
|
||||
0x0a, 0x0a, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x42, 0x75, 0x66, 0x66, 0x22, 0x65, 0x0a, 0x0a,
|
||||
0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x42, 0x75, 0x66, 0x66, 0x12, 0x1c, 0x0a, 0x09, 0x42, 0x75,
|
||||
0x66, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x42,
|
||||
0x75, 0x66, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65,
|
||||
0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x63,
|
||||
0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43,
|
||||
0x6f, 0x64, 0x65, 0x5f, 0x4e, 0x69, 0x61, 0x6e, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43,
|
||||
0x6f, 0x64, 0x65, 0x22, 0x52, 0x0a, 0x0c, 0x4e, 0x69, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x44,
|
||||
0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x04, 0x44,
|
||||
0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x63, 0x74, 0x69,
|
||||
0x76, 0x69, 0x74, 0x79, 0x2e, 0x4e, 0x69, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x55, 0x0a, 0x0c, 0x4e, 0x69, 0x61, 0x6e, 0x52,
|
||||
0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x12,
|
||||
0x2d, 0x0a, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17,
|
||||
0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77,
|
||||
0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x22, 0x41,
|
||||
0x0a, 0x0d, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x49, 0x74, 0x65, 0x6d, 0x4e,
|
||||
0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75,
|
||||
0x6d, 0x22, 0x26, 0x0a, 0x0c, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x41, 0x74, 0x74, 0x61, 0x63,
|
||||
0x6b, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x22, 0xac, 0x03, 0x0a, 0x10, 0x53, 0x43,
|
||||
0x4e, 0x69, 0x61, 0x6e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
||||
0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e,
|
||||
0x4e, 0x69, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x44, 0x61,
|
||||
0x74, 0x61, 0x22, 0x55, 0x0a, 0x0c, 0x4e, 0x69, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x05, 0x41, 0x77,
|
||||
0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69,
|
||||
0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61,
|
||||
0x74, 0x61, 0x52, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x22, 0x41, 0x0a, 0x0d, 0x52, 0x61, 0x6e,
|
||||
0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74,
|
||||
0x65, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d,
|
||||
0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x07, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x22, 0x26, 0x0a, 0x0c,
|
||||
0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79,
|
||||
0x70, 0x65, 0x49, 0x64, 0x22, 0xe8, 0x02, 0x0a, 0x10, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x41,
|
||||
0x74, 0x74, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, 0x70,
|
||||
0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49,
|
||||
0x64, 0x12, 0x16, 0x0a, 0x06, 0x42, 0x6f, 0x73, 0x73, 0x48, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x06, 0x42, 0x6f, 0x73, 0x73, 0x48, 0x70, 0x12, 0x2d, 0x0a, 0x05, 0x41, 0x77, 0x61,
|
||||
0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76,
|
||||
0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x42, 0x6f, 0x73, 0x73, 0x48, 0x70,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x42, 0x6f, 0x73, 0x73, 0x48, 0x70, 0x12, 0x2d,
|
||||
0x0a, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e,
|
||||
0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61,
|
||||
0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x08, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x49, 0x73, 0x44,
|
||||
0x69, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x49, 0x73, 0x44, 0x69, 0x65, 0x12,
|
||||
0x33, 0x0a, 0x08, 0x44, 0x69, 0x65, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e,
|
||||
0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x44, 0x69, 0x65, 0x41,
|
||||
0x77, 0x61, 0x72, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x42, 0x75, 0x66, 0x66, 0x43, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x42, 0x75, 0x66, 0x66, 0x43, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x12, 0x35, 0x0a, 0x09, 0x45, 0x78, 0x74, 0x72, 0x61, 0x44, 0x72, 0x6f, 0x70, 0x18,
|
||||
0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
|
||||
0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09,
|
||||
0x45, 0x78, 0x74, 0x72, 0x61, 0x44, 0x72, 0x6f, 0x70, 0x12, 0x39, 0x0a, 0x0b, 0x46, 0x6c, 0x6f,
|
||||
0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17,
|
||||
0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77,
|
||||
0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x52, 0x65,
|
||||
0x77, 0x61, 0x72, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x4d, 0x61,
|
||||
0x78, 0x48, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x41, 0x74, 0x74, 0x61, 0x63,
|
||||
0x6b, 0x4d, 0x61, 0x78, 0x48, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b,
|
||||
0x53, 0x75, 0x6d, 0x48, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x41, 0x74, 0x74,
|
||||
0x61, 0x63, 0x6b, 0x53, 0x75, 0x6d, 0x48, 0x70, 0x22, 0x11, 0x0a, 0x0f, 0x43, 0x53, 0x4e, 0x69,
|
||||
0x61, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x22, 0xcc, 0x02, 0x0a, 0x0f,
|
||||
0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12,
|
||||
0x24, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72,
|
||||
0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61,
|
||||
0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76,
|
||||
0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74,
|
||||
0x61, 0x52, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x41, 0x74, 0x74, 0x61,
|
||||
0x63, 0x6b, 0x48, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x41, 0x74, 0x74, 0x61,
|
||||
0x63, 0x6b, 0x48, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x49, 0x73, 0x44, 0x69, 0x65, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x05, 0x49, 0x73, 0x44, 0x69, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x44, 0x69,
|
||||
0x65, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61,
|
||||
0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72,
|
||||
0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x44, 0x69, 0x65, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12,
|
||||
0x1c, 0x0a, 0x09, 0x42, 0x75, 0x66, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x09, 0x42, 0x75, 0x66, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x35, 0x0a,
|
||||
0x09, 0x45, 0x78, 0x74, 0x72, 0x61, 0x44, 0x72, 0x6f, 0x70, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b,
|
||||
0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x45, 0x78, 0x74, 0x72, 0x61,
|
||||
0x44, 0x72, 0x6f, 0x70, 0x12, 0x39, 0x0a, 0x0b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x52, 0x65, 0x77,
|
||||
0x61, 0x72, 0x64, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69,
|
||||
0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61,
|
||||
0x74, 0x61, 0x52, 0x0b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x22,
|
||||
0x11, 0x0a, 0x0f, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61,
|
||||
0x72, 0x64, 0x22, 0xa9, 0x01, 0x0a, 0x0f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x53, 0x69, 0x67,
|
||||
0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77,
|
||||
0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x53,
|
||||
0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x09,
|
||||
0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x17, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41,
|
||||
0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77,
|
||||
0x61, 0x72, 0x64, 0x12, 0x39, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
|
||||
0x79, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x5f, 0x4e,
|
||||
0x69, 0x61, 0x6e, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x20,
|
||||
0x0a, 0x0c, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x4e, 0x75, 0x6d,
|
||||
0x22, 0x8a, 0x01, 0x0a, 0x0c, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67,
|
||||
0x65, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
|
||||
0x4e, 0x75, 0x6d, 0x12, 0x2d, 0x0a, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61,
|
||||
0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x41, 0x77, 0x61,
|
||||
0x72, 0x64, 0x12, 0x39, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
|
||||
0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x5f, 0x4e, 0x69,
|
||||
0x61, 0x6e, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x2a, 0xe2, 0x02,
|
||||
0x0a, 0x0c, 0x4e, 0x69, 0x61, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x14,
|
||||
0x0a, 0x10, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4e, 0x69, 0x61, 0x6e, 0x5f, 0x5a, 0x45,
|
||||
0x52, 0x4f, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43,
|
||||
0x53, 0x4e, 0x69, 0x61, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x10, 0xe4, 0x14, 0x12, 0x16, 0x0a, 0x11,
|
||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x44, 0x61, 0x74,
|
||||
0x61, 0x10, 0xe5, 0x14, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43,
|
||||
0x53, 0x4e, 0x69, 0x61, 0x6e, 0x42, 0x75, 0x66, 0x66, 0x10, 0xe6, 0x14, 0x12, 0x16, 0x0a, 0x11,
|
||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x42, 0x75, 0x66,
|
||||
0x66, 0x10, 0xe7, 0x14, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43,
|
||||
0x53, 0x4e, 0x69, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x10, 0xe8, 0x14,
|
||||
0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61,
|
||||
0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x10, 0xe9, 0x14, 0x12, 0x18, 0x0a, 0x13,
|
||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x41, 0x74, 0x74,
|
||||
0x61, 0x63, 0x6b, 0x10, 0xea, 0x14, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
|
||||
0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74,
|
||||
0x61, 0x10, 0xeb, 0x14, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43,
|
||||
0x53, 0x4e, 0x69, 0x61, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0xec,
|
||||
0x14, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e, 0x69,
|
||||
0x61, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0xed, 0x14, 0x12, 0x18,
|
||||
0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x43,
|
||||
0x68, 0x61, 0x6e, 0x67, 0x65, 0x10, 0xee, 0x14, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x10,
|
||||
0xef, 0x14, 0x2a, 0x3e, 0x0a, 0x11, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f,
|
||||
0x64, 0x65, 0x5f, 0x4e, 0x69, 0x61, 0x6e, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x52, 0x43, 0x5f,
|
||||
0x53, 0x75, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x4e, 0x69, 0x61, 0x6e, 0x10, 0x00, 0x12, 0x13, 0x0a,
|
||||
0x0f, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x4e, 0x69, 0x61, 0x6e,
|
||||
0x10, 0x01, 0x42, 0x28, 0x5a, 0x26, 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, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
0x61, 0x52, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x3f, 0x0a, 0x0e,
|
||||
0x4f, 0x74, 0x68, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e,
|
||||
0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0e, 0x4f,
|
||||
0x74, 0x68, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x30, 0x0a,
|
||||
0x13, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x43,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x4f, 0x74, 0x68, 0x65,
|
||||
0x72, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12,
|
||||
0x2e, 0x0a, 0x12, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72,
|
||||
0x64, 0x50, 0x72, 0x6f, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x4f, 0x74, 0x68,
|
||||
0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x12,
|
||||
0x39, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x4f, 0x70,
|
||||
0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x5f, 0x4e, 0x69, 0x61, 0x6e, 0x52,
|
||||
0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x20, 0x0a, 0x0c, 0x43, 0x53,
|
||||
0x4e, 0x69, 0x61, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75,
|
||||
0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x22, 0x8a, 0x01, 0x0a,
|
||||
0x0c, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x12,
|
||||
0x2d, 0x0a, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17,
|
||||
0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77,
|
||||
0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x39,
|
||||
0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x4f, 0x70, 0x52,
|
||||
0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x5f, 0x4e, 0x69, 0x61, 0x6e, 0x52, 0x09,
|
||||
0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x2a, 0xe2, 0x02, 0x0a, 0x0c, 0x4e, 0x69,
|
||||
0x61, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4e, 0x69, 0x61, 0x6e, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00,
|
||||
0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61,
|
||||
0x6e, 0x44, 0x61, 0x74, 0x61, 0x10, 0xe4, 0x14, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x10, 0xe5, 0x14,
|
||||
0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61,
|
||||
0x6e, 0x42, 0x75, 0x66, 0x66, 0x10, 0xe6, 0x14, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x42, 0x75, 0x66, 0x66, 0x10, 0xe7, 0x14,
|
||||
0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61,
|
||||
0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x10, 0xe8, 0x14, 0x12, 0x1a, 0x0a, 0x15,
|
||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x52, 0x61, 0x6e,
|
||||
0x6b, 0x44, 0x61, 0x74, 0x61, 0x10, 0xe9, 0x14, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x10,
|
||||
0xea, 0x14, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e,
|
||||
0x69, 0x61, 0x6e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x10, 0xeb, 0x14,
|
||||
0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61,
|
||||
0x6e, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0xec, 0x14, 0x12, 0x1b, 0x0a,
|
||||
0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x53, 0x69,
|
||||
0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0xed, 0x14, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67,
|
||||
0x65, 0x10, 0xee, 0x14, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53,
|
||||
0x43, 0x4e, 0x69, 0x61, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x10, 0xef, 0x14, 0x2a, 0x3e,
|
||||
0x0a, 0x11, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x5f, 0x4e,
|
||||
0x69, 0x61, 0x6e, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x53, 0x75, 0x63, 0x65,
|
||||
0x73, 0x73, 0x5f, 0x4e, 0x69, 0x61, 0x6e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x50, 0x52,
|
||||
0x43, 0x5f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x4e, 0x69, 0x61, 0x6e, 0x10, 0x01, 0x42, 0x28,
|
||||
0x5a, 0x26, 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,
|
||||
0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
@ -1243,22 +1362,24 @@ var file_protocol_activity_nian_proto_goTypes = []interface{}{
|
|||
var file_protocol_activity_nian_proto_depIdxs = []int32{
|
||||
7, // 0: activity.SCNianData.RankData:type_name -> activity.NianRankData
|
||||
4, // 1: activity.SCNianData.shopData:type_name -> activity.ShopData
|
||||
1, // 2: activity.SCNianBuff.OpRetCode:type_name -> activity.OpResultCode_Nian
|
||||
8, // 3: activity.NianRankData.Data:type_name -> activity.NianRankInfo
|
||||
9, // 4: activity.NianRankInfo.Award:type_name -> activity.RankAwardData
|
||||
9, // 5: activity.SCNianAttackData.Award:type_name -> activity.RankAwardData
|
||||
9, // 6: activity.SCNianAttackData.DieAward:type_name -> activity.RankAwardData
|
||||
9, // 7: activity.SCNianAttackData.ExtraDrop:type_name -> activity.RankAwardData
|
||||
9, // 8: activity.SCNianAttackData.FloorReward:type_name -> activity.RankAwardData
|
||||
9, // 9: activity.SCNianSignAward.SignAward:type_name -> activity.RankAwardData
|
||||
1, // 10: activity.SCNianSignAward.OpRetCode:type_name -> activity.OpResultCode_Nian
|
||||
9, // 11: activity.SCNianChange.Award:type_name -> activity.RankAwardData
|
||||
1, // 12: activity.SCNianChange.OpRetCode:type_name -> activity.OpResultCode_Nian
|
||||
13, // [13:13] is the sub-list for method output_type
|
||||
13, // [13:13] is the sub-list for method input_type
|
||||
13, // [13:13] is the sub-list for extension type_name
|
||||
13, // [13:13] is the sub-list for extension extendee
|
||||
0, // [0:13] is the sub-list for field type_name
|
||||
9, // 2: activity.SCNianData.OtherSignAward:type_name -> activity.RankAwardData
|
||||
1, // 3: activity.SCNianBuff.OpRetCode:type_name -> activity.OpResultCode_Nian
|
||||
8, // 4: activity.NianRankData.Data:type_name -> activity.NianRankInfo
|
||||
9, // 5: activity.NianRankInfo.Award:type_name -> activity.RankAwardData
|
||||
9, // 6: activity.SCNianAttackData.Award:type_name -> activity.RankAwardData
|
||||
9, // 7: activity.SCNianAttackData.DieAward:type_name -> activity.RankAwardData
|
||||
9, // 8: activity.SCNianAttackData.ExtraDrop:type_name -> activity.RankAwardData
|
||||
9, // 9: activity.SCNianAttackData.FloorReward:type_name -> activity.RankAwardData
|
||||
9, // 10: activity.SCNianSignAward.SignAward:type_name -> activity.RankAwardData
|
||||
9, // 11: activity.SCNianSignAward.OtherSignAward:type_name -> activity.RankAwardData
|
||||
1, // 12: activity.SCNianSignAward.OpRetCode:type_name -> activity.OpResultCode_Nian
|
||||
9, // 13: activity.SCNianChange.Award:type_name -> activity.RankAwardData
|
||||
1, // 14: activity.SCNianChange.OpRetCode:type_name -> activity.OpResultCode_Nian
|
||||
15, // [15:15] is the sub-list for method output_type
|
||||
15, // [15:15] is the sub-list for method input_type
|
||||
15, // [15:15] is the sub-list for extension type_name
|
||||
15, // [15:15] is the sub-list for extension extendee
|
||||
0, // [0:15] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_protocol_activity_nian_proto_init() }
|
||||
|
|
|
|||
|
|
@ -45,6 +45,12 @@ message SCNianData{
|
|||
string LuckyRankNeed = 14; //幸运榜上榜条件
|
||||
string RankNeed = 15; //总伤害榜上榜条件
|
||||
int32 Switch = 16; //活动开关 1.开启 2.关闭
|
||||
int32 OtherSignAwardCount = 17;//额外奖励领取次数
|
||||
int32 OtherSignAwardProp = 18;//额外奖励概率
|
||||
repeated RankAwardData OtherSignAward = 19;//签到额外奖励
|
||||
int32 OtherSignMaxCount = 20;//额外奖励领取次数上限
|
||||
int64 AttackMaxHp =21; //单次攻击最大血量
|
||||
int64 AttackSumHp = 22; //攻击总伤害
|
||||
}
|
||||
|
||||
message ShopData{
|
||||
|
|
@ -93,6 +99,8 @@ message SCNianAttackData{
|
|||
int64 BuffCount = 7; //BUFF剩余次数
|
||||
repeated RankAwardData ExtraDrop = 8;//大爆竹额外掉落
|
||||
repeated RankAwardData FloorReward = 9;//保底奖励
|
||||
int64 AttackMaxHp = 10; //单次攻击最大血量
|
||||
int64 AttackSumHp = 11; //攻击总伤害
|
||||
}
|
||||
//领取签到奖励
|
||||
//PACKET_CSNianSignAward
|
||||
|
|
@ -102,7 +110,10 @@ message CSNianSignAward{
|
|||
message SCNianSignAward{
|
||||
int64 SignAwardTime = 1;
|
||||
repeated RankAwardData SignAward = 2;//签到奖励
|
||||
OpResultCode_Nian OpRetCode = 3; // 返回错误码
|
||||
repeated RankAwardData OtherSignAward = 3;//签到额外奖励
|
||||
int32 OtherSignAwardCount = 4;//额外奖励领取次数
|
||||
int32 OtherSignAwardProp = 5;//额外奖励概率
|
||||
OpResultCode_Nian OpRetCode = 6; // 返回错误码
|
||||
}
|
||||
//兑换
|
||||
//PACKET_CSNianChange
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,90 @@
|
|||
syntax = "proto3";
|
||||
package activity;
|
||||
option go_package = "mongo.games.com/game/protocol/activity";
|
||||
|
||||
enum PushCoinPacketID {
|
||||
PACKET_PushCoin_ZERO = 0;// 弃用消息号
|
||||
PACKET_CSPushCoinInfo = 2680; // 信息
|
||||
PACKET_SCPushCoinInfo = 2681; // 信息返回
|
||||
PACKET_CSPushCoinPlayerOp = 2682; // 玩家操作
|
||||
PACKET_SCPushCoinPlayerOp = 2683; // 玩家操作返回
|
||||
PACKET_NotifyPowerLine = 2684; // 通知能量值
|
||||
PACKET_NotifyDrawInfo = 2685; // 抽奖信息
|
||||
}
|
||||
|
||||
//信息
|
||||
//PACKET_CSPushCoinInfo
|
||||
message CSPushCoinInfo {
|
||||
}
|
||||
//PACKET_SCPushCoinInfo
|
||||
message SCPushCoinInfo {
|
||||
repeated ExchangeInfo ExchangeList = 1; //兑换信息
|
||||
repeated DrawInfo DrawList = 2; //抽奖信息
|
||||
int32 ShakeTimes = 3; //可震动次数
|
||||
int64 PowerLine = 4; // 当前能量值
|
||||
int64 PowerLineMax = 5; // 能量值上限
|
||||
int64 RefreshTimes = 6; // 刷新次数
|
||||
}
|
||||
|
||||
message ItemInfo{
|
||||
int32 ItemId = 1; //道具id
|
||||
int32 ItemNum = 2; //道具数量
|
||||
}
|
||||
|
||||
message ExchangeInfo{
|
||||
int32 Id = 1; //兑换id
|
||||
repeated ItemInfo Cost = 2; //消耗道具
|
||||
repeated ItemInfo Gain = 3; //获得道具
|
||||
int64 Times = 4; //可兑换次数 -1无限
|
||||
int64 TotalTimes = 5; //总共兑换次数 -1无限
|
||||
}
|
||||
|
||||
//抽奖信息
|
||||
//PACKET_NotifyDrawInfo
|
||||
message DrawInfo{
|
||||
int32 Id = 1; //抽奖id
|
||||
int32 ItemId = 2; //道具id
|
||||
int32 ItemNum = 3; //道具数量
|
||||
int64 Coin = 4; //价值
|
||||
}
|
||||
|
||||
//玩家操作
|
||||
//PACKET_CSPushCoinPlayerOp
|
||||
message CSPushCoinPlayerOp {
|
||||
OpCodes OpCode = 1;
|
||||
int64 OpParam = 2;
|
||||
repeated ItemInfo OpItem = 3;
|
||||
}
|
||||
|
||||
enum OpCodes {
|
||||
OP_Zero = 0;
|
||||
OP_Bet = 1; // 下注 OpParam 道具id
|
||||
OP_Gain = 2; // 得分 OpParam 1有效区 2无效区 OpItem 获得道具
|
||||
OP_Shake = 3; // 震动 OpParam 消耗次数
|
||||
OP_Refresh = 4; // 刷新 OpParam 桌面金额
|
||||
OP_Exchange = 5; // 兑换 OpParam 兑换id
|
||||
}
|
||||
|
||||
enum OpResultPushCoinCode {
|
||||
OPRC_PushCoin_Success = 0; //成功
|
||||
OPRC_PushCoin_Error = 1; //失败
|
||||
OPRC_PushCoin_BetNotEnough = 2; //投币,金币不足
|
||||
OPRC_PushCoin_ExchangeNotEnough = 3; //兑换次数不足
|
||||
OPRC_PushCoin_ShakeNotEnough = 4; //震动次数不足
|
||||
OPRC_PushCoin_ItemNotEnough = 5; //兑换消耗道具不足
|
||||
}
|
||||
|
||||
//PACKET_SCPushCoinPlayerOp
|
||||
message SCPushCoinPlayerOp {
|
||||
OpResultPushCoinCode OpRetCode = 1;
|
||||
OpCodes OpCode = 2;
|
||||
ExchangeInfo Exchange = 3; // 兑换信息,加到背包
|
||||
int32 BetId = 4; // 金币id
|
||||
}
|
||||
|
||||
//通知能量值
|
||||
//PACKET_NotifyPowerLine
|
||||
message NotifyPowerLine {
|
||||
int64 PowerLine = 1; // 当前能量值
|
||||
int64 PowerLineMax = 2; // 能量值上限
|
||||
}
|
||||
|
|
@ -193,5 +193,9 @@
|
|||
|
||||
- 5660~5669
|
||||
|
||||
### pushcoin.proto
|
||||
|
||||
- 5670~5679
|
||||
|
||||
### game.proto(玩家离开)
|
||||
- 8000~8099
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,104 @@
|
|||
syntax = "proto3";
|
||||
package pushcoin;
|
||||
option go_package = "mongo.games.com/game/protocol/pushcoin";
|
||||
|
||||
// 5670~5679
|
||||
enum PushCoinPacketID {
|
||||
PACKET_PushCoin_ZERO = 0;// 弃用消息号
|
||||
PACKET_SCPushCoinRoomInfo = 5670; // 房间信息
|
||||
PACKET_SCPushCoinRoomState = 5671; // 房间状态
|
||||
PACKET_CSPushCoinPlayerOp = 5672; // 玩家操作
|
||||
PACKET_SCPushCoinPlayerOp = 5673; // 玩家操作返回
|
||||
}
|
||||
|
||||
//房间信息
|
||||
//PACKET_SCPushCoinRoomInfo
|
||||
message SCPushCoinRoomInfo {
|
||||
int32 RoomId = 1; //房间id
|
||||
int32 GameId = 2; //游戏id
|
||||
int32 RoomMode = 3; //游戏模式
|
||||
repeated int32 Params = 4; //规则参数
|
||||
int32 State = 5; //房间当前状态
|
||||
int32 TimeOut = 6; //等待剩余时间 单位:秒
|
||||
repeated PushCoinPlayerData Players = 7; //房间内的玩家信息
|
||||
repeated ExchangeInfo ExchangeList = 8; //兑换信息
|
||||
repeated DrawInfo DrawList = 9; //抽奖信息
|
||||
repeated int64 BetList = 10; //下注金额列表
|
||||
}
|
||||
|
||||
message ItemInfo{
|
||||
int32 ItemId = 1; //道具id
|
||||
int32 ItemNum = 2; //道具数量
|
||||
}
|
||||
|
||||
message ExchangeInfo{
|
||||
int32 Id = 1; //兑换id
|
||||
repeated ItemInfo Cost = 2; //消耗道具
|
||||
repeated ItemInfo Gain = 3; //获得道具
|
||||
int32 ShakeTimes = 4; //获得震动次数
|
||||
}
|
||||
|
||||
message DrawInfo{
|
||||
int32 Id = 1; //抽奖id
|
||||
int32 ItemId = 2; //道具id
|
||||
int32 ItemNum = 3; //道具数量
|
||||
int64 Coin = 4; //价值
|
||||
}
|
||||
|
||||
message PushCoinPlayerData {
|
||||
string Name = 1; //名字
|
||||
int32 SnId = 2; //账号
|
||||
int32 Head = 3; //头像
|
||||
int32 Sex = 4; //性别
|
||||
int64 Coin = 5; //金币
|
||||
int32 Flag = 6; //二进制标记 第一位:是否掉线(0:在线 1:掉线) 第二位:是否准备(0:未准备 1:已准备)
|
||||
repeated string Params = 7; //其他数据 如:ip 等
|
||||
int32 VIP = 8;
|
||||
int32 RoleId = 9; //使用中的角色id
|
||||
int64 Level = 10; //玩家等级
|
||||
int64 Exp = 11; //玩家经验
|
||||
int32 SkinId = 12; //皮肤id
|
||||
int32 ShakeTimes = 13; //可震动次数
|
||||
int64 BaseCoin = 14; //当前底分(单次投币金额)
|
||||
int64 PowerLine = 15; // 当前能量值
|
||||
int64 PowerLineMax = 16; // 能量值上限
|
||||
int64 RefreshTimes = 17; // 刷新次数
|
||||
}
|
||||
|
||||
//房间状态
|
||||
//PACKET_SCPushCoinRoomState
|
||||
message SCPushCoinRoomState {
|
||||
int32 State = 1; //房间当前状态
|
||||
int32 SubState = 2; //房间当前子状态
|
||||
repeated int32 Params = 3; //状态参数
|
||||
}
|
||||
|
||||
//玩家操作
|
||||
//PACKET_CSPushCoinPlayerOp
|
||||
message CSPushCoinPlayerOp {
|
||||
OpCodes OpCode = 1;
|
||||
repeated int64 OpParam = 2;
|
||||
}
|
||||
|
||||
enum OpCodes {
|
||||
OP_Zero = 0;
|
||||
OP_Bet = 1; // 下注 [下注金额]
|
||||
OP_Gain = 2; // 得分 [得分金额]
|
||||
OP_Shake = 3; // 震动 [消耗次数]
|
||||
OP_Refresh = 4; // 刷新 [桌面金额]
|
||||
OP_Exchange = 5; // 兑换 [兑换id]
|
||||
OP_Draw = 6; // 抽奖 [抽奖id]
|
||||
}
|
||||
|
||||
enum OpResultCode {
|
||||
OPRC_Success = 0; //成功
|
||||
OPRC_Error = 1; //失败
|
||||
}
|
||||
|
||||
//PACKET_SCPushCoinPlayerOp
|
||||
message SCPushCoinPlayerOp {
|
||||
OpResultCode OpRetCode = 1;
|
||||
OpCodes OpCode = 2;
|
||||
ExchangeInfo Exchange = 3; // 兑换信息,加到背包
|
||||
DrawInfo Draw = 4; // 抽奖信息,掉落到桌面
|
||||
}
|
||||
|
|
@ -55,6 +55,9 @@ const (
|
|||
//年兽排行榜
|
||||
Rank_PACKET_RANK_CSNian Rank = 10019
|
||||
Rank_PACKET_RANK_SCNian Rank = 10020
|
||||
// 红包抽奖记录
|
||||
Rank_PACKET_CSRedPacketHistory Rank = 10021
|
||||
Rank_PACKET_SCRedPacketHistory Rank = 10022
|
||||
)
|
||||
|
||||
// Enum value maps for Rank.
|
||||
|
|
@ -82,30 +85,34 @@ var (
|
|||
10018: "PACKET_SCLotteryHistory",
|
||||
10019: "PACKET_RANK_CSNian",
|
||||
10020: "PACKET_RANK_SCNian",
|
||||
10021: "PACKET_CSRedPacketHistory",
|
||||
10022: "PACKET_SCRedPacketHistory",
|
||||
}
|
||||
Rank_value = map[string]int32{
|
||||
"PACKET_RANK_ZERO": 0,
|
||||
"PACKET_RANK_CSRankMatch": 10000,
|
||||
"PACKET_RANK_SCRankMatch": 10001,
|
||||
"PACKET_RANK_CSCoin": 10002,
|
||||
"PACKET_RANK_SCCoin": 10003,
|
||||
"PACKET_RANK_CSInvite": 10004,
|
||||
"PACKET_RANK_SCInvite": 10005,
|
||||
"PACKET_CSInviteLog": 10006,
|
||||
"PACKET_SCInviteLog": 10007,
|
||||
"PACKET_RANK_CSWinCoin": 10008,
|
||||
"PACKET_RANK_SCWinCoin": 10009,
|
||||
"PACKET_RANK_CSLevel": 10010,
|
||||
"PACKET_RANK_SCLevel": 10011,
|
||||
"PACKET_RANK_CSPermit": 10012,
|
||||
"PACKET_RANK_SCPermit": 10013,
|
||||
"PACKET_CSRoomAward": 10014,
|
||||
"PACKET_SCRoomAward": 10015,
|
||||
"PACKET_SCRoomAwardOne": 10016,
|
||||
"PACKET_CSLotteryHistory": 10017,
|
||||
"PACKET_SCLotteryHistory": 10018,
|
||||
"PACKET_RANK_CSNian": 10019,
|
||||
"PACKET_RANK_SCNian": 10020,
|
||||
"PACKET_RANK_ZERO": 0,
|
||||
"PACKET_RANK_CSRankMatch": 10000,
|
||||
"PACKET_RANK_SCRankMatch": 10001,
|
||||
"PACKET_RANK_CSCoin": 10002,
|
||||
"PACKET_RANK_SCCoin": 10003,
|
||||
"PACKET_RANK_CSInvite": 10004,
|
||||
"PACKET_RANK_SCInvite": 10005,
|
||||
"PACKET_CSInviteLog": 10006,
|
||||
"PACKET_SCInviteLog": 10007,
|
||||
"PACKET_RANK_CSWinCoin": 10008,
|
||||
"PACKET_RANK_SCWinCoin": 10009,
|
||||
"PACKET_RANK_CSLevel": 10010,
|
||||
"PACKET_RANK_SCLevel": 10011,
|
||||
"PACKET_RANK_CSPermit": 10012,
|
||||
"PACKET_RANK_SCPermit": 10013,
|
||||
"PACKET_CSRoomAward": 10014,
|
||||
"PACKET_SCRoomAward": 10015,
|
||||
"PACKET_SCRoomAwardOne": 10016,
|
||||
"PACKET_CSLotteryHistory": 10017,
|
||||
"PACKET_SCLotteryHistory": 10018,
|
||||
"PACKET_RANK_CSNian": 10019,
|
||||
"PACKET_RANK_SCNian": 10020,
|
||||
"PACKET_CSRedPacketHistory": 10021,
|
||||
"PACKET_SCRedPacketHistory": 10022,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -2569,6 +2576,165 @@ func (x *SCNian) GetTypeId() int32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
// 红包抽奖记录
|
||||
// PACKET_CSRedPacketHistory
|
||||
type CSRedPacketHistory struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` // 红包活动id
|
||||
}
|
||||
|
||||
func (x *CSRedPacketHistory) Reset() {
|
||||
*x = CSRedPacketHistory{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protocol_rank_rank_proto_msgTypes[33]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CSRedPacketHistory) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CSRedPacketHistory) ProtoMessage() {}
|
||||
|
||||
func (x *CSRedPacketHistory) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_protocol_rank_rank_proto_msgTypes[33]
|
||||
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 CSRedPacketHistory.ProtoReflect.Descriptor instead.
|
||||
func (*CSRedPacketHistory) Descriptor() ([]byte, []int) {
|
||||
return file_protocol_rank_rank_proto_rawDescGZIP(), []int{33}
|
||||
}
|
||||
|
||||
func (x *CSRedPacketHistory) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type RedPacketHistory struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Ts int64 `protobuf:"varint,1,opt,name=Ts,proto3" json:"Ts,omitempty"` // 时间戳
|
||||
ItemId int32 `protobuf:"varint,5,opt,name=ItemId,proto3" json:"ItemId,omitempty"` // 道具id
|
||||
ItemNum int64 `protobuf:"varint,6,opt,name=ItemNum,proto3" json:"ItemNum,omitempty"` // 道具数量
|
||||
}
|
||||
|
||||
func (x *RedPacketHistory) Reset() {
|
||||
*x = RedPacketHistory{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protocol_rank_rank_proto_msgTypes[34]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RedPacketHistory) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RedPacketHistory) ProtoMessage() {}
|
||||
|
||||
func (x *RedPacketHistory) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_protocol_rank_rank_proto_msgTypes[34]
|
||||
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 RedPacketHistory.ProtoReflect.Descriptor instead.
|
||||
func (*RedPacketHistory) Descriptor() ([]byte, []int) {
|
||||
return file_protocol_rank_rank_proto_rawDescGZIP(), []int{34}
|
||||
}
|
||||
|
||||
func (x *RedPacketHistory) GetTs() int64 {
|
||||
if x != nil {
|
||||
return x.Ts
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RedPacketHistory) GetItemId() int32 {
|
||||
if x != nil {
|
||||
return x.ItemId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RedPacketHistory) GetItemNum() int64 {
|
||||
if x != nil {
|
||||
return x.ItemNum
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type SCRedPacketHistory struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
List []*RedPacketHistory `protobuf:"bytes,1,rep,name=List,proto3" json:"List,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SCRedPacketHistory) Reset() {
|
||||
*x = SCRedPacketHistory{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protocol_rank_rank_proto_msgTypes[35]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SCRedPacketHistory) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SCRedPacketHistory) ProtoMessage() {}
|
||||
|
||||
func (x *SCRedPacketHistory) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_protocol_rank_rank_proto_msgTypes[35]
|
||||
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 SCRedPacketHistory.ProtoReflect.Descriptor instead.
|
||||
func (*SCRedPacketHistory) Descriptor() ([]byte, []int) {
|
||||
return file_protocol_rank_rank_proto_rawDescGZIP(), []int{35}
|
||||
}
|
||||
|
||||
func (x *SCRedPacketHistory) GetList() []*RedPacketHistory {
|
||||
if x != nil {
|
||||
return x.List
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_protocol_rank_rank_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protocol_rank_rank_proto_rawDesc = []byte{
|
||||
|
|
@ -2805,56 +2971,72 @@ var file_protocol_rank_rank_proto_rawDesc = []byte{
|
|||
0x28, 0x05, 0x52, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x54, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x54, 0x6f, 0x74,
|
||||
0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x2a, 0xd0, 0x04, 0x0a, 0x04, 0x52,
|
||||
0x61, 0x6e, 0x6b, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41,
|
||||
0x4e, 0x4b, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43,
|
||||
0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x52, 0x61, 0x6e, 0x6b, 0x4d,
|
||||
0x61, 0x74, 0x63, 0x68, 0x10, 0x90, 0x4e, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||
0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x53, 0x43, 0x52, 0x61, 0x6e, 0x6b, 0x4d, 0x61, 0x74,
|
||||
0x63, 0x68, 0x10, 0x91, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
|
||||
0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0x92, 0x4e, 0x12, 0x17,
|
||||
0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x53, 0x43,
|
||||
0x43, 0x6f, 0x69, 0x6e, 0x10, 0x93, 0x4e, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||
0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x10,
|
||||
0x94, 0x4e, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e,
|
||||
0x4b, 0x5f, 0x53, 0x43, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x10, 0x95, 0x4e, 0x12, 0x17, 0x0a,
|
||||
0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65,
|
||||
0x4c, 0x6f, 0x67, 0x10, 0x96, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
|
||||
0x5f, 0x53, 0x43, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x10, 0x97, 0x4e, 0x12,
|
||||
0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43,
|
||||
0x53, 0x57, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0x98, 0x4e, 0x12, 0x1a, 0x0a, 0x15, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x53, 0x43, 0x57, 0x69, 0x6e,
|
||||
0x43, 0x6f, 0x69, 0x6e, 0x10, 0x99, 0x4e, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||
0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x10, 0x9a,
|
||||
0x4e, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b,
|
||||
0x5f, 0x53, 0x43, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x10, 0x9b, 0x4e, 0x12, 0x19, 0x0a, 0x14, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x50, 0x65, 0x72,
|
||||
0x6d, 0x69, 0x74, 0x10, 0x9c, 0x4e, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
|
||||
0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x53, 0x43, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x10, 0x9d,
|
||||
0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x52, 0x6f,
|
||||
0x6f, 0x6d, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0x9e, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x77, 0x61, 0x72, 0x64,
|
||||
0x10, 0x9f, 0x4e, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43,
|
||||
0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x77, 0x61, 0x72, 0x64, 0x4f, 0x6e, 0x65, 0x10, 0xa0, 0x4e, 0x12,
|
||||
0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4c, 0x6f, 0x74, 0x74,
|
||||
0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x10, 0xa1, 0x4e, 0x12, 0x1c, 0x0a,
|
||||
0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72,
|
||||
0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x10, 0xa2, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61,
|
||||
0x6e, 0x10, 0xa3, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52,
|
||||
0x41, 0x4e, 0x4b, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x10, 0xa4, 0x4e, 0x2a, 0x8d, 0x01,
|
||||
0x0a, 0x0a, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x13, 0x0a, 0x0f,
|
||||
0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4e, 0x6f, 0x6e, 0x65, 0x10,
|
||||
0x00, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f,
|
||||
0x54, 0x6f, 0x74, 0x61, 0x6c, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x6e, 0x76, 0x69, 0x74,
|
||||
0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x57, 0x65, 0x65, 0x6b, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10,
|
||||
0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x74, 0x68,
|
||||
0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65,
|
||||
0x5f, 0x55, 0x70, 0x57, 0x65, 0x65, 0x6b, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x6e, 0x76,
|
||||
0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x61, 0x78, 0x10, 0x05, 0x42, 0x24, 0x5a,
|
||||
0x22, 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, 0x72,
|
||||
0x61, 0x6e, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x22, 0x24, 0x0a, 0x12, 0x43, 0x53,
|
||||
0x52, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x64,
|
||||
0x22, 0x54, 0x0a, 0x10, 0x52, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x48, 0x69, 0x73,
|
||||
0x74, 0x6f, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x02, 0x54, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x49,
|
||||
0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x22, 0x40, 0x0a, 0x12, 0x53, 0x43, 0x52, 0x65, 0x64, 0x50,
|
||||
0x61, 0x63, 0x6b, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x2a, 0x0a, 0x04,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x72, 0x61, 0x6e,
|
||||
0x6b, 0x2e, 0x52, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f,
|
||||
0x72, 0x79, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x2a, 0x90, 0x05, 0x0a, 0x04, 0x52, 0x61, 0x6e,
|
||||
0x6b, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b,
|
||||
0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||
0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x52, 0x61, 0x6e, 0x6b, 0x4d, 0x61, 0x74,
|
||||
0x63, 0x68, 0x10, 0x90, 0x4e, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
|
||||
0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x53, 0x43, 0x52, 0x61, 0x6e, 0x6b, 0x4d, 0x61, 0x74, 0x63, 0x68,
|
||||
0x10, 0x91, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41,
|
||||
0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0x92, 0x4e, 0x12, 0x17, 0x0a, 0x12,
|
||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x53, 0x43, 0x43, 0x6f,
|
||||
0x69, 0x6e, 0x10, 0x93, 0x4e, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
|
||||
0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x10, 0x94, 0x4e,
|
||||
0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f,
|
||||
0x53, 0x43, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x10, 0x95, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4c, 0x6f,
|
||||
0x67, 0x10, 0x96, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53,
|
||||
0x43, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x10, 0x97, 0x4e, 0x12, 0x1a, 0x0a,
|
||||
0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x57,
|
||||
0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0x98, 0x4e, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43,
|
||||
0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x53, 0x43, 0x57, 0x69, 0x6e, 0x43, 0x6f,
|
||||
0x69, 0x6e, 0x10, 0x99, 0x4e, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
|
||||
0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x10, 0x9a, 0x4e, 0x12,
|
||||
0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x53,
|
||||
0x43, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x10, 0x9b, 0x4e, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43,
|
||||
0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x50, 0x65, 0x72, 0x6d, 0x69,
|
||||
0x74, 0x10, 0x9c, 0x4e, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52,
|
||||
0x41, 0x4e, 0x4b, 0x5f, 0x53, 0x43, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x10, 0x9d, 0x4e, 0x12,
|
||||
0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x52, 0x6f, 0x6f, 0x6d,
|
||||
0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0x9e, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x53, 0x43, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0x9f,
|
||||
0x4e, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x52, 0x6f,
|
||||
0x6f, 0x6d, 0x41, 0x77, 0x61, 0x72, 0x64, 0x4f, 0x6e, 0x65, 0x10, 0xa0, 0x4e, 0x12, 0x1c, 0x0a,
|
||||
0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72,
|
||||
0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x10, 0xa1, 0x4e, 0x12, 0x1c, 0x0a, 0x17, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x48,
|
||||
0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x10, 0xa2, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43,
|
||||
0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x10,
|
||||
0xa3, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e,
|
||||
0x4b, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x10, 0xa4, 0x4e, 0x12, 0x1e, 0x0a, 0x19, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x52, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65,
|
||||
0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x10, 0xa5, 0x4e, 0x12, 0x1e, 0x0a, 0x19, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x52, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65,
|
||||
0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x10, 0xa6, 0x4e, 0x2a, 0x8d, 0x01, 0x0a, 0x0a,
|
||||
0x52, 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x6e,
|
||||
0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12,
|
||||
0x14, 0x0a, 0x10, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x6f,
|
||||
0x74, 0x61, 0x6c, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54,
|
||||
0x79, 0x70, 0x65, 0x5f, 0x57, 0x65, 0x65, 0x6b, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x6e,
|
||||
0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x10, 0x03,
|
||||
0x12, 0x15, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x55,
|
||||
0x70, 0x57, 0x65, 0x65, 0x6b, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x6e, 0x76, 0x69, 0x74,
|
||||
0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x61, 0x78, 0x10, 0x05, 0x42, 0x24, 0x5a, 0x22, 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, 0x72, 0x61, 0x6e,
|
||||
0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
@ -2870,7 +3052,7 @@ func file_protocol_rank_rank_proto_rawDescGZIP() []byte {
|
|||
}
|
||||
|
||||
var file_protocol_rank_rank_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_protocol_rank_rank_proto_msgTypes = make([]protoimpl.MessageInfo, 33)
|
||||
var file_protocol_rank_rank_proto_msgTypes = make([]protoimpl.MessageInfo, 36)
|
||||
var file_protocol_rank_rank_proto_goTypes = []interface{}{
|
||||
(Rank)(0), // 0: rank.Rank
|
||||
(RankInvite)(0), // 1: rank.RankInvite
|
||||
|
|
@ -2907,6 +3089,9 @@ var file_protocol_rank_rank_proto_goTypes = []interface{}{
|
|||
(*CSNian)(nil), // 32: rank.CSNian
|
||||
(*NianRankData)(nil), // 33: rank.NianRankData
|
||||
(*SCNian)(nil), // 34: rank.SCNian
|
||||
(*CSRedPacketHistory)(nil), // 35: rank.CSRedPacketHistory
|
||||
(*RedPacketHistory)(nil), // 36: rank.RedPacketHistory
|
||||
(*SCRedPacketHistory)(nil), // 37: rank.SCRedPacketHistory
|
||||
}
|
||||
var file_protocol_rank_rank_proto_depIdxs = []int32{
|
||||
3, // 0: rank.SCRankMatch.Ranks:type_name -> rank.SeasonRank
|
||||
|
|
@ -2929,11 +3114,12 @@ var file_protocol_rank_rank_proto_depIdxs = []int32{
|
|||
30, // 17: rank.SCLotteryHistory.List:type_name -> rank.LotteryHistory
|
||||
33, // 18: rank.SCNian.Ranks:type_name -> rank.NianRankData
|
||||
33, // 19: rank.SCNian.Me:type_name -> rank.NianRankData
|
||||
20, // [20:20] is the sub-list for method output_type
|
||||
20, // [20:20] is the sub-list for method input_type
|
||||
20, // [20:20] is the sub-list for extension type_name
|
||||
20, // [20:20] is the sub-list for extension extendee
|
||||
0, // [0:20] is the sub-list for field type_name
|
||||
36, // 20: rank.SCRedPacketHistory.List:type_name -> rank.RedPacketHistory
|
||||
21, // [21:21] is the sub-list for method output_type
|
||||
21, // [21:21] is the sub-list for method input_type
|
||||
21, // [21:21] is the sub-list for extension type_name
|
||||
21, // [21:21] is the sub-list for extension extendee
|
||||
0, // [0:21] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_protocol_rank_rank_proto_init() }
|
||||
|
|
@ -3338,6 +3524,42 @@ func file_protocol_rank_rank_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_protocol_rank_rank_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CSRedPacketHistory); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protocol_rank_rank_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RedPacketHistory); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protocol_rank_rank_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SCRedPacketHistory); 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{
|
||||
|
|
@ -3345,7 +3567,7 @@ func file_protocol_rank_rank_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protocol_rank_rank_proto_rawDesc,
|
||||
NumEnums: 2,
|
||||
NumMessages: 33,
|
||||
NumMessages: 36,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -36,6 +36,9 @@ enum Rank{
|
|||
//年兽排行榜
|
||||
PACKET_RANK_CSNian = 10019;
|
||||
PACKET_RANK_SCNian = 10020;
|
||||
// 红包抽奖记录
|
||||
PACKET_CSRedPacketHistory = 10021;
|
||||
PACKET_SCRedPacketHistory = 10022;
|
||||
}
|
||||
|
||||
// 排位榜
|
||||
|
|
@ -299,3 +302,17 @@ message SCNian{
|
|||
int32 Total = 5; // 总数量
|
||||
int32 TypeId = 6;
|
||||
}
|
||||
|
||||
// 红包抽奖记录
|
||||
// PACKET_CSRedPacketHistory
|
||||
message CSRedPacketHistory{
|
||||
int64 Id = 1; // 红包活动id
|
||||
}
|
||||
message RedPacketHistory{
|
||||
int64 Ts = 1; // 时间戳
|
||||
int32 ItemId = 5; // 道具id
|
||||
int64 ItemNum = 6; // 道具数量
|
||||
}
|
||||
message SCRedPacketHistory{
|
||||
repeated RedPacketHistory List = 1;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -5,6 +5,22 @@ syntax = "proto3";
|
|||
package server;
|
||||
option go_package = "mongo.games.com/game/protocol/server";
|
||||
|
||||
message DB_ACTPushCoin {
|
||||
|
||||
int32 Id = 1;
|
||||
|
||||
int32 Rate = 2;
|
||||
|
||||
map<int64, int64> Gain = 3;
|
||||
|
||||
int64 Value = 4;
|
||||
|
||||
}
|
||||
|
||||
message DB_ACTPushCoinArray {
|
||||
repeated DB_ACTPushCoin Arr = 1;
|
||||
}
|
||||
|
||||
message DB_ActSign {
|
||||
|
||||
int32 Id = 1;
|
||||
|
|
@ -1481,6 +1497,8 @@ message DB_PropExchange {
|
|||
|
||||
map<int64, int64> Gain = 4;
|
||||
|
||||
int32 Times = 5;
|
||||
|
||||
}
|
||||
|
||||
message DB_PropExchangeArray {
|
||||
|
|
|
|||
|
|
@ -10575,6 +10575,78 @@ func (x *ConsumeConfig) GetEndTime() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
// etcd /game/act_pushcoin
|
||||
type PushCoinConfig struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Platform string `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform,omitempty"` // 平台
|
||||
On int32 `protobuf:"varint,2,opt,name=On,proto3" json:"On,omitempty"` // 活动开关 1.开启 2.关闭
|
||||
StartTime string `protobuf:"bytes,3,opt,name=StartTime,proto3" json:"StartTime,omitempty"` // 活动开始时间
|
||||
EndTime string `protobuf:"bytes,4,opt,name=EndTime,proto3" json:"EndTime,omitempty"` // 活动结束时间
|
||||
}
|
||||
|
||||
func (x *PushCoinConfig) Reset() {
|
||||
*x = PushCoinConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protocol_webapi_common_proto_msgTypes[114]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *PushCoinConfig) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PushCoinConfig) ProtoMessage() {}
|
||||
|
||||
func (x *PushCoinConfig) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_protocol_webapi_common_proto_msgTypes[114]
|
||||
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 PushCoinConfig.ProtoReflect.Descriptor instead.
|
||||
func (*PushCoinConfig) Descriptor() ([]byte, []int) {
|
||||
return file_protocol_webapi_common_proto_rawDescGZIP(), []int{114}
|
||||
}
|
||||
|
||||
func (x *PushCoinConfig) GetPlatform() string {
|
||||
if x != nil {
|
||||
return x.Platform
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PushCoinConfig) GetOn() int32 {
|
||||
if x != nil {
|
||||
return x.On
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PushCoinConfig) GetStartTime() string {
|
||||
if x != nil {
|
||||
return x.StartTime
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PushCoinConfig) GetEndTime() string {
|
||||
if x != nil {
|
||||
return x.EndTime
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_protocol_webapi_common_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protocol_webapi_common_proto_rawDesc = []byte{
|
||||
|
|
@ -12191,10 +12263,17 @@ var file_protocol_webapi_common_proto_rawDesc = []byte{
|
|||
0x12, 0x1c, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x07, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 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,
|
||||
0x07, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x74, 0x0a, 0x0e, 0x50, 0x75, 0x73, 0x68,
|
||||
0x43, 0x6f, 0x69, 0x6e, 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, 0x0e, 0x0a, 0x02, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x02, 0x4f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54,
|
||||
0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x74, 0x61, 0x72, 0x74,
|
||||
0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 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 (
|
||||
|
|
@ -12209,7 +12288,7 @@ func file_protocol_webapi_common_proto_rawDescGZIP() []byte {
|
|||
return file_protocol_webapi_common_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protocol_webapi_common_proto_msgTypes = make([]protoimpl.MessageInfo, 124)
|
||||
var file_protocol_webapi_common_proto_msgTypes = make([]protoimpl.MessageInfo, 125)
|
||||
var file_protocol_webapi_common_proto_goTypes = []interface{}{
|
||||
(*MysqlDbSetting)(nil), // 0: webapi.MysqlDbSetting
|
||||
(*MongoDbSetting)(nil), // 1: webapi.MongoDbSetting
|
||||
|
|
@ -12325,32 +12404,33 @@ var file_protocol_webapi_common_proto_goTypes = []interface{}{
|
|||
(*RedPacketInfo)(nil), // 111: webapi.RedPacketInfo
|
||||
(*RedInfo)(nil), // 112: webapi.RedInfo
|
||||
(*ConsumeConfig)(nil), // 113: webapi.ConsumeConfig
|
||||
nil, // 114: webapi.Platform.BindTelRewardEntry
|
||||
nil, // 115: webapi.PlayerData.RankScoreEntry
|
||||
nil, // 116: webapi.ItemShop.AwardEntry
|
||||
nil, // 117: webapi.VIPcfg.AwardEntry
|
||||
nil, // 118: webapi.VIPcfg.Privilege1Entry
|
||||
nil, // 119: webapi.VIPcfg.Privilege7Entry
|
||||
nil, // 120: webapi.VIPcfg.Privilege9Entry
|
||||
nil, // 121: webapi.ActInviteConfig.PayScoreEntry
|
||||
nil, // 122: webapi.SkinLevel.UpItemEntry
|
||||
nil, // 123: webapi.SkinItem.UnlockParamEntry
|
||||
(*server.DB_GameFree)(nil), // 124: server.DB_GameFree
|
||||
(*server.DB_GameItem)(nil), // 125: server.DB_GameItem
|
||||
(*PushCoinConfig)(nil), // 114: webapi.PushCoinConfig
|
||||
nil, // 115: webapi.Platform.BindTelRewardEntry
|
||||
nil, // 116: webapi.PlayerData.RankScoreEntry
|
||||
nil, // 117: webapi.ItemShop.AwardEntry
|
||||
nil, // 118: webapi.VIPcfg.AwardEntry
|
||||
nil, // 119: webapi.VIPcfg.Privilege1Entry
|
||||
nil, // 120: webapi.VIPcfg.Privilege7Entry
|
||||
nil, // 121: webapi.VIPcfg.Privilege9Entry
|
||||
nil, // 122: webapi.ActInviteConfig.PayScoreEntry
|
||||
nil, // 123: webapi.SkinLevel.UpItemEntry
|
||||
nil, // 124: webapi.SkinItem.UnlockParamEntry
|
||||
(*server.DB_GameFree)(nil), // 125: server.DB_GameFree
|
||||
(*server.DB_GameItem)(nil), // 126: server.DB_GameItem
|
||||
}
|
||||
var file_protocol_webapi_common_proto_depIdxs = []int32{
|
||||
2, // 0: webapi.Platform.Leaderboard:type_name -> webapi.RankSwitch
|
||||
3, // 1: webapi.Platform.ClubConfig:type_name -> webapi.ClubConfig
|
||||
4, // 2: webapi.Platform.ThirdGameMerchant:type_name -> webapi.ThirdGame
|
||||
114, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry
|
||||
115, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry
|
||||
6, // 4: webapi.GameConfigGlobal.GameStatus:type_name -> webapi.GameStatus
|
||||
124, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree
|
||||
125, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree
|
||||
8, // 6: webapi.PlatformGameConfig.DbGameFrees:type_name -> webapi.GameFree
|
||||
0, // 7: webapi.PlatformDbConfig.Mysql:type_name -> webapi.MysqlDbSetting
|
||||
1, // 8: webapi.PlatformDbConfig.MongoDb:type_name -> webapi.MongoDbSetting
|
||||
1, // 9: webapi.PlatformDbConfig.MongoDbLog:type_name -> webapi.MongoDbSetting
|
||||
124, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree
|
||||
115, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry
|
||||
125, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree
|
||||
116, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry
|
||||
32, // 12: webapi.PlayerData.Items:type_name -> webapi.ItemInfo
|
||||
14, // 13: webapi.PlayerData.RoleUnlockList:type_name -> webapi.ModInfo
|
||||
14, // 14: webapi.PlayerData.PetUnlockList:type_name -> webapi.ModInfo
|
||||
|
|
@ -12363,7 +12443,7 @@ var file_protocol_webapi_common_proto_depIdxs = []int32{
|
|||
32, // 21: webapi.ExchangeShop.Items:type_name -> webapi.ItemInfo
|
||||
25, // 22: webapi.ExchangeShopList.List:type_name -> webapi.ExchangeShop
|
||||
29, // 23: webapi.ExchangeShopList.Weight:type_name -> webapi.ShopWeight
|
||||
116, // 24: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry
|
||||
117, // 24: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry
|
||||
30, // 25: webapi.ItemShopList.List:type_name -> webapi.ItemShop
|
||||
32, // 26: webapi.MatchInfoAward.ItemId:type_name -> webapi.ItemInfo
|
||||
33, // 27: webapi.GameMatchDate.Award:type_name -> webapi.MatchInfoAward
|
||||
|
|
@ -12384,14 +12464,14 @@ var file_protocol_webapi_common_proto_depIdxs = []int32{
|
|||
38, // 42: webapi.WelfareSpree.Item:type_name -> webapi.WelfareDate
|
||||
48, // 43: webapi.WelfareFirstPayDataList.List:type_name -> webapi.WelfareSpree
|
||||
48, // 44: webapi.WelfareContinuousPayDataList.List:type_name -> webapi.WelfareSpree
|
||||
117, // 45: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry
|
||||
118, // 46: webapi.VIPcfg.Privilege1:type_name -> webapi.VIPcfg.Privilege1Entry
|
||||
119, // 47: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry
|
||||
120, // 48: webapi.VIPcfg.Privilege9:type_name -> webapi.VIPcfg.Privilege9Entry
|
||||
118, // 45: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry
|
||||
119, // 46: webapi.VIPcfg.Privilege1:type_name -> webapi.VIPcfg.Privilege1Entry
|
||||
120, // 47: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry
|
||||
121, // 48: webapi.VIPcfg.Privilege9:type_name -> webapi.VIPcfg.Privilege9Entry
|
||||
51, // 49: webapi.VIPcfgDataList.List:type_name -> webapi.VIPcfg
|
||||
38, // 50: webapi.ChessRankConfig.Item:type_name -> webapi.WelfareDate
|
||||
55, // 51: webapi.ChessRankcfgData.Datas:type_name -> webapi.ChessRankConfig
|
||||
121, // 52: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry
|
||||
122, // 52: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry
|
||||
62, // 53: webapi.ActInviteConfig.Awards1:type_name -> webapi.RankAward
|
||||
62, // 54: webapi.ActInviteConfig.Awards2:type_name -> webapi.RankAward
|
||||
62, // 55: webapi.ActInviteConfig.Awards3:type_name -> webapi.RankAward
|
||||
|
|
@ -12408,12 +12488,12 @@ var file_protocol_webapi_common_proto_depIdxs = []int32{
|
|||
69, // 66: webapi.DiamondLotteryData.Info:type_name -> webapi.DiamondLotteryInfo
|
||||
70, // 67: webapi.DiamondLotteryData.Players:type_name -> webapi.DiamondLotteryPlayers
|
||||
72, // 68: webapi.DiamondLotteryConfig.LotteryData:type_name -> webapi.DiamondLotteryData
|
||||
125, // 69: webapi.ItemConfig.Items:type_name -> server.DB_GameItem
|
||||
126, // 69: webapi.ItemConfig.Items:type_name -> server.DB_GameItem
|
||||
32, // 70: webapi.RankAwardInfo.Item:type_name -> webapi.ItemInfo
|
||||
75, // 71: webapi.RankTypeInfo.Award:type_name -> webapi.RankAwardInfo
|
||||
76, // 72: webapi.RankTypeConfig.Info:type_name -> webapi.RankTypeInfo
|
||||
122, // 73: webapi.SkinLevel.UpItem:type_name -> webapi.SkinLevel.UpItemEntry
|
||||
123, // 74: webapi.SkinItem.UnlockParam:type_name -> webapi.SkinItem.UnlockParamEntry
|
||||
123, // 73: webapi.SkinLevel.UpItem:type_name -> webapi.SkinLevel.UpItemEntry
|
||||
124, // 74: webapi.SkinItem.UnlockParam:type_name -> webapi.SkinItem.UnlockParamEntry
|
||||
78, // 75: webapi.SkinItem.Levels:type_name -> webapi.SkinLevel
|
||||
79, // 76: webapi.SkinConfig.Items:type_name -> webapi.SkinItem
|
||||
82, // 77: webapi.AwardLogConfig.AwardLog:type_name -> webapi.AwardLogData
|
||||
|
|
@ -13822,6 +13902,18 @@ func file_protocol_webapi_common_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_protocol_webapi_common_proto_msgTypes[114].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PushCoinConfig); 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{
|
||||
|
|
@ -13829,7 +13921,7 @@ func file_protocol_webapi_common_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protocol_webapi_common_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 124,
|
||||
NumMessages: 125,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1166,4 +1166,12 @@ message ConsumeConfig{
|
|||
int32 On = 2; // 活动开关 1.开启 2.关闭
|
||||
string StartTime = 3; // 活动开始时间
|
||||
string EndTime = 4; // 活动结束时间
|
||||
}
|
||||
|
||||
// etcd /game/act_pushcoin
|
||||
message PushCoinConfig{
|
||||
string Platform = 1; // 平台
|
||||
int32 On = 2; // 活动开关 1.开启 2.关闭
|
||||
string StartTime = 3; // 活动开始时间
|
||||
string EndTime = 4; // 活动结束时间
|
||||
}
|
||||
|
|
@ -34,6 +34,8 @@ func init() {
|
|||
com.Register(int(rankproto.Rank_PACKET_CSLotteryHistory), rankproto.CSLotteryHistory{}, CSLotteryHistory)
|
||||
//年兽排行榜
|
||||
com.Register(int(rankproto.Rank_PACKET_RANK_CSNian), rankproto.CSNian{}, CSNian)
|
||||
// 红包历史记录
|
||||
com.Register(int(rankproto.Rank_PACKET_CSRedPacketHistory), rankproto.CSRedPacketHistory{}, CSRedPacketHistory)
|
||||
}
|
||||
|
||||
func CSRankMatch(s *netlib.Session, d *rankproto.GateTransmit, packetId int, data interface{}, sid int64) error {
|
||||
|
|
@ -648,6 +650,7 @@ func CSLotteryHistory(s *netlib.Session, d *rankproto.GateTransmit, packetId int
|
|||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
func CSNian(s *netlib.Session, d *rankproto.GateTransmit, packetId int, data interface{}, sid int64) error {
|
||||
logger.Logger.Trace("CSNian data:", data)
|
||||
msg, ok := data.(*rankproto.CSNian)
|
||||
|
|
@ -783,3 +786,36 @@ func CSNian(s *netlib.Session, d *rankproto.GateTransmit, packetId int, data int
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func CSRedPacketHistory(s *netlib.Session, d *rankproto.GateTransmit, packetId int, data interface{}, sid int64) error {
|
||||
logger.Logger.Trace("CSRedPacketHistory data:", data)
|
||||
msg, ok := data.(*rankproto.CSRedPacketHistory)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
pack := &rankproto.SCRedPacketHistory{}
|
||||
|
||||
var list []*model.RedPacketHistory
|
||||
var err error
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
list, err = model.GetRedPacketHistory(d.Platform, d.Snid, msg.GetId())
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("GetRedPacketHistory error: %v", err)
|
||||
}
|
||||
return nil
|
||||
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) {
|
||||
if err == nil {
|
||||
for _, v := range list {
|
||||
pack.List = append(pack.List, &rankproto.RedPacketHistory{
|
||||
Ts: v.Ts,
|
||||
ItemId: v.ItemId,
|
||||
ItemNum: v.ItemNum,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
common.SendToGate(sid, int(rankproto.Rank_PACKET_SCRedPacketHistory), pack, s)
|
||||
}), "CSRedPacketHistory").Start()
|
||||
return 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_ACTPushCoinMgr = &DB_ACTPushCoinMgr{
|
||||
Datas: &server.DB_ACTPushCoinArray{},
|
||||
pool: make(map[int32]*server.DB_ACTPushCoin),
|
||||
|
||||
}
|
||||
|
||||
type DB_ACTPushCoinMgr struct {
|
||||
Datas *server.DB_ACTPushCoinArray
|
||||
pool map[int32]*server.DB_ACTPushCoin
|
||||
|
||||
}
|
||||
|
||||
func (this *DB_ACTPushCoinMgr) unmarshal(data []byte) error {
|
||||
err := proto.Unmarshal(data, this.Datas)
|
||||
if err == nil {
|
||||
this.arrangeData()
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (this *DB_ACTPushCoinMgr) reunmarshal(data []byte) error {
|
||||
newDatas := &server.DB_ACTPushCoinArray{}
|
||||
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_ACTPushCoinMgr) 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_ACTPushCoinMgr) GetData(id int32) *server.DB_ACTPushCoin {
|
||||
if data, ok := this.pool[id]; ok {
|
||||
return data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
func init() {
|
||||
DataMgr.register("DB_ACTPushCoin.dat", &ProtobufDataLoader{dh: PBDB_ACTPushCoinMgr})
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"mongo.games.com/goserver/core/timer"
|
||||
"time"
|
||||
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/netlib"
|
||||
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/game/proto"
|
||||
loginproto "mongo.games.com/game/protocol/login"
|
||||
playerproto "mongo.games.com/game/protocol/player"
|
||||
)
|
||||
|
||||
func init() {
|
||||
// 心跳
|
||||
netlib.Register(int(loginproto.GatePacketID_PACKET_SC_PONG), loginproto.SCPong{}, SCPong)
|
||||
// 登录
|
||||
netlib.Register(int(loginproto.LoginPacketID_PACKET_SC_LOGIN), loginproto.SCLogin{}, SCLogin)
|
||||
// 玩家信息
|
||||
netlib.Register(int(playerproto.PlayerPacketID_PACKET_SC_PLAYERDATA), playerproto.SCPlayerData{}, SCPlayerData)
|
||||
}
|
||||
|
||||
func SCPong(s *netlib.Session, packetid int, data interface{}) error {
|
||||
accountID := s.GetAttribute(SessionAttributeClientAccountId)
|
||||
logger.Logger.Tracef("SCPong username:%v %v", accountID, data)
|
||||
return nil
|
||||
}
|
||||
|
||||
func SCLogin(s *netlib.Session, packetid int, data interface{}) error {
|
||||
logger.Logger.Trace("SCLogin ", data)
|
||||
|
||||
msg, ok := data.(*loginproto.SCLogin)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
if msg.GetOpRetCode() != loginproto.OpResultCode_OPRC_Sucess {
|
||||
accountID := s.GetAttribute(SessionAttributeClientAccountId)
|
||||
logger.Logger.Error("登录失败 ", accountID)
|
||||
s.Close()
|
||||
return nil
|
||||
}
|
||||
|
||||
csPlayerData := &playerproto.CSPlayerData{
|
||||
AccId: msg.GetAccId(),
|
||||
}
|
||||
pp := &model.PlayerParams{
|
||||
Platform: 1,
|
||||
Ip: fmt.Sprintf("%v.%v.%v.%v", 1+rand.Int31n(255), 1+rand.Int31n(255), 1+rand.Int31n(255), 1+rand.Int31n(255)),
|
||||
City: "北京",
|
||||
Logininmodel: "app",
|
||||
}
|
||||
d, err := json.Marshal(pp)
|
||||
if err == nil {
|
||||
csPlayerData.Params = proto.String(string(d))
|
||||
}
|
||||
|
||||
s.Send(int(playerproto.PlayerPacketID_PACKET_CS_PLAYERDATA), csPlayerData)
|
||||
logger.Logger.Info("登录成功 ", msg.GetAccId())
|
||||
return nil
|
||||
}
|
||||
|
||||
func SCPlayerData(s *netlib.Session, packetid int, data interface{}) error {
|
||||
logger.Logger.Trace("SCPlayerData ", data)
|
||||
msg, ok := data.(*playerproto.SCPlayerData)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
if msg.GetOpRetCode() != playerproto.OpResultCode_OPRC_Sucess {
|
||||
accountID := s.GetAttribute(SessionAttributeClientAccountId)
|
||||
logger.Logger.Errorf("获取玩家信息失败 %v", accountID)
|
||||
s.Close()
|
||||
return nil
|
||||
}
|
||||
|
||||
s.SetAttribute(SessionAttributeUser, msg)
|
||||
|
||||
StartSessionPingTimer(s, timer.TimerActionWrapper(func(h timer.TimerHandle, ud interface{}) bool {
|
||||
if !s.IsConned() {
|
||||
StopSessionPingTimer(s)
|
||||
return false
|
||||
}
|
||||
pack := &loginproto.CSPing{}
|
||||
s.Send(int(loginproto.GatePacketID_PACKET_CS_PING), pack)
|
||||
return true
|
||||
}), nil, time.Second*time.Duration(60+rand.Int31n(100)), -1)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"mongo.games.com/goserver/core"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/netlib"
|
||||
)
|
||||
|
||||
var Config = &Configuration{}
|
||||
|
||||
type Configuration struct {
|
||||
Count int // 机器人总数
|
||||
AppId string // appID
|
||||
Connects netlib.SessionConfig // 网络连接配置
|
||||
}
|
||||
|
||||
func (this *Configuration) Name() string {
|
||||
return "benchmark"
|
||||
}
|
||||
|
||||
func (this *Configuration) Init() error {
|
||||
logger.Logger.Tracef("%+v", *this)
|
||||
if this.Count == 0 {
|
||||
this.Count = 20
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this *Configuration) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
core.RegistePackage(Config)
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
netlib:
|
||||
SrvInfo:
|
||||
Name: BenchmarkServer
|
||||
Type: 9
|
||||
Id: 902
|
||||
AreaID: 1
|
||||
Banner:
|
||||
- =================
|
||||
- benchmark server
|
||||
- =================
|
||||
IoServices: []
|
||||
module:
|
||||
Options:
|
||||
QueueBacklog: 1024
|
||||
MaxDone: 1024
|
||||
Interval: 100
|
||||
executor:
|
||||
Options:
|
||||
QueueBacklog: 1024
|
||||
MaxDone: 1024
|
||||
Interval: 0
|
||||
Worker:
|
||||
WorkerCnt: 8
|
||||
Options:
|
||||
QueueBacklog: 1024
|
||||
MaxDone: 1024
|
||||
Interval: 0
|
||||
timer:
|
||||
Options:
|
||||
QueueBacklog: 1024
|
||||
MaxDone: 1024
|
||||
Interval: 100
|
||||
signal:
|
||||
SupportSignal: true
|
||||
benchmark:
|
||||
Count: 100
|
||||
AppId: 5c56d1644966f078bfb90c71
|
||||
Connects:
|
||||
Id: 402
|
||||
Type: 4
|
||||
AreaId: 1
|
||||
Name: ClientService
|
||||
Ip: 127.0.0.1
|
||||
Port: 11001
|
||||
Protocol: tcp
|
||||
Path: /
|
||||
MaxDone: 200
|
||||
MaxPend: 200
|
||||
MaxPacket: 65535
|
||||
MaxConn: 2000
|
||||
RcvBuff: 4096
|
||||
SndBuff: 4096
|
||||
WriteTimeout: 3600
|
||||
ReadTimeout: 3600
|
||||
SoLinger: 10
|
||||
IsInnerLink: true
|
||||
NoDelay: true
|
||||
SupportFragment: true
|
||||
AuthKey: www.jxjy.games.cn
|
||||
IsClient: true
|
||||
AllowMultiConn: true
|
||||
FilterChain:
|
||||
- session-filter-auth
|
||||
HandlerChain:
|
||||
- handler-gate-session
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/module"
|
||||
"mongo.games.com/goserver/core/netlib"
|
||||
)
|
||||
|
||||
const (
|
||||
// RobotSessionStartId 机器人session开始id
|
||||
RobotSessionStartId = 100000000
|
||||
)
|
||||
|
||||
var (
|
||||
BenchMarkModule = &BenchMark{}
|
||||
WaitConnectSessions []*netlib.SessionConfig
|
||||
)
|
||||
|
||||
// NewSession 新建session
|
||||
// id 连接id, 默认自动分配
|
||||
func NewSession(id ...int) {
|
||||
cfg := Config.Connects
|
||||
if len(id) > 0 && id[0] > 0 {
|
||||
cfg.Id = id[0]
|
||||
} else {
|
||||
BenchMarkModule.idx++
|
||||
cfg.Id = BenchMarkModule.idx
|
||||
}
|
||||
cfg.Init()
|
||||
logger.Logger.Info("waite connect session id=", cfg.Id)
|
||||
WaitConnectSessions = append(WaitConnectSessions, &cfg)
|
||||
}
|
||||
|
||||
type BenchMark struct {
|
||||
idx int
|
||||
}
|
||||
|
||||
func (m *BenchMark) ModuleName() string {
|
||||
return "benchmark-module"
|
||||
}
|
||||
|
||||
func (m *BenchMark) Init() {
|
||||
m.idx = RobotSessionStartId
|
||||
for i := 0; i < Config.Count; i++ {
|
||||
NewSession()
|
||||
}
|
||||
}
|
||||
|
||||
// Update 机器开始连接游戏服务器
|
||||
func (m *BenchMark) Update() {
|
||||
n := len(WaitConnectSessions)
|
||||
if n > 0 {
|
||||
config := WaitConnectSessions[n-1]
|
||||
WaitConnectSessions = WaitConnectSessions[:n-1]
|
||||
if err := netlib.Connect(config); err != nil {
|
||||
logger.Logger.Error("netlib.Connect error", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (m *BenchMark) Shutdown() {
|
||||
module.UnregisteModule(m)
|
||||
}
|
||||
|
||||
func init() {
|
||||
module.RegisteModule(BenchMarkModule, time.Millisecond, 1)
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"mongo.games.com/goserver/core/netlib"
|
||||
"mongo.games.com/goserver/core/timer"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
SessionAttributeClientAccountId int = iota // 账号
|
||||
SessionAttributeUser
|
||||
SessionAttributePingTimer
|
||||
)
|
||||
|
||||
func StartSessionPingTimer(s *netlib.Session, act timer.TimerAction, ud interface{}, interval time.Duration, times int) bool {
|
||||
StopSessionPingTimer(s)
|
||||
if hTimer, ok := timer.StartTimer(act, ud, interval, times); ok {
|
||||
s.SetAttribute(SessionAttributePingTimer, hTimer)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func StopSessionPingTimer(s *netlib.Session) {
|
||||
if h, ok := s.GetAttribute(SessionAttributePingTimer).(timer.TimerHandle); ok {
|
||||
if h != timer.TimerHandle(0) {
|
||||
timer.StopTimer(h)
|
||||
s.RemoveAttribute(SessionAttributePingTimer)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"math/rand"
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/model"
|
||||
loginproto "mongo.games.com/game/protocol/login"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/netlib"
|
||||
"strconv"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
)
|
||||
|
||||
/*
|
||||
添加到客户端管理器,管理器负责登录
|
||||
当连接断开时,从管理器中移除,判断是否需要重连
|
||||
*/
|
||||
|
||||
const (
|
||||
GateSessionHandlerName = "handler-gate-session"
|
||||
)
|
||||
|
||||
type GateSessionHandler struct {
|
||||
netlib.BasicSessionHandler
|
||||
}
|
||||
|
||||
func (g *GateSessionHandler) GetName() string {
|
||||
return GateSessionHandlerName
|
||||
}
|
||||
|
||||
func (g *GateSessionHandler) GetInterestOps() uint {
|
||||
return 1<<netlib.InterestOps_Opened |
|
||||
1<<netlib.InterestOps_Closed
|
||||
}
|
||||
|
||||
func (g *GateSessionHandler) OnSessionOpened(s *netlib.Session) {
|
||||
// 登录账号
|
||||
StartLogin(s)
|
||||
return
|
||||
}
|
||||
|
||||
func (g *GateSessionHandler) OnSessionClosed(s *netlib.Session) {
|
||||
|
||||
}
|
||||
|
||||
func init() {
|
||||
netlib.RegisteSessionHandlerCreator(GateSessionHandlerName, func() netlib.SessionHandler {
|
||||
return &GateSessionHandler{}
|
||||
})
|
||||
}
|
||||
|
||||
var UserNameIndex int64
|
||||
|
||||
func StartLogin(s *netlib.Session) {
|
||||
ts := time.Now().UnixNano()
|
||||
username := fmt.Sprintf("benchmark-%v", atomic.AddInt64(&UserNameIndex, 1))
|
||||
s.SetAttribute(SessionAttributeClientAccountId, username)
|
||||
csLogin := &loginproto.CSLogin{
|
||||
Username: username,
|
||||
TimeStamp: ts,
|
||||
Platform: "1",
|
||||
Channel: "",
|
||||
PlatformTag: "test.win88.yy_android",
|
||||
}
|
||||
|
||||
params := &model.PlayerParams{
|
||||
Ip: fmt.Sprintf("%v.%v.%v.%v", 1+rand.Int31n(255), 1+rand.Int31n(255), 1+rand.Int31n(255), 1+rand.Int31n(255)),
|
||||
City: "北京",
|
||||
Platform: 1,
|
||||
Logininmodel: "app",
|
||||
}
|
||||
data, err := json.Marshal(params)
|
||||
if err == nil {
|
||||
csLogin.Params = string(data[:])
|
||||
}
|
||||
|
||||
h := md5.New()
|
||||
io.WriteString(h, fmt.Sprintf("%v%v", username, Config.AppId))
|
||||
pwd := hex.EncodeToString(h.Sum(nil))
|
||||
h.Reset()
|
||||
io.WriteString(h, fmt.Sprintf("%v%v%v", pwd, Config.AppId, ts))
|
||||
pwd = hex.EncodeToString(h.Sum(nil))
|
||||
csLogin.Password = pwd
|
||||
|
||||
csLogin.LoginType = 0
|
||||
csLogin.Sign = common.MakeMd5String(csLogin.GetUsername(), csLogin.GetPassword(),
|
||||
strconv.Itoa(int(csLogin.GetTimeStamp())), csLogin.GetParams(), Config.AppId)
|
||||
|
||||
s.Send(int(loginproto.LoginPacketID_PACKET_CS_LOGIN), csLogin)
|
||||
logger.Logger.Infof("账号 [%v] 开始登录", username)
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<seelog type="adaptive" mininterval="2000000" maxinterval="100000000" critmsgcount="500" minlevel="trace">
|
||||
<exceptions>
|
||||
<exception filepattern="test*" minlevel="error"/>
|
||||
</exceptions>
|
||||
<outputs formatid="all">
|
||||
<rollingfile formatid="all" type="size" filename="./all.log" maxsize="50000000" maxrolls="5" />
|
||||
<filter levels="info,trace,warn,error">
|
||||
<console formatid="fmtinfo"/>
|
||||
</filter>
|
||||
<filter levels="error,critical" formatid="fmterror">
|
||||
<console/>
|
||||
<file path="errors.log"/>
|
||||
</filter>
|
||||
</outputs>
|
||||
<formats>
|
||||
<format id="fmtinfo" format="[%Date][%Time] [%Level] %Msg%n"/>
|
||||
<format id="fmterror" format="[%Date][%Time] [%LEVEL] [%FuncShort @ %File.%Line] %Msg%n"/>
|
||||
<format id="all" format="[%Date][%Time] [%Level] [@ %File.%Line] %Msg%n"/>
|
||||
<format id="criticalemail" format="Critical error on our server!\n %Time %Date %RelFile %Func %Msg \nSent by Seelog"/>
|
||||
</formats>
|
||||
</seelog>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
_ "mongo.games.com/game"
|
||||
|
||||
"mongo.games.com/goserver/core"
|
||||
"mongo.games.com/goserver/core/module"
|
||||
)
|
||||
|
||||
func main() {
|
||||
defer core.ClosePackages()
|
||||
core.LoadPackages("config.yaml")
|
||||
// core hook
|
||||
core.RegisteHook(core.HOOK_BEFORE_START, func() error {
|
||||
|
||||
return nil
|
||||
})
|
||||
core.RegisteHook(core.HOOK_AFTER_STOP, func() error {
|
||||
|
||||
return nil
|
||||
})
|
||||
// module模块
|
||||
waiter := module.Start()
|
||||
waiter.Wait("main()")
|
||||
}
|
||||
|
|
@ -140,6 +140,29 @@ func CSNianData(s *netlib.Session, packetid int, data interface{}, sid int64) er
|
|||
break
|
||||
}
|
||||
}
|
||||
//签到额外奖励
|
||||
for _, value := range sData {
|
||||
if value.Id == 2 {
|
||||
strSlice := strings.Split(value.PropValue, ",")
|
||||
itemId, _ := strconv.Atoi(strSlice[0])
|
||||
itemNum, _ := strconv.Atoi(strSlice[1])
|
||||
pack.OtherSignAward = append(pack.OtherSignAward, &activity.RankAwardData{
|
||||
ItemId: int32(itemId),
|
||||
ItemNum: int64(itemNum),
|
||||
})
|
||||
break
|
||||
}
|
||||
}
|
||||
pack.OtherSignAwardCount = p.WelfData.NianData.SignOtherAwardCount
|
||||
pack.OtherSignAwardProp = p.WelfData.NianData.SignOtherAwardProp
|
||||
count := int64(0)
|
||||
for _, value := range sData {
|
||||
if value.Id == 3 {
|
||||
count, _ = strconv.ParseInt(value.PropValue, 10, 64)
|
||||
break
|
||||
}
|
||||
}
|
||||
pack.OtherSignMaxCount = int32(count)
|
||||
StartTs := common.IntToTime(int(pool.List[0].BuffStartTime)).Unix()
|
||||
EndTs := common.IntToTime(int(pool.List[0].BuffEndTime)).Unix()
|
||||
pack.BuffStartTime = StartTs
|
||||
|
|
@ -154,6 +177,8 @@ func CSNianData(s *netlib.Session, packetid int, data interface{}, sid int64) er
|
|||
pack.SignAwardTime = signTime
|
||||
pack.ChangeData = changeData
|
||||
pack.Switch = pool.Switch
|
||||
pack.AttackMaxHp = p.WelfData.NianData.AttackMaxHp
|
||||
pack.AttackSumHp = p.WelfData.NianData.AttackSumHp
|
||||
logger.Logger.Trace("请求年兽活动信息 ", pack)
|
||||
p.SendToClient(int(activity.NianPacketID_PACKET_SCNianData), pack)
|
||||
}
|
||||
|
|
@ -308,7 +333,7 @@ func CSNianAttack(s *netlib.Session, packetid int, data interface{}, sid int64)
|
|||
for i := 0; i < count; i++ {
|
||||
//随机伤害值
|
||||
randomValue := int64(rand.Intn(intSlice[1]-intSlice[0]+1) + intSlice[0])
|
||||
logger.Logger.Tracef("随机到的伤害值是:%d", randomValue)
|
||||
logger.Logger.Tracef("snid :%v 随机到的伤害值是:%d", p.SnId, randomValue)
|
||||
//计算BUFF
|
||||
if p.WelfData.NianData.BuffCount > 0 {
|
||||
randomValue = randomValue + randomValue/2
|
||||
|
|
@ -386,7 +411,7 @@ func CSNianAttack(s *netlib.Session, packetid int, data interface{}, sid int64)
|
|||
Change: extraItems,
|
||||
GainWay: common.GainWayNianGain_Attack_BigOther,
|
||||
Operator: "system",
|
||||
Remark: "年兽活动-打爆竹额外活动奖励",
|
||||
Remark: "年兽活动-大爆竹额外活动奖励",
|
||||
})
|
||||
extraDrop := &activity.RankAwardData{}
|
||||
extraDrop.ItemId = int32(extraItemId)
|
||||
|
|
@ -469,7 +494,7 @@ func CSNianAttack(s *netlib.Session, packetid int, data interface{}, sid int64)
|
|||
var bossDieOther []*model.Item
|
||||
for _, info := range pool.List[0].BossDieOtherReward {
|
||||
if p.WelfData.NianData.OtherAwardNum[info.Id] >= info.DropUp {
|
||||
logger.Logger.Trace("BOSS死亡 额外掉落达到上限 id = ", info.Id, "数量:", p.WelfData.NianData.OtherAwardNum[info.Id])
|
||||
logger.Logger.Trace("snid:", p.SnId, "BOSS死亡 额外掉落达到上限 id = ", info.Id, "数量:", p.WelfData.NianData.OtherAwardNum[info.Id])
|
||||
continue
|
||||
}
|
||||
//随机
|
||||
|
|
@ -479,6 +504,9 @@ func CSNianAttack(s *netlib.Session, packetid int, data interface{}, sid int64)
|
|||
if int32(otherItemNum)+p.WelfData.NianData.OtherAwardNum[info.Id] > info.DropUp {
|
||||
otherItemNum = int64(info.DropUp - p.WelfData.NianData.OtherAwardNum[info.Id])
|
||||
}
|
||||
if p.WelfData.NianData.OtherAwardNum == nil {
|
||||
p.WelfData.NianData.OtherAwardNum = make(map[int32]int32)
|
||||
}
|
||||
p.WelfData.NianData.OtherAwardNum[info.Id] += int32(otherItemNum)
|
||||
bossDieOther = append(bossDieOther, &model.Item{
|
||||
ItemId: otherItemId,
|
||||
|
|
@ -529,6 +557,8 @@ func CSNianAttack(s *netlib.Session, packetid int, data interface{}, sid int64)
|
|||
pack.DieAward = append(pack.DieAward, dieInfo)
|
||||
}
|
||||
pack.BuffCount = p.WelfData.NianData.BuffCount
|
||||
pack.AttackMaxHp = p.WelfData.NianData.AttackMaxHp
|
||||
pack.AttackSumHp = p.WelfData.NianData.AttackSumHp
|
||||
p.SendToClient(int(activity.NianPacketID_PACKET_SCNianAttackData), pack)
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeNianBossDamage, &TaskData{SnId: p.SnId, Num: AttackHp}) // 对年兽造成伤害
|
||||
//更新年兽排行榜榜
|
||||
|
|
@ -539,7 +569,8 @@ func CSNianAttack(s *netlib.Session, packetid int, data interface{}, sid int64)
|
|||
luckTime = 0
|
||||
}
|
||||
damage := p.WelfData.NianData.AttackSumHp
|
||||
if luckValue < RankNeed {
|
||||
logger.Logger.Tracef("sndi :%v,当前最大幸运值:%v,“总榜伤害值:%v", p.SnId, p.WelfData.NianData.AttackMaxHp, p.WelfData.NianData.AttackSumHp)
|
||||
if damage < RankNeed {
|
||||
damage = 0
|
||||
}
|
||||
if luckValue > 0 || damage > 0 {
|
||||
|
|
@ -556,6 +587,7 @@ func CSNianAttack(s *netlib.Session, packetid int, data interface{}, sid int64)
|
|||
log.LuckTime = luckTime
|
||||
}
|
||||
mq.Write(log)
|
||||
logger.Logger.Tracef("更新排行榜数据 snid :%v,log:%v", p.SnId, log)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
|
@ -670,6 +702,53 @@ func CSNianSignAward(s *netlib.Session, packetid int, data interface{}, sid int6
|
|||
award.ItemNum = info.ItemNum
|
||||
pack.SignAward = append(pack.SignAward, award)
|
||||
}
|
||||
//签到额外奖励
|
||||
sData := srvdata.PBDB_NewYearActivityMgr.Datas.GetArr()
|
||||
count := int64(0)
|
||||
for _, value := range sData {
|
||||
if value.Id == 3 {
|
||||
count, _ = strconv.ParseInt(value.PropValue, 10, 64)
|
||||
break
|
||||
}
|
||||
}
|
||||
var prop int64
|
||||
if p.WelfData.NianData.SignOtherAwardProp == 0 {
|
||||
for _, value := range sData {
|
||||
if value.Id == 4 {
|
||||
prop, _ = strconv.ParseInt(value.PropValue, 10, 64)
|
||||
break
|
||||
}
|
||||
}
|
||||
p.WelfData.NianData.SignOtherAwardProp = int32(prop)
|
||||
}
|
||||
if p.WelfData.NianData.SignOtherAwardCount < int32(count) {
|
||||
//概率
|
||||
if rand.Intn(100)+1 < int(p.WelfData.NianData.SignOtherAwardProp) {
|
||||
for _, value := range sData {
|
||||
if value.Id == 2 {
|
||||
strSlice := strings.Split(value.PropValue, ",")
|
||||
itemId, _ := strconv.Atoi(strSlice[0])
|
||||
itemNum, _ := strconv.Atoi(strSlice[1])
|
||||
items = append(items, &model.Item{
|
||||
ItemId: int32(itemId),
|
||||
ItemNum: int64(itemNum),
|
||||
})
|
||||
award := &activity.RankAwardData{}
|
||||
award.ItemId = int32(itemId)
|
||||
award.ItemNum = int64(itemNum)
|
||||
pack.OtherSignAward = append(pack.OtherSignAward, award)
|
||||
break
|
||||
}
|
||||
}
|
||||
p.WelfData.NianData.SignOtherAwardCount += 1
|
||||
p.WelfData.NianData.SignOtherAwardProp = 60
|
||||
} else {
|
||||
p.WelfData.NianData.SignOtherAwardProp += int32(prop)
|
||||
if p.WelfData.NianData.SignOtherAwardProp > 100 {
|
||||
p.WelfData.NianData.SignOtherAwardProp = 100
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BagMgrSingleton.AddItems(&model.AddItemParam{
|
||||
Platform: p.Platform,
|
||||
|
|
@ -679,6 +758,8 @@ func CSNianSignAward(s *netlib.Session, packetid int, data interface{}, sid int6
|
|||
Operator: "system",
|
||||
Remark: "年兽活动-领取签到奖励获得",
|
||||
})
|
||||
pack.OtherSignAwardCount = p.WelfData.NianData.SignOtherAwardCount
|
||||
pack.OtherSignAwardProp = p.WelfData.NianData.SignOtherAwardProp
|
||||
p.SendToClient(int(activity.NianPacketID_PACKET_SCNianSignAward), pack)
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeNianSign, &TaskData{SnId: p.SnId, Num: 1})
|
||||
}
|
||||
|
|
@ -713,7 +794,10 @@ func CSNianChange(s *netlib.Session, packetid int, data interface{}, sid int64)
|
|||
return nil
|
||||
}
|
||||
num := msg.Num
|
||||
pack := &activity.SCNianChange{}
|
||||
if num <= 0 || num > 99 {
|
||||
pack.OpRetCode = activity.OpResultCode_Nian_OPRC_Error_Nian
|
||||
p.SendToClient(int(activity.NianPacketID_PACKET_SCNianChange), pack)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -730,7 +814,6 @@ func CSNianChange(s *netlib.Session, packetid int, data interface{}, sid int64)
|
|||
break
|
||||
}
|
||||
}
|
||||
pack := &activity.SCNianChange{}
|
||||
if p.Diamond < int64(diamond*int(num)) {
|
||||
pack.OpRetCode = activity.OpResultCode_Nian_OPRC_Error_Nian
|
||||
p.SendToClient(int(activity.NianPacketID_PACKET_SCNianChange), pack)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,425 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/netlib"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/gamesrv/base"
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/game/protocol/activity"
|
||||
"mongo.games.com/game/srvdata"
|
||||
)
|
||||
|
||||
const (
|
||||
PowerMax = 700000
|
||||
PowerInit = 400000
|
||||
)
|
||||
|
||||
var PushCoinItemValue = map[int32]int64{
|
||||
common.ItemIDBigCoin: 50000,
|
||||
common.ItemIDVCard: 10000,
|
||||
common.ItemIDPlum: 30000,
|
||||
30011: 100000000, // 话费卡
|
||||
common.ItemIDCoin1: 5000,
|
||||
common.ItemIDCoin2: 10000,
|
||||
common.ItemIDCoin3: 15000,
|
||||
}
|
||||
|
||||
func init() {
|
||||
// 推币机活动信息
|
||||
common.Register(int(activity.PushCoinPacketID_PACKET_CSPushCoinInfo), activity.CSPushCoinInfo{}, CSPushCoinInfo)
|
||||
// 推币机玩家操作
|
||||
common.Register(int(activity.PushCoinPacketID_PACKET_CSPushCoinPlayerOp), activity.CSPushCoinPlayerOp{}, CSPushCoinPlayerOp)
|
||||
}
|
||||
|
||||
func CSPushCoinInfo(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||
_, ok := data.(*activity.CSPushCoinInfo)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
p := PlayerMgrSington.GetOnlinePlayer(sid)
|
||||
if p == nil {
|
||||
logger.Logger.Warn("CSPushCoinInfo p == nil")
|
||||
return nil
|
||||
}
|
||||
|
||||
if p.WelfData == nil {
|
||||
logger.Logger.Warn("CSPushCoinInfo p.WelfData == nil")
|
||||
return nil
|
||||
}
|
||||
|
||||
if p.WelfData.PushCoin == nil {
|
||||
InitPlayerPushCoin(p)
|
||||
}
|
||||
|
||||
pack := &activity.SCPushCoinInfo{
|
||||
ShakeTimes: p.WelfData.PushCoin.Shake,
|
||||
PowerLine: p.WelfData.PushCoin.Power,
|
||||
PowerLineMax: PowerMax,
|
||||
RefreshTimes: p.WelfData.PushCoin.Refresh,
|
||||
}
|
||||
|
||||
for _, v := range srvdata.PBDB_PropExchangeMgr.Datas.Arr {
|
||||
if v.GetGroup() == 2 {
|
||||
info := &activity.ExchangeInfo{
|
||||
Id: v.GetId(),
|
||||
TotalTimes: int64(v.GetTimes()),
|
||||
}
|
||||
for kk, vv := range v.GetCost() {
|
||||
info.Cost = append(info.Cost, &activity.ItemInfo{
|
||||
ItemId: int32(kk),
|
||||
ItemNum: int32(vv),
|
||||
})
|
||||
}
|
||||
sort.Slice(info.Cost, func(i, j int) bool {
|
||||
return info.Cost[i].ItemId < info.Cost[j].ItemId
|
||||
})
|
||||
for kk, vv := range v.GetGain() {
|
||||
info.Gain = append(info.Gain, &activity.ItemInfo{
|
||||
ItemId: int32(kk),
|
||||
ItemNum: int32(vv),
|
||||
})
|
||||
}
|
||||
sort.Slice(info.Gain, func(i, j int) bool {
|
||||
return info.Gain[i].ItemId < info.Gain[j].ItemId
|
||||
})
|
||||
|
||||
info.Times = int64(v.GetTimes() - p.WelfData.PushCoin.Exchange[v.Id])
|
||||
if v.GetTimes() == 0 {
|
||||
info.Times = -1
|
||||
info.TotalTimes = -1
|
||||
}
|
||||
|
||||
pack.ExchangeList = append(pack.ExchangeList, info)
|
||||
}
|
||||
}
|
||||
|
||||
// 转盘
|
||||
for _, v := range srvdata.PBDB_ACTPushCoinMgr.Datas.Arr {
|
||||
for kk, vv := range v.GetGain() {
|
||||
pack.DrawList = append(pack.DrawList, &activity.DrawInfo{
|
||||
Id: v.GetId(),
|
||||
ItemId: int32(kk),
|
||||
ItemNum: int32(vv),
|
||||
Coin: v.GetValue(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
p.SendToClient(int(activity.PushCoinPacketID_PACKET_SCPushCoinInfo), pack)
|
||||
logger.Logger.Trace("SCPushCoinInfo: ", pack)
|
||||
return nil
|
||||
}
|
||||
|
||||
func CSPushCoinPlayerOp(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||
logger.Logger.Trace("CSPushCoinPlayerOpHandler Process recv ", data)
|
||||
msg, ok := data.(*activity.CSPushCoinPlayerOp)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
p := PlayerMgrSington.GetOnlinePlayer(sid)
|
||||
if p == nil {
|
||||
logger.Logger.Warn("CSPushCoinPlayerOp p == nil")
|
||||
return nil
|
||||
}
|
||||
|
||||
if p.WelfData == nil {
|
||||
logger.Logger.Warn("CSPushCoinPlayerOp p.WelfData == nil")
|
||||
return nil
|
||||
}
|
||||
|
||||
if p.WelfData.PushCoin == nil {
|
||||
logger.Logger.Warn("CSPushCoinPlayerOp p.WelfData.PushCoin == nil")
|
||||
return nil
|
||||
}
|
||||
|
||||
pack := &activity.SCPushCoinPlayerOp{
|
||||
OpRetCode: activity.OpResultPushCoinCode_OPRC_PushCoin_Error,
|
||||
OpCode: msg.GetOpCode(),
|
||||
}
|
||||
|
||||
switch msg.GetOpCode() {
|
||||
case activity.OpCodes_OP_Bet:
|
||||
if msg.GetOpParam() != common.ItemIDCoin1 && msg.GetOpParam() != common.ItemIDCoin2 && msg.GetOpParam() != common.ItemIDCoin3 {
|
||||
goto here
|
||||
}
|
||||
|
||||
item := srvdata.GameItemMgr.Get(p.Platform, int32(msg.GetOpParam()))
|
||||
if item == nil {
|
||||
goto here
|
||||
}
|
||||
|
||||
if p.GetCoin() < item.GetNum() {
|
||||
pack.OpRetCode = activity.OpResultPushCoinCode_OPRC_PushCoin_BetNotEnough
|
||||
goto here
|
||||
}
|
||||
pack.BetId = int32(msg.GetOpParam())
|
||||
|
||||
p.AddCoin(-item.GetNum(), common.GainWayPushCoinCost, base.SyncFlag_ToClient, "system", "推币机下注")
|
||||
// 增加桌面道具
|
||||
AddValue(p, map[int32]int64{common.ItemIDCoin: item.GetNum()})
|
||||
|
||||
case activity.OpCodes_OP_Gain:
|
||||
|
||||
if msg.GetOpParam() == 1 {
|
||||
// 有效区
|
||||
for _, v := range msg.GetOpItem() {
|
||||
id := v.GetItemId()
|
||||
val := int64(v.GetItemNum())
|
||||
switch v.GetItemId() {
|
||||
case common.ItemIDBigCoin, common.ItemIDCoin1, common.ItemIDCoin2, common.ItemIDCoin3:
|
||||
val *= srvdata.GameItemMgr.Get(p.Platform, id).GetNum()
|
||||
id = common.ItemIDCoin
|
||||
}
|
||||
|
||||
if p.WelfData.PushCoin.Items[id] < val {
|
||||
logger.Logger.Errorf("获得道具太多: %d, %d", p.WelfData.PushCoin.Items[id], val)
|
||||
// 刷新桌面余额
|
||||
UpdatePlayerPushCoin(p)
|
||||
goto here
|
||||
}
|
||||
|
||||
BagMgrSingleton.AddItems(&model.AddItemParam{
|
||||
Platform: p.Platform,
|
||||
SnId: p.SnId,
|
||||
Change: []*model.Item{{ItemId: id, ItemNum: val}},
|
||||
GainWay: common.GainWayPushCoinGain,
|
||||
Operator: "system",
|
||||
Remark: "推币机掉落获得",
|
||||
})
|
||||
}
|
||||
} else {
|
||||
// 无效区
|
||||
|
||||
}
|
||||
|
||||
for _, v := range msg.GetOpItem() {
|
||||
// 增加能量条
|
||||
AddPower(p, PushCoinItemValue[v.GetItemId()]*int64(v.GetItemNum()))
|
||||
// 减少桌面道具
|
||||
AddValue(p, map[int32]int64{v.GetItemId(): -int64(v.GetItemNum())})
|
||||
}
|
||||
|
||||
case activity.OpCodes_OP_Shake:
|
||||
if p.WelfData.PushCoin.Shake < int32(msg.GetOpParam()) {
|
||||
pack.OpRetCode = activity.OpResultPushCoinCode_OPRC_PushCoin_ShakeNotEnough
|
||||
goto here
|
||||
}
|
||||
p.WelfData.PushCoin.Shake -= int32(msg.GetOpParam())
|
||||
|
||||
case activity.OpCodes_OP_Refresh:
|
||||
UpdatePlayerPushCoin(p)
|
||||
|
||||
case activity.OpCodes_OP_Exchange:
|
||||
d := srvdata.PBDB_PropExchangeMgr.GetData(int32(msg.GetOpParam()))
|
||||
if d == nil {
|
||||
goto here
|
||||
}
|
||||
// 兑换次数
|
||||
if d.GetTimes() > 0 && p.WelfData.PushCoin.Exchange[d.Id] >= d.GetTimes() {
|
||||
pack.OpRetCode = activity.OpResultPushCoinCode_OPRC_PushCoin_ExchangeNotEnough
|
||||
goto here
|
||||
}
|
||||
|
||||
pack.Exchange = &activity.ExchangeInfo{
|
||||
Id: d.Id,
|
||||
}
|
||||
var cost, gain []*model.Item
|
||||
for k, v := range d.GetCost() {
|
||||
pack.Exchange.Cost = append(pack.Exchange.Cost, &activity.ItemInfo{
|
||||
ItemId: int32(k),
|
||||
ItemNum: int32(v),
|
||||
})
|
||||
if k == common.ItemIDCoin && p.GetCoin() < v {
|
||||
pack.OpRetCode = activity.OpResultPushCoinCode_OPRC_PushCoin_ItemNotEnough
|
||||
goto here
|
||||
}
|
||||
cost = append(cost, &model.Item{
|
||||
ItemId: int32(k),
|
||||
ItemNum: -v,
|
||||
})
|
||||
}
|
||||
|
||||
_, _, ok := BagMgrSingleton.AddItems(&model.AddItemParam{
|
||||
Platform: p.Platform,
|
||||
SnId: p.SnId,
|
||||
Change: cost,
|
||||
Add: 0,
|
||||
GainWay: common.GainWayPushCoinExchangeCost,
|
||||
Operator: "system",
|
||||
Remark: "推币机活动兑换消耗",
|
||||
})
|
||||
if !ok {
|
||||
pack.OpRetCode = activity.OpResultPushCoinCode_OPRC_PushCoin_ItemNotEnough
|
||||
goto here
|
||||
}
|
||||
|
||||
for k, v := range d.GetGain() {
|
||||
pack.Exchange.Gain = append(pack.Exchange.Gain, &activity.ItemInfo{
|
||||
ItemId: int32(k),
|
||||
ItemNum: int32(v),
|
||||
})
|
||||
if k == common.ItemIDShake {
|
||||
p.WelfData.PushCoin.Shake += int32(v)
|
||||
continue
|
||||
}
|
||||
gain = append(gain, &model.Item{
|
||||
ItemId: int32(k),
|
||||
ItemNum: v,
|
||||
})
|
||||
}
|
||||
BagMgrSingleton.AddItems(&model.AddItemParam{
|
||||
Platform: p.Platform,
|
||||
SnId: p.SnId,
|
||||
Change: gain,
|
||||
Cost: cost,
|
||||
Add: 0,
|
||||
GainWay: common.GainWatPushCoinExchangeGain,
|
||||
Operator: "system",
|
||||
Remark: "推币机活动兑换获得",
|
||||
})
|
||||
if p.WelfData.PushCoin.Exchange == nil {
|
||||
p.WelfData.PushCoin.Exchange = make(map[int32]int32)
|
||||
}
|
||||
p.WelfData.PushCoin.Exchange[d.Id]++
|
||||
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
|
||||
pack.OpRetCode = activity.OpResultPushCoinCode_OPRC_PushCoin_Success
|
||||
|
||||
here:
|
||||
p.SendToClient(int(activity.PushCoinPacketID_PACKET_SCPushCoinPlayerOp), pack)
|
||||
logger.Logger.Trace("SCPushCoinPlayerOp: ", pack)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func InitPlayerPushCoin(p *Player) {
|
||||
// 初始化
|
||||
p.WelfData.PushCoin = &model.PushCoinData{
|
||||
Power: PowerInit,
|
||||
Exchange: make(map[int32]int32),
|
||||
Items: map[int32]int64{
|
||||
common.ItemIDVCard: 1,
|
||||
common.ItemIDCoin: 50 * 5000,
|
||||
common.ItemIDPlum: 1,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func UpdatePlayerPushCoin(p *Player) {
|
||||
p.WelfData.PushCoin.Refresh++
|
||||
// 50个金币
|
||||
p.WelfData.PushCoin.Items = map[int32]int64{
|
||||
common.ItemIDCoin: 50 * 5000,
|
||||
}
|
||||
}
|
||||
|
||||
func AddPower(p *Player, value int64) {
|
||||
if value < 0 {
|
||||
return
|
||||
}
|
||||
p.WelfData.PushCoin.Power += value
|
||||
if p.WelfData.PushCoin.Power > PowerMax {
|
||||
p.WelfData.PushCoin.Power = PowerMax
|
||||
}
|
||||
p.SendToClient(int(activity.PushCoinPacketID_PACKET_NotifyPowerLine), &activity.NotifyPowerLine{
|
||||
PowerLine: p.WelfData.PushCoin.Power,
|
||||
PowerLineMax: PowerMax,
|
||||
})
|
||||
if value <= 0 {
|
||||
return
|
||||
}
|
||||
// 抽奖
|
||||
Draw(p)
|
||||
}
|
||||
|
||||
func Draw(p *Player) {
|
||||
if p.WelfData.PushCoin.Power < PowerMax {
|
||||
return
|
||||
}
|
||||
p.WelfData.PushCoin.Power = 0
|
||||
var index int32 = -1
|
||||
switch p.WelfData.PushCoin.Dram {
|
||||
case 0:
|
||||
// 必中大金币
|
||||
for _, v := range srvdata.PBDB_ACTPushCoinMgr.Datas.Arr {
|
||||
for kk := range v.GetGain() {
|
||||
if kk == common.ItemIDBigCoin {
|
||||
index = v.GetId()
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
case 1:
|
||||
// 必中v卡
|
||||
for _, v := range srvdata.PBDB_ACTPushCoinMgr.Datas.Arr {
|
||||
for kk := range v.GetGain() {
|
||||
if kk == common.ItemIDVCard {
|
||||
index = v.GetId()
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
var n int32
|
||||
rand := common.RandInt(10000)
|
||||
for _, v := range srvdata.PBDB_ACTPushCoinMgr.Datas.Arr {
|
||||
if rand < int(n+v.GetRate()) {
|
||||
index = v.GetId()
|
||||
break
|
||||
}
|
||||
n += v.GetRate()
|
||||
}
|
||||
}
|
||||
p.WelfData.PushCoin.Dram++
|
||||
|
||||
if index >= 0 {
|
||||
d := srvdata.PBDB_ACTPushCoinMgr.GetData(index)
|
||||
if d != nil {
|
||||
pack := &activity.DrawInfo{
|
||||
Id: d.GetId(),
|
||||
Coin: d.GetValue(),
|
||||
}
|
||||
for k, v := range d.GetGain() {
|
||||
pack.ItemId = int32(k)
|
||||
pack.ItemNum = int32(v)
|
||||
}
|
||||
if pack.Coin > 0 || pack.ItemId > 0 {
|
||||
p.SendToClient(int(activity.PushCoinPacketID_PACKET_NotifyDrawInfo), pack)
|
||||
// 增加能量条
|
||||
AddPower(p, 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func AddValue(p *Player, item map[int32]int64) {
|
||||
if item == nil {
|
||||
return
|
||||
}
|
||||
if p.WelfData != nil && p.WelfData.PushCoin != nil {
|
||||
if p.WelfData.PushCoin.Items == nil {
|
||||
p.WelfData.PushCoin.Items = make(map[int32]int64)
|
||||
}
|
||||
for k, v := range item {
|
||||
if v > 0 {
|
||||
switch k {
|
||||
case common.ItemIDCoin1, common.ItemIDCoin2, common.ItemIDCoin3, common.ItemIDBigCoin:
|
||||
p.WelfData.PushCoin.Items[common.ItemIDCoin] += v * srvdata.GameItemMgr.Get(p.Platform, k).GetNum()
|
||||
default:
|
||||
p.WelfData.PushCoin.Items[k] += v
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -117,6 +117,8 @@ func init() {
|
|||
etcd.Register(etcd.KeyRedPacket, webapi.RedPacketConfig{}, platformConfigEvent)
|
||||
// 累计消耗活动配置
|
||||
etcd.Register(etcd.KeyActConsume, webapi.ConsumeConfig{}, platformConfigEvent)
|
||||
// 推金币活动配置
|
||||
etcd.Register(etcd.KeyActPushCoin, webapi.PushCoinConfig{}, platformConfigEvent)
|
||||
}
|
||||
|
||||
func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||
|
|
@ -370,6 +372,8 @@ func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, e
|
|||
WelfareMgrSington.UpdateRedPacket(config, isInit)
|
||||
case *webapi.ConsumeConfig:
|
||||
WelfareMgrSington.UpdateConsumeConfig(config)
|
||||
case *webapi.PushCoinConfig:
|
||||
WelfareMgrSington.UpdatePushCoinConfig(config)
|
||||
|
||||
default:
|
||||
logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey)
|
||||
|
|
|
|||
|
|
@ -2903,6 +2903,9 @@ func (this *Player) DoShopInfo(info *model.DbShop, isLogin bool) {
|
|||
}
|
||||
//年兽礼包
|
||||
if info.PageId == ShopPageNian {
|
||||
if this.WelfData.NianData.GiftShop == nil {
|
||||
this.WelfData.NianData.GiftShop = map[int32]int32{}
|
||||
}
|
||||
this.WelfData.NianData.GiftShop[info.ShopId] += 1
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -765,13 +765,14 @@ func (r *RankMatchMgr) RankAward() {
|
|||
}
|
||||
rankId := int32(1)
|
||||
for k, player := range players {
|
||||
localRankId := rankId
|
||||
if player == nil {
|
||||
logger.Logger.Errorf("RankMatchMgr OnDayTimer FindPlayerPermitList player is nil %v", list.List[k].SnId)
|
||||
continue
|
||||
}
|
||||
var items []int64
|
||||
for _, award := range rankAward {
|
||||
if award.RankLevelId == rankId {
|
||||
if award.RankLevelId == localRankId {
|
||||
for _, itemInfo := range award.Item {
|
||||
items = append(items, int64(itemInfo.ItemId))
|
||||
items = append(items, itemInfo.ItemNum)
|
||||
|
|
@ -786,7 +787,7 @@ func (r *RankMatchMgr) RankAward() {
|
|||
var newMsg *model.Message
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
title := i18n.Tr("languages", "PermitAwardTitle")
|
||||
content := i18n.Tr("languages", "PermitAward", []int{int(rankId), int(rankId), int(rankId), int(rankId)})
|
||||
content := i18n.Tr("languages", "PermitAward", []int{int(localRankId), int(localRankId), int(localRankId), int(localRankId)})
|
||||
newMsg = model.NewMessage("", 0, "", player.SnId, model.MSGTYPE_RANK_REWARD,
|
||||
title, content, 0, 0, model.MSGSTATE_UNREAD, time.Now().Unix(), 0, "", items, platform, model.HallTienlen, nil)
|
||||
err := model.InsertMessage(platform, newMsg)
|
||||
|
|
@ -837,13 +838,14 @@ func (r *RankMatchMgr) RankAward() {
|
|||
}
|
||||
rankId := int32(1)
|
||||
for k, player := range players {
|
||||
localRankId := rankId
|
||||
if player == nil {
|
||||
logger.Logger.Errorf("RankMatchMgr OnDayTimer FindWinCoinListTienlen player is nil %v", ret.List[k].SnId)
|
||||
continue
|
||||
}
|
||||
var items []int64
|
||||
for _, award := range rankAward {
|
||||
if award.RankLevelId == rankId {
|
||||
if award.RankLevelId == localRankId {
|
||||
for _, itemInfo := range award.Item {
|
||||
items = append(items, int64(itemInfo.ItemId))
|
||||
items = append(items, itemInfo.ItemNum)
|
||||
|
|
@ -858,7 +860,7 @@ func (r *RankMatchMgr) RankAward() {
|
|||
var newMsg *model.Message
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
title := i18n.Tr("languages", "PermitAwardTitle")
|
||||
content := i18n.Tr("languages", "PermitAward", []int{int(rankId), int(rankId), int(rankId), int(rankId)})
|
||||
content := i18n.Tr("languages", "PermitAward", []int{int(localRankId), int(localRankId), int(localRankId), int(localRankId)})
|
||||
newMsg = model.NewMessage("", 0, "", player.SnId, model.MSGTYPE_RANK_REWARD,
|
||||
title, content, 0, 0, model.MSGSTATE_UNREAD, time.Now().Unix(), 0, "", items, platform, model.HallTienlen, nil)
|
||||
err := model.InsertMessage(platform, newMsg)
|
||||
|
|
@ -956,7 +958,7 @@ func (r *RankMatchMgr) NianRankAward() {
|
|||
end, _ := time.Parse(time.DateTime, endTime)
|
||||
endTimestamp := end.Unix()
|
||||
nowTime := time.Now().Unix()
|
||||
if nowTime < timestamp || nowTime > endTimestamp {
|
||||
if nowTime < timestamp || nowTime-86400 > endTimestamp {
|
||||
return
|
||||
}
|
||||
log := &model.NianPlayerRankLog{}
|
||||
|
|
@ -994,14 +996,19 @@ func (r *RankMatchMgr) NianRankAward() {
|
|||
}
|
||||
rankId := int32(1)
|
||||
for k, player := range players {
|
||||
localRankId := rankId
|
||||
if player == nil {
|
||||
logger.Logger.Errorf("RankMatchMgr OnDayTimer FindLuckNianRankList player is nil %v", list.List[k].SnId)
|
||||
continue
|
||||
}
|
||||
var items []int64
|
||||
for _, award := range rankAward[rankId].Award {
|
||||
items = append(items, int64(award.ItemId))
|
||||
items = append(items, award.ItemNum)
|
||||
for _, award := range rankAward {
|
||||
if award.RankId == localRankId {
|
||||
for _, itemInfo := range award.Award {
|
||||
items = append(items, int64(itemInfo.ItemId))
|
||||
items = append(items, itemInfo.ItemNum)
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(items) == 0 {
|
||||
break
|
||||
|
|
@ -1010,7 +1017,7 @@ func (r *RankMatchMgr) NianRankAward() {
|
|||
var newMsg *model.Message
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
title := i18n.Tr("languages", "NianLuckTitle")
|
||||
content := i18n.Tr("languages", "NianLuckAward", []int{int(rankId), int(rankId), int(rankId), int(rankId)})
|
||||
content := i18n.Tr("languages", "NianLuckAward", []int{int(localRankId), int(localRankId), int(localRankId), int(localRankId)})
|
||||
newMsg = model.NewMessage("", 0, "", player.SnId, model.MSGTYPE_RANK_REWARD,
|
||||
title, content, 0, 0, model.MSGSTATE_UNREAD, time.Now().Unix(), 0, "", items, platform, model.HallTienlen, nil)
|
||||
err := model.InsertMessage(platform, newMsg)
|
||||
|
|
@ -1027,12 +1034,13 @@ func (r *RankMatchMgr) NianRankAward() {
|
|||
})).Start()
|
||||
//记录log
|
||||
rankData := &model.NianPlayerRankData{
|
||||
RankId: rankId,
|
||||
RankId: localRankId,
|
||||
Snid: player.SnId,
|
||||
Score: list.List[rankId-1].Luck,
|
||||
Score: list.List[localRankId-1].Luck,
|
||||
}
|
||||
log.RankData = append(log.RankData, rankData)
|
||||
rankId += 1
|
||||
logger.Logger.Infof("发奖 snid:%v rankId:%v", player.SnId, localRankId)
|
||||
}
|
||||
mq.Write(log)
|
||||
//清除幸运榜数值
|
||||
|
|
@ -1045,7 +1053,8 @@ func (r *RankMatchMgr) NianRankAward() {
|
|||
|
||||
})).StartByExecutor("NianLuck_Award")
|
||||
} else if info.TypeId == 2 {
|
||||
if time.Now().Day()-1 != end.Day() {
|
||||
yesterday := time.Unix(time.Now().Unix()-86400, 0)
|
||||
if yesterday.Day() != end.Day() {
|
||||
return
|
||||
}
|
||||
rankAward := info.RankInfo
|
||||
|
|
@ -1078,14 +1087,19 @@ func (r *RankMatchMgr) NianRankAward() {
|
|||
}
|
||||
rankId := int32(1)
|
||||
for k, player := range players {
|
||||
localRankId := rankId // 将 rankId 复制到局部变量
|
||||
if player == nil {
|
||||
logger.Logger.Errorf("RankMatchMgr OnDayTimer FindLuckNianRankList player is nil %v", list.List[k].SnId)
|
||||
continue
|
||||
}
|
||||
var items []int64
|
||||
for _, award := range rankAward[rankId].Award {
|
||||
items = append(items, int64(award.ItemId))
|
||||
items = append(items, award.ItemNum)
|
||||
for _, award := range rankAward {
|
||||
if award.RankId == localRankId {
|
||||
for _, itemInfo := range award.Award {
|
||||
items = append(items, int64(itemInfo.ItemId))
|
||||
items = append(items, itemInfo.ItemNum)
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(items) == 0 {
|
||||
break
|
||||
|
|
@ -1094,7 +1108,7 @@ func (r *RankMatchMgr) NianRankAward() {
|
|||
var newMsg *model.Message
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
title := i18n.Tr("languages", "NianDamageTitle")
|
||||
content := i18n.Tr("languages", "NianDamageAward", []int{int(rankId), int(rankId), int(rankId), int(rankId)})
|
||||
content := i18n.Tr("languages", "NianDamageAward", []int{int(localRankId), int(localRankId), int(localRankId), int(localRankId)})
|
||||
newMsg = model.NewMessage("", 0, "", player.SnId, model.MSGTYPE_RANK_REWARD,
|
||||
title, content, 0, 0, model.MSGSTATE_UNREAD, time.Now().Unix(), 0, "", items, platform, model.HallTienlen, nil)
|
||||
err := model.InsertMessage(platform, newMsg)
|
||||
|
|
@ -1110,9 +1124,9 @@ func (r *RankMatchMgr) NianRankAward() {
|
|||
}
|
||||
})).Start()
|
||||
rankData := &model.NianPlayerRankData{
|
||||
RankId: rankId,
|
||||
RankId: localRankId,
|
||||
Snid: player.SnId,
|
||||
Score: list.List[rankId-1].Damage,
|
||||
Score: list.List[localRankId-1].Damage,
|
||||
}
|
||||
log.RankData = append(log.RankData, rankData)
|
||||
rankId += 1
|
||||
|
|
|
|||
|
|
@ -2291,7 +2291,7 @@ func init() {
|
|||
retFail("购买记录状态修改失败")
|
||||
return
|
||||
}
|
||||
if player != nil || (player != nil && player.IsOffline()) {
|
||||
if player != nil && !player.IsOffline() {
|
||||
player.DoShopInfo(info, false)
|
||||
// 邀请积分
|
||||
InviteTask(msg.Platform, player.PSnId, info.SnId, common.InviteScoreTypePay, int64(info.ConsumeNum))
|
||||
|
|
|
|||
|
|
@ -5,8 +5,10 @@ import (
|
|||
"math"
|
||||
"math/rand"
|
||||
"slices"
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/module"
|
||||
|
||||
|
|
@ -929,6 +931,7 @@ func (this *WelfareMgr) GetAddUp2Award(p *Player, day int32) {
|
|||
// WelfareSwitch 通知活动开关状态
|
||||
func (this *WelfareMgr) WelfareSwitch(p *Player, platform string, op int) {
|
||||
pack := &player_proto.SCEasyWelfaredInfo{}
|
||||
now := time.Now()
|
||||
// 0转盘1盲盒2首冲3连续充值
|
||||
info := this.GetConfig(platform)
|
||||
|
||||
|
|
@ -1019,11 +1022,18 @@ func (this *WelfareMgr) WelfareSwitch(p *Player, platform string, op int) {
|
|||
}
|
||||
// 累消活动
|
||||
consumeConfig := info.ConsumeConfig
|
||||
if consumeConfig != nil {
|
||||
if consumeConfig != nil && now.Unix() >= common.StrTimeToTs(consumeConfig.StartTime) && now.Unix() < common.StrTimeToTs(consumeConfig.EndTime) {
|
||||
pack.WelfareSwitch = append(pack.WelfareSwitch, consumeConfig.On) //累消活动开关
|
||||
} else {
|
||||
pack.WelfareSwitch = append(pack.WelfareSwitch, model.WelfareClose)
|
||||
}
|
||||
// 推币机活动
|
||||
coinConfig := info.PushCoinConfig
|
||||
if coinConfig != nil && now.Unix() >= common.StrTimeToTs(coinConfig.StartTime) && now.Unix() < common.StrTimeToTs(coinConfig.EndTime) {
|
||||
pack.WelfareSwitch = append(pack.WelfareSwitch, coinConfig.On) //推币机活动开关
|
||||
} else {
|
||||
pack.WelfareSwitch = append(pack.WelfareSwitch, model.WelfareClose)
|
||||
}
|
||||
|
||||
if model.GameParamData.TestActSwitch {
|
||||
for k := range pack.WelfareSwitch {
|
||||
|
|
@ -2313,6 +2323,10 @@ func (this *WelfareMgr) SendRedPacketInfo(p *Player) *welfare.SCRedPacketInfo {
|
|||
}
|
||||
}
|
||||
|
||||
sort.Slice(pack.Info, func(i, j int) bool {
|
||||
return pack.Info[i].StartTs < pack.Info[j].StartTs
|
||||
})
|
||||
|
||||
p.SendToClient(int(welfare.SPacketID_PACKET_SCRedPacketInfo), pack)
|
||||
return pack
|
||||
}
|
||||
|
|
@ -2401,7 +2415,7 @@ func (this *WelfareMgr) GetRedPacket(p *Player, id int64) *welfare.SCRedPacketDr
|
|||
f := func() {
|
||||
// 概率抽奖
|
||||
rate := 0
|
||||
n := rand.Int63n(100)
|
||||
n := rand.Int63n(10000)
|
||||
for _, v := range cfg.GetRedList() {
|
||||
rate += int(v.GetRate())
|
||||
if n < int64(rate) {
|
||||
|
|
@ -2461,6 +2475,18 @@ func (this *WelfareMgr) GetRedPacket(p *Player, id int64) *welfare.SCRedPacketDr
|
|||
Ts: now,
|
||||
}, mq.BackRedPacket)
|
||||
|
||||
mq.Write(&model.RedPacketHistory{
|
||||
Platform: p.Platform,
|
||||
ID: primitive.NewObjectID(),
|
||||
Cid: id,
|
||||
Snid: p.SnId,
|
||||
Ts: time.Now().Unix(),
|
||||
ItemId: cfg.GetItemId(),
|
||||
ItemNum: reward,
|
||||
}, mq.DBRedPacket)
|
||||
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeBuyRedBag, &TaskData{SnId: p.SnId, Num: 1})
|
||||
|
||||
_, pack.RemainCount = RedPacketMgrInst.GetRemainTimesByConfig(p, cfg)
|
||||
Send(welfare.OpResultCode_OPRC_Sucess)
|
||||
return pack
|
||||
|
|
@ -2483,6 +2509,23 @@ func (this *WelfareMgr) UpdateConsumeConfig(conf *webapi_proto.ConsumeConfig) {
|
|||
}
|
||||
}
|
||||
|
||||
func (this *WelfareMgr) UpdatePushCoinConfig(conf *webapi_proto.PushCoinConfig) {
|
||||
if model.GameParamData.TestActSwitch {
|
||||
conf.On = model.WelfareOpen
|
||||
}
|
||||
s := int32(0)
|
||||
info := this.GetConfig(conf.Platform)
|
||||
if info.PushCoinConfig != nil {
|
||||
s = info.PushCoinConfig.On
|
||||
}
|
||||
this.GetConfig(conf.Platform).PushCoinConfig = conf
|
||||
//更新活动时间
|
||||
// 打开关闭要广播给客户端
|
||||
if s != 0 && s != conf.On {
|
||||
this.WelfareSwitch(nil, conf.Platform, model.OpPushCoin)
|
||||
}
|
||||
}
|
||||
|
||||
func (this *WelfareMgr) Update() {
|
||||
}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue