From 09202f60d3617126b2dda90b5303a01ee1dfd7dd Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Wed, 11 Sep 2024 18:27:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E9=81=93=E5=85=B7=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gamesrv/base/etcd.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gamesrv/base/etcd.go b/gamesrv/base/etcd.go index 5452a21..44233f8 100644 --- a/gamesrv/base/etcd.go +++ b/gamesrv/base/etcd.go @@ -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) }