后台弹窗配置

This commit is contained in:
by 2024-10-15 14:18:16 +08:00
parent 5b7710eaa4
commit 8ee0093ccf
8 changed files with 946 additions and 472 deletions

View File

@ -30,20 +30,21 @@ const (
ETCDKEY_PLAYERPOOL = "/game/plt/playerpool/" // 个人水池调控配置
ETCDKEY_GAME_CONFIG = "/game/plt/gameconfig/" // 游戏管理/全局配置
ETCDKEY_ACT_PHONELOTTERY = "/game/act_phoneLottery"
ETCDKEY_ChannelSwitch = "/game/channel/switch" // 渠道开关
ETCDKEY_ACT_Invite = "/game/act_invite" // 邀请活动配置
ETCDKEY_ACT_Permit = "/game/act_permit" // 赛季通行证配置
ETCDKEY_DIAMOND_LOTTERY = "/game/diamond_lottery" // 钻石抽奖配置
ETCDKEY_Item = "/game/item" // 道具列表
ETCDKEY_SKin = "/game/skin_config" // 皮肤配置
ETCDKEY_RANK_TYPE = "/game/RankType" // 排行榜奖励配置
ETCDKEY_AWARD_CONFIG = "/game/awardlog_config" //获奖记录
ETCDKEY_GUIDE = "/game/guide_config" //新手引导配置
ETCDKEY_MACHINE = "/game/machine_config" //娃娃机配置
ETCDKEY_MatchAudience = "/game/match_audience" //比赛观众
ETCDKEY_Spirit = "/game/spirit" // 小精灵配置
ETCDKEY_RoomType = "/game/room_type" // 房间类型配置
ETCDKEY_RoomConfig = "/game/room_config" // 房间配置
ETCDKEY_RoomConfigSystem = "/game/room_system" // 系统房间配置
ETCDKEY_ClientUpgrade = "/game/client_upgrade" // 客户端升级奖励配置
ETCDKEY_ChannelSwitch = "/game/channel/switch" // 渠道开关
ETCDKEY_ACT_Invite = "/game/act_invite" // 邀请活动配置
ETCDKEY_ACT_Permit = "/game/act_permit" // 赛季通行证配置
ETCDKEY_DIAMOND_LOTTERY = "/game/diamond_lottery" // 钻石抽奖配置
ETCDKEY_Item = "/game/item" // 道具列表
ETCDKEY_SKin = "/game/skin_config" // 皮肤配置
ETCDKEY_RANK_TYPE = "/game/RankType" // 排行榜奖励配置
ETCDKEY_AWARD_CONFIG = "/game/awardlog_config" //获奖记录
ETCDKEY_GUIDE = "/game/guide_config" //新手引导配置
ETCDKEY_MACHINE = "/game/machine_config" //娃娃机配置
ETCDKEY_MatchAudience = "/game/match_audience" //比赛观众
ETCDKEY_Spirit = "/game/spirit" // 小精灵配置
ETCDKEY_RoomType = "/game/room_type" // 房间类型配置
ETCDKEY_RoomConfig = "/game/room_config" // 房间配置
ETCDKEY_RoomConfigSystem = "/game/room_system" // 系统房间配置
ETCDKEY_ClientUpgrade = "/game/client_upgrade" // 客户端升级奖励配置
ETCDKEY_PopUpWindow = "/game/PopUpWindowConfig" //弹窗配置
)

View File

