refactor: 游戏管理器,房间管理器,数据管理器。

main
NorthLan 3 years ago
parent 0368a2da91
commit 0621d663e0

@ -43,6 +43,57 @@ Game:
Commands: [ "j", "加入", "t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8", "w", "我在哪", "m1", "m2", "m3", "m4", "f", "开炮" ] Commands: [ "j", "加入", "t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8", "w", "我在哪", "m1", "m2", "m3", "m4", "f", "开炮" ]
Zhgfb: Zhgfb:
Commands: [ ] Commands: [ ]
Zhgzd:
Commands: [ "j", "加入", "加入游戏", "w", "我在哪", "s", "s1", "s2", "s3", "s4", "c1", "c2", "c3", "c4", "r1", "r2", "r3", "r4", "p0", "p1", "p2", "p3", "p4", "p5" ]
CommandUnitDict:
1: "001"
2: "003"
3: "004"
4: "006"
CommandCostDict:
s:
Common: 1
Units:
"001": 2
"003": 3
"004": 3
"006": 2
c:
Common: 1
r:
Common: 1
p:
Common: 1
DispatchCountDict:
"001": 5
"003": 5
"004": 3
"006": 3
GiftEffect:
StrategicMaximal:
# 这个好诶 10电池 1元
GiftIds: [ 30758,30971,31213,31478]
Addon: 2
Limit: 5
StrategicRecover:
# 打call 5电池 0.5元
GiftIds: [ 31278,31037,31212,31485 ]
Addon: 1
Duration: 5
Limit: 10
SupportSkill:
# 辣条随机 免费
- GiftIds: [1]
SkillIds: ["S0001", "S0002", "S0003", "S0005"]
# 小花花 - 火墙 1电池 0.1元
- GiftIds: [31036, 31476]
SkillIds: ["S0001"]
# 牛哇牛哇 - 雷击 1电池 0.1元
- GiftIds: [31225, 31214, 31039, 31202, 31477]
SkillIds: ["S0003"]
# i了i了 - 箭雨 1电池 0.1元
- GiftIds: [ 31060, 31216 ]
SkillIds: [ "S0002" ]
Log: Log:
Console: Console:
Level: debug Level: debug

@ -1,34 +0,0 @@
package game
import (
"dcg/config"
pbRoom "dcg/game/pb/room"
"errors"
)
// LivePair 直播间ID 与 游戏类型 映射关系
var (
LivePair map[int64]pbRoom.GameType
defaultGameType = pbRoom.GameType_ZHG
)
func init() {
LivePair = make(map[int64]pbRoom.GameType)
}
func CacheGameType(roomId int64, gameType pbRoom.GameType) {
LivePair[roomId] = gameType
}
//goland:noinspection GoNameStartsWithPackageName
func GameTypeByLiveRoomId(roomId int64) (pbRoom.GameType, error) {
if gameType, ok := LivePair[roomId]; ok {
return gameType, nil
} else {
modeCfg := config.Config.Game.ModeDict
if gtInt, ok := modeCfg[roomId]; ok {
return pbRoom.GameType(gtInt), nil
}
}
return defaultGameType, errors.New("该直播间未加入游戏房间")
}

