using System; using System.Collections.Generic; using LitJson; public class SuperVipManager : GameSystemManager { /// 渠道门槛配置 {渠道名: 累充金额/元} public Dictionary channelThresholdDict = new Dictionary(); /// 客服领取奖励列表 [[物品ID, 个数], ...] public int[][] customerServiceRewards; public override void Init() { var config = FuncConfigConfig.Get("SuperVIP"); channelThresholdDict = JsonMapper.ToObject>(config.Numerical1); customerServiceRewards = JsonMapper.ToObject(config.Numerical2); } public override void Release() { } /// /// 判定SuperVIP入口是否开启 /// 条件: 当前渠道在配置表中 且 历史累充 >= 配置门槛(元) * 100 /// public bool IsEntryOpen() { var appId = VersionConfig.Get().appId; if (!channelThresholdDict.TryGetValue(appId, out var thresholdYuan)) return false; return RechargeManager.Instance.realRecharge >= thresholdYuan * 100; } }