@ -155,6 +155,8 @@ type AllConfig struct {
RoomConfigSystem map[int32]*webapi.RoomConfigSystem
// 客户端升级奖励配置
*webapi.ClientUpgrade
//弹窗配置
*webapi.PopUpWindowConfig
}
type GlobalConfig struct {

File diff suppressed because it is too large Load Diff

View File

@ -236,6 +236,8 @@ enum PlayerPacketID {
PACKET_SCClawdollItemLog = 2845;//
PACKET_CSDollConfig = 2846; //
PACKET_SCDollConfig = 2847; //
PACKET_CSPopUpWindowConfig = 2848; //
PACKET_SCPopUpWindowConfig = 2849; //
}
//
@ -1407,4 +1409,20 @@ message MachineInfo{
int32 ItemNum = 4;//
int32 MachineId = 5;
string Name = 6;
}
//
//PACKET_CSPopUpWindowConfig
message CSPopUpWindowConfig{
}
//
//PACKET_SCPopUpWindowConfig
message SCPopUpWindowConfig{
repeated PopUpWindowInfo Info =1;
}
message PopUpWindowInfo{
int32 Id = 1;
string Name = 2;
string Key = 3;
int32 OpenStatus = 4;//1- 0-
int32 Weight = 5;//
}

View File

@ -9001,6 +9001,141 @@ func (x *ClientUpgrade) GetReward() []*ItemInfo {
return nil
}
//etcd /game/PopUpWindowConfig
type PopUpWindowConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Platform string `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform,omitempty"` // 平台
Info []*PopUpWindowInfo `protobuf:"bytes,2,rep,name=Info,proto3" json:"Info,omitempty"`
}
func (x *PopUpWindowConfig) Reset() {
*x = PopUpWindowConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[94]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PopUpWindowConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PopUpWindowConfig) ProtoMessage() {}
func (x *PopUpWindowConfig) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[94]
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 PopUpWindowConfig.ProtoReflect.Descriptor instead.
func (*PopUpWindowConfig) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{94}
}
func (x *PopUpWindowConfig) GetPlatform() string {
if x != nil {
return x.Platform
}
return ""
}
func (x *PopUpWindowConfig) GetInfo() []*PopUpWindowInfo {
if x != nil {
return x.Info
}
return nil
}
type PopUpWindowInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
Key string `protobuf:"bytes,3,opt,name=Key,proto3" json:"Key,omitempty"`
OpenStatus int32 `protobuf:"varint,4,opt,name=OpenStatus,proto3" json:"OpenStatus,omitempty"` //1-开启 0-关闭
Weight int32 `protobuf:"varint,5,opt,name=Weight,proto3" json:"Weight,omitempty"` //弹窗权重
}
func (x *PopUpWindowInfo) Reset() {
*x = PopUpWindowInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[95]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PopUpWindowInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PopUpWindowInfo) ProtoMessage() {}
func (x *PopUpWindowInfo) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[95]
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 PopUpWindowInfo.ProtoReflect.Descriptor instead.
func (*PopUpWindowInfo) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{95}
}
func (x *PopUpWindowInfo) GetId() int32 {
if x != nil {
return x.Id
}
return 0
}
func (x *PopUpWindowInfo) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *PopUpWindowInfo) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
func (x *PopUpWindowInfo) GetOpenStatus() int32 {
if x != nil {
return x.OpenStatus
}
return 0
}
func (x *PopUpWindowInfo) GetWeight() int32 {
if x != nil {
return x.Weight
}
return 0
}
var File_common_proto protoreflect.FileDescriptor
var file_common_proto_rawDesc = []byte{
@ -10410,10 +10545,24 @@ var file_common_proto_rawDesc = []byte{
0x01, 0x28, 0x05, 0x52, 0x07, 0x4f, 0x6e, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x06,
0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x77,
0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06,
0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e,
0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x22, 0x5c, 0x0a, 0x11, 0x50, 0x6f, 0x70, 0x55, 0x70, 0x57,
0x69, 0x6e, 0x64, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x50,
0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50,
0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x2b, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x18,
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x50,
0x6f, 0x70, 0x55, 0x70, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04,
0x49, 0x6e, 0x66, 0x6f, 0x22, 0x7f, 0x0a, 0x0f, 0x50, 0x6f, 0x70, 0x55, 0x70, 0x57, 0x69, 0x6e,
0x64, 0x6f, 0x77, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4b,
0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x1e, 0x0a,
0x0a, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
0x05, 0x52, 0x0a, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a,
0x06, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x57,
0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67,
0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -10428,7 +10577,7 @@ func file_common_proto_rawDescGZIP() []byte {
return file_common_proto_rawDescData
}
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 104)
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 106)
var file_common_proto_goTypes = []interface{}{
(*MysqlDbSetting)(nil), // 0: webapi.MysqlDbSetting
(*MongoDbSetting)(nil), // 1: webapi.MongoDbSetting
@ -10524,32 +10673,34 @@ var file_common_proto_goTypes = []interface{}{
(*RoomConfig)(nil), // 91: webapi.RoomConfig
(*RoomConfigSystem)(nil), // 92: webapi.RoomConfigSystem
(*ClientUpgrade)(nil), // 93: webapi.ClientUpgrade
nil, // 94: webapi.Platform.BindTelRewardEntry
nil, // 95: webapi.PlayerData.RankScoreEntry
nil, // 96: webapi.ItemShop.AwardEntry
nil, // 97: webapi.VIPcfg.AwardEntry
nil, // 98: webapi.VIPcfg.Privilege1Entry
nil, // 99: webapi.VIPcfg.Privilege7Entry
nil, // 100: webapi.VIPcfg.Privilege9Entry
nil, // 101: webapi.ActInviteConfig.PayScoreEntry
nil, // 102: webapi.SkinLevel.UpItemEntry
nil, // 103: webapi.SkinItem.UnlockParamEntry
(*server.DB_GameFree)(nil), // 104: server.DB_GameFree
(*server.DB_GameItem)(nil), // 105: server.DB_GameItem
(*PopUpWindowConfig)(nil), // 94: webapi.PopUpWindowConfig
(*PopUpWindowInfo)(nil), // 95: webapi.PopUpWindowInfo
nil, // 96: webapi.Platform.BindTelRewardEntry
nil, // 97: webapi.PlayerData.RankScoreEntry
nil, // 98: webapi.ItemShop.AwardEntry
nil, // 99: webapi.VIPcfg.AwardEntry
nil, // 100: webapi.VIPcfg.Privilege1Entry
nil, // 101: webapi.VIPcfg.Privilege7Entry
nil, // 102: webapi.VIPcfg.Privilege9Entry
nil, // 103: webapi.ActInviteConfig.PayScoreEntry
nil, // 104: webapi.SkinLevel.UpItemEntry
nil, // 105: webapi.SkinItem.UnlockParamEntry
(*server.DB_GameFree)(nil), // 106: server.DB_GameFree
(*server.DB_GameItem)(nil), // 107: server.DB_GameItem
}
var file_common_proto_depIdxs = []int32{
2, // 0: webapi.Platform.Leaderboard:type_name -> webapi.RankSwitch
3, // 1: webapi.Platform.ClubConfig:type_name -> webapi.ClubConfig
4, // 2: webapi.Platform.ThirdGameMerchant:type_name -> webapi.ThirdGame
94, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry
96, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry
6, // 4: webapi.GameConfigGlobal.GameStatus:type_name -> webapi.GameStatus
104, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree
106, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree
8, // 6: webapi.PlatformGameConfig.DbGameFrees:type_name -> webapi.GameFree
0, // 7: webapi.PlatformDbConfig.Mysql:type_name -> webapi.MysqlDbSetting
1, // 8: webapi.PlatformDbConfig.MongoDb:type_name -> webapi.MongoDbSetting
1, // 9: webapi.PlatformDbConfig.MongoDbLog:type_name -> webapi.MongoDbSetting
104, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree
95, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry
106, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree
97, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry
32, // 12: webapi.PlayerData.Items:type_name -> webapi.ItemInfo
14, // 13: webapi.PlayerData.RoleUnlockList:type_name -> webapi.ModInfo
14, // 14: webapi.PlayerData.PetUnlockList:type_name -> webapi.ModInfo
@ -10562,7 +10713,7 @@ var file_common_proto_depIdxs = []int32{
32, // 21: webapi.ExchangeShop.Items:type_name -> webapi.ItemInfo
25, // 22: webapi.ExchangeShopList.List:type_name -> webapi.ExchangeShop
29, // 23: webapi.ExchangeShopList.Weight:type_name -> webapi.ShopWeight
96, // 24: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry
98, // 24: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry
30, // 25: webapi.ItemShopList.List:type_name -> webapi.ItemShop
32, // 26: webapi.MatchInfoAward.ItemId:type_name -> webapi.ItemInfo
33, // 27: webapi.GameMatchDate.Award:type_name -> webapi.MatchInfoAward
@ -10583,14 +10734,14 @@ var file_common_proto_depIdxs = []int32{
38, // 42: webapi.WelfareSpree.Item:type_name -> webapi.WelfareDate
48, // 43: webapi.WelfareFirstPayDataList.List:type_name -> webapi.WelfareSpree
48, // 44: webapi.WelfareContinuousPayDataList.List:type_name -> webapi.WelfareSpree
97, // 45: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry
98, // 46: webapi.VIPcfg.Privilege1:type_name -> webapi.VIPcfg.Privilege1Entry
99, // 47: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry
100, // 48: webapi.VIPcfg.Privilege9:type_name -> webapi.VIPcfg.Privilege9Entry
99, // 45: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry
100, // 46: webapi.VIPcfg.Privilege1:type_name -> webapi.VIPcfg.Privilege1Entry
101, // 47: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry
102, // 48: webapi.VIPcfg.Privilege9:type_name -> webapi.VIPcfg.Privilege9Entry
51, // 49: webapi.VIPcfgDataList.List:type_name -> webapi.VIPcfg
38, // 50: webapi.ChessRankConfig.Item:type_name -> webapi.WelfareDate
55, // 51: webapi.ChessRankcfgData.Datas:type_name -> webapi.ChessRankConfig
101, // 52: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry
103, // 52: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry
62, // 53: webapi.ActInviteConfig.Awards1:type_name -> webapi.RankAward
62, // 54: webapi.ActInviteConfig.Awards2:type_name -> webapi.RankAward
62, // 55: webapi.ActInviteConfig.Awards3:type_name -> webapi.RankAward
@ -10607,12 +10758,12 @@ var file_common_proto_depIdxs = []int32{
69, // 66: webapi.DiamondLotteryData.Info:type_name -> webapi.DiamondLotteryInfo
70, // 67: webapi.DiamondLotteryData.Players:type_name -> webapi.DiamondLotteryPlayers
72, // 68: webapi.DiamondLotteryConfig.LotteryData:type_name -> webapi.DiamondLotteryData
105, // 69: webapi.ItemConfig.Items:type_name -> server.DB_GameItem
107, // 69: webapi.ItemConfig.Items:type_name -> server.DB_GameItem
32, // 70: webapi.RankAwardInfo.Item:type_name -> webapi.ItemInfo
75, // 71: webapi.RankTypeInfo.Award:type_name -> webapi.RankAwardInfo
76, // 72: webapi.RankTypeConfig.Info:type_name -> webapi.RankTypeInfo
102, // 73: webapi.SkinLevel.UpItem:type_name -> webapi.SkinLevel.UpItemEntry
103, // 74: webapi.SkinItem.UnlockParam:type_name -> webapi.SkinItem.UnlockParamEntry
104, // 73: webapi.SkinLevel.UpItem:type_name -> webapi.SkinLevel.UpItemEntry
105, // 74: webapi.SkinItem.UnlockParam:type_name -> webapi.SkinItem.UnlockParamEntry
78, // 75: webapi.SkinItem.Levels:type_name -> webapi.SkinLevel
79, // 76: webapi.SkinConfig.Items:type_name -> webapi.SkinItem
82, // 77: webapi.AwardLogConfig.AwardLog:type_name -> webapi.AwardLogData
@ -10622,11 +10773,12 @@ var file_common_proto_depIdxs = []int32{
32, // 81: webapi.RoomConfig.Cost:type_name -> webapi.ItemInfo
32, // 82: webapi.RoomConfig.Reward:type_name -> webapi.ItemInfo
32, // 83: webapi.ClientUpgrade.Reward:type_name -> webapi.ItemInfo
84, // [84:84] is the sub-list for method output_type
84, // [84:84] is the sub-list for method input_type
84, // [84:84] is the sub-list for extension type_name
84, // [84:84] is the sub-list for extension extendee
0, // [0:84] is the sub-list for field type_name
95, // 84: webapi.PopUpWindowConfig.Info:type_name -> webapi.PopUpWindowInfo
85, // [85:85] is the sub-list for method output_type
85, // [85:85] is the sub-list for method input_type
85, // [85:85] is the sub-list for extension type_name
85, // [85:85] is the sub-list for extension extendee
0, // [0:85] is the sub-list for field type_name
}
func init() { file_common_proto_init() }
@ -11763,6 +11915,30 @@ func file_common_proto_init() {
return nil
}
}
file_common_proto_msgTypes[94].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PopUpWindowConfig); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_common_proto_msgTypes[95].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PopUpWindowInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@ -11770,7 +11946,7 @@ func file_common_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_common_proto_rawDesc,
NumEnums: 0,
NumMessages: 104,
NumMessages: 106,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -988,4 +988,17 @@ message ClientUpgrade{
int32 On = 2; // 1 2
int32 OnForce = 3; // 1 2
repeated ItemInfo Reward = 4; //
}
//etcd /game/PopUpWindowConfig
message PopUpWindowConfig{
string Platform = 1; //
repeated PopUpWindowInfo Info =2;
}
message PopUpWindowInfo{
int32 Id = 1;
string Name = 2;
string Key = 3;
int32 OpenStatus = 4;//1- 2-
int32 Weight = 5;//
}

View File

@ -3273,6 +3273,32 @@ func CSCLAWDOLLConfig(s *netlib.Session, packetId int, data interface{}, sid int
}
return nil
}
// 客户端请求弹窗配置
func CSPopUpWindowConfig(s *netlib.Session, packetId int, data interface{}, sid int64) error {
p := PlayerMgrSington.GetPlayer(sid)
if p == nil {
return nil
}
config := PlatformMgrSingleton.GetConfig(p.Platform).PopUpWindowConfig
if config == nil {
return nil
}
pack := &player_proto.SCPopUpWindowConfig{}
for _, value := range config.Info {
info := &player_proto.PopUpWindowInfo{
Id: value.Id,
Name: value.Name,
Key: value.Key,
OpenStatus: value.OpenStatus,
Weight: value.Weight,
}
pack.Info = append(pack.Info, info)
}
p.SendToClient(int(player_proto.PlayerPacketID_PACKET_SCPopUpWindowConfig), pack)
return nil
}
func init() {
// 用户信息
common.Register(int(player_proto.PlayerPacketID_PACKET_CS_PLAYERDATA), player_proto.CSPlayerData{}, CSPlayerData)
@ -3310,4 +3336,6 @@ func init() {
common.Register(int(player_proto.PlayerPacketID_PACKET_CSClawdollItemLog), player_proto.CSClawdollItemLog{}, CSClawdollItemLog)
//客户端请求配置信息
common.Register(int(player_proto.PlayerPacketID_PACKET_CSDollConfig), player_proto.CSCLAWDOLLConfig{}, CSCLAWDOLLConfig)
//客户端请求弹窗配置信息
common.Register(int(player_proto.PlayerPacketID_PACKET_CSPopUpWindowConfig), player_proto.CSPopUpWindowConfig{}, CSPopUpWindowConfig)
}

View File

@ -102,6 +102,8 @@ func init() {
etcd.Register(etcd.ETCDKEY_MACHINE, webapi.MachineConfig{}, platformConfigEvent)
//客户端升级奖励配置
etcd.Register(etcd.ETCDKEY_ClientUpgrade, webapi.ClientUpgrade{}, platformConfigEvent)
//弹窗活动配置
etcd.Register(etcd.ETCDKEY_PopUpWindow, webapi.PopUpWindowConfig{}, platformConfigEvent)
}
func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
@ -338,6 +340,8 @@ func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, e
}
case *webapi.ClientUpgrade:
PlatformMgrSingleton.GetConfig(config.Platform).ClientUpgrade = config
case *webapi.PopUpWindowConfig:
PlatformMgrSingleton.GetConfig(config.Platform).PopUpWindowConfig = config
default:
logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey)
}