//============================================ //--4>: // Exported by ExcelConfigExport // // 此代码为工具根据配置自动生成, 请不要修改 // //============================================ using System; using Sog; using System.Collections.Generic; using Newtonsoft.Json.Linq; using System.IO; using System.Linq; public partial class CommParamDescMgr : IConfigManager { //Singleton private static CommParamDescMgr _instance; private static readonly object syslock = new object(); public static CommParamDescMgr Instance { get { if (_instance == null) { lock (syslock) { if (_instance == null) { _instance = new CommParamDescMgr(); }}} return _instance; }} public class ItemData { public CommParamDesc Item; public int Line; public bool ReadAlready; } protected Dictionary m_ItemTable = new (); protected Dictionary n_ItemTable = new (); //for server only, m_readKeyOnly must be false protected SortedList m_ItemDescTable = new (); public SortedList ItemTable { get { if (m_ItemDescTable.Count == 0) { foreach (var item in m_ItemTable) { m_ItemDescTable.Add(item.Key, item.Value.Item); }} return m_ItemDescTable; } } private TabBinFile m_tbf; //private TabTextFile m_tf; private int m_curAsynKey1; public override bool InitBin(string fileName, byte[] fileContent) { m_ErrorCount = 0; m_ItemTable.Clear(); n_ItemTable.Clear(); m_ItemDescTable.Clear(); m_allRead = false; m_curAsynKey1 = 0; m_tbf = new TabBinFile(fileName, fileContent); while (m_tbf.Next()) { ItemData itemData = new ItemData() { Item = new CommParamDesc() }; var item = itemData.Item; if (m_readKeyOnly) {m_tbf.SetCurrentCol(0); } if (item.ReadItemBin(m_tbf, m_readKeyOnly) == false) { TraceLog.Error("Failed to InitBin TabManager:{0}, read line error, line: {1}", this.ToString(), m_tbf.CurrentLine); m_ErrorCount++; continue; } if (m_ItemTable.ContainsKey(item.GetKey1())) { TraceLog.Error("Failed to InitBin TabManager:{0}, multi key:{1}, line: {2}", this.ToString(), item.GetKey1(), m_tbf.CurrentLine); m_ErrorCount++; continue; } m_ItemTable.Add(item.GetKey1(), itemData); n_ItemTable.Add(item.InternalId, item); if (m_readKeyOnly) { itemData.Line = m_tbf.CurrentLine; } else { itemData.ReadAlready = true; } } if (!m_readKeyOnly) { m_tbf = null; } return true; } public CommParamDesc GetConfig(string key) { ItemData itemData; if (m_ItemTable.TryGetValue(key, out itemData) == false) { return null; } if(itemData.ReadAlready) { return itemData.Item; } if (m_tbf == null) { TraceLog.Error("Cfg1KeyMgrTemplate.GetConfig Failed fs null TabManager:{ 0}, read line error,", this.ToString()); return null; } m_tbf.SetCurrentLine(itemData.Line); m_tbf.SetCurrentCol(0); itemData.ReadAlready = true; if (itemData.Item.ReadItemBin(m_tbf, false) == false) { TraceLog.Error("Cfg1KeyMgrTemplate.GetConfig Failed to init TabManager:{0}, read line error, line: {1}", this.ToString(), m_tbf.CurrentLine); return null; } return itemData.Item; } public CommParamDesc GetConfigByInternal(int internalId) { var desc = n_ItemTable.GetValueOrDefault(internalId, null); if (desc == null) { TraceLog.Error("Cfg1KeyMgrTemplate.Get by InternalId Failed fs null TabManager:{0}, internalId={1},read line error,", this.ToString(), internalId); } return desc; } /// /// 跨天时间(24小时制) /// public CommParamDesc CrossDaysTime => GetConfig("CrossDaysTime"); /// /// 玩家迷雾解锁范围(半径)(米) /// public CommParamDesc MiniMapMistSize => GetConfig("MiniMapMistSize"); /// /// 战斗胜利回城倒计时(秒) /// public CommParamDesc BackCityTime => GetConfig("BackCityTime"); /// /// 玩家体力上限 /// public CommParamDesc PwrMax => GetConfig("PwrMax"); /// /// 每1点体力恢复时间(秒) /// public CommParamDesc PwrRecoverTime => GetConfig("PwrRecoverTime"); /// /// 巅峰起始等级 /// public CommParamDesc PeakLvStart => GetConfig("PeakLvStart"); /// /// 每个巅峰等级提供天赋点数 /// public CommParamDesc PeakLvPointNum => GetConfig("PeakLvPointNum"); /// /// 装备背包容量 /// public CommParamDesc EquipGridNum => GetConfig("EquipGridNum"); /// /// 道具背包容量 /// public CommParamDesc ItemGridNum => GetConfig("ItemGridNum"); /// /// 分解获得道具id(对应装备品质1、2、3、4、5、6) /// public CommParamDesc BreakItemId => GetConfig("BreakItemId"); /// /// 分解获得道具数量(对应装备品质1、2、3、4、5、6) /// public CommParamDesc BreakItemNum => GetConfig("BreakItemNum"); /// /// 仓库个数 /// public CommParamDesc WareRoomNum => GetConfig("WareRoomNum"); /// /// 仓库栏位数 /// public CommParamDesc WareRoomGridNum => GetConfig("WareRoomGridNum"); /// /// 仓库解锁消耗道具数量(0为默认解锁) /// public CommParamDesc WareRoomCostNum => GetConfig("WareRoomCostNum"); /// /// 仓库解锁消耗道具id /// public CommParamDesc WareRoomCostId => GetConfig("WareRoomCostId"); /// /// 改名卡消耗钻石数量 /// public CommParamDesc RenameCost => GetConfig("RenameCost"); /// /// 关卡内同时存在N波怪物时,触发狂暴(配skillId,参数在技能里) /// public CommParamDesc MonAngryGA => GetConfig("MonAngryGA"); /// /// 入口存在时间(秒) /// public CommParamDesc RwdChapterTime => GetConfig("RwdChapterTime"); /// /// 新角色进入游戏时,默认穿戴的1号位,2号位武器id /// public CommParamDesc DefaultWeapon => GetConfig("DefaultWeapon"); /// /// 首次速通奖励允许前后端时间误差(单位:秒) /// public CommParamDesc SpdRwdTimeErr => GetConfig("SpdRwdTimeErr"); /// /// 掉落列表条目数量 /// public CommParamDesc DropListNum => GetConfig("DropListNum"); /// /// 战斗中换上新的枪时,拥有的子弹数量百分比X%(计算结果小数向上取整) /// public CommParamDesc NewGunBullet => GetConfig("NewGunBullet"); /// /// 装备分解和兑换高品质,弹出确认弹窗 /// public CommParamDesc AdvancedQuality => GetConfig("AdvancedQuality"); /// /// 角色默认技能组 /// public CommParamDesc RoleDefaultSki => GetConfig("RoleDefaultSki"); /// /// 玩家默认解锁的皮肤id(默认穿戴第1个) /// public CommParamDesc DefaultSkin => GetConfig("DefaultSkin"); /// /// 每日免费刷新次数 /// public CommParamDesc ShopReFreeTime => GetConfig("ShopReFreeTime"); /// /// 刷新消耗装备碎片id和数量 /// public CommParamDesc ShopReCostFrag => GetConfig("ShopReCostFrag"); /// /// 刷新消耗钻石id和数量 /// public CommParamDesc ShopReCostDiam => GetConfig("ShopReCostDiam"); /// /// 主线首个章节id /// public CommParamDesc MainLandFirstId => GetConfig("MainLandFirstId"); /// /// 首次速通奖励刷在玩家半径X米范围的随机位置 /// public CommParamDesc SpdRwdArea => GetConfig("SpdRwdArea"); /// /// 速通奖励宝箱开盖时间点,消失时间点(从宝箱出现开始X毫秒) /// public CommParamDesc SpdRwdShow => GetConfig("SpdRwdShow"); /// /// 速通奖励宝箱预制体资源 /// public CommParamDesc SpdRwdShowPath => GetConfig("SpdRwdShowPath"); /// /// 掉落物品质特效(对应品质0-6,0对应空) /// public CommParamDesc DropQualSFX => GetConfig("DropQualSFX"); /// /// 掉落物品质拖尾特效(对应品质0-6,0对应空) /// public CommParamDesc DropQualSFXTail => GetConfig("DropQualSFXTail"); /// /// 钻石买体力获得数量 /// public CommParamDesc BuyPowerGet => GetConfig("BuyPowerGet"); /// /// 钻石买体力消耗道具、id、数量(数量随购买次数递增,每日重置) /// public CommParamDesc BuyPowerCost => GetConfig("BuyPowerCost"); /// /// 钻石买体力限购次数 /// public CommParamDesc BuyPowerTimes => GetConfig("BuyPowerTimes"); /// /// 所有战斗实体默认挂载的GA /// public CommParamDesc DefaultGA => GetConfig("DefaultGA"); /// /// /// public CommParamDesc LevelPenaltyGA => GetConfig("LevelPenaltyGA"); /// /// 速通奖励满足条件时,延迟X毫秒后进入下一波 /// public CommParamDesc SpdRwdShowDelay => GetConfig("SpdRwdShowDelay"); /// /// 邮件数量上限 /// public CommParamDesc MailCountMax => GetConfig("MailCountMax"); /// /// 每日扫荡次数 /// public CommParamDesc SweepTimes => GetConfig("SweepTimes"); /// /// 月卡界面每日道具奖励 /// public CommParamDesc MonthlyDayAward => GetConfig("MonthlyDayAward"); /// /// 子弹格子图标 /// public CommParamDesc BulletNumPic => GetConfig("BulletNumPic"); /// /// 子弹格子数=实际战斗子弹量/参数N(小数部分算1个格子)【AR、LMG、SG、SR、RPG、SMG、CURE】 /// public CommParamDesc BulletShowNum => GetConfig("BulletShowNum"); /// /// /// public CommParamDesc CombatK1SMG => GetConfig("Combat_K1_SMG"); /// /// /// public CommParamDesc CombatK1AR => GetConfig("Combat_K1_AR"); /// /// /// public CommParamDesc CombatK1LMG => GetConfig("Combat_K1_LMG"); /// /// /// public CommParamDesc CombatK1SG => GetConfig("Combat_K1_SG"); /// /// /// public CommParamDesc CombatK1SR => GetConfig("Combat_K1_SR"); /// /// /// public CommParamDesc CombatK1RPG => GetConfig("Combat_K1_RPG"); /// /// /// public CommParamDesc CombatK2 => GetConfig("Combat_K2"); /// /// /// public CommParamDesc CombatK3 => GetConfig("Combat_K3"); /// /// /// public CommParamDesc CombatK4 => GetConfig("Combat_K4"); /// /// /// public CommParamDesc CombatK5 => GetConfig("Combat_K5"); /// /// /// public CommParamDesc CombatK6 => GetConfig("Combat_K6"); /// /// /// public CommParamDesc CombatK7 => GetConfig("Combat_K7"); /// /// /// public CommParamDesc CombatK8 => GetConfig("Combat_K8"); /// /// /// public CommParamDesc CombatK9 => GetConfig("Combat_K9"); /// /// /// public CommParamDesc CombatB1 => GetConfig("Combat_B1"); /// /// /// public CommParamDesc CombatB2 => GetConfig("Combat_B2"); /// /// /// public CommParamDesc CombatB3 => GetConfig("Combat_B3"); /// /// 补签参数(消耗道具类型、id、数量,“数量随补签次数增加,0为免费”) /// public CommParamDesc LoopSign1001 => GetConfig("LoopSign1001"); /// /// 举报按钮的点击冷却时间(毫秒) /// public CommParamDesc BtnUiCd01 => GetConfig("BtnUiCd01"); /// /// 每个部位宝石槽位数量 /// public CommParamDesc GemPositionNum => GetConfig("GemPositionNum"); /// /// 广告代币购买开关,开启后使用代币支付(0:关,1:开) /// public CommParamDesc AdTokenSwitch => GetConfig("AdTokenSwitch"); /// /// 宝石定向合成消耗(道具数量,道具Id) /// public CommParamDesc GemMixCost => GetConfig("GemMixCost"); /// /// 宝石可进行自动合成的品质范围 /// public CommParamDesc GemAMixQuality => GetConfig("GemAMixQuality"); /// /// 宝石可进行定向合成的品质范围 /// public CommParamDesc GemCMixQuality => GetConfig("GemCMixQuality"); /// /// 奖励表id /// public CommParamDesc RwdChapterRwd => GetConfig("RwdChapterRwd"); /// /// 玩家解锁功能后,前N天(跨天)每日首次登录和首次战败弹出拍脸 /// public CommParamDesc FirstBuyPopUp => GetConfig("FirstBuyPopUp"); /// /// 宝石自动合成消耗(道具数量,道具Id) /// public CommParamDesc GemCMixCost => GetConfig("GemCMixCost"); /// /// 主界面生成机器人数量 /// public CommParamDesc RobotMainNum => GetConfig("RobotMainNum"); /// /// 机器人生成时间间隔(秒) /// public CommParamDesc RobotRebornTime => GetConfig("RobotRebornTime"); /// /// 机器人存在时间(秒)(范围随机) /// public CommParamDesc RobotBeingTime => GetConfig("RobotBeingTime"); /// /// 机器人待机时间(秒)(范围随机) /// public CommParamDesc RobotStandbyTime => GetConfig("RobotStandbyTime"); /// /// 主界面机器人等级范围(下限;上限) /// public CommParamDesc RobotMainLevel => GetConfig("RobotMainLevel"); /// /// 主界面机器人活动范围(半径,中心点) /// public CommParamDesc RobotMainArea => GetConfig("RobotMainArea"); /// /// 主界面机器人武器 /// public CommParamDesc RobotMainWeapon => GetConfig("RobotMainWeapon"); /// /// 主界面广告入口存在N秒 /// public CommParamDesc MainAdShowTime => GetConfig("MainAdShowTime"); /// /// 引导关怪物列表 /// public CommParamDesc GuideMonId => GetConfig("GuideMonId"); /// /// 引导关怪物坐标(x1;y1;x2;y2...) /// public CommParamDesc GuideMonPos => GetConfig("GuideMonPos"); /// /// 引导关装备id(RewardId,服务器用;类型/id/数量,客户端用) /// public CommParamDesc GuideGunId => GetConfig("GuideGunId"); /// /// 引导关装备坐标(x1;y1) /// public CommParamDesc GuideGunPos => GetConfig("GuideGunPos"); /// /// 引导关关卡Id(ChapterBattle表) /// public CommParamDesc GuideChapterId => GetConfig("GuideChapterId"); /// /// 引导关玩家出生点坐标(x1;y1) /// public CommParamDesc GuidePlayerPos => GetConfig("GuidePlayerPos"); /// /// 引导关结束,对应的最终引导id和经过的组id(前客户端用,后服务器用)(需完成该引导) /// public CommParamDesc GuideChapterEnd => GetConfig("GuideChapterEnd"); /// /// 主线入口引导动效(解锁关卡进度,结束关卡进度) /// public CommParamDesc ChapterGuideVFX => GetConfig("ChapterGuideVFX"); /// /// 引导关x坐标大于N时触发战斗 /// public CommParamDesc GuideBattlePos => GetConfig("GuideBattlePos"); /// /// 通过X关之前常显示红点 /// public CommParamDesc ShopReRedPoint => GetConfig("ShopReRedPoint"); /// /// 引导关,目标地点光标触发半径和坐标(x1;y1;x2;y2...) /// public CommParamDesc GuideCursorPos => GetConfig("GuideCursorPos"); /// /// 问卷奖励(客户端用)(type1,id1,value1,type2...) /// public CommParamDesc QuestRwdShow6001 => GetConfig("QuestRwdShow6001"); /// /// 跳转问卷星小程序id /// public CommParamDesc QuestJumpAPPID => GetConfig("QuestJumpAPPID"); /// /// 有大于等于X点未分配常显示红点 /// public CommParamDesc TalentRedPoint => GetConfig("TalentRedPoint"); /// /// 有大于X点未分配常显示红点 /// public CommParamDesc LevelUpRedPoint => GetConfig("LevelUpRedPoint"); /// /// 主线副本,每场战斗可看广告复活次数 /// public CommParamDesc AdreviveCount => GetConfig("AdreviveCount"); /// /// /// public CommParamDesc PickUpGoldSe => GetConfig("PickUpGoldSe"); /// /// /// public CommParamDesc PickUpDiaSe => GetConfig("PickUpDiaSe"); /// /// /// public CommParamDesc PickUpEquipSe => GetConfig("PickUpEquipSe"); /// /// /// public CommParamDesc PickUpHPSe => GetConfig("PickUpHPSe"); /// /// /// public CommParamDesc PickUpTokenSe => GetConfig("PickUpTokenSe"); /// /// 新角色进入游戏时,默认拥有抽卡券(道具类型,id,数量) /// public CommParamDesc BagDefaultItem => GetConfig("BagDefaultItem"); /// /// 首充礼包显示的礼包id /// public CommParamDesc FirstPackShow => GetConfig("FirstPackShow"); /// /// Reward中的权重公式;最终权重=权重+幸运值/(幸运值+A)*B(万分比) /// public CommParamDesc LuckRwdInc => GetConfig("LuckRwdInc"); /// /// EquipAttr中的权重公式;最终权重=权重+幸运值*A(万分比) /// public CommParamDesc LuckAttrInc => GetConfig("LuckAttrInc"); /// /// 提审-不触发的解锁弹窗引导,此处配置功能id /// public CommParamDesc AuditGuidance => GetConfig("AuditGuidance"); /// /// 显示的装备等级上限 /// public CommParamDesc ShopReLevelMax => GetConfig("ShopReLevelMax"); /// /// 基础翅膀起始等级id、品阶id、星级id /// public CommParamDesc WingsDefaultInit => GetConfig("WingsDefaultInit"); /// /// 副本列表展示的道具奖励(id) /// public CommParamDesc ContBttlShowRwd => GetConfig("ContBttlShowRwd"); /// /// 消耗门票(道具id、数量) /// public CommParamDesc ContBttlCost => GetConfig("ContBttlCost"); /// /// 门票跨天自动恢复数量 /// public CommParamDesc ContBttlRecover => GetConfig("ContBttlRecover"); /// /// 门票自动恢复上限(拥有的数量≥N则不再恢复) /// public CommParamDesc ContBttlReLimit => GetConfig("ContBttlReLimit"); /// /// 宝箱品质对应击杀敌人数量,大于该数量显示对应品质(白、蓝、紫、金、彩) /// public CommParamDesc ContBttlQuality => GetConfig("ContBttlQuality"); /// /// 玩法对应关卡id /// public CommParamDesc ContBttlId => GetConfig("ContBttlId"); /// /// 本层战斗结束时,延迟N秒进入下一层(万分比) /// public CommParamDesc ContBttlDelay => GetConfig("ContBttlDelay"); /// /// 宝箱品质对应的图标(白、蓝、紫、金、彩) /// public CommParamDesc ContBttlQBox => GetConfig("ContBttlQBox"); /// /// 玩家死亡时,显示在场景中的奖励数量上限 /// public CommParamDesc ContBttlDropMax => GetConfig("ContBttlDropMax"); /// /// 每日连购,购买礼包X会获得礼包N1,N2,N3……,并扣除购买次数 /// public CommParamDesc DailyPackBuyAll => GetConfig("DailyPackBuyAll"); /// /// 入侵者击杀玩家时放的表现技能 /// public CommParamDesc ContBttlIntrudSk => GetConfig("ContBttlIntrudSk"); /// /// 每页天赋点数上限 /// public CommParamDesc TalentPoint => GetConfig("TalentPoint"); /// /// 预设数量 /// public CommParamDesc SchemeNum => GetConfig("SchemeNum"); /// /// 预设解锁消耗道具数量(0为默认解锁) /// public CommParamDesc SchemeCostNum => GetConfig("SchemeCostNum"); /// /// 预设解锁消耗道具id /// public CommParamDesc SchemeCostId => GetConfig("SchemeCostId"); /// /// 提审-资源条不显示跳转按钮,填道具id /// public CommParamDesc AuditItem => GetConfig("AuditItem"); /// /// 预设&战斗展示的天赋ID,栏位1 /// public CommParamDesc SchemeTalent1 => GetConfig("SchemeTalent1"); /// /// 预设&战斗展示的天赋ID,栏位2 /// public CommParamDesc SchemeTalent2 => GetConfig("SchemeTalent2"); /// /// 预设&战斗展示的天赋ID,栏位3 /// public CommParamDesc SchemeTalent3 => GetConfig("SchemeTalent3"); /// /// /// public CommParamDesc WaitPickParam => GetConfig("WaitPickParam"); /// /// 终身限购界面每日道具奖励 /// public CommParamDesc ForeverPackAward => GetConfig("ForeverPackAward"); /// /// /// public CommParamDesc CombatK1 => GetConfig("Combat_K1"); /// /// /// public CommParamDesc CombatK10 => GetConfig("Combat_K10"); /// /// /// public CommParamDesc CombatK11 => GetConfig("Combat_K11"); /// /// /// public CommParamDesc CombatB4 => GetConfig("Combat_B4"); /// /// /// public CommParamDesc CombatB5 => GetConfig("Combat_B5"); /// /// 主界面机器人等级范围边界(下限;上限) /// public CommParamDesc RobotMainLvLimit => GetConfig("RobotMainLvLimit"); /// /// 被入侵者击败后保留的奖励类型 /// public CommParamDesc KeepRewardType => GetConfig("KeepRewardType"); /// /// 被入侵者击败后保留的奖励ID /// public CommParamDesc KeepRewardId => GetConfig("KeepRewardId"); /// /// 被入侵者击败后保留的奖励数量比例 /// public CommParamDesc KeepRewardRatio => GetConfig("KeepRewardRatio"); /// /// 那些天赋在计算天赋权重的时候进行计算 /// public CommParamDesc TalentInclude => GetConfig("TalentInclude"); /// /// 每份补给发放道具 /// public CommParamDesc PowerSupply => GetConfig("PowerSupply"); /// /// 每份补给含体力数量 /// public CommParamDesc PowerSupplyAmount => GetConfig("PowerSupplyAmount"); /// /// 补给发放时间(24小时制) /// public CommParamDesc PowerSupplyTime => GetConfig("PowerSupplyTime"); /// /// 补给存储上限 /// public CommParamDesc PowerSupplyLimit => GetConfig("PowerSupplyLimit"); /// /// 补给存储期限(天) /// public CommParamDesc PowerSupplyTimeLimit => GetConfig("PowerSupplyTimeLimit"); /// /// 活跃任务每日免费刷新次数 /// public CommParamDesc CactivityQuestReFreeTime => GetConfig("CactivityQuestReFreeTime"); /// /// 活跃任务刷新消耗道具和数量 /// public CommParamDesc CactivityQuestReCost => GetConfig("CactivityQuestReCost"); } public partial class CommParamDesc { public static readonly string _KEY_InternalId = "InternalId"; public static readonly string _KEY_id = "id"; public static readonly string _KEY_int_val = "int_val"; public static readonly string _KEY_str_val = "str_val"; public static readonly string _KEY_int_list = "int_list"; public static readonly string _KEY_str_list = "str_list"; /// /// 内部ID /// public int InternalId { get; set; } /// /// ID /// public string id { get; set; } /// /// 整数数值 /// public int int_val { get; set; } /// /// 字符串数值 /// public string str_val { get; set; } /// /// 整数数组 /// public int[] int_list { get; set; } /// /// 字符串数组 /// public string[] str_list { get; set; } public Dictionary listDic = new Dictionary(); public CommParamDesc() { } public string GetKey1() { return id; } public bool ReadItemBin(TabBinFile txf, bool readKeyOnly) { InternalId = txf.GetintByIndex(_KEY_InternalId); id = txf.GetstringByIndex(_KEY_id); if(readKeyOnly) { return true; } int_val = txf.GetintByIndex(_KEY_int_val); str_val = txf.GetstringByIndex(_KEY_str_val); int_list = txf.GetintArrayByIndex(_KEY_int_list); str_list = txf.GetstringArrayByIndex(_KEY_str_list); return true; } }