同步道具列表

This commit is contained in:
sk 2024-09-11 18:27:40 +08:00
parent 6eedc84050
commit 09202f60d3
1 changed files with 6 additions and 0 deletions

View File

@ -9,6 +9,7 @@ import (
"mongo.games.com/game/etcd"
"mongo.games.com/game/model"
"mongo.games.com/game/protocol/webapi"
"mongo.games.com/game/srvdata"
)
var ConfigMgrInst = model.NewConfigMgr()
@ -18,6 +19,8 @@ func init() {
etcd.Register(etcd.ETCDKEY_PLAYERPOOL, webapi.PlayerPool{}, platformConfigEtcd)
// 游戏配置
etcd.Register(etcd.ETCDKEY_GAME_CONFIG, webapi.GameConfig{}, platformConfigEtcd)
// 道具列表
etcd.Register(etcd.ETCDKEY_Item, webapi.ItemConfig{}, platformConfigEtcd)
// 集卡活动
etcd.Register(etcd.ETCDKEY_ACT_Collect, webapi.WelfareCollectConfig{}, platformConfigEtcd)
// 渠道开关
@ -45,6 +48,9 @@ func platformConfigEtcd(ctx context.Context, completeKey string, isInit bool, ev
ConfigMgrInst.GetConfig(d.Platform).SkinConfig = d
case *webapi.MachineConfig:
ConfigMgrInst.GetConfig(d.Platform).MachineConfig = d
case *webapi.ItemConfig:
ConfigMgrInst.GetConfig(d.Platform).ItemConfig = d
srvdata.GameItemMgr.SetConfig(d)
default:
logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey)
}