@ -32,7 +32,7 @@ func NewCommonLiveGameLogic(svcCtx *svc.ServiceContext) *LiveGameLogic {
} }
func (h *commonGameLogic) handleCheckIn(roomId int64, _ string, user *pbCommon.PbUser) { func (h *commonGameLogic) handleCheckIn(roomId int64, _ string, user *pbCommon.PbUser) {
room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) room, err := manager.GameManager.RoomByLiveRoomId(roomId)
if err != nil { if err != nil {
return return
} }
@ -48,11 +48,11 @@ func (h *commonGameLogic) handleCheckIn(roomId int64, _ string, user *pbCommon.P
respMsg.IntegralChange = resp.IntegralChange respMsg.IntegralChange = resp.IntegralChange
respMsg.IsCritical = resp.IsCritical respMsg.IsCritical = resp.IsCritical
} }
room.PushToLiveRoom(roomId, "user.checkIn", respMsg) room.Broadcast("user.checkIn", respMsg)
} }
func (h *commonGameLogic) handleQuery(roomId int64, _ string, user *pbCommon.PbUser) { func (h *commonGameLogic) handleQuery(roomId int64, _ string, user *pbCommon.PbUser) {
room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) room, err := manager.GameManager.RoomByLiveRoomId(roomId)
if err != nil { if err != nil {
return return
} }
@ -70,7 +70,7 @@ func (h *commonGameLogic) handleQuery(roomId int64, _ string, user *pbCommon.PbU
}) })
} }
} }
room.PushToLiveRoom(roomId, "user.query", &pbCommon.UserQueryMsg{ room.Broadcast("user.query", &pbCommon.UserQueryMsg{
User: user, User: user,
Rank: rank, Rank: rank,
TitleIds: []int64{}, TitleIds: []int64{},
@ -78,12 +78,12 @@ func (h *commonGameLogic) handleQuery(roomId int64, _ string, user *pbCommon.PbU
} }
func (h *commonGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift) { func (h *commonGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift) {
room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) room, err := manager.GameManager.RoomByLiveRoomId(roomId)
if err != nil { if err != nil {
return return
} }
// 1. 发送通用礼物消息 // 1. 发送通用礼物消息
room.PushToLiveRoom(roomId, "live.gift.common", &pbCommon.GiftMsg{ room.Broadcast("live.gift.common", &pbCommon.GiftMsg{
User: user, User: user,
GiftId: gift.GiftId, GiftId: gift.GiftId,
Num: gift.Num, Num: gift.Num,
@ -110,7 +110,7 @@ func (h *commonGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift *
return return
} }
user.Integral = giftResp.Integral.Integral // 更新最新积分 user.Integral = giftResp.Integral.Integral // 更新最新积分
room.PushToLiveRoom(roomId, "user.integral.change", &pbCommon.UserIntegralChanged{ room.Broadcast("user.integral.change", &pbCommon.UserIntegralChanged{
User: user, User: user,
Change: giftResp.Integral.Change, Change: giftResp.Integral.Change,
Integral: giftResp.Integral.Integral, Integral: giftResp.Integral.Integral,
@ -118,12 +118,12 @@ func (h *commonGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift *
} }
func (h *commonGameLogic) handleNobility(roomId int64, user *pbCommon.PbUser, msg *pbMq.MqGuardBuy) { func (h *commonGameLogic) handleNobility(roomId int64, user *pbCommon.PbUser, msg *pbMq.MqGuardBuy) {
room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) room, err := manager.GameManager.RoomByLiveRoomId(roomId)
if err != nil { if err != nil {
return return
} }
// 1. 发送通用礼物消息 // 1. 发送通用礼物消息
room.PushToLiveRoom(roomId, "live.gift.nobility", &pbCommon.GiftMsg{ room.Broadcast("live.gift.nobility", &pbCommon.GiftMsg{
User: user, User: user,
GiftId: msg.GiftId, GiftId: msg.GiftId,
Num: int64(msg.Num), Num: int64(msg.Num),
@ -151,7 +151,7 @@ func (h *commonGameLogic) handleNobility(roomId int64, user *pbCommon.PbUser, ms
return return
} }
user.Integral = nobilityResp.Integral.Integral // 更新最新积分 user.Integral = nobilityResp.Integral.Integral // 更新最新积分
room.PushToLiveRoom(roomId, "user.integral.change", &pbCommon.UserIntegralChanged{ room.Broadcast("user.integral.change", &pbCommon.UserIntegralChanged{
User: user, User: user,
Change: nobilityResp.Integral.Change, Change: nobilityResp.Integral.Change,
Integral: nobilityResp.Integral.Integral, Integral: nobilityResp.Integral.Integral,

@ -22,6 +22,13 @@ type (
CMDHandlerFunc func(roomId int64, cmd string, user *pbCommon.PbUser) CMDHandlerFunc func(roomId int64, cmd string, user *pbCommon.PbUser)
GiftHandlerFunc func(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift) GiftHandlerFunc func(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift)
NobilityHandlerFunc func(roomId int64, user *pbCommon.PbUser, nobility *pbMq.MqGuardBuy) NobilityHandlerFunc func(roomId int64, user *pbCommon.PbUser, nobility *pbMq.MqGuardBuy)
// GiftLogic LiveGameLogic内部礼物逻辑处理
GiftLogic struct {
GiftIds []int64
Fn GiftLogicFunc
}
GiftLogicFunc func(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift)
) )
func NewLiveGameLogic(gameType pbRoom.GameType, cmdParser *cmd.Parser) *LiveGameLogic { func NewLiveGameLogic(gameType pbRoom.GameType, cmdParser *cmd.Parser) *LiveGameLogic {
@ -64,12 +71,12 @@ func (l *LiveGameLogic) HandleDanmaku(pushCommonMsg bool, user *pbCommon.PbUser,
l.handleCMD(dm.LiveRoomId, c, user) l.handleCMD(dm.LiveRoomId, c, user)
} }
} else if pushCommonMsg { } else if pushCommonMsg {
room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(dm.LiveRoomId) room, err := manager.GameManager.RoomByLiveRoomId(dm.LiveRoomId)
if err != nil { if err != nil {
return return
} }
// 发送正常的非命令弹幕消息 // 发送正常的非命令弹幕消息
room.PushToLiveRoom(dm.LiveRoomId, "live.danmaku", &pbCommon.DanmakuMsg{ room.Broadcast("live.danmaku", &pbCommon.DanmakuMsg{
User: user, User: user,
Content: dm.Content, Content: dm.Content,
}) })

@ -1,7 +1,7 @@
package live_logic package live_logic
import ( import (
"dcg/game" "dcg/game/manager"
pbCommon "dcg/game/pb/common" pbCommon "dcg/game/pb/common"
pbMq "dcg/game/pb/mq" pbMq "dcg/game/pb/mq"
pbRoom "dcg/game/pb/room" pbRoom "dcg/game/pb/room"
@ -28,6 +28,7 @@ func InitLiveManager(svcCtx *svc.ServiceContext) {
// gameLogic // gameLogic
LiveManager.RegisterLogic(NewZhgLiveGameLogic(svcCtx)) LiveManager.RegisterLogic(NewZhgLiveGameLogic(svcCtx))
LiveManager.RegisterLogic(NewZhghzLiveGameLogic().LiveGameLogic) LiveManager.RegisterLogic(NewZhghzLiveGameLogic().LiveGameLogic)
LiveManager.RegisterLogic(NewZhgzdLiveGameLogic(svcCtx))
} }
func newManager() *Manager { func newManager() *Manager {
@ -41,11 +42,11 @@ func (m *Manager) RegisterLogic(h *LiveGameLogic) {
} }
func (m *Manager) logicByLiveRoomId(roomId int64) (*LiveGameLogic, error) { func (m *Manager) logicByLiveRoomId(roomId int64) (*LiveGameLogic, error) {
gameType, err := game.GameTypeByLiveRoomId(roomId) room, err := manager.GameManager.RoomByLiveRoomId(roomId)
if err != nil { if err != nil {
return nil, errors.New("当前直播间未加入游戏房间") return nil, errors.New("当前直播间未加入游戏房间")
} }
if l, ok := m.gameLogics[gameType]; ok { if l, ok := m.gameLogics[room.GameType()]; ok {
return l, nil return l, nil
} }
return nil, errors.New("未找到当前直播间支持的游戏逻辑") return nil, errors.New("未找到当前直播间支持的游戏逻辑")

@ -35,23 +35,24 @@ func NewZhgLiveGameLogic(svcCtx *svc.ServiceContext) *LiveGameLogic {
} }
func (h *ZhgGameLogic) handleJoinGame(roomId int64, _ string, user *pbCommon.PbUser) { func (h *ZhgGameLogic) handleJoinGame(roomId int64, _ string, user *pbCommon.PbUser) {
room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) room, err := manager.GameManager.RoomByLiveRoomId(roomId)
if err != nil { if err != nil {
return return
} }
room.PushToLiveRoom(roomId, "game.join", &pbGameZhg.JoinGame{User: user})
room.Broadcast("game.join", &pbGameZhg.JoinGame{User: user})
} }
func (h *ZhgGameLogic) handleOutbreak(roomId int64, _ string, user *pbCommon.PbUser) { func (h *ZhgGameLogic) handleOutbreak(roomId int64, _ string, user *pbCommon.PbUser) {
room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) room, err := manager.GameManager.RoomByLiveRoomId(roomId)
if err != nil { if err != nil {
return return
} }
room.PushToLiveRoom(roomId, "game.outbreak", &pbGameZhg.Outbreak{User: user}) room.Broadcast("game.outbreak", &pbGameZhg.Outbreak{User: user})
} }
func (h *ZhgGameLogic) handleOutbreakIntegral(roomId int64, cmd string, user *pbCommon.PbUser) { func (h *ZhgGameLogic) handleOutbreakIntegral(roomId int64, cmd string, user *pbCommon.PbUser) {
room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) room, err := manager.GameManager.RoomByLiveRoomId(roomId)
if err != nil { if err != nil {
return return
} }
@ -70,7 +71,7 @@ func (h *ZhgGameLogic) handleOutbreakIntegral(roomId int64, cmd string, user *pb
costIntegral = zhgCfg.OutbreakBaseCost costIntegral = zhgCfg.OutbreakBaseCost
} }
room.PushToLiveRoom(roomId, "game.outbreak.integral", &pbGameZhg.OutbreakIntegral{ room.Broadcast("game.outbreak.integral", &pbGameZhg.OutbreakIntegral{
User: user, User: user,
UnitType: string(cmdRune[1]), UnitType: string(cmdRune[1]),
Count: int32(zhgCfg.OutbreakCount), Count: int32(zhgCfg.OutbreakCount),
@ -84,12 +85,12 @@ func (h *ZhgGameLogic) handleCreateUnit(roomId int64, cmd string, user *pbCommon
} }
unit := cmd[1] unit := cmd[1]
room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) room, err := manager.GameManager.RoomByLiveRoomId(roomId)
if err != nil { if err != nil {
return return
} }
room.PushToLiveRoom(roomId, "game.createUnit", &pbGameZhg.CreateUnit{ room.Broadcast("game.createUnit", &pbGameZhg.CreateUnit{
User: user, User: user,
Unit: string(unit), Unit: string(unit),
}) })
@ -101,22 +102,22 @@ func (h *ZhgGameLogic) handleMove(roomId int64, cmd string, user *pbCommon.PbUse
} }
line := cmd[1] line := cmd[1]
room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) room, err := manager.GameManager.RoomByLiveRoomId(roomId)
if err != nil { if err != nil {
return return
} }
room.PushToLiveRoom(roomId, "game.move", &pbGameZhg.Move{ room.Broadcast("game.move", &pbGameZhg.Move{
User: user, User: user,
Line: string(line), Line: string(line),
}) })
} }
func (h *ZhgGameLogic) handleWai(roomId int64, _ string, user *pbCommon.PbUser) { func (h *ZhgGameLogic) handleWai(roomId int64, _ string, user *pbCommon.PbUser) {
room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) room, err := manager.GameManager.RoomByLiveRoomId(roomId)
if err != nil { if err != nil {
return return
} }
room.PushToLiveRoom(roomId, "game.wai", &pbGameZhg.Wai{User: user}) room.Broadcast("game.wai", &pbGameZhg.Wai{User: user})
} }
func (h *ZhgGameLogic) handleMode(roomId int64, cmd string, user *pbCommon.PbUser) { func (h *ZhgGameLogic) handleMode(roomId int64, cmd string, user *pbCommon.PbUser) {
@ -124,11 +125,11 @@ func (h *ZhgGameLogic) handleMode(roomId int64, cmd string, user *pbCommon.PbUse
return return
} }
line := cmd[1] line := cmd[1]
room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) room, err := manager.GameManager.RoomByLiveRoomId(roomId)
if err != nil { if err != nil {
return return
} }
room.PushToLiveRoom(roomId, "game.mode", &pbGameZhg.BuildingMode{ room.Broadcast("game.mode", &pbGameZhg.BuildingMode{
User: user, User: user,
Mode: string(line), Mode: string(line),
}) })

@ -17,19 +17,14 @@ type (
*LiveGameLogic *LiveGameLogic
// giftLogics 礼物处理 platform-cmd:logic // giftLogics 礼物处理 platform-cmd:logic
giftLogics map[string]giftLogic giftLogics map[string]GiftLogic
} }
giftLogic struct {
giftIds []int64
fn giftLogicFunc
}
giftLogicFunc func(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift)
) )
func NewZhghzLiveGameLogic() *ZhghzGameLogic { func NewZhghzLiveGameLogic() *ZhghzGameLogic {
resp := &ZhghzGameLogic{ resp := &ZhghzGameLogic{
LiveGameLogic: NewLiveGameLogic(pbRoom.GameType_ZHGHZ, cmd.NewCMDParser(false, config.Config.Game.Zhghz.Commands...)), LiveGameLogic: NewLiveGameLogic(pbRoom.GameType_ZHGHZ, cmd.NewCMDParser(false, config.Config.Game.Zhghz.Commands...)),
giftLogics: make(map[string]giftLogic), giftLogics: make(map[string]GiftLogic),
} }
resp.RegisterCMDHandler(resp.handleJoinGame, "j", "t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8") resp.RegisterCMDHandler(resp.handleJoinGame, "j", "t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8")
resp.RegisterCMDHandler(resp.handleMove, "m1", "m2", "m3", "m4") resp.RegisterCMDHandler(resp.handleMove, "m1", "m2", "m3", "m4")
@ -41,7 +36,7 @@ func NewZhghzLiveGameLogic() *ZhghzGameLogic {
} }
func (h *ZhghzGameLogic) handleJoinGame(roomId int64, cmd string, user *pbCommon.PbUser) { func (h *ZhghzGameLogic) handleJoinGame(roomId int64, cmd string, user *pbCommon.PbUser) {
room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) room, err := manager.GameManager.RoomByLiveRoomId(roomId)
if err != nil { if err != nil {
return return
} }
@ -51,14 +46,14 @@ func (h *ZhghzGameLogic) handleJoinGame(roomId int64, cmd string, user *pbCommon
v, _ := strconv.Atoi(string(cmd[1])) v, _ := strconv.Atoi(string(cmd[1]))
team = int32(v) team = int32(v)
} }
room.PushToLiveRoom(roomId, "game.join", &pbGameZhghz.JoinGame{ room.Broadcast("game.join", &pbGameZhghz.JoinGame{
User: user, User: user,
Team: team, Team: team,
}) })
} }
func (h *ZhghzGameLogic) handleMove(roomId int64, cmd string, user *pbCommon.PbUser) { func (h *ZhghzGameLogic) handleMove(roomId int64, cmd string, user *pbCommon.PbUser) {
room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) room, err := manager.GameManager.RoomByLiveRoomId(roomId)
if err != nil { if err != nil {
return return
} }
@ -68,35 +63,35 @@ func (h *ZhghzGameLogic) handleMove(roomId int64, cmd string, user *pbCommon.PbU
} }
v, _ := strconv.Atoi(string(cmd[1])) v, _ := strconv.Atoi(string(cmd[1]))
room.PushToLiveRoom(roomId, "game.move", &pbGameZhghz.Move{ room.Broadcast("game.move", &pbGameZhghz.Move{
User: user, User: user,
Direction: int32(v), Direction: int32(v),
}) })
} }
func (h *ZhghzGameLogic) handleShoot(roomId int64, _ string, user *pbCommon.PbUser) { func (h *ZhghzGameLogic) handleShoot(roomId int64, _ string, user *pbCommon.PbUser) {
room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) room, err := manager.GameManager.RoomByLiveRoomId(roomId)
if err != nil { if err != nil {
return return
} }
room.PushToLiveRoom(roomId, "game.shoot", &pbGameZhghz.Shoot{ room.Broadcast("game.shoot", &pbGameZhghz.Shoot{
User: user, User: user,
}) })
} }
func (h *ZhghzGameLogic) handleWai(roomId int64, _ string, user *pbCommon.PbUser) { func (h *ZhghzGameLogic) handleWai(roomId int64, _ string, user *pbCommon.PbUser) {
room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) room, err := manager.GameManager.RoomByLiveRoomId(roomId)
if err != nil { if err != nil {
return return
} }
room.PushToLiveRoom(roomId, "game.wai", &pbGameZhghz.Where{User: user}) room.Broadcast("game.wai", &pbGameZhghz.Where{User: user})
} }
func (h *ZhghzGameLogic) handleGiftLogic(cmd string, roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift) bool { func (h *ZhghzGameLogic) handleGiftLogic(cmd string, roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift) bool {
if gl, ok := h.giftLogics[cmd]; ok { if gl, ok := h.giftLogics[cmd]; ok {
for _, id := range gl.giftIds { for _, id := range gl.GiftIds {
if gift.GiftId == id { if gift.GiftId == id {
gl.fn(roomId, user, gift) gl.Fn(roomId, user, gift)
return true return true
} }
} }
@ -107,7 +102,7 @@ func (h *ZhghzGameLogic) handleGiftLogic(cmd string, roomId int64, user *pbCommo
} }
func (h *ZhghzGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift) { func (h *ZhghzGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift) {
room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) room, err := manager.GameManager.RoomByLiveRoomId(roomId)
if err != nil { if err != nil {
return return
} }
@ -117,10 +112,10 @@ func (h *ZhghzGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift *p
logicKey := fmt.Sprintf("%s-game.chargeShield", gift.Platform) logicKey := fmt.Sprintf("%s-game.chargeShield", gift.Platform)
if ok := h.handleGiftLogic(logicKey, roomId, user, gift); !ok { if ok := h.handleGiftLogic(logicKey, roomId, user, gift); !ok {
// 1 辣条 | 30607 小心心 > 魔法护盾 // 1 辣条 | 30607 小心心 > 魔法护盾
h.giftLogics[logicKey] = giftLogic{ h.giftLogics[logicKey] = GiftLogic{
giftIds: []int64{1, 30607}, GiftIds: []int64{1, 30607},
fn: func(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift) { Fn: func(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift) {
room.PushToLiveRoom(roomId, "game.chargeShield", &pbGameZhghz.ChargeShield{ room.Broadcast("game.chargeShield", &pbGameZhghz.ChargeShield{
User: user, User: user,
Points: int32(gift.Num * 1), Points: int32(gift.Num * 1),
}) })
@ -131,10 +126,10 @@ func (h *ZhghzGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift *p
logicKey = fmt.Sprintf("%s-game.giftShoot", gift.Platform) logicKey = fmt.Sprintf("%s-game.giftShoot", gift.Platform)
if ok := h.handleGiftLogic(logicKey, roomId, user, gift); !ok { if ok := h.handleGiftLogic(logicKey, roomId, user, gift); !ok {
// 31036 小花花 | 31039 牛哇牛哇 > 魔法飞弹 // 31036 小花花 | 31039 牛哇牛哇 > 魔法飞弹
h.giftLogics[logicKey] = giftLogic{ h.giftLogics[logicKey] = GiftLogic{
giftIds: []int64{31036, 31039}, GiftIds: []int64{31036, 31039},
fn: func(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift) { Fn: func(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift) {
room.PushToLiveRoom(roomId, "game.giftShoot", &pbGameZhghz.ChargeShield{ room.Broadcast("game.giftShoot", &pbGameZhghz.ChargeShield{
User: user, User: user,
Points: int32(gift.Num * 1), Points: int32(gift.Num * 1),
}) })

@ -35,8 +35,9 @@ func (p *GameStatus) Prefix() string {
// Status 游戏房间状态变更 // Status 游戏房间状态变更
func (p *GameStatus) Status(s *session.Session, msg *pbCommon.GameStatusReq) error { func (p *GameStatus) Status(s *session.Session, msg *pbCommon.GameStatusReq) error {
manager.GameManager.DataManager.SessionGameStatus(s, manager.GameStatus(msg.Status)) manager.GameManager.SessionGameStatus(s, manager.GameStatus(msg.Status))
data, err := manager.GameManager.DataManager.SessionData(s)
data, err := manager.GameManager.SessionData(s)
if err != nil { if err != nil {
return s.Response(&pbCommon.GameStatusResp{ return s.Response(&pbCommon.GameStatusResp{
Success: false, Success: false,

@ -15,11 +15,6 @@ var GameLogic *Logics
type Logics struct { type Logics struct {
Services *component.Components Services *component.Components
RoomLogic *room.Logic
StatisticsPvP *statistics.PvP
Rank *rank.Rank
UserIntegral *user.UserLogic
} }
func Init(svcCtx *svc.ServiceContext) { func Init(svcCtx *svc.ServiceContext) {
@ -62,9 +57,5 @@ func Init(svcCtx *svc.ServiceContext) {
GameLogic = &Logics{ GameLogic = &Logics{
Services: services, Services: services,
RoomLogic: roomManager,
StatisticsPvP: statisticsPvP,
Rank: rk,
UserIntegral: userIntegral,
} }
} }

@ -26,7 +26,7 @@ func (m *Logic) Init() {
func (m *Logic) AfterInit() { func (m *Logic) AfterInit() {
session.Lifetime.OnClosed(func(s *session.Session) { session.Lifetime.OnClosed(func(s *session.Session) {
manager.GameManager.RoomManager.SessionLeaveRoom(s) manager.GameManager.RoomManager.LeaveRoom(s)
}) })
} }
@ -35,10 +35,18 @@ func (m *Logic) Shutdown() {
} }
func (m *Logic) Join(s *session.Session, msg *pbRoom.JoinRoomReq) error { func (m *Logic) Join(s *session.Session, msg *pbRoom.JoinRoomReq) error {
if err := manager.GameManager.RoomManager.SessionJoinRoom(s, msg.GameType, msg.LiveRoomId); err != nil { // uid - liveRoomId
err := s.Bind(msg.LiveRoomId)
if err != nil {
return err
}
manager.GameManager.DataManager.SetSessionData(s, manager.NewGameData(msg.LiveRoomId))
if err = manager.GameManager.JoinRoom(s, msg.GameType, msg.LiveRoomId); err != nil {
return s.Response(&pbRoom.JoinRoomResp{ return s.Response(&pbRoom.JoinRoomResp{
Code: 500, Code: 500,
Result: "加入房间失败", Result: err.Error(),
}) })
} }
return s.Response(&pbRoom.JoinRoomResp{ return s.Response(&pbRoom.JoinRoomResp{

@ -41,7 +41,7 @@ func (p *UserLogic) Prefix() string {
func (p *UserLogic) Change(s *session.Session, msg *pbCommon.ChangeUserIntegralReq) error { func (p *UserLogic) Change(s *session.Session, msg *pbCommon.ChangeUserIntegralReq) error {
integral, err := p.svcCtx.UserCenterRpc.ChangeIntegral(p.svcCtx.Ctx, &usercenter.ChangeIntegralReq{ integral, err := p.svcCtx.UserCenterRpc.ChangeIntegral(p.svcCtx.Ctx, &usercenter.ChangeIntegralReq{
UserId: msg.UserId, UserId: msg.UserId,
BattleId: manager.GameManager.DataManager.BattleIdBySession(s), BattleId: manager.GameManager.BattleIdBySession(s),
Change: msg.Change, Change: msg.Change,
IntegralType: pb.IntegralType_Battle, IntegralType: pb.IntegralType_Battle,
}) })

@ -1,8 +1,8 @@
package manager package manager
import ( import (
"git.noahlan.cn/northlan/ngs/session"
"git.noahlan.cn/northlan/ntools-go/uuid" "git.noahlan.cn/northlan/ntools-go/uuid"
"sync"
) )
type GameStatus int32 type GameStatus int32
@ -12,39 +12,41 @@ const (
GameEnded // 游戏已结束 GameEnded // 游戏已结束
) )
type GameData struct { type DataFilter func(session *session.Session, data *Data) bool
// Data is Session data
type Data struct {
liveRoomId int64 // Session 对应 直播间ID
battleId int64 // 战局ID battleId int64 // 战局ID
current GameStatus // 当前战局状态 currentStatus GameStatus // 当前战局状态
mutex sync.RWMutex // 锁
} }
func NewGameData() *GameData { func NewGameData(liveRoomId int64) *Data {
return &GameData{ return &Data{
current: GameEnded, liveRoomId: liveRoomId,
currentStatus: GameEnded,
}
} }
func (m *Data) LiveRoomId() int64 {
return m.liveRoomId
} }
func (m *GameData) SetStatus(status GameStatus) GameStatus { func (m *Data) BattleId() int64 {
m.mutex.Lock() return m.battleId
defer m.mutex.Unlock() }
m.current = status
func (m *Data) CurrentStatus() GameStatus {
return m.currentStatus
}
func (m *Data) SetStatus(status GameStatus) GameStatus {
m.currentStatus = status
if status == GameStarted { if status == GameStarted {
m.battleId = uuid.NextId() m.battleId = uuid.NextId()
} else if status == GameEnded { } else if status == GameEnded {
m.battleId = 0 m.battleId = 0
} }
return m.current return m.currentStatus
}
func (m *GameData) Status() GameStatus {
m.mutex.RLock()
defer m.mutex.RUnlock()
return m.current
}
func (m *GameData) BattleId() int64 {
m.mutex.RLock()
defer m.mutex.RUnlock()
return m.battleId
} }

@ -5,6 +5,10 @@ import (
"git.noahlan.cn/northlan/ngs/session" "git.noahlan.cn/northlan/ngs/session"
) )
const (
DataKey = "DATA"
)
type DataManager struct { type DataManager struct {
} }
@ -12,25 +16,19 @@ func NewDataManager() *DataManager {
return &DataManager{} return &DataManager{}
} }
func (m *DataManager) SessionGameStatus(session *session.Session, status GameStatus) GameStatus { func (m *DataManager) SessionGameStatus(session *session.Session, status GameStatus) {
if data, err := m.SessionData(session); err != nil { if data, err := m.SessionData(session); err == nil {
return GameEnded data.SetStatus(status)
} else {
return data.SetStatus(status)
} }
} }
func (m *DataManager) SessionData(session *session.Session) (*GameData, error) { func (m *DataManager) SetSessionData(s *session.Session, data *Data) {
if !session.HasKey(DataKey) { s.Set(DataKey, data)
return nil, errors.New("session中无data数据")
}
return session.Value(DataKey).(*GameData), nil
} }
func (m *DataManager) BattleIdBySession(session *session.Session) int64 { func (m *DataManager) SessionData(session *session.Session) (*Data, error) {
data, err := m.SessionData(session) if !session.HasKey(DataKey) {
if err != nil { return nil, errors.New("session中无data数据")
return 0
} }
return data.BattleId() return session.Value(DataKey).(*Data), nil
} }

@ -1,48 +1,110 @@
package manager package manager
import (
pbRoom "dcg/game/pb/room"
"dcg/game/svc"
"errors"
"fmt"
"git.noahlan.cn/northlan/ngs/session"
)
var GameManager *gameManager var GameManager *gameManager
type ( type (
gameManager struct { gameManager struct {
RoomManager *RoomManager // 房间管理器 svcCtx *svc.ServiceContext // svcCtx
DataManager *DataManager // 数据管理器(Session)
*RoomManager // 房间管理器
*DataManager // 数据管理器(Session)
} }
) )
func init() { func Init(svcCtx *svc.ServiceContext) {
GameManager = newGameManager() GameManager = newGameManager(svcCtx)
} }
func newGameManager() *gameManager { func newGameManager(svcCtx *svc.ServiceContext) *gameManager {
return &gameManager{ return &gameManager{
svcCtx: svcCtx,
RoomManager: NewRoomManager(), RoomManager: NewRoomManager(),
DataManager: NewDataManager(),
} }
} }
func (m *gameManager) BattleIdByLiveRoomId(liveRoomId int64) int64 { func (m *gameManager) JoinRoom(s *session.Session, gameType pbRoom.GameType, liveRoomId int64) error {
sess, err := m.RoomManager.SessionByLiveRoomId(liveRoomId) room := m.RoomManager.RetrieveRoomByType(gameType)
var exists bool
room.PeekMembers(func(_ int64, s *session.Session) bool {
data, err := m.DataManager.SessionData(s)
if err != nil { if err != nil {
return 0 return true
} }
data, err := m.DataManager.SessionData(sess) if data.LiveRoomId() == liveRoomId {
exists = true
return false
}
return true
})
if !exists {
return room.Add(s)
}
return errors.New(fmt.Sprintf("session [%v] 已在房间 [%d] 中,不能再次加入", s, room.ID()))
}
// SessionByDataFilter 通过 session数据过滤器 获取session,data
func (m *gameManager) SessionByDataFilter(filter DataFilter) (room *Room, sess *session.Session, data *Data, err error) {
m.RoomManager.PeekAllSession(func(r *Room, session *session.Session) bool {
data, err = m.DataManager.SessionData(session)
if err != nil { if err != nil {
return 0 return true
}
if filter(session, data) {
room = r
sess = session
return false
} }
return data.BattleId() return true
})
return
} }
func (m *gameManager) LiveRoomIdByBattleId(battleId int64) int64 { func (m *gameManager) RoomByLiveRoomId(liveRoomId int64) (*Room, error) {
for _, session := range m.RoomManager.Sessions() { room, _, _, err := m.SessionByDataFilter(func(session *session.Session, data *Data) bool {
data, err := m.DataManager.SessionData(session) return data.LiveRoomId() == liveRoomId
})
if err != nil { if err != nil {
continue return nil, errors.New(fmt.Sprintf("未找到直播间 [%s] 对应游戏房间", liveRoomId))
} }
if data.BattleId() == battleId { return room, nil
if !session.HasKey(LiveRoomIdKey) {
continue
} }
return session.Int64(LiveRoomIdKey)
func (m *gameManager) BattleIdByLiveRoomId(liveRoomId int64) int64 {
_, _, d, err := m.SessionByDataFilter(func(_ *session.Session, data *Data) bool {
return data.LiveRoomId() == liveRoomId
})
if err != nil {
return 0
} }
return d.BattleId()
} }
func (m *gameManager) BattleIdBySession(s *session.Session) int64 {
_, _, d, err := m.SessionByDataFilter(func(sess *session.Session, _ *Data) bool {
return sess.ID() == s.ID()
})
if err != nil {
return 0 return 0
} }
return d.BattleId()
}
func (m *gameManager) RoomByBattleId(battleId int64) (*Room, error) {
room, _, _, err := m.SessionByDataFilter(func(_ *session.Session, data *Data) bool {
return data.BattleId() == battleId
})
if err != nil {
return nil, errors.New(fmt.Sprintf("未找到战局 [%d] 对应的游戏房间", battleId))
}
return room, nil
}

@ -0,0 +1,52 @@
package manager
import (
pbRoom "dcg/game/pb/room"
"fmt"
"git.noahlan.cn/northlan/ngs"
"git.noahlan.cn/northlan/ntools-go/logger"
)
type (
// Room 游戏房间
// 一种游戏类型一个房间
// 一个房间多个客户端(此客户端可能来自于同一个直播间,没办法区分)
Room struct {
id int64 // 房间ID
gameType pbRoom.GameType // 游戏类型
*ngs.Group // 分组
}
)
func newRoom(id int64, gameType pbRoom.GameType) *Room {
return &Room{
id: id,
gameType: gameType,
Group: ngs.NewGroup(fmt.Sprintf("Room-%s", pbRoom.GameType_name[int32(gameType)])),
}
}
func (r *Room) ID() int64 {
return r.id
}
func (r *Room) GameType() pbRoom.GameType {
return r.gameType
}
// Broadcast 广播消息到该房间内所有客户端session
func (r *Room) Broadcast(route string, v interface{}) {
err := r.Group.Broadcast(route, v)
if err != nil {
logger.SLog.Errorf("推送消息到 房间[%d:%s] 失败, err:%v", r.id, pbRoom.GameType_name[int32(r.gameType)], err)
}
}
// Multicast 根据filter条件推送消息
func (r *Room) Multicast(route string, v interface{}, filter ngs.SessionFilter) {
err := r.Group.Multicast(route, v, filter)
if err != nil {
logger.SLog.Errorf("推送消息到 房间[%d:%s] 失败, err:%v", r.id, pbRoom.GameType_name[int32(r.gameType)], err)
}
}

@ -1,30 +1,25 @@
package manager package manager
import ( import (
"dcg/game"
pbRoom "dcg/game/pb/room" pbRoom "dcg/game/pb/room"
"errors" "errors"
"fmt" "fmt"
"git.noahlan.cn/northlan/ngs"
"git.noahlan.cn/northlan/ngs/session" "git.noahlan.cn/northlan/ngs/session"
"git.noahlan.cn/northlan/ntools-go/logger"
"git.noahlan.cn/northlan/ntools-go/uuid" "git.noahlan.cn/northlan/ntools-go/uuid"
"github.com/golang/protobuf/proto" "google.golang.org/protobuf/proto"
"sync"
) )
type ( const (
// Room 游戏房间 RoomKey = "ROOM"
// 一种游戏类型一个房间(后期有需要再进行修改) )
// 一个房间可加入多个直播间客户端
Room struct {
Id int64 // 房间ID
GameType pbRoom.GameType // 游戏类型
group *ngs.Group // 分组
}
type (
// RoomManager 房间管理器
RoomManager struct { RoomManager struct {
rooms map[pbRoom.GameType]*Room rooms map[pbRoom.GameType]*Room
mutex sync.RWMutex
} }
) )
@ -34,135 +29,91 @@ func NewRoomManager() *RoomManager {
} }
} }
func (m *RoomManager) Rooms() []*Room { func (m *RoomManager) Members() []*session.Session {
resp := make([]*Room, 0, len(m.rooms)) m.mutex.RLock()
for _, room := range m.rooms { defer m.mutex.RUnlock()
resp = append(resp, room)
}
return resp
}
func (m *RoomManager) Sessions() []*session.Session {
resp := make([]*session.Session, 0) resp := make([]*session.Session, 0)
for _, room := range m.rooms { for _, room := range m.rooms {
for _, sid := range room.group.Members() { resp = append(resp, room.Members()...)
member, err := room.group.Member(sid)
if err != nil {
return resp
}
resp = append(resp, member)
}
} }
return resp return resp
} }
// RoomByGameType 通过游戏类型获取游戏房间 func (m *RoomManager) PeekRoom(fn func(gameType pbRoom.GameType, room *Room) bool) {
// 若房间不存在,则创建之 m.mutex.RLock()
func (m *RoomManager) RoomByGameType(gameType pbRoom.GameType) *Room { defer m.mutex.RUnlock()
room, found := m.rooms[gameType]
if !found { for gameType, room := range m.rooms {
room = &Room{ if !fn(gameType, room) {
Id: uuid.NextId(), break
GameType: gameType,
group: ngs.NewGroup(fmt.Sprintf("Room-%s", pbRoom.GameType_name[int32(gameType)])),
} }
m.rooms[gameType] = room
} }
return room
} }
func (m *RoomManager) RoomByLiveRoomId(liveRoomId int64) (*Room, error) { func (m *RoomManager) PeekAllSession(fn func(*Room, *session.Session) bool) {
gameType, err := game.GameTypeByLiveRoomId(liveRoomId) m.mutex.RLock()
if err != nil { defer m.mutex.RUnlock()
return nil, err
}
return m.RoomByGameType(gameType), nil
}
func (m *RoomManager) SessionByLiveRoomId(liveRoomId int64) (*session.Session, error) { for _, room := range m.rooms {
room, err := m.RoomByLiveRoomId(liveRoomId) room.PeekMembers(func(sId int64, s *session.Session) bool {
if err != nil { return fn(room, s)
return nil, err })
} }
return room.SessionByLiveRoomId(liveRoomId)
} }
func (m *RoomManager) SessionJoinRoom(s *session.Session, gameType pbRoom.GameType, liveRoomId int64) error { func (m *RoomManager) JoinRoom(s *session.Session, gameType pbRoom.GameType) error {
room := m.RoomByGameType(gameType) room := m.RetrieveRoomByType(gameType)
game.CacheGameType(liveRoomId, gameType) s.Set(RoomKey, room)
return room.Add(s)
}
// uid - uuid func (m *RoomManager) LeaveRoom(s *session.Session) {
err := s.Bind(uuid.NextId()) room, err := m.RoomBySession(s)
if err != nil { if err != nil {
return err return
} }
_ = room.Leave(s)
s.Set(RoomKey, room)
s.Set(LiveRoomIdKey, liveRoomId)
s.Set(DataKey, NewGameData())
return room.group.Add(s)
} }
func (m *RoomManager) SessionLeaveRoom(s *session.Session) { func (m *RoomManager) RoomBySession(s *session.Session) (*Room, error) {
if !s.HasKey(RoomKey) { if !s.HasKey(RoomKey) {
return return nil, errors.New(fmt.Sprintf("session [%d] 未加入房间", s.ID()))
} }
room := s.Value(RoomKey).(*Room) room := s.Value(RoomKey).(*Room)
_ = room.group.Leave(s) return room, nil
} }
func (m *RoomManager) Clean() { func (m *RoomManager) Clean() {
m.mutex.Lock()
defer m.mutex.Unlock()
for _, room := range m.rooms { for _, room := range m.rooms {
_ = room.group.LeaveAll() _ = room.LeaveAll()
} }
m.rooms = make(map[pbRoom.GameType]*Room)
} }
// Broadcast 消息全局分发 // Broadcast 消息全局分发,即所有房间分发
func (m *RoomManager) Broadcast(route string, msg proto.Message) { func (m *RoomManager) Broadcast(route string, msg proto.Message) {
for _, room := range m.rooms { m.mutex.RLock()
err := room.group.Broadcast(route, msg) defer m.mutex.RUnlock()
if err != nil {
logger.SLog.Errorf("broadcast message to room %d err:%+v", room.Id, err)
}
}
}
// PushToLiveRoom 消息Push到直播间ID指定客户端 for _, room := range m.rooms {
func (r *Room) PushToLiveRoom(liveRoomId int64, route string, msg proto.Message) { room.Broadcast(route, msg)
sess, err := r.SessionByLiveRoomId(liveRoomId)
if err != nil {
return
}
err = sess.Push(route, msg)
if err != nil {
logger.SLog.Errorf("推送消息到 直播间[%d]客户端 失败, err:%+v", liveRoomId, err)
} }
} }
func (r *Room) SessionByLiveRoomId(liveRoomId int64) (*session.Session, error) { // RetrieveRoomByType 通过游戏类型获取游戏房间
for _, sid := range r.group.Members() { // 若房间不存在,则创建
member, err := r.group.Member(sid) func (m *RoomManager) RetrieveRoomByType(gameType pbRoom.GameType) *Room {
if err != nil { m.mutex.Lock()
continue defer m.mutex.Unlock()
}
if !member.HasKey(LiveRoomIdKey) {
continue
}
lRId := member.Value(LiveRoomIdKey).(int64)
if lRId == liveRoomId {
return member, nil
}
}
logger.SLog.Errorf("未找到直播间 [%d] 的客户端实例", liveRoomId)
return nil, errors.New("未找到客户端实例")
}
// Broadcast 房间内分发消息 room, found := m.rooms[gameType]
func (r *Room) Broadcast(route string, msg proto.Message) { if !found {
err := r.group.Broadcast(route, msg) room = newRoom(uuid.NextId(), gameType)
if err != nil { m.rooms[gameType] = room
logger.SLog.Errorf("推送消息到 房间[%d:%s] 失败, err:%+v", r.Id, pbRoom.GameType_name[int32(r.GameType)], err)
return
} }
return room
} }

@ -1,7 +0,0 @@
package manager
const (
RoomKey = "ROOM"
LiveRoomIdKey = "LIVE_ROOM_ID"
DataKey = "DATA"
)

@ -11,7 +11,7 @@ import (
"git.noahlan.cn/northlan/ntools-go/kafka" "git.noahlan.cn/northlan/ntools-go/kafka"
"git.noahlan.cn/northlan/ntools-go/logger" "git.noahlan.cn/northlan/ntools-go/logger"
"github.com/Shopify/sarama" "github.com/Shopify/sarama"
"github.com/golang/protobuf/proto" "google.golang.org/protobuf/proto"
"strconv" "strconv"
) )

@ -12,7 +12,7 @@ import (
"git.noahlan.cn/northlan/ntools-go/kafka" "git.noahlan.cn/northlan/ntools-go/kafka"
"git.noahlan.cn/northlan/ntools-go/logger" "git.noahlan.cn/northlan/ntools-go/logger"
"github.com/Shopify/sarama" "github.com/Shopify/sarama"
"github.com/golang/protobuf/proto" "google.golang.org/protobuf/proto"
"strconv" "strconv"
) )

@ -11,7 +11,7 @@ import (
"git.noahlan.cn/northlan/ntools-go/kafka" "git.noahlan.cn/northlan/ntools-go/kafka"
"git.noahlan.cn/northlan/ntools-go/logger" "git.noahlan.cn/northlan/ntools-go/logger"
"github.com/Shopify/sarama" "github.com/Shopify/sarama"
"github.com/golang/protobuf/proto" "google.golang.org/protobuf/proto"
"strconv" "strconv"
) )

@ -10,7 +10,7 @@ import (
"git.noahlan.cn/northlan/ntools-go/kafka" "git.noahlan.cn/northlan/ntools-go/kafka"
"git.noahlan.cn/northlan/ntools-go/logger" "git.noahlan.cn/northlan/ntools-go/logger"
"github.com/Shopify/sarama" "github.com/Shopify/sarama"
"github.com/golang/protobuf/proto" "google.golang.org/protobuf/proto"
) )
type RewardTransferHandler struct { type RewardTransferHandler struct {
@ -46,12 +46,11 @@ func (h *RewardTransferHandler) handleTopic(data []byte, _ string) {
logger.SLog.Error("unmarshal msg err", err) logger.SLog.Error("unmarshal msg err", err)
return return
} }
roomId := manager.GameManager.LiveRoomIdByBattleId(msgFromMq.BattleId) room, err := manager.GameManager.RoomByBattleId(msgFromMq.BattleId)
room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId)
if err != nil { if err != nil {
return return
} }
room.PushToLiveRoom(roomId, "game.rewardPool", &pbCommon.RewardPoolMsg{ room.Broadcast("game.rewardPool", &pbCommon.RewardPoolMsg{
WelfarePool: msgFromMq.WelfarePool, WelfarePool: msgFromMq.WelfarePool,
BattleId: msgFromMq.BattleId, BattleId: msgFromMq.BattleId,
InitReward: msgFromMq.InitReward, InitReward: msgFromMq.InitReward,

@ -35,24 +35,29 @@ namespace Pb.Common {
"DgoGdXNlcklkGAEgASgDEg4KBmNoYW5nZRgCIAEoAyJlChZDaGFuZ2VVc2Vy", "DgoGdXNlcklkGAEgASgDEg4KBmNoYW5nZRgCIAEoAyJlChZDaGFuZ2VVc2Vy",
"SW50ZWdyYWxSZXNwEgwKBGNvZGUYASABKAUSCwoDbXNnGAIgASgJEg4KBnVz", "SW50ZWdyYWxSZXNwEgwKBGNvZGUYASABKAUSCwoDbXNnGAIgASgJEg4KBnVz",
"ZXJJZBgDIAEoAxIOCgZjaGFuZ2UYBCABKAMSEAoIaW50ZWdyYWwYBSABKAMi", "ZXJJZBgDIAEoAxIOCgZjaGFuZ2UYBCABKAMSEAoIaW50ZWdyYWwYBSABKAMi",
"dAoKQ2hlY2tJbk1zZxIMCgRjb2RlGAEgASgFEgsKA21zZxgCIAEoCRIfCgR1", "VgoSVXNlckNvaW5DaGFuZ2VkTXNnEh8KBHVzZXIYASABKAsyES5wYi5jb21t",
"c2VyGAMgASgLMhEucGIuY29tbW9uLlBiVXNlchIWCg5pbnRlZ3JhbENoYW5n", "b24uUGJVc2VyEg4KBmNoYW5nZRgCIAEoAxIPCgdjdXJyZW50GAMgASgDIjMK",
"ZRgEIAEoAxISCgppc0NyaXRpY2FsGAUgASgIImEKC0dpZnRQYWNrTXNnEgwK", "EUNoYW5nZVVzZXJDb2luUmVxEg4KBnVzZXJJZBgBIAEoAxIOCgZjaGFuZ2UY",
"BGNvZGUYASABKAUSCwoDbXNnGAIgASgJEh8KBHVzZXIYAyABKAsyES5wYi5j", "AiABKAMiYAoSQ2hhbmdlVXNlckNvaW5SZXNwEgwKBGNvZGUYASABKAUSCwoD",
"b21tb24uUGJVc2VyEhYKDmludGVncmFsQ2hhbmdlGAQgASgDIqwBCgxVc2Vy", "bXNnGAIgASgJEg4KBnVzZXJJZBgDIAEoAxIOCgZjaGFuZ2UYBCABKAMSDwoH",
"UXVlcnlNc2cSHwoEdXNlchgBIAEoCzIRLnBiLmNvbW1vbi5QYlVzZXISLgoE", "Y3VycmVudBgFIAEoAyJ0CgpDaGVja0luTXNnEgwKBGNvZGUYASABKAUSCwoD",
"cmFuaxgCIAMoCzIgLnBiLmNvbW1vbi5Vc2VyUXVlcnlNc2cuUmFua0l0ZW0S", "bXNnGAIgASgJEh8KBHVzZXIYAyABKAsyES5wYi5jb21tb24uUGJVc2VyEhYK",
"EAoIdGl0bGVJZHMYAyADKAMaOQoIUmFua0l0ZW0SEAoIcmFua1R5cGUYASAB", "DmludGVncmFsQ2hhbmdlGAQgASgDEhIKCmlzQ3JpdGljYWwYBSABKAgiYQoL",
"KAUSDQoFc2NvcmUYAiABKAMSDAoEcmFuaxgDIAEoBSI+CgpEYW5tYWt1TXNn", "R2lmdFBhY2tNc2cSDAoEY29kZRgBIAEoBRILCgNtc2cYAiABKAkSHwoEdXNl",
"Eh8KBHVzZXIYASABKAsyES5wYi5jb21tb24uUGJVc2VyEg8KB2NvbnRlbnQY", "chgDIAEoCzIRLnBiLmNvbW1vbi5QYlVzZXISFgoOaW50ZWdyYWxDaGFuZ2UY",
"AiABKAkieAoHR2lmdE1zZxIfCgR1c2VyGAEgASgLMhEucGIuY29tbW9uLlBi", "BCABKAMirAEKDFVzZXJRdWVyeU1zZxIfCgR1c2VyGAEgASgLMhEucGIuY29t",
"VXNlchIOCgZnaWZ0SWQYAiABKAMSCwoDbnVtGAMgASgDEhAKCGdpZnROYW1l", "bW9uLlBiVXNlchIuCgRyYW5rGAIgAygLMiAucGIuY29tbW9uLlVzZXJRdWVy",
"GAQgASgJEg0KBXByaWNlGAUgASgDEg4KBmlzUGFpZBgGIAEoCCKdAQoNUmV3", "eU1zZy5SYW5rSXRlbRIQCgh0aXRsZUlkcxgDIAMoAxo5CghSYW5rSXRlbRIQ",
"YXJkUG9vbE1zZxITCgt3ZWxmYXJlUG9vbBgBIAEoAxIQCghiYXR0bGVJZBgC", "CghyYW5rVHlwZRgBIAEoBRINCgVzY29yZRgCIAEoAxIMCgRyYW5rGAMgASgF",
"IAEoAxISCgppbml0UmV3YXJkGAMgASgDEhIKCmdpZnRSZXdhcmQYBCABKAMS", "Ij4KCkRhbm1ha3VNc2cSHwoEdXNlchgBIAEoCzIRLnBiLmNvbW1vbi5QYlVz",
"FAoMYmF0dGxlUmV3YXJkGAUgASgDEhMKC290aGVyUmV3YXJkGAYgASgDEhIK", "ZXISDwoHY29udGVudBgCIAEoCSJ4CgdHaWZ0TXNnEh8KBHVzZXIYASABKAsy",
"CmFsbFJld2FyZHMYCiABKANCHVobZGNnL2dhbWUvcGIvY29tbW9uO3BiQ29t", "ES5wYi5jb21tb24uUGJVc2VyEg4KBmdpZnRJZBgCIAEoAxILCgNudW0YAyAB",
"bW9uYgZwcm90bzM=")); "KAMSEAoIZ2lmdE5hbWUYBCABKAkSDQoFcHJpY2UYBSABKAMSDgoGaXNQYWlk",
"GAYgASgIIp0BCg1SZXdhcmRQb29sTXNnEhMKC3dlbGZhcmVQb29sGAEgASgD",
"EhAKCGJhdHRsZUlkGAIgASgDEhIKCmluaXRSZXdhcmQYAyABKAMSEgoKZ2lm",
"dFJld2FyZBgEIAEoAxIUCgxiYXR0bGVSZXdhcmQYBSABKAMSEwoLb3RoZXJS",
"ZXdhcmQYBiABKAMSEgoKYWxsUmV3YXJkcxgKIAEoA0IdWhtkY2cvZ2FtZS9w",
"Yi9jb21tb247cGJDb21tb25iBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { }, new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
@ -62,6 +67,9 @@ namespace Pb.Common {
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.UserIntegralChanged), global::Pb.Common.UserIntegralChanged.Parser, new[]{ "User", "Change", "Integral" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.UserIntegralChanged), global::Pb.Common.UserIntegralChanged.Parser, new[]{ "User", "Change", "Integral" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.ChangeUserIntegralReq), global::Pb.Common.ChangeUserIntegralReq.Parser, new[]{ "UserId", "Change" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.ChangeUserIntegralReq), global::Pb.Common.ChangeUserIntegralReq.Parser, new[]{ "UserId", "Change" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.ChangeUserIntegralResp), global::Pb.Common.ChangeUserIntegralResp.Parser, new[]{ "Code", "Msg", "UserId", "Change", "Integral" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.ChangeUserIntegralResp), global::Pb.Common.ChangeUserIntegralResp.Parser, new[]{ "Code", "Msg", "UserId", "Change", "Integral" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.UserCoinChangedMsg), global::Pb.Common.UserCoinChangedMsg.Parser, new[]{ "User", "Change", "Current" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.ChangeUserCoinReq), global::Pb.Common.ChangeUserCoinReq.Parser, new[]{ "UserId", "Change" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.ChangeUserCoinResp), global::Pb.Common.ChangeUserCoinResp.Parser, new[]{ "Code", "Msg", "UserId", "Change", "Current" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.CheckInMsg), global::Pb.Common.CheckInMsg.Parser, new[]{ "Code", "Msg", "User", "IntegralChange", "IsCritical" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.CheckInMsg), global::Pb.Common.CheckInMsg.Parser, new[]{ "Code", "Msg", "User", "IntegralChange", "IsCritical" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.GiftPackMsg), global::Pb.Common.GiftPackMsg.Parser, new[]{ "Code", "Msg", "User", "IntegralChange" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.GiftPackMsg), global::Pb.Common.GiftPackMsg.Parser, new[]{ "Code", "Msg", "User", "IntegralChange" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.UserQueryMsg), global::Pb.Common.UserQueryMsg.Parser, new[]{ "User", "Rank", "TitleIds" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.UserQueryMsg.Types.RankItem), global::Pb.Common.UserQueryMsg.Types.RankItem.Parser, new[]{ "RankType", "Score", "Rank" }, null, null, null, null)}), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.UserQueryMsg), global::Pb.Common.UserQueryMsg.Parser, new[]{ "User", "Rank", "TitleIds" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.UserQueryMsg.Types.RankItem), global::Pb.Common.UserQueryMsg.Types.RankItem.Parser, new[]{ "RankType", "Score", "Rank" }, null, null, null, null)}),
@ -1807,6 +1815,877 @@ namespace Pb.Common {
} }
/// <summary>
/// UserIntegralChanged 用户金币变更通知 push -> user.coin.change
/// </summary>
public sealed partial class UserCoinChangedMsg : pb::IMessage<UserCoinChangedMsg>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<UserCoinChangedMsg> _parser = new pb::MessageParser<UserCoinChangedMsg>(() => new UserCoinChangedMsg());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<UserCoinChangedMsg> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[6]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public UserCoinChangedMsg() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public UserCoinChangedMsg(UserCoinChangedMsg other) : this() {
user_ = other.user_ != null ? other.user_.Clone() : null;
change_ = other.change_;
current_ = other.current_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public UserCoinChangedMsg Clone() {
return new UserCoinChangedMsg(this);
}
/// <summary>Field number for the "user" field.</summary>
public const int UserFieldNumber = 1;
private global::Pb.Common.PbUser user_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Pb.Common.PbUser User {
get { return user_; }
set {
user_ = value;
}
}
/// <summary>Field number for the "change" field.</summary>
public const int ChangeFieldNumber = 2;
private long change_;
/// <summary>
/// 变更量
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public long Change {
get { return change_; }
set {
change_ = value;
}
}
/// <summary>Field number for the "current" field.</summary>
public const int CurrentFieldNumber = 3;
private long current_;
/// <summary>
/// 现有量
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public long Current {
get { return current_; }
set {
current_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as UserCoinChangedMsg);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(UserCoinChangedMsg other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (!object.Equals(User, other.User)) return false;
if (Change != other.Change) return false;
if (Current != other.Current) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
if (user_ != null) hash ^= User.GetHashCode();
if (Change != 0L) hash ^= Change.GetHashCode();
if (Current != 0L) hash ^= Current.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (user_ != null) {
output.WriteRawTag(10);
output.WriteMessage(User);
}
if (Change != 0L) {
output.WriteRawTag(16);
output.WriteInt64(Change);
}
if (Current != 0L) {
output.WriteRawTag(24);
output.WriteInt64(Current);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (user_ != null) {
output.WriteRawTag(10);
output.WriteMessage(User);
}
if (Change != 0L) {
output.WriteRawTag(16);
output.WriteInt64(Change);
}
if (Current != 0L) {
output.WriteRawTag(24);
output.WriteInt64(Current);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() {
int size = 0;
if (user_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(User);
}
if (Change != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Change);
}
if (Current != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Current);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(UserCoinChangedMsg other) {
if (other == null) {
return;
}
if (other.user_ != null) {
if (user_ == null) {
User = new global::Pb.Common.PbUser();
}
User.MergeFrom(other.User);
}
if (other.Change != 0L) {
Change = other.Change;
}
if (other.Current != 0L) {
Current = other.Current;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
if (user_ == null) {
User = new global::Pb.Common.PbUser();
}
input.ReadMessage(User);
break;
}
case 16: {
Change = input.ReadInt64();
break;
}
case 24: {
Current = input.ReadInt64();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 10: {
if (user_ == null) {
User = new global::Pb.Common.PbUser();
}
input.ReadMessage(User);
break;
}
case 16: {
Change = input.ReadInt64();
break;
}
case 24: {
Current = input.ReadInt64();
break;
}
}
}
}
#endif
}
/// <summary>
/// ChangeUserIntegral 更新用户金币 request -> user.coin.change
/// </summary>
public sealed partial class ChangeUserCoinReq : pb::IMessage<ChangeUserCoinReq>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<ChangeUserCoinReq> _parser = new pb::MessageParser<ChangeUserCoinReq>(() => new ChangeUserCoinReq());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<ChangeUserCoinReq> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[7]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public ChangeUserCoinReq() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public ChangeUserCoinReq(ChangeUserCoinReq other) : this() {
userId_ = other.userId_;
change_ = other.change_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public ChangeUserCoinReq Clone() {
return new ChangeUserCoinReq(this);
}
/// <summary>Field number for the "userId" field.</summary>
public const int UserIdFieldNumber = 1;
private long userId_;
/// <summary>
/// 用户ID
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public long UserId {
get { return userId_; }
set {
userId_ = value;
}
}
/// <summary>Field number for the "change" field.</summary>
public const int ChangeFieldNumber = 2;
private long change_;
/// <summary>
/// 更新量,负数为消耗,正数为增加
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public long Change {
get { return change_; }
set {
change_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as ChangeUserCoinReq);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(ChangeUserCoinReq other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (UserId != other.UserId) return false;
if (Change != other.Change) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
if (UserId != 0L) hash ^= UserId.GetHashCode();
if (Change != 0L) hash ^= Change.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (UserId != 0L) {
output.WriteRawTag(8);
output.WriteInt64(UserId);
}
if (Change != 0L) {
output.WriteRawTag(16);
output.WriteInt64(Change);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (UserId != 0L) {
output.WriteRawTag(8);
output.WriteInt64(UserId);
}
if (Change != 0L) {
output.WriteRawTag(16);
output.WriteInt64(Change);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() {
int size = 0;
if (UserId != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(UserId);
}
if (Change != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Change);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(ChangeUserCoinReq other) {
if (other == null) {
return;
}
if (other.UserId != 0L) {
UserId = other.UserId;
}
if (other.Change != 0L) {
Change = other.Change;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 8: {
UserId = input.ReadInt64();
break;
}
case 16: {
Change = input.ReadInt64();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 8: {
UserId = input.ReadInt64();
break;
}
case 16: {
Change = input.ReadInt64();
break;
}
}
}
}
#endif
}
/// <summary>
/// ChangeUserIntegralResp 用户金币更新返回
/// </summary>
public sealed partial class ChangeUserCoinResp : pb::IMessage<ChangeUserCoinResp>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<ChangeUserCoinResp> _parser = new pb::MessageParser<ChangeUserCoinResp>(() => new ChangeUserCoinResp());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<ChangeUserCoinResp> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[8]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public ChangeUserCoinResp() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public ChangeUserCoinResp(ChangeUserCoinResp other) : this() {
code_ = other.code_;
msg_ = other.msg_;
userId_ = other.userId_;
change_ = other.change_;
current_ = other.current_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public ChangeUserCoinResp Clone() {
return new ChangeUserCoinResp(this);
}
/// <summary>Field number for the "code" field.</summary>
public const int CodeFieldNumber = 1;
private int code_;
/// <summary>
/// code, 200表示成功其余根据对照表
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int Code {
get { return code_; }
set {
code_ = value;
}
}
/// <summary>Field number for the "msg" field.</summary>
public const int MsgFieldNumber = 2;
private string msg_ = "";
/// <summary>
/// 消息
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public string Msg {
get { return msg_; }
set {
msg_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "userId" field.</summary>
public const int UserIdFieldNumber = 3;
private long userId_;
/// <summary>
/// 用户ID
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public long UserId {
get { return userId_; }
set {
userId_ = value;
}
}
/// <summary>Field number for the "change" field.</summary>
public const int ChangeFieldNumber = 4;
private long change_;
/// <summary>
/// 变更量
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public long Change {
get { return change_; }
set {
change_ = value;
}
}
/// <summary>Field number for the "current" field.</summary>
public const int CurrentFieldNumber = 5;
private long current_;
/// <summary>
/// 现有量
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public long Current {
get { return current_; }
set {
current_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as ChangeUserCoinResp);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(ChangeUserCoinResp other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Code != other.Code) return false;
if (Msg != other.Msg) return false;
if (UserId != other.UserId) return false;
if (Change != other.Change) return false;
if (Current != other.Current) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
if (Code != 0) hash ^= Code.GetHashCode();
if (Msg.Length != 0) hash ^= Msg.GetHashCode();
if (UserId != 0L) hash ^= UserId.GetHashCode();
if (Change != 0L) hash ^= Change.GetHashCode();
if (Current != 0L) hash ^= Current.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (Code != 0) {
output.WriteRawTag(8);
output.WriteInt32(Code);
}
if (Msg.Length != 0) {
output.WriteRawTag(18);
output.WriteString(Msg);
}
if (UserId != 0L) {
output.WriteRawTag(24);
output.WriteInt64(UserId);
}
if (Change != 0L) {
output.WriteRawTag(32);
output.WriteInt64(Change);
}
if (Current != 0L) {
output.WriteRawTag(40);
output.WriteInt64(Current);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (Code != 0) {
output.WriteRawTag(8);
output.WriteInt32(Code);
}
if (Msg.Length != 0) {
output.WriteRawTag(18);
output.WriteString(Msg);
}
if (UserId != 0L) {
output.WriteRawTag(24);
output.WriteInt64(UserId);
}
if (Change != 0L) {
output.WriteRawTag(32);
output.WriteInt64(Change);
}
if (Current != 0L) {
output.WriteRawTag(40);
output.WriteInt64(Current);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() {
int size = 0;
if (Code != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code);
}
if (Msg.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Msg);
}
if (UserId != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(UserId);
}
if (Change != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Change);
}
if (Current != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Current);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(ChangeUserCoinResp other) {
if (other == null) {
return;
}
if (other.Code != 0) {
Code = other.Code;
}
if (other.Msg.Length != 0) {
Msg = other.Msg;
}
if (other.UserId != 0L) {
UserId = other.UserId;
}
if (other.Change != 0L) {
Change = other.Change;
}
if (other.Current != 0L) {
Current = other.Current;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 8: {
Code = input.ReadInt32();
break;
}
case 18: {
Msg = input.ReadString();
break;
}
case 24: {
UserId = input.ReadInt64();
break;
}
case 32: {
Change = input.ReadInt64();
break;
}
case 40: {
Current = input.ReadInt64();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 8: {
Code = input.ReadInt32();
break;
}
case 18: {
Msg = input.ReadString();
break;
}
case 24: {
UserId = input.ReadInt64();
break;
}
case 32: {
Change = input.ReadInt64();
break;
}
case 40: {
Current = input.ReadInt64();
break;
}
}
}
}
#endif
}
/// <summary> /// <summary>
/// CheckInMsg 每日打卡 push -> user.checkIn /// CheckInMsg 每日打卡 push -> user.checkIn
/// </summary> /// </summary>
@ -1824,7 +2703,7 @@ namespace Pb.Common {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor { public static pbr::MessageDescriptor Descriptor {
get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[6]; } get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[9]; }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -2188,7 +3067,7 @@ namespace Pb.Common {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor { public static pbr::MessageDescriptor Descriptor {
get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[7]; } get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[10]; }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -2509,7 +3388,7 @@ namespace Pb.Common {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor { public static pbr::MessageDescriptor Descriptor {
get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[8]; } get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[11]; }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -3056,7 +3935,7 @@ namespace Pb.Common {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor { public static pbr::MessageDescriptor Descriptor {
get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[9]; } get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[12]; }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -3294,7 +4173,7 @@ namespace Pb.Common {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor { public static pbr::MessageDescriptor Descriptor {
get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[10]; } get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[13]; }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -3686,7 +4565,7 @@ namespace Pb.Common {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor { public static pbr::MessageDescriptor Descriptor {
get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[11]; } get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[14]; }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]

@ -420,6 +420,206 @@ func (x *ChangeUserIntegralResp) GetIntegral() int64 {
return 0 return 0
} }
// UserIntegralChanged 用户金币变更通知 push -> user.coin.change
type UserCoinChangedMsg struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
User *PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
Change int64 `protobuf:"varint,2,opt,name=change,proto3" json:"change,omitempty"` // 变更量
Current int64 `protobuf:"varint,3,opt,name=current,proto3" json:"current,omitempty"` // 现有量
}
func (x *UserCoinChangedMsg) Reset() {
*x = UserCoinChangedMsg{}
if protoimpl.UnsafeEnabled {
mi := &file_common_common_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UserCoinChangedMsg) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UserCoinChangedMsg) ProtoMessage() {}
func (x *UserCoinChangedMsg) ProtoReflect() protoreflect.Message {
mi := &file_common_common_proto_msgTypes[6]
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 UserCoinChangedMsg.ProtoReflect.Descriptor instead.
func (*UserCoinChangedMsg) Descriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{6}
}
func (x *UserCoinChangedMsg) GetUser() *PbUser {
if x != nil {
return x.User
}
return nil
}
func (x *UserCoinChangedMsg) GetChange() int64 {
if x != nil {
return x.Change
}
return 0
}
func (x *UserCoinChangedMsg) GetCurrent() int64 {
if x != nil {
return x.Current
}
return 0
}
// ChangeUserIntegral 更新用户金币 request -> user.coin.change
type ChangeUserCoinReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID
Change int64 `protobuf:"varint,2,opt,name=change,proto3" json:"change,omitempty"` // 更新量,负数为消耗,正数为增加
}
func (x *ChangeUserCoinReq) Reset() {
*x = ChangeUserCoinReq{}
if protoimpl.UnsafeEnabled {
mi := &file_common_common_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChangeUserCoinReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChangeUserCoinReq) ProtoMessage() {}
func (x *ChangeUserCoinReq) ProtoReflect() protoreflect.Message {
mi := &file_common_common_proto_msgTypes[7]
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 ChangeUserCoinReq.ProtoReflect.Descriptor instead.
func (*ChangeUserCoinReq) Descriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{7}
}
func (x *ChangeUserCoinReq) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
func (x *ChangeUserCoinReq) GetChange() int64 {
if x != nil {
return x.Change
}
return 0
}
// ChangeUserIntegralResp 用户金币更新返回
type ChangeUserCoinResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // code, 200表示成功其余根据对照表
Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // 消息
UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID
Change int64 `protobuf:"varint,4,opt,name=change,proto3" json:"change,omitempty"` // 变更量
Current int64 `protobuf:"varint,5,opt,name=current,proto3" json:"current,omitempty"` // 现有量
}
func (x *ChangeUserCoinResp) Reset() {
*x = ChangeUserCoinResp{}
if protoimpl.UnsafeEnabled {
mi := &file_common_common_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChangeUserCoinResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChangeUserCoinResp) ProtoMessage() {}
func (x *ChangeUserCoinResp) ProtoReflect() protoreflect.Message {
mi := &file_common_common_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChangeUserCoinResp.ProtoReflect.Descriptor instead.
func (*ChangeUserCoinResp) Descriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{8}
}
func (x *ChangeUserCoinResp) GetCode() int32 {
if x != nil {
return x.Code
}
return 0
}
func (x *ChangeUserCoinResp) GetMsg() string {
if x != nil {
return x.Msg
}
return ""
}
func (x *ChangeUserCoinResp) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
func (x *ChangeUserCoinResp) GetChange() int64 {
if x != nil {
return x.Change
}
return 0
}
func (x *ChangeUserCoinResp) GetCurrent() int64 {
if x != nil {
return x.Current
}
return 0
}
// CheckInMsg 每日打卡 push -> user.checkIn // CheckInMsg 每日打卡 push -> user.checkIn
type CheckInMsg struct { type CheckInMsg struct {
state protoimpl.MessageState state protoimpl.MessageState
@ -436,7 +636,7 @@ type CheckInMsg struct {
func (x *CheckInMsg) Reset() { func (x *CheckInMsg) Reset() {
*x = CheckInMsg{} *x = CheckInMsg{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_common_common_proto_msgTypes[6] mi := &file_common_common_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -449,7 +649,7 @@ func (x *CheckInMsg) String() string {
func (*CheckInMsg) ProtoMessage() {} func (*CheckInMsg) ProtoMessage() {}
func (x *CheckInMsg) ProtoReflect() protoreflect.Message { func (x *CheckInMsg) ProtoReflect() protoreflect.Message {
mi := &file_common_common_proto_msgTypes[6] mi := &file_common_common_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -462,7 +662,7 @@ func (x *CheckInMsg) ProtoReflect() protoreflect.Message {
// Deprecated: Use CheckInMsg.ProtoReflect.Descriptor instead. // Deprecated: Use CheckInMsg.ProtoReflect.Descriptor instead.
func (*CheckInMsg) Descriptor() ([]byte, []int) { func (*CheckInMsg) Descriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{6} return file_common_common_proto_rawDescGZIP(), []int{9}
} }
func (x *CheckInMsg) GetCode() int32 { func (x *CheckInMsg) GetCode() int32 {
@ -515,7 +715,7 @@ type GiftPackMsg struct {
func (x *GiftPackMsg) Reset() { func (x *GiftPackMsg) Reset() {
*x = GiftPackMsg{} *x = GiftPackMsg{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_common_common_proto_msgTypes[7] mi := &file_common_common_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -528,7 +728,7 @@ func (x *GiftPackMsg) String() string {
func (*GiftPackMsg) ProtoMessage() {} func (*GiftPackMsg) ProtoMessage() {}
func (x *GiftPackMsg) ProtoReflect() protoreflect.Message { func (x *GiftPackMsg) ProtoReflect() protoreflect.Message {
mi := &file_common_common_proto_msgTypes[7] mi := &file_common_common_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -541,7 +741,7 @@ func (x *GiftPackMsg) ProtoReflect() protoreflect.Message {
// Deprecated: Use GiftPackMsg.ProtoReflect.Descriptor instead. // Deprecated: Use GiftPackMsg.ProtoReflect.Descriptor instead.
func (*GiftPackMsg) Descriptor() ([]byte, []int) { func (*GiftPackMsg) Descriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{7} return file_common_common_proto_rawDescGZIP(), []int{10}
} }
func (x *GiftPackMsg) GetCode() int32 { func (x *GiftPackMsg) GetCode() int32 {
@ -586,7 +786,7 @@ type UserQueryMsg struct {
func (x *UserQueryMsg) Reset() { func (x *UserQueryMsg) Reset() {
*x = UserQueryMsg{} *x = UserQueryMsg{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_common_common_proto_msgTypes[8] mi := &file_common_common_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -599,7 +799,7 @@ func (x *UserQueryMsg) String() string {
func (*UserQueryMsg) ProtoMessage() {} func (*UserQueryMsg) ProtoMessage() {}
func (x *UserQueryMsg) ProtoReflect() protoreflect.Message { func (x *UserQueryMsg) ProtoReflect() protoreflect.Message {
mi := &file_common_common_proto_msgTypes[8] mi := &file_common_common_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -612,7 +812,7 @@ func (x *UserQueryMsg) ProtoReflect() protoreflect.Message {
// Deprecated: Use UserQueryMsg.ProtoReflect.Descriptor instead. // Deprecated: Use UserQueryMsg.ProtoReflect.Descriptor instead.
func (*UserQueryMsg) Descriptor() ([]byte, []int) { func (*UserQueryMsg) Descriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{8} return file_common_common_proto_rawDescGZIP(), []int{11}
} }
func (x *UserQueryMsg) GetUser() *PbUser { func (x *UserQueryMsg) GetUser() *PbUser {
@ -649,7 +849,7 @@ type DanmakuMsg struct {
func (x *DanmakuMsg) Reset() { func (x *DanmakuMsg) Reset() {
*x = DanmakuMsg{} *x = DanmakuMsg{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_common_common_proto_msgTypes[9] mi := &file_common_common_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -662,7 +862,7 @@ func (x *DanmakuMsg) String() string {
func (*DanmakuMsg) ProtoMessage() {} func (*DanmakuMsg) ProtoMessage() {}
func (x *DanmakuMsg) ProtoReflect() protoreflect.Message { func (x *DanmakuMsg) ProtoReflect() protoreflect.Message {
mi := &file_common_common_proto_msgTypes[9] mi := &file_common_common_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -675,7 +875,7 @@ func (x *DanmakuMsg) ProtoReflect() protoreflect.Message {
// Deprecated: Use DanmakuMsg.ProtoReflect.Descriptor instead. // Deprecated: Use DanmakuMsg.ProtoReflect.Descriptor instead.
func (*DanmakuMsg) Descriptor() ([]byte, []int) { func (*DanmakuMsg) Descriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{9} return file_common_common_proto_rawDescGZIP(), []int{12}
} }
func (x *DanmakuMsg) GetUser() *PbUser { func (x *DanmakuMsg) GetUser() *PbUser {
@ -709,7 +909,7 @@ type GiftMsg struct {
func (x *GiftMsg) Reset() { func (x *GiftMsg) Reset() {
*x = GiftMsg{} *x = GiftMsg{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_common_common_proto_msgTypes[10] mi := &file_common_common_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -722,7 +922,7 @@ func (x *GiftMsg) String() string {
func (*GiftMsg) ProtoMessage() {} func (*GiftMsg) ProtoMessage() {}
func (x *GiftMsg) ProtoReflect() protoreflect.Message { func (x *GiftMsg) ProtoReflect() protoreflect.Message {
mi := &file_common_common_proto_msgTypes[10] mi := &file_common_common_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -735,7 +935,7 @@ func (x *GiftMsg) ProtoReflect() protoreflect.Message {
// Deprecated: Use GiftMsg.ProtoReflect.Descriptor instead. // Deprecated: Use GiftMsg.ProtoReflect.Descriptor instead.
func (*GiftMsg) Descriptor() ([]byte, []int) { func (*GiftMsg) Descriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{10} return file_common_common_proto_rawDescGZIP(), []int{13}
} }
func (x *GiftMsg) GetUser() *PbUser { func (x *GiftMsg) GetUser() *PbUser {
@ -798,7 +998,7 @@ type RewardPoolMsg struct {
func (x *RewardPoolMsg) Reset() { func (x *RewardPoolMsg) Reset() {
*x = RewardPoolMsg{} *x = RewardPoolMsg{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_common_common_proto_msgTypes[11] mi := &file_common_common_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -811,7 +1011,7 @@ func (x *RewardPoolMsg) String() string {
func (*RewardPoolMsg) ProtoMessage() {} func (*RewardPoolMsg) ProtoMessage() {}
func (x *RewardPoolMsg) ProtoReflect() protoreflect.Message { func (x *RewardPoolMsg) ProtoReflect() protoreflect.Message {
mi := &file_common_common_proto_msgTypes[11] mi := &file_common_common_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -824,7 +1024,7 @@ func (x *RewardPoolMsg) ProtoReflect() protoreflect.Message {
// Deprecated: Use RewardPoolMsg.ProtoReflect.Descriptor instead. // Deprecated: Use RewardPoolMsg.ProtoReflect.Descriptor instead.
func (*RewardPoolMsg) Descriptor() ([]byte, []int) { func (*RewardPoolMsg) Descriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{11} return file_common_common_proto_rawDescGZIP(), []int{14}
} }
func (x *RewardPoolMsg) GetWelfarePool() int64 { func (x *RewardPoolMsg) GetWelfarePool() int64 {
@ -890,7 +1090,7 @@ type UserQueryMsg_RankItem struct {
func (x *UserQueryMsg_RankItem) Reset() { func (x *UserQueryMsg_RankItem) Reset() {
*x = UserQueryMsg_RankItem{} *x = UserQueryMsg_RankItem{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_common_common_proto_msgTypes[12] mi := &file_common_common_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -903,7 +1103,7 @@ func (x *UserQueryMsg_RankItem) String() string {
func (*UserQueryMsg_RankItem) ProtoMessage() {} func (*UserQueryMsg_RankItem) ProtoMessage() {}
func (x *UserQueryMsg_RankItem) ProtoReflect() protoreflect.Message { func (x *UserQueryMsg_RankItem) ProtoReflect() protoreflect.Message {
mi := &file_common_common_proto_msgTypes[12] mi := &file_common_common_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -916,7 +1116,7 @@ func (x *UserQueryMsg_RankItem) ProtoReflect() protoreflect.Message {
// Deprecated: Use UserQueryMsg_RankItem.ProtoReflect.Descriptor instead. // Deprecated: Use UserQueryMsg_RankItem.ProtoReflect.Descriptor instead.
func (*UserQueryMsg_RankItem) Descriptor() ([]byte, []int) { func (*UserQueryMsg_RankItem) Descriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{8, 0} return file_common_common_proto_rawDescGZIP(), []int{11, 0}
} }
func (x *UserQueryMsg_RankItem) GetRankType() int32 { func (x *UserQueryMsg_RankItem) GetRankType() int32 {
@ -985,7 +1185,37 @@ var file_common_common_proto_rawDesc = []byte{
0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72,
0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72,
0x61, 0x6c, 0x22, 0xa1, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x4d, 0x73, 0x61, 0x6c, 0x22, 0x6d, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x43, 0x68,
0x61, 0x6e, 0x67, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12,
0x16, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65,
0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e,
0x74, 0x22, 0x43, 0x0a, 0x11, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x55, 0x73, 0x65, 0x72, 0x43,
0x6f, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16,
0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x84, 0x01, 0x0a, 0x12, 0x43, 0x68, 0x61, 0x6e, 0x67,
0x65, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a,
0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64,
0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x6d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20,
0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63,
0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x68, 0x61,
0x6e, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x05,
0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x22, 0xa1, 0x01,
0x0a, 0x0a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x4d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04,
0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65,
0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d,
0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55,
0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x6e, 0x74,
0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
0x03, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67,
0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x43, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x18,
0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x43, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61,
0x6c, 0x22, 0x82, 0x01, 0x0a, 0x0b, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x4d, 0x73,
0x67, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18,
@ -993,64 +1223,54 @@ var file_common_common_proto_rawDesc = []byte{
0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x26, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x26,
0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,
0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c,
0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x43, 0x72, 0x69, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0xd9, 0x01, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x51,
0x69, 0x63, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x43, 0x72, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18,
0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x22, 0x82, 0x01, 0x0a, 0x0b, 0x47, 0x69, 0x66, 0x74, 0x50, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
0x61, 0x63, 0x6b, 0x4d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x34,
0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70,
0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x51, 0x75, 0x65,
0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x72, 0x79, 0x4d, 0x73, 0x67, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04,
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x72, 0x61, 0x6e, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x73,
0x73, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x08, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x73,
0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x1a, 0x50, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08,
0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0xd9, 0x01, 0x0a, 0x0c, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
0x55, 0x73, 0x65, 0x72, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72,
0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x12,
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x72, 0x61,
0x73, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x03, 0x28, 0x6e, 0x6b, 0x22, 0x4d, 0x0a, 0x0a, 0x44, 0x61, 0x6e, 0x6d, 0x61, 0x6b, 0x75, 0x4d, 0x73, 0x67,
0x0b, 0x32, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11,
0x65, 0x72, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x73, 0x67, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65,
0x74, 0x65, 0x6d, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69, 0x74, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
0x6c, 0x65, 0x49, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x08, 0x74, 0x69, 0x74, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x6c, 0x65, 0x49, 0x64, 0x73, 0x1a, 0x50, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x74, 0x65, 0x74, 0x22, 0xa4, 0x01, 0x0a, 0x07, 0x47, 0x69, 0x66, 0x74, 0x4d, 0x73, 0x67, 0x12, 0x25, 0x0a,
0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62,
0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04,
0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x75, 0x73, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, 0x64, 0x18, 0x02,
0x6f, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03,
0x05, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x22, 0x4d, 0x0a, 0x0a, 0x44, 0x61, 0x6e, 0x6d, 0x61, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x1a,
0x6b, 0x75, 0x4d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x0a, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72,
0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x50, 0x61, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0xa4, 0x01, 0x0a, 0x07, 0x47, 0x69, 0x66, 0x74, 0x4d, 0x52, 0x06, 0x69, 0x73, 0x50, 0x61, 0x69, 0x64, 0x22, 0xf3, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x77,
0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x61, 0x72, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x4d, 0x73, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x77, 0x65,
0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x69, 0x66, 0x0b, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x1a, 0x0a, 0x08,
0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08,
0x64, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x69, 0x74,
0x6e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x69, 0x6e,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x69, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x69, 0x66, 0x74,
0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x67, 0x69,
0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x50, 0x61, 0x69, 0x64, 0x18, 0x66, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74,
0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x50, 0x61, 0x69, 0x64, 0x22, 0xf3, 0x01, 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c,
0x0a, 0x0d, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x4d, 0x73, 0x67, 0x12, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x20, 0x0a, 0x0b,
0x20, 0x0a, 0x0b, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x18, 0x01, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28,
0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x50, 0x6f, 0x6f, 0x03, 0x52, 0x0b, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1e,
0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x0a, 0x20, 0x01,
0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x42, 0x1d,
0x0a, 0x69, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x5a, 0x1b, 0x64, 0x63, 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x6f,
0x03, 0x52, 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1e, 0x0a, 0x6d, 0x6d, 0x6f, 0x6e, 0x3b, 0x70, 0x62, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70,
0x0a, 0x67, 0x69, 0x66, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x03, 0x52, 0x0a, 0x67, 0x69, 0x66, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x22, 0x0a,
0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x05, 0x20,
0x01, 0x28, 0x03, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72,
0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64,
0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x52, 0x65, 0x77,
0x61, 0x72, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64,
0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x77, 0x61,
0x72, 0x64, 0x73, 0x42, 0x1d, 0x5a, 0x1b, 0x64, 0x63, 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f,
0x70, 0x62, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x3b, 0x70, 0x62, 0x43, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -1065,7 +1285,7 @@ func file_common_common_proto_rawDescGZIP() []byte {
return file_common_common_proto_rawDescData return file_common_common_proto_rawDescData
} }
var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
var file_common_common_proto_goTypes = []interface{}{ var file_common_common_proto_goTypes = []interface{}{
(*PbUser)(nil), // 0: pb.common.PbUser (*PbUser)(nil), // 0: pb.common.PbUser
(*GameStatusReq)(nil), // 1: pb.common.GameStatusReq (*GameStatusReq)(nil), // 1: pb.common.GameStatusReq
@ -1073,27 +1293,31 @@ var file_common_common_proto_goTypes = []interface{}{
(*UserIntegralChanged)(nil), // 3: pb.common.UserIntegralChanged (*UserIntegralChanged)(nil), // 3: pb.common.UserIntegralChanged
(*ChangeUserIntegralReq)(nil), // 4: pb.common.ChangeUserIntegralReq (*ChangeUserIntegralReq)(nil), // 4: pb.common.ChangeUserIntegralReq
(*ChangeUserIntegralResp)(nil), // 5: pb.common.ChangeUserIntegralResp (*ChangeUserIntegralResp)(nil), // 5: pb.common.ChangeUserIntegralResp
(*CheckInMsg)(nil), // 6: pb.common.CheckInMsg (*UserCoinChangedMsg)(nil), // 6: pb.common.UserCoinChangedMsg
(*GiftPackMsg)(nil), // 7: pb.common.GiftPackMsg (*ChangeUserCoinReq)(nil), // 7: pb.common.ChangeUserCoinReq
(*UserQueryMsg)(nil), // 8: pb.common.UserQueryMsg (*ChangeUserCoinResp)(nil), // 8: pb.common.ChangeUserCoinResp
(*DanmakuMsg)(nil), // 9: pb.common.DanmakuMsg (*CheckInMsg)(nil), // 9: pb.common.CheckInMsg
(*GiftMsg)(nil), // 10: pb.common.GiftMsg (*GiftPackMsg)(nil), // 10: pb.common.GiftPackMsg
(*RewardPoolMsg)(nil), // 11: pb.common.RewardPoolMsg (*UserQueryMsg)(nil), // 11: pb.common.UserQueryMsg
(*UserQueryMsg_RankItem)(nil), // 12: pb.common.UserQueryMsg.RankItem (*DanmakuMsg)(nil), // 12: pb.common.DanmakuMsg
(*GiftMsg)(nil), // 13: pb.common.GiftMsg
(*RewardPoolMsg)(nil), // 14: pb.common.RewardPoolMsg
(*UserQueryMsg_RankItem)(nil), // 15: pb.common.UserQueryMsg.RankItem
} }
var file_common_common_proto_depIdxs = []int32{ var file_common_common_proto_depIdxs = []int32{
0, // 0: pb.common.UserIntegralChanged.user:type_name -> pb.common.PbUser 0, // 0: pb.common.UserIntegralChanged.user:type_name -> pb.common.PbUser
0, // 1: pb.common.CheckInMsg.user:type_name -> pb.common.PbUser 0, // 1: pb.common.UserCoinChangedMsg.user:type_name -> pb.common.PbUser
0, // 2: pb.common.GiftPackMsg.user:type_name -> pb.common.PbUser 0, // 2: pb.common.CheckInMsg.user:type_name -> pb.common.PbUser
0, // 3: pb.common.UserQueryMsg.user:type_name -> pb.common.PbUser 0, // 3: pb.common.GiftPackMsg.user:type_name -> pb.common.PbUser
12, // 4: pb.common.UserQueryMsg.rank:type_name -> pb.common.UserQueryMsg.RankItem 0, // 4: pb.common.UserQueryMsg.user:type_name -> pb.common.PbUser
0, // 5: pb.common.DanmakuMsg.user:type_name -> pb.common.PbUser 15, // 5: pb.common.UserQueryMsg.rank:type_name -> pb.common.UserQueryMsg.RankItem
0, // 6: pb.common.GiftMsg.user:type_name -> pb.common.PbUser 0, // 6: pb.common.DanmakuMsg.user:type_name -> pb.common.PbUser
7, // [7:7] is the sub-list for method output_type 0, // 7: pb.common.GiftMsg.user:type_name -> pb.common.PbUser
7, // [7:7] is the sub-list for method input_type 8, // [8:8] is the sub-list for method output_type
7, // [7:7] is the sub-list for extension type_name 8, // [8:8] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension extendee 8, // [8:8] is the sub-list for extension type_name
0, // [0:7] is the sub-list for field type_name 8, // [8:8] is the sub-list for extension extendee
0, // [0:8] is the sub-list for field type_name
} }
func init() { file_common_common_proto_init() } func init() { file_common_common_proto_init() }
@ -1175,7 +1399,7 @@ func file_common_common_proto_init() {
} }
} }
file_common_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { file_common_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CheckInMsg); i { switch v := v.(*UserCoinChangedMsg); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -1187,7 +1411,7 @@ func file_common_common_proto_init() {
} }
} }
file_common_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { file_common_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GiftPackMsg); i { switch v := v.(*ChangeUserCoinReq); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -1199,7 +1423,7 @@ func file_common_common_proto_init() {
} }
} }
file_common_common_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { file_common_common_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UserQueryMsg); i { switch v := v.(*ChangeUserCoinResp); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -1211,7 +1435,7 @@ func file_common_common_proto_init() {
} }
} }
file_common_common_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { file_common_common_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DanmakuMsg); i { switch v := v.(*CheckInMsg); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -1223,7 +1447,7 @@ func file_common_common_proto_init() {
} }
} }
file_common_common_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { file_common_common_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GiftMsg); i { switch v := v.(*GiftPackMsg); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -1235,7 +1459,7 @@ func file_common_common_proto_init() {
} }
} }
file_common_common_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { file_common_common_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RewardPoolMsg); i { switch v := v.(*UserQueryMsg); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -1247,6 +1471,42 @@ func file_common_common_proto_init() {
} }
} }
file_common_common_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { file_common_common_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DanmakuMsg); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_common_common_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GiftMsg); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_common_common_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RewardPoolMsg); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_common_common_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UserQueryMsg_RankItem); i { switch v := v.(*UserQueryMsg_RankItem); i {
case 0: case 0:
return &v.state return &v.state
@ -1265,7 +1525,7 @@ func file_common_common_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_common_common_proto_rawDesc, RawDescriptor: file_common_common_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 13, NumMessages: 16,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

@ -26,6 +26,8 @@ message GameStatusResp {
int64 timestamp = 3; // int64 timestamp = 3; //
} }
/////////////////
// UserIntegralChanged push -> user.integral.change // UserIntegralChanged push -> user.integral.change
message UserIntegralChanged { message UserIntegralChanged {
pb.common.PbUser user = 1; pb.common.PbUser user = 1;
@ -49,6 +51,31 @@ message ChangeUserIntegralResp {
int64 integral = 5; // int64 integral = 5; //
} }
////////////////////
// UserIntegralChanged push -> user.coin.change
message UserCoinChangedMsg {
pb.common.PbUser user = 1;
int64 change = 2; //
int64 current = 3; //
}
// ChangeUserIntegral request -> user.coin.change
message ChangeUserCoinReq {
int64 userId = 1; // ID
int64 change = 2; //
}
// ChangeUserIntegralResp
message ChangeUserCoinResp {
int32 code = 1; // code, 200
string msg = 2; //
int64 userId = 3; // ID
int64 change = 4; //
int64 current = 5; //
}
// CheckInMsg push -> user.checkIn // CheckInMsg push -> user.checkIn
message CheckInMsg { message CheckInMsg {
int32 code = 1; // code, 200 int32 code = 1; // code, 200

@ -2,4 +2,4 @@ protoc --go_opt=paths=source_relative ^
--go-grpc_opt=paths=source_relative ^ --go-grpc_opt=paths=source_relative ^
--go-grpc_opt=require_unimplemented_servers=false ^ --go-grpc_opt=require_unimplemented_servers=false ^
--go_out=. --go-grpc_out=. --proto_path=. ^ --go_out=. --go-grpc_out=. --proto_path=. ^
./mq/*.proto ./common/*.proto ./room/*.proto ./game/zhg/*.proto ./game/zhghz/*.proto ./mq/*.proto ./common/*.proto ./room/*.proto ./game/zhg/*.proto ./game/zhghz/*.proto ./game/zhgzd/*.proto

@ -28,9 +28,9 @@ namespace Pb.Room {
"b29tSWQYASABKAMSIwoIR2FtZVR5cGUYAiABKA4yES5wYi5yb29tLkdhbWVU", "b29tSWQYASABKAMSIwoIR2FtZVR5cGUYAiABKA4yES5wYi5yb29tLkdhbWVU",
"eXBlIiwKDEpvaW5Sb29tUmVzcBIMCgRDb2RlGAEgASgDEg4KBlJlc3VsdBgC", "eXBlIiwKDEpvaW5Sb29tUmVzcBIMCgRDb2RlGAEgASgDEg4KBlJlc3VsdBgC",
"IAEoCSI5CgZDbGllbnQSCgoCSWQYASABKAMSIwoIR2FtZVR5cGUYAiABKA4y", "IAEoCSI5CgZDbGllbnQSCgoCSWQYASABKAMSIwoIR2FtZVR5cGUYAiABKA4y",
"ES5wYi5yb29tLkdhbWVUeXBlKikKCEdhbWVUeXBlEgcKA1pIRxAAEgkKBVpI", "ES5wYi5yb29tLkdhbWVUeXBlKjQKCEdhbWVUeXBlEgcKA1pIRxAAEgkKBVpI",
"R0haEAESCQoFWkhHRkIQAkIZWhdkY2cvZ2FtZS9wYi9yb29tO3BiUm9vbWIG", "R0haEAESCQoFWkhHRkIQAhIJCgVaSEdaRBADQhlaF2RjZy9nYW1lL3BiL3Jv",
"cHJvdG8z")); "b207cGJSb29tYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { }, new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Pb.Room.GameType), }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Pb.Room.GameType), }, null, new pbr::GeneratedClrTypeInfo[] {
@ -59,6 +59,10 @@ namespace Pb.Room {
/// 指挥官-副本 /// 指挥官-副本
/// </summary> /// </summary>
[pbr::OriginalName("ZHGFB")] Zhgfb = 2, [pbr::OriginalName("ZHGFB")] Zhgfb = 2,
/// <summary>
/// 指挥官-阵地
/// </summary>
[pbr::OriginalName("ZHGZD")] Zhgzd = 3,
} }
#endregion #endregion

@ -27,6 +27,7 @@ const (
GameType_ZHG GameType = 0 // 指挥官 GameType_ZHG GameType = 0 // 指挥官
GameType_ZHGHZ GameType = 1 // 指挥官-海战 GameType_ZHGHZ GameType = 1 // 指挥官-海战
GameType_ZHGFB GameType = 2 // 指挥官-副本 GameType_ZHGFB GameType = 2 // 指挥官-副本
GameType_ZHGZD GameType = 3 // 指挥官-阵地
) )
// Enum value maps for GameType. // Enum value maps for GameType.
@ -35,11 +36,13 @@ var (
0: "ZHG", 0: "ZHG",
1: "ZHGHZ", 1: "ZHGHZ",
2: "ZHGFB", 2: "ZHGFB",
3: "ZHGZD",
} }
GameType_value = map[string]int32{ GameType_value = map[string]int32{
"ZHG": 0, "ZHG": 0,
"ZHGHZ": 1, "ZHGHZ": 1,
"ZHGFB": 2, "ZHGFB": 2,
"ZHGZD": 3,
} }
) )
@ -253,12 +256,13 @@ var file_room_room_proto_rawDesc = []byte{
0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x64, 0x12, 0x2d,
0x0a, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x0a, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x54, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x54,
0x79, 0x70, 0x65, 0x52, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2a, 0x29, 0x0a, 0x79, 0x70, 0x65, 0x52, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2a, 0x34, 0x0a,
0x08, 0x47, 0x61, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x5a, 0x48, 0x47, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x5a, 0x48, 0x47,
0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x5a, 0x48, 0x47, 0x48, 0x5a, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x5a, 0x48, 0x47, 0x48, 0x5a, 0x10, 0x01, 0x12, 0x09, 0x0a,
0x05, 0x5a, 0x48, 0x47, 0x46, 0x42, 0x10, 0x02, 0x42, 0x19, 0x5a, 0x17, 0x64, 0x63, 0x67, 0x2f, 0x05, 0x5a, 0x48, 0x47, 0x46, 0x42, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x5a, 0x48, 0x47, 0x5a,
0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x62, 0x2f, 0x72, 0x6f, 0x6f, 0x6d, 0x3b, 0x70, 0x62, 0x52, 0x44, 0x10, 0x03, 0x42, 0x19, 0x5a, 0x17, 0x64, 0x63, 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f,
0x6f, 0x6f, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x70, 0x62, 0x2f, 0x72, 0x6f, 0x6f, 0x6d, 0x3b, 0x70, 0x62, 0x52, 0x6f, 0x6f, 0x6d, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (

@ -9,6 +9,7 @@ enum GameType {
ZHG = 0; // ZHG = 0; //
ZHGHZ = 1; // - ZHGHZ = 1; // -
ZHGFB = 2; // - ZHGFB = 2; // -
ZHGZD = 3; // -
} }
message JoinRoomReq { message JoinRoomReq {

@ -3,17 +3,16 @@ module dcg
go 1.18 go 1.18
require ( require (
git.noahlan.cn/northlan/ngs v0.1.2 git.noahlan.cn/northlan/ngs v1.0.2
git.noahlan.cn/northlan/ntools-go/kafka v1.0.1 git.noahlan.cn/northlan/ntools-go/kafka v1.0.1
git.noahlan.cn/northlan/ntools-go/logger v1.0.1 git.noahlan.cn/northlan/ntools-go/logger v1.0.1
git.noahlan.cn/northlan/ntools-go/stringn v1.1.0 git.noahlan.cn/northlan/ntools-go/stringn v1.1.0
git.noahlan.cn/northlan/ntools-go/uuid v1.0.0 git.noahlan.cn/northlan/ntools-go/uuid v1.0.0
github.com/Shopify/sarama v1.32.0 github.com/Shopify/sarama v1.32.0
github.com/golang/protobuf v1.5.2
github.com/gookit/config/v2 v2.1.0 github.com/gookit/config/v2 v2.1.0
github.com/pkg/errors v0.9.1 github.com/pkg/errors v0.9.1
github.com/zeromicro/go-zero v1.3.2 github.com/zeromicro/go-zero v1.3.2
google.golang.org/grpc v1.45.0 google.golang.org/grpc v1.46.2
google.golang.org/protobuf v1.28.0 google.golang.org/protobuf v1.28.0
) )
@ -32,6 +31,7 @@ require (
github.com/go-redis/redis/v8 v8.11.4 // indirect github.com/go-redis/redis/v8 v8.11.4 // indirect
github.com/gogo/protobuf v1.3.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/mock v1.6.0 // indirect github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-cmp v0.5.7 // indirect github.com/google/go-cmp v0.5.7 // indirect
github.com/google/gofuzz v1.2.0 // indirect github.com/google/gofuzz v1.2.0 // indirect
@ -76,14 +76,14 @@ require (
go.uber.org/multierr v1.8.0 // indirect go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.21.0 // indirect go.uber.org/zap v1.21.0 // indirect
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
golang.org/x/net v0.0.0-20220421235706-1d1ef9303861 // indirect golang.org/x/net v0.0.0-20220526153639-5463443f8c37 // indirect
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect
google.golang.org/appengine v1.6.7 // indirect google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4 // indirect google.golang.org/genproto v0.0.0-20220526192754-51939a95c655 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/api v0.20.12 // indirect k8s.io/api v0.20.12 // indirect

@ -33,6 +33,12 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
git.noahlan.cn/northlan/ngs v0.1.2 h1:0+cZIAff14VgGBqkCw5Hur9gVD6HzxTmFIvuoWvFphQ= git.noahlan.cn/northlan/ngs v0.1.2 h1:0+cZIAff14VgGBqkCw5Hur9gVD6HzxTmFIvuoWvFphQ=
git.noahlan.cn/northlan/ngs v0.1.2/go.mod h1:dWoj94sHXJPFE1BbCvF8hOLtMRUe0V6v7RGpGs4+iAs= git.noahlan.cn/northlan/ngs v0.1.2/go.mod h1:dWoj94sHXJPFE1BbCvF8hOLtMRUe0V6v7RGpGs4+iAs=
git.noahlan.cn/northlan/ngs v1.0.0 h1:u2VREPozM/+e4Pqt2+3+g0CVDBuL02UNv2Mq73xkGP0=
git.noahlan.cn/northlan/ngs v1.0.0/go.mod h1:dWoj94sHXJPFE1BbCvF8hOLtMRUe0V6v7RGpGs4+iAs=
git.noahlan.cn/northlan/ngs v1.0.1 h1:Jf0mT7N9pHTt3tgq5IhL7DxvjudJUBaH6iSS5+KB9FI=
git.noahlan.cn/northlan/ngs v1.0.1/go.mod h1:dWoj94sHXJPFE1BbCvF8hOLtMRUe0V6v7RGpGs4+iAs=
git.noahlan.cn/northlan/ngs v1.0.2 h1:ulEnuEQ/RTrsY6xbYJnQtg8Q8conCnF+/bmOFBfle4I=
git.noahlan.cn/northlan/ngs v1.0.2/go.mod h1:dWoj94sHXJPFE1BbCvF8hOLtMRUe0V6v7RGpGs4+iAs=
git.noahlan.cn/northlan/ntools-go/kafka v1.0.1 h1:SDUwYRzksZ3Vcu7PTZxk+TEMF2f3gBiQEboKOhi1yfI= git.noahlan.cn/northlan/ntools-go/kafka v1.0.1 h1:SDUwYRzksZ3Vcu7PTZxk+TEMF2f3gBiQEboKOhi1yfI=
git.noahlan.cn/northlan/ntools-go/kafka v1.0.1/go.mod h1:RxX9JSUIr3Gbk+cvUwE5k+i08AgIK3TA9ayDJCMn2n8= git.noahlan.cn/northlan/ntools-go/kafka v1.0.1/go.mod h1:RxX9JSUIr3Gbk+cvUwE5k+i08AgIK3TA9ayDJCMn2n8=
git.noahlan.cn/northlan/ntools-go/logger v1.0.1 h1:+08dMbsKGECM1B7H8GqwtRzGqOl5yrNNbJYo9tFoMf0= git.noahlan.cn/northlan/ntools-go/logger v1.0.1 h1:+08dMbsKGECM1B7H8GqwtRzGqOl5yrNNbJYo9tFoMf0=
@ -101,6 +107,7 @@ github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnht
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
@ -131,6 +138,7 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
@ -596,8 +604,8 @@ golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220421235706-1d1ef9303861 h1:yssD99+7tqHWO5Gwh81phT+67hg+KttniBr6UnEXOY8= golang.org/x/net v0.0.0-20220526153639-5463443f8c37 h1:lUkvobShwKsOesNfWWlCS5q7fnbG1MEliIzwu886fn8=
golang.org/x/net v0.0.0-20220421235706-1d1ef9303861/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220526153639-5463443f8c37/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@ -661,6 +669,7 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -672,8 +681,9 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
@ -801,8 +811,8 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
google.golang.org/genproto v0.0.0-20220228195345-15d65a4533f7/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220228195345-15d65a4533f7/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4 h1:myaecH64R0bIEDjNORIel4iXubqzaHU1K2z8ajBwWcM= google.golang.org/genproto v0.0.0-20220526192754-51939a95c655 h1:56rmjc5LUAanErbiNrY+s/Nd47wDQEJkpqS7i43M1I0=
google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220526192754-51939a95c655/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
@ -820,8 +830,8 @@ google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k=
google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M= google.golang.org/grpc v1.46.2 h1:u+MLGgVf7vRdjEYZ8wDFhAVNmhkbJ5hmrA1LMWK1CAQ=
google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=

@ -4,6 +4,7 @@ import (
"dcg/config" "dcg/config"
"dcg/game/live_logic" "dcg/game/live_logic"
"dcg/game/logic" "dcg/game/logic"
"dcg/game/manager"
"dcg/game/msg_transfer" "dcg/game/msg_transfer"
"dcg/game/svc" "dcg/game/svc"
"flag" "flag"
@ -24,6 +25,7 @@ func main() {
ctx := svc.NewServiceContext() ctx := svc.NewServiceContext()
manager.Init(ctx)
logic.Init(ctx) logic.Init(ctx)
live_logic.InitLiveManager(ctx) live_logic.InitLiveManager(ctx)

@ -50,7 +50,6 @@ func (p *Parser) SetDistinct(distinct bool) {
} }
// Parse 从弹幕内容解析命令 // Parse 从弹幕内容解析命令
// distinct 是否去重
func (p *Parser) Parse(content string) *CMD { func (p *Parser) Parse(content string) *CMD {
// 移除多余空格,小写 // 移除多余空格,小写
tmpContent := strings.ToLower(strings.TrimSpace(content)) tmpContent := strings.ToLower(strings.TrimSpace(content))

Loading…
Cancel
Save